Commit 526f3420 authored by Carlos Eduardo Seo's avatar Carlos Eduardo Seo Committed by Lynn Boger

cmd/asm, cmd/internal/obj/ppc64: add ISA 3.0 instructions

This change adds new ppc64 instructions from the POWER9 ISA. This includes
compares, loads, maths, register moves and the new random number generator and
copy/paste facilities.

Change-Id: Ife3720b90f5af184ff115bbcdcbce5c1302d39b6
Reviewed-on: https://go-review.googlesource.com/53930
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarLynn Boger <laboger@linux.vnet.ibm.com>
parent 6959087b
...@@ -581,6 +581,10 @@ label1: ...@@ -581,6 +581,10 @@ label1:
// cmpb RA,RS,RB // cmpb RA,RS,RB
CMPB R2,R2,R1 CMPB R2,R2,R1
// CMPEQB RA,RB,BF produces
// cmpeqb BF,RA,RB
CMPEQB R1, R2, CR0
// //
// rotate extended mnemonics map onto other shift instructions // rotate extended mnemonics map onto other shift instructions
// //
...@@ -707,6 +711,10 @@ label1: ...@@ -707,6 +711,10 @@ label1:
DCBF (R1) DCBF (R1)
DCBF (R1+R2) // DCBF (R1)(R2*1) DCBF (R1+R2) // DCBF (R1)(R2*1)
// LDMX (RB)(RA*1),RT produces
// ldmx RT,RA,RB
LDMX (R2)(R1*1), R3
// Population count, X-form // Population count, X-form
// <MNEMONIC> RS,RA produces // <MNEMONIC> RS,RA produces
// <mnemonic> RA,RS // <mnemonic> RA,RS
...@@ -714,6 +722,17 @@ label1: ...@@ -714,6 +722,17 @@ label1:
POPCNTW R1,R2 POPCNTW R1,R2
POPCNTB R1,R2 POPCNTB R1,R2
// Random number generator, X-form
// DARN L,RT produces
// darn RT,L
DARN $1, R1
// Copy/Paste facility
// <MNEMONIC> RB,RA produces
// <mnemonic> RA,RB
COPY R2,R1
PASTECC R2,R1
// VMX instructions // VMX instructions
// Described as: // Described as:
...@@ -788,6 +807,11 @@ label1: ...@@ -788,6 +807,11 @@ label1:
VPMSUMW V2, V3, V1 VPMSUMW V2, V3, V1
VPMSUMD V2, V3, V1 VPMSUMD V2, V3, V1
// Vector multiply-sum, VA-form
// <MNEMONIC> VRA, VRB, VRC, VRT produces
// <mnemonic> VRT, VRA, VRB, VRC
VMSUMUDM V4, V3, V2, V1
// Vector SUB, VX-form // Vector SUB, VX-form
// <MNEMONIC> VRA,VRB,VRT produces // <MNEMONIC> VRA,VRB,VRT produces
// <mnemonic> VRT,VRA,VRB // <mnemonic> VRT,VRA,VRB
...@@ -885,6 +909,8 @@ label1: ...@@ -885,6 +909,8 @@ label1:
VCMPGTSWCC V3, V2, V1 VCMPGTSWCC V3, V2, V1
VCMPGTSD V3, V2, V1 VCMPGTSD V3, V2, V1
VCMPGTSDCC V3, V2, V1 VCMPGTSDCC V3, V2, V1
VCMPNEZB V3, V2, V1
VCMPNEZBCC V3, V2, V1
// Vector permute, VA-form // Vector permute, VA-form
// <MNEMONIC> VRA,VRB,VRC,VRT produces // <MNEMONIC> VRA,VRB,VRC,VRT produces
...@@ -958,6 +984,7 @@ label1: ...@@ -958,6 +984,7 @@ label1:
// <mnemonic> RA,XS // <mnemonic> RA,XS
MFVSRD VS0, R1 MFVSRD VS0, R1
MFVSRWZ VS33, R1 MFVSRWZ VS33, R1
MFVSRLD VS63, R1
// VSX move to VSR, XX1-form // VSX move to VSR, XX1-form
// <MNEMONIC> RA,XT produces // <MNEMONIC> RA,XT produces
...@@ -965,6 +992,8 @@ label1: ...@@ -965,6 +992,8 @@ label1:
MTVSRD R1, VS0 MTVSRD R1, VS0
MTVSRWA R1, VS31 MTVSRWA R1, VS31
MTVSRWZ R1, VS63 MTVSRWZ R1, VS63
MTVSRDD R1, R2, VS0
MTVSRWS R1, VS32
// VSX AND, XX3-form // VSX AND, XX3-form
// <MNEMONIC> XA,XB,XT produces // <MNEMONIC> XA,XB,XT produces
...@@ -1062,6 +1091,17 @@ label1: ...@@ -1062,6 +1091,17 @@ label1:
XVCVUXDSP VS0,VS32 XVCVUXDSP VS0,VS32
XVCVUXWSP VS0,VS32 XVCVUXWSP VS0,VS32
// Multiply-Add High Doubleword
// <MNEMONIC> RA,RB,RC,RT produces
// <mnemonic> RT,RA,RB,RC
MADDHD R1,R2,R3,R4
MADDHDU R1,R2,R3,R4
// Add Extended using alternate carry bit
// ADDEX RA,RB,CY,RT produces
// addex RT, RA, RB, CY
ADDEX R1, R2, $0, R3
// //
// NOP // NOP
// //
......
...@@ -396,6 +396,7 @@ const ( ...@@ -396,6 +396,7 @@ const (
AADDZECC AADDZECC
AADDZEVCC AADDZEVCC
AADDZEV AADDZEV
AADDEX
AAND AAND
AANDCC AANDCC
AANDN AANDN
...@@ -412,6 +413,7 @@ const ( ...@@ -412,6 +413,7 @@ const (
ABVS // Unordered-set ABVS // Unordered-set
ACMP ACMP
ACMPU ACMPU
ACMPEQB
ACNTLZW ACNTLZW
ACNTLZWCC ACNTLZWCC
ACRAND ACRAND
...@@ -712,6 +714,13 @@ const ( ...@@ -712,6 +714,13 @@ const (
APOPCNTD APOPCNTD
APOPCNTW APOPCNTW
APOPCNTB APOPCNTB
ACOPY
APASTECC
ADARN
ALDMX
AMADDHD
AMADDHDU
AMADDLD
/* Vector */ /* Vector */
ALV ALV
...@@ -781,6 +790,7 @@ const ( ...@@ -781,6 +790,7 @@ const (
AVPMSUMH AVPMSUMH
AVPMSUMW AVPMSUMW
AVPMSUMD AVPMSUMD
AVMSUMUDM
AVR AVR
AVRLB AVRLB
AVRLH AVRLH
...@@ -842,6 +852,8 @@ const ( ...@@ -842,6 +852,8 @@ const (
AVCMPGTSWCC AVCMPGTSWCC
AVCMPGTSD AVCMPGTSD
AVCMPGTSDCC AVCMPGTSDCC
AVCMPNEZB
AVCMPNEZBCC
AVPERM AVPERM
AVSEL AVSEL
AVSPLT AVSPLT
...@@ -885,12 +897,15 @@ const ( ...@@ -885,12 +897,15 @@ const (
AMFFPRD AMFFPRD
AMFVRD AMFVRD
AMFVSRWZ AMFVSRWZ
AMFVSRLD
AMTVSR AMTVSR
AMTVSRD AMTVSRD
AMTFPRD AMTFPRD
AMTVRD AMTVRD
AMTVSRWA AMTVSRWA
AMTVSRWZ AMTVSRWZ
AMTVSRDD
AMTVSRWS
AXXLAND AXXLAND
AXXLANDQ AXXLANDQ
AXXLANDC AXXLANDC
......
...@@ -26,6 +26,7 @@ var Anames = []string{ ...@@ -26,6 +26,7 @@ var Anames = []string{
"ADDZECC", "ADDZECC",
"ADDZEVCC", "ADDZEVCC",
"ADDZEV", "ADDZEV",
"ADDEX",
"AND", "AND",
"ANDCC", "ANDCC",
"ANDN", "ANDN",
...@@ -42,6 +43,7 @@ var Anames = []string{ ...@@ -42,6 +43,7 @@ var Anames = []string{
"BVS", "BVS",
"CMP", "CMP",
"CMPU", "CMPU",
"CMPEQB",
"CNTLZW", "CNTLZW",
"CNTLZWCC", "CNTLZWCC",
"CRAND", "CRAND",
...@@ -329,6 +331,13 @@ var Anames = []string{ ...@@ -329,6 +331,13 @@ var Anames = []string{
"POPCNTD", "POPCNTD",
"POPCNTW", "POPCNTW",
"POPCNTB", "POPCNTB",
"COPY",
"PASTECC",
"DARN",
"LDMX",
"MADDHD",
"MADDHDU",
"MADDLD",
"LV", "LV",
"LVEBX", "LVEBX",
"LVEHX", "LVEHX",
...@@ -396,6 +405,7 @@ var Anames = []string{ ...@@ -396,6 +405,7 @@ var Anames = []string{
"VPMSUMH", "VPMSUMH",
"VPMSUMW", "VPMSUMW",
"VPMSUMD", "VPMSUMD",
"VMSUMUDM",
"VR", "VR",
"VRLB", "VRLB",
"VRLH", "VRLH",
...@@ -457,6 +467,8 @@ var Anames = []string{ ...@@ -457,6 +467,8 @@ var Anames = []string{
"VCMPGTSWCC", "VCMPGTSWCC",
"VCMPGTSD", "VCMPGTSD",
"VCMPGTSDCC", "VCMPGTSDCC",
"VCMPNEZB",
"VCMPNEZBCC",
"VPERM", "VPERM",
"VSEL", "VSEL",
"VSPLT", "VSPLT",
...@@ -498,12 +510,15 @@ var Anames = []string{ ...@@ -498,12 +510,15 @@ var Anames = []string{
"MFFPRD", "MFFPRD",
"MFVRD", "MFVRD",
"MFVSRWZ", "MFVSRWZ",
"MFVSRLD",
"MTVSR", "MTVSR",
"MTVSRD", "MTVSRD",
"MTFPRD", "MTFPRD",
"MTVRD", "MTVRD",
"MTVSRWA", "MTVSRWA",
"MTVSRWZ", "MTVSRWZ",
"MTVSRDD",
"MTVSRWS",
"XXLAND", "XXLAND",
"XXLANDQ", "XXLANDQ",
"XXLANDC", "XXLANDC",
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment