Skip to content

Commit

Permalink
[vm] Don't create UnboxedConstantInstr(kUnboxedInt64) for RISCV32.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rmacnak-google authored and Commit Queue committed Jan 9, 2024
1 parent e9f51b8 commit 2ff30ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runtime/vm/compiler/aot/aot_call_specializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ Definition* AotCallSpecializer::TryOptimizeDivisionOperation(
Value* right_value) {
auto unboxed_constant = [&](int64_t value) -> Definition* {
ASSERT(compiler::target::IsSmi(value));
#if defined(TARGET_ARCH_ARM)
#if defined(TARGET_ARCH_IS_32_BIT)
Definition* const const_def = new (Z) UnboxedConstantInstr(
Smi::ZoneHandle(Z, Smi::New(value)), kUnboxedInt32);
InsertBefore(instr, const_def, /*env=*/nullptr, FlowGraph::kValue);
Expand Down
2 changes: 2 additions & 0 deletions runtime/vm/compiler/backend/il_riscv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ LocationSummary* Instruction::MakeCallSummary(Zone* zone,
const auto representation = instr->representation();
switch (representation) {
case kTagged:
case kUnboxedUint32:
case kUnboxedInt32:
result->set_out(
0, Location::RegisterLocation(CallingConventions::kReturnReg));
break;
Expand Down
6 changes: 2 additions & 4 deletions utils/dartdev/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ application_snapshot("generate_dartdev_snapshot") {

deps = [
"../dds:dds",
"../dtd:dtd"
"../dtd:dtd",
]

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

Expand Down

0 comments on commit 2ff30ee

Please sign in to comment.