1
0
mirror of https://github.com/golang/go synced 2024-11-23 04:20:03 -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:
bill_ofarrell 2018-04-26 16:30:30 -04:00 committed by Michael Munday
parent d7f5c0360f
commit 3c65bb5b90
5 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -941,6 +941,7 @@ const (
AVUPLB
AVUPLHW
AVUPLF
AVMSLG
// binary
ABYTE

View File

@ -677,6 +677,7 @@ var Anames = []string{
"VUPLB",
"VUPLHW",
"VUPLF",
"VMSLG",
"BYTE",
"WORD",
"DWORD",

View File

@ -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 {

View File

@ -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: