diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2013-08-06 03:37:50 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-08-06 11:08:47 -0400 |
commit | 3e21bb092d07e6d394e6d754057d4ff2d363d318 (patch) | |
tree | d6a4eec65d6016a7b8e587974916f8a4a80c4bae /arch | |
parent | d2475b8ff81ebeed88d8fcbc22876aced5a0807a (diff) |
x86, insn: Add new opcodes as of June, 2013
Add TSX-NI related instructions and new instructions to
x86-opcode-map.txt according to the Intel(R) 64 and IA-32
Architectures Software Developer's Manual Vol2C (June, 2013).
This also includes below updates.
- Fix a typo of MWAIT (the lack of (11B)).
- Change NOP Ev to prefetchw Ev
- Add CRC32 new prefix style (66&F2)
- Add ADCX, ADOX, RDSEED, CLAC and STAC instructions
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/20130806073750.4049.12365.stgit@udc4-manage.rcp.hitachi.co.jp
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/lib/x86-opcode-map.txt | 42 | ||||
-rw-r--r-- | arch/x86/tools/gen-insn-attr-x86.awk | 4 |
2 files changed, 27 insertions, 19 deletions
diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt index 5d7e51f3fd28..533a85e3a07e 100644 --- a/arch/x86/lib/x86-opcode-map.txt +++ b/arch/x86/lib/x86-opcode-map.txt | |||
@@ -1,10 +1,8 @@ | |||
1 | # x86 Opcode Maps | 1 | # x86 Opcode Maps |
2 | # | 2 | # |
3 | # This is (mostly) based on following documentations. | 3 | # This is (mostly) based on following documentations. |
4 | # - Intel(R) 64 and IA-32 Architectures Software Developer's Manual Vol.2 | 4 | # - Intel(R) 64 and IA-32 Architectures Software Developer's Manual Vol.2C |
5 | # (#325383-040US, October 2011) | 5 | # (#326018-047US, June 2013) |
6 | # - Intel(R) Advanced Vector Extensions Programming Reference | ||
7 | # (#319433-011,JUNE 2011). | ||
8 | # | 6 | # |
9 | #<Opcode maps> | 7 | #<Opcode maps> |
10 | # Table: table-name | 8 | # Table: table-name |
@@ -29,6 +27,7 @@ | |||
29 | # - (F3): the last prefix is 0xF3 | 27 | # - (F3): the last prefix is 0xF3 |
30 | # - (F2): the last prefix is 0xF2 | 28 | # - (F2): the last prefix is 0xF2 |
31 | # - (!F3) : the last prefix is not 0xF3 (including non-last prefix case) | 29 | # - (!F3) : the last prefix is not 0xF3 (including non-last prefix case) |
30 | # - (66&F2): Both 0x66 and 0xF2 prefixes are specified. | ||
32 | 31 | ||
33 | Table: one byte opcode | 32 | Table: one byte opcode |
34 | Referrer: | 33 | Referrer: |
@@ -246,8 +245,8 @@ c2: RETN Iw (f64) | |||
246 | c3: RETN | 245 | c3: RETN |
247 | c4: LES Gz,Mp (i64) | VEX+2byte (Prefix) | 246 | c4: LES Gz,Mp (i64) | VEX+2byte (Prefix) |
248 | c5: LDS Gz,Mp (i64) | VEX+1byte (Prefix) | 247 | c5: LDS Gz,Mp (i64) | VEX+1byte (Prefix) |
249 | c6: Grp11 Eb,Ib (1A) | 248 | c6: Grp11A Eb,Ib (1A) |
250 | c7: Grp11 Ev,Iz (1A) | 249 | c7: Grp11B Ev,Iz (1A) |
251 | c8: ENTER Iw,Ib | 250 | c8: ENTER Iw,Ib |
252 | c9: LEAVE (d64) | 251 | c9: LEAVE (d64) |
253 | ca: RETF Iw | 252 | ca: RETF Iw |
@@ -293,8 +292,8 @@ ef: OUT DX,eAX | |||
293 | # 0xf0 - 0xff | 292 | # 0xf0 - 0xff |
294 | f0: LOCK (Prefix) | 293 | f0: LOCK (Prefix) |
295 | f1: | 294 | f1: |
296 | f2: REPNE (Prefix) | 295 | f2: REPNE (Prefix) | XACQUIRE (Prefix) |
297 | f3: REP/REPE (Prefix) | 296 | f3: REP/REPE (Prefix) | XRELEASE (Prefix) |
298 | f4: HLT | 297 | f4: HLT |
299 | f5: CMC | 298 | f5: CMC |
300 | f6: Grp3_1 Eb (1A) | 299 | f6: Grp3_1 Eb (1A) |
@@ -326,7 +325,8 @@ AVXcode: 1 | |||
326 | 0a: | 325 | 0a: |
327 | 0b: UD2 (1B) | 326 | 0b: UD2 (1B) |
328 | 0c: | 327 | 0c: |
329 | 0d: NOP Ev | GrpP | 328 | # AMD's prefetch group. Intel supports prefetchw(/1) only. |
329 | 0d: GrpP | ||
330 | 0e: FEMMS | 330 | 0e: FEMMS |
331 | # 3DNow! uses the last imm byte as opcode extension. | 331 | # 3DNow! uses the last imm byte as opcode extension. |
332 | 0f: 3DNow! Pq,Qq,Ib | 332 | 0f: 3DNow! Pq,Qq,Ib |
@@ -729,12 +729,12 @@ dc: VAESENC Vdq,Hdq,Wdq (66),(v1) | |||
729 | dd: VAESENCLAST Vdq,Hdq,Wdq (66),(v1) | 729 | dd: VAESENCLAST Vdq,Hdq,Wdq (66),(v1) |
730 | de: VAESDEC Vdq,Hdq,Wdq (66),(v1) | 730 | de: VAESDEC Vdq,Hdq,Wdq (66),(v1) |
731 | df: VAESDECLAST Vdq,Hdq,Wdq (66),(v1) | 731 | df: VAESDECLAST Vdq,Hdq,Wdq (66),(v1) |
732 | f0: MOVBE Gy,My | MOVBE Gw,Mw (66) | CRC32 Gd,Eb (F2) | 732 | f0: MOVBE Gy,My | MOVBE Gw,Mw (66) | CRC32 Gd,Eb (F2) | CRC32 Gd,Eb (66&F2) |
733 | f1: MOVBE My,Gy | MOVBE Mw,Gw (66) | CRC32 Gd,Ey (F2) | 733 | f1: MOVBE My,Gy | MOVBE Mw,Gw (66) | CRC32 Gd,Ey (F2) | CRC32 Gd,Ew (66&F2) |
734 | f2: ANDN Gy,By,Ey (v) | 734 | f2: ANDN Gy,By,Ey (v) |
735 | f3: Grp17 (1A) | 735 | f3: Grp17 (1A) |
736 | f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v) | 736 | f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v) |
737 | f6: MULX By,Gy,rDX,Ey (F2),(v) | 737 | f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v) |
738 | f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v) | 738 | f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v) |
739 | EndTable | 739 | EndTable |
740 | 740 | ||
@@ -861,8 +861,8 @@ EndTable | |||
861 | 861 | ||
862 | GrpTable: Grp7 | 862 | GrpTable: Grp7 |
863 | 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) | 863 | 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B) |
864 | 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001) | 864 | 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B) |
865 | 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | 865 | 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B) |
866 | 3: LIDT Ms | 866 | 3: LIDT Ms |
867 | 4: SMSW Mw/Rv | 867 | 4: SMSW Mw/Rv |
868 | 5: | 868 | 5: |
@@ -880,15 +880,21 @@ EndTable | |||
880 | GrpTable: Grp9 | 880 | GrpTable: Grp9 |
881 | 1: CMPXCHG8B/16B Mq/Mdq | 881 | 1: CMPXCHG8B/16B Mq/Mdq |
882 | 6: VMPTRLD Mq | VMCLEAR Mq (66) | VMXON Mq (F3) | RDRAND Rv (11B) | 882 | 6: VMPTRLD Mq | VMCLEAR Mq (66) | VMXON Mq (F3) | RDRAND Rv (11B) |
883 | 7: VMPTRST Mq | VMPTRST Mq (F3) | 883 | 7: VMPTRST Mq | VMPTRST Mq (F3) | RDSEED Rv (11B) |
884 | EndTable | 884 | EndTable |
885 | 885 | ||
886 | GrpTable: Grp10 | 886 | GrpTable: Grp10 |
887 | EndTable | 887 | EndTable |
888 | 888 | ||
889 | GrpTable: Grp11 | 889 | # Grp11A and Grp11B are expressed as Grp11 in Intel SDM |
890 | # Note: the operands are given by group opcode | 890 | GrpTable: Grp11A |
891 | 0: MOV | 891 | 0: MOV Eb,Ib |
892 | 7: XABORT Ib (000),(11B) | ||
893 | EndTable | ||
894 | |||
895 | GrpTable: Grp11B | ||
896 | 0: MOV Eb,Iz | ||
897 | 7: XBEGIN Jz (000),(11B) | ||
892 | EndTable | 898 | EndTable |
893 | 899 | ||
894 | GrpTable: Grp12 | 900 | GrpTable: Grp12 |
diff --git a/arch/x86/tools/gen-insn-attr-x86.awk b/arch/x86/tools/gen-insn-attr-x86.awk index e6773dc8ac41..093a892026f9 100644 --- a/arch/x86/tools/gen-insn-attr-x86.awk +++ b/arch/x86/tools/gen-insn-attr-x86.awk | |||
@@ -68,7 +68,7 @@ BEGIN { | |||
68 | 68 | ||
69 | lprefix1_expr = "\\((66|!F3)\\)" | 69 | lprefix1_expr = "\\((66|!F3)\\)" |
70 | lprefix2_expr = "\\(F3\\)" | 70 | lprefix2_expr = "\\(F3\\)" |
71 | lprefix3_expr = "\\((F2|!F3)\\)" | 71 | lprefix3_expr = "\\((F2|!F3|66\\&F2)\\)" |
72 | lprefix_expr = "\\((66|F2|F3)\\)" | 72 | lprefix_expr = "\\((66|F2|F3)\\)" |
73 | max_lprefix = 4 | 73 | max_lprefix = 4 |
74 | 74 | ||
@@ -83,6 +83,8 @@ BEGIN { | |||
83 | prefix_num["Operand-Size"] = "INAT_PFX_OPNDSZ" | 83 | prefix_num["Operand-Size"] = "INAT_PFX_OPNDSZ" |
84 | prefix_num["REPNE"] = "INAT_PFX_REPNE" | 84 | prefix_num["REPNE"] = "INAT_PFX_REPNE" |
85 | prefix_num["REP/REPE"] = "INAT_PFX_REPE" | 85 | prefix_num["REP/REPE"] = "INAT_PFX_REPE" |
86 | prefix_num["XACQUIRE"] = "INAT_PFX_REPNE" | ||
87 | prefix_num["XRELEASE"] = "INAT_PFX_REPE" | ||
86 | prefix_num["LOCK"] = "INAT_PFX_LOCK" | 88 | prefix_num["LOCK"] = "INAT_PFX_LOCK" |
87 | prefix_num["SEG=CS"] = "INAT_PFX_CS" | 89 | prefix_num["SEG=CS"] = "INAT_PFX_CS" |
88 | prefix_num["SEG=DS"] = "INAT_PFX_DS" | 90 | prefix_num["SEG=DS"] = "INAT_PFX_DS" |