diff options
| author | Ben Shi <powerman1st@163.com> | 2018-05-11 06:19:58 +0000 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2018-05-14 01:53:39 +0000 |
| commit | bec2f51b07b2d5cf38ac88d21d9bf221e329e132 (patch) | |
| tree | 07f697d5ff4aca402b9ae5ce530b04a65a222526 /src/cmd/internal/obj/arm | |
| parent | 3080b7d0af65858400b13134c1c471e2cb35e647 (diff) | |
| download | go-bec2f51b07b2d5cf38ac88d21d9bf221e329e132.tar.xz | |
cmd/internal/obj/arm: fix wrong encoding of MUL
The arm assembler incorrectly encodes the following instructions.
"MUL R2, R4" -> 0xe0040492 ("MUL R4, R2, R4")
"MUL R2, R4, R4" -> 0xe0040492 ("MUL R4, R2, R4")
The CL fixes that issue.
fixes #25347
Change-Id: I883716c7bc51c5f64837ae7d81342f94540a58cb
Reviewed-on: https://go-review.googlesource.com/112737
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/arm')
| -rw-r--r-- | src/cmd/internal/obj/arm/asm5.go | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/cmd/internal/obj/arm/asm5.go b/src/cmd/internal/obj/arm/asm5.go index 96f6b90e8d..3427ea9161 100644 --- a/src/cmd/internal/obj/arm/asm5.go +++ b/src/cmd/internal/obj/arm/asm5.go @@ -2046,16 +2046,6 @@ func (c *ctxt5) asmout(p *obj.Prog, o *Optab, out []uint32) { if r == 0 { r = rt } - if rt == r { - r = rf - rf = rt - } - - if false { - if rt == r || rf == REGPC&15 || r == REGPC&15 || rt == REGPC&15 { - c.ctxt.Diag("%v: bad registers in MUL", p) - } - } o1 |= (uint32(rf)&15)<<8 | (uint32(r)&15)<<0 | (uint32(rt)&15)<<16 |
