mirror of
https://github.com/golang/go
synced 2024-11-23 18:40:03 -07:00
cmd/internal: allow ADDE to work with memory location on s390x
Originally on s390x, ADDE does not work when adding numbers from a memory location. For example: ADDE (R3), R4 will result in a failure. Since ADDC, ADD and ADDW already supports adding from memory location, let's support that for ADDE as well. Change-Id: I7cbe112ea154733a621b948c6a21bbee63fb0c62 Reviewed-on: https://go-review.googlesource.com/c/go/+/229304 Reviewed-by: Michael Munday <mike.munday@ibm.com> Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
79395c55e2
commit
a45ea55da7
4
src/cmd/asm/internal/asm/testdata/s390x.s
vendored
4
src/cmd/asm/internal/asm/testdata/s390x.s
vendored
@ -89,6 +89,7 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
|
||||
ADDW R1, R2, R3 // b9f81032
|
||||
ADDW $8192, R1 // a71a2000
|
||||
ADDW $8192, R1, R2 // ec21200000d8
|
||||
ADDE R1, R2 // b9880021
|
||||
SUB R3, R4 // b9090043
|
||||
SUB R3, R4, R5 // b9e93054
|
||||
SUB $8192, R3 // a73be000
|
||||
@ -183,6 +184,9 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
|
||||
ADDW 4095(R7), R8 // 5a807fff
|
||||
ADDW -1(R1), R2 // e3201fffff5a
|
||||
ADDW 4096(R3), R4 // e3403000015a
|
||||
ADDE 4096(R3), R4 // e34030000188
|
||||
ADDE 4096(R3)(R2*1), R4 // e34230000188
|
||||
ADDE 524288(R3)(R4*1), R5 // c0a10008000041aa4000e35a30000088
|
||||
MULLD (R1)(R2*1), R3 // e3321000000c
|
||||
MULLW (R3)(R4*1), R5 // 71543000
|
||||
MULLW 4096(R3), R4 // e34030000151
|
||||
|
@ -906,10 +906,10 @@ func buildop(ctxt *obj.Link) {
|
||||
case AADD:
|
||||
opset(AADDC, r)
|
||||
opset(AADDW, r)
|
||||
opset(AADDE, r)
|
||||
opset(AMULLD, r)
|
||||
opset(AMULLW, r)
|
||||
case ADIVW:
|
||||
opset(AADDE, r)
|
||||
opset(ADIVD, r)
|
||||
opset(ADIVDU, r)
|
||||
opset(ADIVWU, r)
|
||||
@ -3040,6 +3040,8 @@ func (c *ctxtz) asmout(p *obj.Prog, asm *[]byte) {
|
||||
opxy = op_AG
|
||||
case AADDC:
|
||||
opxy = op_ALG
|
||||
case AADDE:
|
||||
opxy = op_ALCG
|
||||
case AADDW:
|
||||
opx = op_A
|
||||
opxy = op_AY
|
||||
|
Loading…
Reference in New Issue
Block a user