mirror of
https://github.com/golang/go
synced 2024-11-23 03:30:02 -07:00
cmd/asm: add s390x VMSLG instruction
This instruction was introduced on the z14 to accelerate "limbified" multiplications for certain cryptographic algorithms. This change allows it to be used in Go assembly. Change-Id: Ic93dae7fec1756f662874c08a5abc435bce9dd9e Reviewed-on: https://go-review.googlesource.com/109695 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
d7f5c0360f
commit
3c65bb5b90
1
src/cmd/asm/internal/asm/testdata/s390x.s
vendored
1
src/cmd/asm/internal/asm/testdata/s390x.s
vendored
@ -367,6 +367,7 @@ TEXT main·foo(SB),DUPOK|NOSPLIT,$16-0 // TEXT main.foo(SB), DUPOK|NOSPLIT, $16-
|
||||
VSTEF $3, V2, (R9) // e7209000300b
|
||||
VSTEH $7, V31, (R2) // e7f020007809
|
||||
VSTEB $15, V29, 4094(R12) // e7d0cffef808
|
||||
VMSLG V21, V22, V23, V24 // e78563007fb8
|
||||
|
||||
RET
|
||||
RET foo(SB)
|
||||
|
@ -941,6 +941,7 @@ const (
|
||||
AVUPLB
|
||||
AVUPLHW
|
||||
AVUPLF
|
||||
AVMSLG
|
||||
|
||||
// binary
|
||||
ABYTE
|
||||
|
@ -677,6 +677,7 @@ var Anames = []string{
|
||||
"VUPLB",
|
||||
"VUPLHW",
|
||||
"VUPLF",
|
||||
"VMSLG",
|
||||
"BYTE",
|
||||
"WORD",
|
||||
"DWORD",
|
||||
|
@ -1376,6 +1376,7 @@ func buildop(ctxt *obj.Link) {
|
||||
opset(AVSTRCZFS, r)
|
||||
opset(AVSBCBIQ, r)
|
||||
opset(AVSBIQ, r)
|
||||
opset(AVMSLG, r)
|
||||
case AVSEL:
|
||||
opset(AVFMADB, r)
|
||||
opset(AWFMADB, r)
|
||||
@ -2529,6 +2530,7 @@ const (
|
||||
op_VUPLH uint32 = 0xE7D5 // VRR-a VECTOR UNPACK LOGICAL HIGH
|
||||
op_VUPLL uint32 = 0xE7D4 // VRR-a VECTOR UNPACK LOGICAL LOW
|
||||
op_VUPL uint32 = 0xE7D6 // VRR-a VECTOR UNPACK LOW
|
||||
op_VMSL uint32 = 0xE7B8 // VRR-d VECTOR MULTIPLY SUM LOGICAL
|
||||
)
|
||||
|
||||
func oclass(a *obj.Addr) int {
|
||||
|
@ -45,6 +45,8 @@ func vop(as obj.As) (opcode, es, cs uint32) {
|
||||
return op_VAC, 0, 0
|
||||
case AVACQ:
|
||||
return op_VAC, 4, 0
|
||||
case AVMSLG:
|
||||
return op_VMSL, 3, 0
|
||||
case AVACCC:
|
||||
return op_VACCC, 0, 0
|
||||
case AVACCCQ:
|
||||
|
Loading…
Reference in New Issue
Block a user