mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 06:44:36 -05:00
x86/insn: Fix opcode map (!REX2) superscript tags
Commit:159039af8c("x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode map") added (!REX2) superscript with a space, but the correct format requires ',' for concatination with other superscript tags. Add ',' to generate correct insn attribute tables. I confirmed with following command: arch/x86/lib/x86-opcode-map.txt | grep e8 | head -n 1 [0xe8] = INAT_MAKE_IMM(INAT_IMM_VWORD32) | INAT_FORCE64 | INAT_NO_REX2, Fixes:159039af8c("x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode map") Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/174580489027.388420.15539375184727726142.stgit@devnote2
This commit is contained in:
committed by
Ingo Molnar
parent
83725bdf94
commit
ca698ec2f0
@@ -35,7 +35,7 @@
|
||||
# - (!F3) : the last prefix is not 0xF3 (including non-last prefix case)
|
||||
# - (66&F2): Both 0x66 and 0xF2 prefixes are specified.
|
||||
#
|
||||
# REX2 Prefix
|
||||
# REX2 Prefix Superscripts
|
||||
# - (!REX2): REX2 is not allowed
|
||||
# - (REX2): REX2 variant e.g. JMPABS
|
||||
|
||||
@@ -286,10 +286,10 @@ df: ESC
|
||||
# Note: "forced64" is Intel CPU behavior: they ignore 0x66 prefix
|
||||
# in 64-bit mode. AMD CPUs accept 0x66 prefix, it causes RIP truncation
|
||||
# to 16 bits. In 32-bit mode, 0x66 is accepted by both Intel and AMD.
|
||||
e0: LOOPNE/LOOPNZ Jb (f64) (!REX2)
|
||||
e1: LOOPE/LOOPZ Jb (f64) (!REX2)
|
||||
e2: LOOP Jb (f64) (!REX2)
|
||||
e3: JrCXZ Jb (f64) (!REX2)
|
||||
e0: LOOPNE/LOOPNZ Jb (f64),(!REX2)
|
||||
e1: LOOPE/LOOPZ Jb (f64),(!REX2)
|
||||
e2: LOOP Jb (f64),(!REX2)
|
||||
e3: JrCXZ Jb (f64),(!REX2)
|
||||
e4: IN AL,Ib (!REX2)
|
||||
e5: IN eAX,Ib (!REX2)
|
||||
e6: OUT Ib,AL (!REX2)
|
||||
@@ -298,10 +298,10 @@ e7: OUT Ib,eAX (!REX2)
|
||||
# in "near" jumps and calls is 16-bit. For CALL,
|
||||
# push of return address is 16-bit wide, RSP is decremented by 2
|
||||
# but is not truncated to 16 bits, unlike RIP.
|
||||
e8: CALL Jz (f64) (!REX2)
|
||||
e9: JMP-near Jz (f64) (!REX2)
|
||||
ea: JMP-far Ap (i64) (!REX2)
|
||||
eb: JMP-short Jb (f64) (!REX2)
|
||||
e8: CALL Jz (f64),(!REX2)
|
||||
e9: JMP-near Jz (f64),(!REX2)
|
||||
ea: JMP-far Ap (i64),(!REX2)
|
||||
eb: JMP-short Jb (f64),(!REX2)
|
||||
ec: IN AL,DX (!REX2)
|
||||
ed: IN eAX,DX (!REX2)
|
||||
ee: OUT DX,AL (!REX2)
|
||||
@@ -478,22 +478,22 @@ AVXcode: 1
|
||||
7f: movq Qq,Pq | vmovdqa Wx,Vx (66) | vmovdqa32/64 Wx,Vx (66),(evo) | vmovdqu Wx,Vx (F3) | vmovdqu32/64 Wx,Vx (F3),(evo) | vmovdqu8/16 Wx,Vx (F2),(ev)
|
||||
# 0x0f 0x80-0x8f
|
||||
# Note: "forced64" is Intel CPU behavior (see comment about CALL insn).
|
||||
80: JO Jz (f64) (!REX2)
|
||||
81: JNO Jz (f64) (!REX2)
|
||||
82: JB/JC/JNAE Jz (f64) (!REX2)
|
||||
83: JAE/JNB/JNC Jz (f64) (!REX2)
|
||||
84: JE/JZ Jz (f64) (!REX2)
|
||||
85: JNE/JNZ Jz (f64) (!REX2)
|
||||
86: JBE/JNA Jz (f64) (!REX2)
|
||||
87: JA/JNBE Jz (f64) (!REX2)
|
||||
88: JS Jz (f64) (!REX2)
|
||||
89: JNS Jz (f64) (!REX2)
|
||||
8a: JP/JPE Jz (f64) (!REX2)
|
||||
8b: JNP/JPO Jz (f64) (!REX2)
|
||||
8c: JL/JNGE Jz (f64) (!REX2)
|
||||
8d: JNL/JGE Jz (f64) (!REX2)
|
||||
8e: JLE/JNG Jz (f64) (!REX2)
|
||||
8f: JNLE/JG Jz (f64) (!REX2)
|
||||
80: JO Jz (f64),(!REX2)
|
||||
81: JNO Jz (f64),(!REX2)
|
||||
82: JB/JC/JNAE Jz (f64),(!REX2)
|
||||
83: JAE/JNB/JNC Jz (f64),(!REX2)
|
||||
84: JE/JZ Jz (f64),(!REX2)
|
||||
85: JNE/JNZ Jz (f64),(!REX2)
|
||||
86: JBE/JNA Jz (f64),(!REX2)
|
||||
87: JA/JNBE Jz (f64),(!REX2)
|
||||
88: JS Jz (f64),(!REX2)
|
||||
89: JNS Jz (f64),(!REX2)
|
||||
8a: JP/JPE Jz (f64),(!REX2)
|
||||
8b: JNP/JPO Jz (f64),(!REX2)
|
||||
8c: JL/JNGE Jz (f64),(!REX2)
|
||||
8d: JNL/JGE Jz (f64),(!REX2)
|
||||
8e: JLE/JNG Jz (f64),(!REX2)
|
||||
8f: JNLE/JG Jz (f64),(!REX2)
|
||||
# 0x0f 0x90-0x9f
|
||||
90: SETO Eb | kmovw/q Vk,Wk | kmovb/d Vk,Wk (66)
|
||||
91: SETNO Eb | kmovw/q Mv,Vk | kmovb/d Mv,Vk (66)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
# - (!F3) : the last prefix is not 0xF3 (including non-last prefix case)
|
||||
# - (66&F2): Both 0x66 and 0xF2 prefixes are specified.
|
||||
#
|
||||
# REX2 Prefix
|
||||
# REX2 Prefix Superscripts
|
||||
# - (!REX2): REX2 is not allowed
|
||||
# - (REX2): REX2 variant e.g. JMPABS
|
||||
|
||||
@@ -286,10 +286,10 @@ df: ESC
|
||||
# Note: "forced64" is Intel CPU behavior: they ignore 0x66 prefix
|
||||
# in 64-bit mode. AMD CPUs accept 0x66 prefix, it causes RIP truncation
|
||||
# to 16 bits. In 32-bit mode, 0x66 is accepted by both Intel and AMD.
|
||||
e0: LOOPNE/LOOPNZ Jb (f64) (!REX2)
|
||||
e1: LOOPE/LOOPZ Jb (f64) (!REX2)
|
||||
e2: LOOP Jb (f64) (!REX2)
|
||||
e3: JrCXZ Jb (f64) (!REX2)
|
||||
e0: LOOPNE/LOOPNZ Jb (f64),(!REX2)
|
||||
e1: LOOPE/LOOPZ Jb (f64),(!REX2)
|
||||
e2: LOOP Jb (f64),(!REX2)
|
||||
e3: JrCXZ Jb (f64),(!REX2)
|
||||
e4: IN AL,Ib (!REX2)
|
||||
e5: IN eAX,Ib (!REX2)
|
||||
e6: OUT Ib,AL (!REX2)
|
||||
@@ -298,10 +298,10 @@ e7: OUT Ib,eAX (!REX2)
|
||||
# in "near" jumps and calls is 16-bit. For CALL,
|
||||
# push of return address is 16-bit wide, RSP is decremented by 2
|
||||
# but is not truncated to 16 bits, unlike RIP.
|
||||
e8: CALL Jz (f64) (!REX2)
|
||||
e9: JMP-near Jz (f64) (!REX2)
|
||||
ea: JMP-far Ap (i64) (!REX2)
|
||||
eb: JMP-short Jb (f64) (!REX2)
|
||||
e8: CALL Jz (f64),(!REX2)
|
||||
e9: JMP-near Jz (f64),(!REX2)
|
||||
ea: JMP-far Ap (i64),(!REX2)
|
||||
eb: JMP-short Jb (f64),(!REX2)
|
||||
ec: IN AL,DX (!REX2)
|
||||
ed: IN eAX,DX (!REX2)
|
||||
ee: OUT DX,AL (!REX2)
|
||||
@@ -478,22 +478,22 @@ AVXcode: 1
|
||||
7f: movq Qq,Pq | vmovdqa Wx,Vx (66) | vmovdqa32/64 Wx,Vx (66),(evo) | vmovdqu Wx,Vx (F3) | vmovdqu32/64 Wx,Vx (F3),(evo) | vmovdqu8/16 Wx,Vx (F2),(ev)
|
||||
# 0x0f 0x80-0x8f
|
||||
# Note: "forced64" is Intel CPU behavior (see comment about CALL insn).
|
||||
80: JO Jz (f64) (!REX2)
|
||||
81: JNO Jz (f64) (!REX2)
|
||||
82: JB/JC/JNAE Jz (f64) (!REX2)
|
||||
83: JAE/JNB/JNC Jz (f64) (!REX2)
|
||||
84: JE/JZ Jz (f64) (!REX2)
|
||||
85: JNE/JNZ Jz (f64) (!REX2)
|
||||
86: JBE/JNA Jz (f64) (!REX2)
|
||||
87: JA/JNBE Jz (f64) (!REX2)
|
||||
88: JS Jz (f64) (!REX2)
|
||||
89: JNS Jz (f64) (!REX2)
|
||||
8a: JP/JPE Jz (f64) (!REX2)
|
||||
8b: JNP/JPO Jz (f64) (!REX2)
|
||||
8c: JL/JNGE Jz (f64) (!REX2)
|
||||
8d: JNL/JGE Jz (f64) (!REX2)
|
||||
8e: JLE/JNG Jz (f64) (!REX2)
|
||||
8f: JNLE/JG Jz (f64) (!REX2)
|
||||
80: JO Jz (f64),(!REX2)
|
||||
81: JNO Jz (f64),(!REX2)
|
||||
82: JB/JC/JNAE Jz (f64),(!REX2)
|
||||
83: JAE/JNB/JNC Jz (f64),(!REX2)
|
||||
84: JE/JZ Jz (f64),(!REX2)
|
||||
85: JNE/JNZ Jz (f64),(!REX2)
|
||||
86: JBE/JNA Jz (f64),(!REX2)
|
||||
87: JA/JNBE Jz (f64),(!REX2)
|
||||
88: JS Jz (f64),(!REX2)
|
||||
89: JNS Jz (f64),(!REX2)
|
||||
8a: JP/JPE Jz (f64),(!REX2)
|
||||
8b: JNP/JPO Jz (f64),(!REX2)
|
||||
8c: JL/JNGE Jz (f64),(!REX2)
|
||||
8d: JNL/JGE Jz (f64),(!REX2)
|
||||
8e: JLE/JNG Jz (f64),(!REX2)
|
||||
8f: JNLE/JG Jz (f64),(!REX2)
|
||||
# 0x0f 0x90-0x9f
|
||||
90: SETO Eb | kmovw/q Vk,Wk | kmovb/d Vk,Wk (66)
|
||||
91: SETNO Eb | kmovw/q Mv,Vk | kmovb/d Mv,Vk (66)
|
||||
|
||||
Reference in New Issue
Block a user