Permalink
Browse files

cmd/internal/obj/arm: fix wrong encoding of MULBB

"MULBB R1, R2, R3" is encoded to 0xe163f182, which should be
0xe1630182.

This patch fix it.

fix #20764

Change-Id: I9d3c3ffa40ecde86638e5e083eacc67578caebf4
Reviewed-on: https://go-review.googlesource.com/46491
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
  • Loading branch information...
benshi001 authored and cherrymui committed Jun 23, 2017
1 parent ddeab53 commit 3785457c765018a8ca5a399da177ddc5573db68d
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/cmd/asm/internal/asm/testdata/arm.s
  2. +1 −1 src/cmd/internal/obj/arm/asm5.go
@@ -975,7 +975,7 @@ jmp_label_3:
MULL R1, R2, (R4, R3) // 9231c4e0
MULL.S R1, R2, (R4, R3) // 9231d4e0
MMUL R1, R2, R3 // 12f153e7
MULBB R1, R2, R3 // 82f163e1
MULBB R1, R2, R3 // 820163e1
MULWB R1, R2, R3 // a20123e1
MULWT R1, R2, R3 // e20123e1
@@ -2866,7 +2866,7 @@ func (c *ctxt5) oprrr(p *obj.Prog, a obj.As, sc int) uint32 {
return o&(0xf<<28) | 0x12<<20 | 0xa<<4
case AMULBB:
return o&(0xf<<28) | 0x16<<20 | 0xf<<12 | 0x8<<4
return o&(0xf<<28) | 0x16<<20 | 0x8<<4
case AMULAWT:
return o&(0xf<<28) | 0x12<<20 | 0xc<<4

0 comments on commit 3785457

Please sign in to comment.