diff --git a/src/cmd/asm/internal/asm/testdata/386enc.s b/src/cmd/asm/internal/asm/testdata/386enc.s index 4af6de36d17..aacb40793e7 100644 --- a/src/cmd/asm/internal/asm/testdata/386enc.s +++ b/src/cmd/asm/internal/asm/testdata/386enc.s @@ -33,5 +33,8 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 PUSHL FS // 0fa0 POPL FS // 0fa1 POPL SS // 17 + + RDPID AX // f30fc7f8 + // End of tests. RET diff --git a/src/cmd/asm/internal/asm/testdata/amd64enc_extra.s b/src/cmd/asm/internal/asm/testdata/amd64enc_extra.s index 48bdf1bcda1..08cb20c7071 100644 --- a/src/cmd/asm/internal/asm/testdata/amd64enc_extra.s +++ b/src/cmd/asm/internal/asm/testdata/amd64enc_extra.s @@ -1055,5 +1055,9 @@ TEXT asmtest(SB),DUPOK|NOSPLIT,$0 TPAUSE BX // 660faef3 UMONITOR BX // f30faef3 UMWAIT BX // f20faef3 + + RDPID DX // f30fc7fa + RDPID R11 // f3410fc7fb + // End of tests. RET diff --git a/src/cmd/asm/internal/asm/testdata/amd64error.s b/src/cmd/asm/internal/asm/testdata/amd64error.s index 5bd335e3031..1ca2d3147cd 100644 --- a/src/cmd/asm/internal/asm/testdata/amd64error.s +++ b/src/cmd/asm/internal/asm/testdata/amd64error.s @@ -144,4 +144,7 @@ TEXT errors(SB),$0 VMOVDQA32.Z Z0, Z1 // ERROR "mask register must be specified for .Z instructions" VMOVDQA32.Z Z0, K0, Z1 // ERROR "invalid instruction" VMOVDQA32.Z Z0, K1, Z1 // ok + + RDPID (BX) // ERROR "invalid instruction" + RET diff --git a/src/cmd/internal/obj/x86/aenum.go b/src/cmd/internal/obj/x86/aenum.go index f0913d7c551..79cdd241a23 100644 --- a/src/cmd/internal/obj/x86/aenum.go +++ b/src/cmd/internal/obj/x86/aenum.go @@ -747,6 +747,7 @@ const ( ARDGSBASEL ARDGSBASEQ ARDMSR + ARDPID ARDPKRU ARDPMC ARDRANDL diff --git a/src/cmd/internal/obj/x86/anames.go b/src/cmd/internal/obj/x86/anames.go index 7869e366f9b..3966381e50d 100644 --- a/src/cmd/internal/obj/x86/anames.go +++ b/src/cmd/internal/obj/x86/anames.go @@ -745,6 +745,7 @@ var Anames = []string{ "RDGSBASEL", "RDGSBASEQ", "RDMSR", + "RDPID", "RDPKRU", "RDPMC", "RDRANDL", diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index 0e8670c8e5d..718da6a8a2c 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -775,7 +775,7 @@ var ymshufb = []ytab{ } // It should never have more than 1 entry, -// because some optab entries you opcode secuences that +// because some optab entries have opcode sequences that // are longer than 2 bytes (zoffset=2 here), // ROUNDPD and ROUNDPS and recently added BLENDPD, // to name a few. @@ -1774,6 +1774,7 @@ var optab = {ALSSW, ym_rl, Pe, opBytes{0x0f, 0xb2}}, {ALSSL, ym_rl, Px, opBytes{0x0f, 0xb2}}, {ALSSQ, ym_rl, Pw, opBytes{0x0f, 0xb2}}, + {ARDPID, yrdrand, Pf3, opBytes{0xc7, 07}}, {ABLENDPD, yxshuf, Pq, opBytes{0x3a, 0x0d, 0}}, {ABLENDPS, yxshuf, Pq, opBytes{0x3a, 0x0c, 0}}, diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go index c85b5018eb4..8c9ea4f2a91 100644 --- a/src/cmd/internal/obj/x86/obj6.go +++ b/src/cmd/internal/obj/x86/obj6.go @@ -1476,6 +1476,7 @@ var unaryDst = map[obj.As]bool{ ARDFSBASEQ: true, ARDGSBASEL: true, ARDGSBASEQ: true, + ARDPID: true, ARDRANDL: true, ARDRANDQ: true, ARDRANDW: true,