Skip to content

Commit 9ae7fd2

Browse files
linzjcommit-bot@chromium.org
linzj
authored andcommitted
Fix disassembler fails to mention sign extend for loads on arm64.
Last fix reverted, should not mess up with the format option. Should only deal with load operations. [email protected] Change-Id: Ib9037fc32445e899ab92a8110f29f51f482520e0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153641 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Martin Kustermann <[email protected]>
1 parent e5086f9 commit 9ae7fd2

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

runtime/vm/compiler/assembler/disassembler_arm64.cc

+5-13
Original file line numberDiff line numberDiff line change
@@ -622,25 +622,15 @@ int ARM64Decoder::FormatOption(Instr* instr, const char* format) {
622622
ASSERT(STRING_STARTS_WITH(format, "sz"));
623623
const int sz = instr->SzField();
624624
char const* sz_str;
625-
bool signed_extend_required = instr->Bits(23, 1) == 1;
626625
switch (sz) {
627626
case 0:
628-
if (signed_extend_required)
629-
sz_str = "sb";
630-
else
631-
sz_str = "b";
627+
sz_str = "b";
632628
break;
633629
case 1:
634-
if (signed_extend_required)
635-
sz_str = "sh";
636-
else
637-
sz_str = "h";
630+
sz_str = "h";
638631
break;
639632
case 2:
640-
if (signed_extend_required)
641-
sz_str = "sw";
642-
else
643-
sz_str = "w";
633+
sz_str = "w";
644634
break;
645635
case 3:
646636
sz_str = "x";
@@ -721,6 +711,8 @@ void ARM64Decoder::DecodeLoadStoreReg(Instr* instr) {
721711
// Integer src/dst.
722712
if (instr->Bits(22, 2) == 0) {
723713
Format(instr, "str'sz 'rt, 'memop");
714+
} else if (instr->Bits(23, 1) == 1) {
715+
Format(instr, "ldrs'sz 'rt, 'memop");
724716
} else {
725717
Format(instr, "ldr'sz 'rt, 'memop");
726718
}

0 commit comments

Comments
 (0)