aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-11-09 12:55:52 +0100
committerJan Beulich <jbeulich@suse.com>2023-11-09 12:55:52 +0100
commite7d74879870833fb0c42282da940e60fee13948e (patch)
tree96ee80096c01d0b0594f34216347f7976cc76e64 /opcodes
parent706ce98422dcbfa1ae073853c479854cb7c7f2a0 (diff)
downloadgdb-e7d74879870833fb0c42282da940e60fee13948e.zip
gdb-e7d74879870833fb0c42282da940e60fee13948e.tar.gz
gdb-e7d74879870833fb0c42282da940e60fee13948e.tar.bz2
x86: rework UWRMSR operand swapping
As indicated during review already, doing the swapping early is overall cheaper than doing it only after operand matching.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-opc.tbl4
-rw-r--r--opcodes/i386-tbl.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl
index 7020ca1..c31bf20 100644
--- a/opcodes/i386-opc.tbl
+++ b/opcodes/i386-opc.tbl
@@ -3356,6 +3356,8 @@ eretu, 0xf30f01ca, FRED, NoSuf, {}
urdmsr, 0xf20f38f8, USER_MSR, RegMem|NoSuf|NoRex64, { Reg64, Reg64 }
urdmsr, 0xf2f8/0, USER_MSR, Modrm|Vex128|VexMap7|VexW0|NoSuf, { Imm32, Reg64 }
uwrmsr, 0xf30f38f8, USER_MSR, Modrm|NoSuf|NoRex64, { Reg64, Reg64 }
-uwrmsr, 0xf3f8/0, USER_MSR, Modrm|Vex128|VexMap7|VexW0|NoSuf, { Reg64, Imm32 }
+// Immediates want to be first; md_assemble() takes care of swapping operands
+// accordingly.
+uwrmsr, 0xf3f8/0, USER_MSR, Modrm|Vex128|VexMap7|VexW0|NoSuf, { Imm32, Reg64 }
// USER_MSR instructions end.
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
index 5117bda..527793c 100644
--- a/opcodes/i386-tbl.h
+++ b/opcodes/i386-tbl.h
@@ -39668,9 +39668,9 @@ static const insn_template i386_optab[] =
0 },
{ { 98, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 } },
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } },
- { { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
+ { { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 } },
- { { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ { { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0 } } } },
};