aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2022-07-04 08:32:20 +0200
committerJan Beulich <jbeulich@suse.com>2022-07-04 08:32:20 +0200
commit02b83698ef04a33a8c606efeceb8fe7cd9a9b344 (patch)
treed11b653a7321d636217643f0b89d910e19d10eac /opcodes
parent9386188e95f4dee6319c51b30e2ea64b27ae0084 (diff)
downloadgdb-02b83698ef04a33a8c606efeceb8fe7cd9a9b344.zip
gdb-02b83698ef04a33a8c606efeceb8fe7cd9a9b344.tar.gz
gdb-02b83698ef04a33a8c606efeceb8fe7cd9a9b344.tar.bz2
x86: restore masking of displacement kinds
Commit 7d5e4556a375 rendered the check near the end of what is now i386_finalize_displacement() entirely dead for AT&T mode, since for operands involving a displacement .unspecified will always be set. But the logic there is bogus anyway - Intel syntax operand size specifiers are of no interest there either. The only thing which matters in the "displacement only" determination is .baseindex. Of course when masking displacement kinds we should not at the same time also mask off other attributes. Furthermore the type mask returned by lex_got() also needs to be adjusted: The only case where we want Disp32 (rather than Disp32S) is when dealing with 32-bit addressing mode in 64-bit code.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/i386-gen.c12
-rw-r--r--opcodes/i386-init.h12
2 files changed, 12 insertions, 12 deletions
diff --git a/opcodes/i386-gen.c b/opcodes/i386-gen.c
index d18a7d2..1fe59e6 100644
--- a/opcodes/i386-gen.c
+++ b/opcodes/i386-gen.c
@@ -529,14 +529,14 @@ static initializer operand_type_init[] =
"Imm16|Imm32|Imm32S" },
{ "OPERAND_TYPE_IMM32_64",
"Imm32|Imm64" },
- { "OPERAND_TYPE_IMM32_32S_DISP32",
- "Imm32|Imm32S|Disp32" },
+ { "OPERAND_TYPE_IMM32_32S_DISP32S",
+ "Imm32|Imm32S|Disp32S" },
{ "OPERAND_TYPE_IMM64_DISP64",
"Imm64|Disp64" },
- { "OPERAND_TYPE_IMM32_32S_64_DISP32",
- "Imm32|Imm32S|Imm64|Disp32" },
- { "OPERAND_TYPE_IMM32_32S_64_DISP32_64",
- "Imm32|Imm32S|Imm64|Disp32|Disp64" },
+ { "OPERAND_TYPE_IMM32_32S_64_DISP32S",
+ "Imm32|Imm32S|Imm64|Disp32S" },
+ { "OPERAND_TYPE_IMM32_32S_64_DISP32S_64",
+ "Imm32|Imm32S|Imm64|Disp32S|Disp64" },
{ "OPERAND_TYPE_ANYIMM",
"Imm1|Imm8|Imm8S|Imm16|Imm32|Imm32S|Imm64" },
};
diff --git a/opcodes/i386-init.h b/opcodes/i386-init.h
index df2f7bc..84ed54e 100644
--- a/opcodes/i386-init.h
+++ b/opcodes/i386-init.h
@@ -1964,20 +1964,20 @@
{ { 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0 } }
-#define OPERAND_TYPE_IMM32_32S_DISP32 \
- { { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
+#define OPERAND_TYPE_IMM32_32S_DISP32S \
+ { { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0 } }
#define OPERAND_TYPE_IMM64_DISP64 \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0 } }
-#define OPERAND_TYPE_IMM32_32S_64_DISP32 \
- { { 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, \
+#define OPERAND_TYPE_IMM32_32S_64_DISP32S \
+ { { 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0 } }
-#define OPERAND_TYPE_IMM32_32S_64_DISP32_64 \
- { { 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, \
+#define OPERAND_TYPE_IMM32_32S_64_DISP32S_64 \
+ { { 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0 } }
#define OPERAND_TYPE_ANYIMM \