]> Cypherpunks repositories - gostls13.git/commit
cmd: fix the order that s390x operands are printed in
authorMichael Munday <munday@ca.ibm.com>
Tue, 11 Apr 2017 18:30:18 +0000 (14:30 -0400)
committerMichael Munday <munday@ca.ibm.com>
Tue, 25 Apr 2017 15:16:56 +0000 (15:16 +0000)
commitdb6f3bbc9a2d35a9b310f4d9ded1f1d63ef48234
tree0a6eeb12e90dd9c4c6687a0e340cbf374d2e42fe
parent7d547b6411fa6e07e22aca7c98c90d17f7449927
cmd: fix the order that s390x operands are printed in

The assembler reordered the operands of some instructions to put the
first operand into From3. Unfortunately this meant that when the
instructions were printed the operands were in a different order than
the assembler would expect as input. For example, 'MVC $8, (R1), (R2)'
would be printed as 'MVC (R1), $8, (R2)'.

Originally this was done to ensure that From contained the source
memory operand. The current compiler no longer requires this and so
this CL simply makes all instructions use the standard order for
operands: From, Reg, From3 and finally To.

Fixes #18295

Change-Id: Ib2b5ec29c647ca7a995eb03dc78f82d99618b092
Reviewed-on: https://go-review.googlesource.com/40299
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/asm/internal/arch/s390x.go
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/testdata/s390x.s
src/cmd/compile/internal/s390x/ggen.go
src/cmd/compile/internal/s390x/ssa.go
src/cmd/internal/obj/s390x/asmz.go