aboutsummaryrefslogtreecommitdiff
path: root/opcodes/i386-tbl.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-03-28 11:47:59 +0100
committerJan Beulich <jbeulich@suse.com>2024-03-28 11:47:59 +0100
commitcd9ca24dd21821f203279d48d8ae1b67cc4aa5fe (patch)
tree39fb221ed632c46917c68f0e0a37e3dacc0ceb4d /opcodes/i386-tbl.h
parent4ef6173d2dfeafd33deedf7ce0d384cfbcf1170d (diff)
downloadgdb-cd9ca24dd21821f203279d48d8ae1b67cc4aa5fe.zip
gdb-cd9ca24dd21821f203279d48d8ae1b67cc4aa5fe.tar.gz
gdb-cd9ca24dd21821f203279d48d8ae1b67cc4aa5fe.tar.bz2
x86: templatize INC/DEC
With the multitude of new APX templates, it finally becomes desirable to further remove redundancy by also templatizing basic arithmetic insns. Start with the simplest case, accompanied by a necessary adjustment to i386-gen (such that template uses can also be at the start of a line). While there also drop a bogus (meaningless / unreachable) "break" as well as a unused variable (which I'm surprised compilers didn't warn about).
Diffstat (limited to 'opcodes/i386-tbl.h')
-rw-r--r--opcodes/i386-tbl.h108
1 files changed, 54 insertions, 54 deletions
diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h
index f17d94e..1b10f13 100644
--- a/opcodes/i386-tbl.h
+++ b/opcodes/i386-tbl.h
@@ -868,32 +868,6 @@ static const insn_template i386_optab[] =
0, 0, 0, 0, 0, 0 } },
{ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0,
0, 0, 0, 0, 1, 0 } } } },
- { MN_inc, 0x40, 1, SPACE_BASE, None,
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 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 } },
- { { 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 71, 72, 73,
74, 76, 78, 80, 82, 83, 84, 85,
- 92, 95, 102, 105, 113, 117, 120, 127,
- 134, 141, 142, 149, 151, 153, 154, 155,
+ 92, 99, 107, 111, 114, 121, 128, 135,
+ 136, 143, 146, 149, 151, 153, 154, 155,
156, 157, 159, 161, 162, 163, 164, 165,
166, 167, 168, 169, 170, 171, 172, 173,
174, 181, 183, 185, 192, 199, 210, 221,