Skip to content

Commit 2ff30ee

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Don't create UnboxedConstantInstr(kUnboxedInt64) for RISCV32.
TEST=dartfuzz Bug: #54425 Bug: #54434 Change-Id: I05975376cd61ffeceda60edf76df182fbf753593 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345348 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
1 parent e9f51b8 commit 2ff30ee

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

runtime/vm/compiler/aot/aot_call_specializer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ Definition* AotCallSpecializer::TryOptimizeDivisionOperation(
402402
Value* right_value) {
403403
auto unboxed_constant = [&](int64_t value) -> Definition* {
404404
ASSERT(compiler::target::IsSmi(value));
405-
#if defined(TARGET_ARCH_ARM)
405+
#if defined(TARGET_ARCH_IS_32_BIT)
406406
Definition* const const_def = new (Z) UnboxedConstantInstr(
407407
Smi::ZoneHandle(Z, Smi::New(value)), kUnboxedInt32);
408408
InsertBefore(instr, const_def, /*env=*/nullptr, FlowGraph::kValue);

runtime/vm/compiler/backend/il_riscv.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ LocationSummary* Instruction::MakeCallSummary(Zone* zone,
4444
const auto representation = instr->representation();
4545
switch (representation) {
4646
case kTagged:
47+
case kUnboxedUint32:
48+
case kUnboxedInt32:
4749
result->set_out(
4850
0, Location::RegisterLocation(CallingConventions::kReturnReg));
4951
break;

utils/dartdev/BUILD.gn

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ application_snapshot("generate_dartdev_snapshot") {
2525

2626
deps = [
2727
"../dds:dds",
28-
"../dtd:dtd"
28+
"../dtd:dtd",
2929
]
3030

3131
# DDS should be run from AOT snapshot on all architectures except IA32/X86.
32-
# TODO(https://dartbug.com/54434): Fix simriscv32 AOT.
33-
if (dart_target_arch != "ia32" && dart_target_arch != "x86" &&
34-
dart_target_arch != "riscv32") {
32+
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
3533
deps += [ "../dds:dds_aot" ]
3634
}
3735

0 commit comments

Comments
 (0)