]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/5l: fix encoding of new MOVB, MOVH instructions
authorRuss Cox <rsc@golang.org>
Mon, 12 Aug 2013 17:42:04 +0000 (13:42 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 12 Aug 2013 17:42:04 +0000 (13:42 -0400)
They are just like MOVW and should be setting only
two register fields, not three.

R=ken2
CC=golang-dev, remyoudompheng
https://golang.org/cl/12781043

src/cmd/5l/asm.c

index 28bb406829c59205752971b72707133736dd7ecb..774332b4652225b6abd09c10cb966ffc867e5e23 100644 (file)
@@ -798,7 +798,7 @@ if(debug['G']) print("%ux: %s: arm %d\n", (uint32)(p->pc), p->from.sym->name, p-
                r = p->reg;
                if(p->to.type == D_NONE)
                        rt = 0;
-               if(p->as == AMOVW || p->as == AMVN)
+               if(p->as == AMOVB || p->as == AMOVH || p->as == AMOVW || p->as == AMVN)
                        r = 0;
                else
                if(r == NREG)