Skip to content

Commit 87a6340

Browse files
benshi001cherrymui
authored andcommitted
arm/armasm: fix wrong register order in MLA.S
Though "0xe0243192" can be correctly disassembled to "MLA R1, R2, R3, R4", "0xe0243192" is disassembled to "MLA.S R3, R1, R2, R4", which should be "MLA.S R1, R2, R3, R4". This patch fix it. fix golang/go#20752 Change-Id: I2b4627b822715954923429688bccb21c081b7d0e Reviewed-on: https://go-review.googlesource.com/46456 Reviewed-by: Cherry Zhang <[email protected]> Run-TryBot: Cherry Zhang <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 9dd8665 commit 87a6340

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arm/armasm/plan9x.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64), text
115115
}
116116
// For MLA-like instructions, the addend is the third operand.
117117
switch inst.Op &^ 15 {
118-
case SMLAWT_EQ, SMLAWB_EQ, MLA_EQ, MLS_EQ, SMMLA_EQ, SMMLS_EQ, SMLABB_EQ:
118+
case SMLAWT_EQ, SMLAWB_EQ, MLA_EQ, MLA_S_EQ, MLS_EQ, SMMLA_EQ, SMMLS_EQ, SMLABB_EQ:
119119
args = []string{args[1], args[2], args[0], args[3]}
120120
}
121121

arm/armasm/testdata/decode.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,5 @@ ff818c71| 1 gnu strdvc r8, [ip, pc]
306306
|97acd647 1 gnu error: unknown instruction
307307
ed003be9| 1 plan9 LDMDB [R0,R2-R3,R5-R7], R11!
308308
923124e0| 1 plan9 MLA R1, R2, R3, R4
309+
923134e0| 1 plan9 MLA.S R1, R2, R3, R4
309310
923164e0| 1 plan9 MLS R1, R2, R3, R4

0 commit comments

Comments
 (0)