Permalink
Browse files

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: Lynn Boger <laboger@linux.vnet.ibm.com>
  • Loading branch information...
ceseo authored and laboger committed May 16, 2017
1 parent 6959087 commit 526f3420c2a25a2bc99ae4cc2750c2598a07c895
@@ -581,6 +581,10 @@ label1:
// cmpb RA,RS,RB
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
//
@@ -707,13 +711,28 @@ label1:
DCBF (R1)
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
// <MNEMONIC> RS,RA produces
// <mnemonic> RA,RS
POPCNTD R1,R2
POPCNTW 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
// Described as:
@@ -788,6 +807,11 @@ label1:
VPMSUMW 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
// <MNEMONIC> VRA,VRB,VRT produces
// <mnemonic> VRT,VRA,VRB
@@ -885,6 +909,8 @@ label1:
VCMPGTSWCC V3, V2, V1
VCMPGTSD V3, V2, V1
VCMPGTSDCC V3, V2, V1
VCMPNEZB V3, V2, V1
VCMPNEZBCC V3, V2, V1
// Vector permute, VA-form
// <MNEMONIC> VRA,VRB,VRC,VRT produces
@@ -958,13 +984,16 @@ label1:
// <mnemonic> RA,XS
MFVSRD VS0, R1
MFVSRWZ VS33, R1
MFVSRLD VS63, R1
// VSX move to VSR, XX1-form
// <MNEMONIC> RA,XT produces
// <mnemonic> XT,RA
MTVSRD R1, VS0
MTVSRWA R1, VS31
MTVSRWZ R1, VS63
MTVSRDD R1, R2, VS0
MTVSRWS R1, VS32
// VSX AND, XX3-form
// <MNEMONIC> XA,XB,XT produces
@@ -1062,6 +1091,17 @@ label1:
XVCVUXDSP 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
//
@@ -396,6 +396,7 @@ const (
AADDZECC
AADDZEVCC
AADDZEV
AADDEX
AAND
AANDCC
AANDN
@@ -412,6 +413,7 @@ const (
ABVS // Unordered-set
ACMP
ACMPU
ACMPEQB
ACNTLZW
ACNTLZWCC
ACRAND
@@ -712,6 +714,13 @@ const (
APOPCNTD
APOPCNTW
APOPCNTB
ACOPY
APASTECC
ADARN
ALDMX
AMADDHD
AMADDHDU
AMADDLD
/* Vector */
ALV
@@ -781,6 +790,7 @@ const (
AVPMSUMH
AVPMSUMW
AVPMSUMD
AVMSUMUDM
AVR
AVRLB
AVRLH
@@ -842,6 +852,8 @@ const (
AVCMPGTSWCC
AVCMPGTSD
AVCMPGTSDCC
AVCMPNEZB
AVCMPNEZBCC
AVPERM
AVSEL
AVSPLT
@@ -885,12 +897,15 @@ const (
AMFFPRD
AMFVRD
AMFVSRWZ
AMFVSRLD
AMTVSR
AMTVSRD
AMTFPRD
AMTVRD
AMTVSRWA
AMTVSRWZ
AMTVSRDD
AMTVSRWS
AXXLAND
AXXLANDQ
AXXLANDC
@@ -26,6 +26,7 @@ var Anames = []string{
"ADDZECC",
"ADDZEVCC",
"ADDZEV",
"ADDEX",
"AND",
"ANDCC",
"ANDN",
@@ -42,6 +43,7 @@ var Anames = []string{
"BVS",
"CMP",
"CMPU",
"CMPEQB",
"CNTLZW",
"CNTLZWCC",
"CRAND",
@@ -329,6 +331,13 @@ var Anames = []string{
"POPCNTD",
"POPCNTW",
"POPCNTB",
"COPY",
"PASTECC",
"DARN",
"LDMX",
"MADDHD",
"MADDHDU",
"MADDLD",
"LV",
"LVEBX",
"LVEHX",
@@ -396,6 +405,7 @@ var Anames = []string{
"VPMSUMH",
"VPMSUMW",
"VPMSUMD",
"VMSUMUDM",
"VR",
"VRLB",
"VRLH",
@@ -457,6 +467,8 @@ var Anames = []string{
"VCMPGTSWCC",
"VCMPGTSD",
"VCMPGTSDCC",
"VCMPNEZB",
"VCMPNEZBCC",
"VPERM",
"VSEL",
"VSPLT",
@@ -498,12 +510,15 @@ var Anames = []string{
"MFFPRD",
"MFVRD",
"MFVSRWZ",
"MFVSRLD",
"MTVSR",
"MTVSRD",
"MTFPRD",
"MTVRD",
"MTVSRWA",
"MTVSRWZ",
"MTVSRDD",
"MTVSRWS",
"XXLAND",
"XXLANDQ",
"XXLANDC",
Oops, something went wrong.

0 comments on commit 526f342

Please sign in to comment.