summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2019-07-29 22:05:34 -0700
committerH. Peter Anvin <hpa@zytor.com>2019-07-29 22:05:34 -0700
commitf89bb7693885f552537481b00b2a3aa9a0d1ecd5 (patch)
tree55fd9d3acfe96e2c5ee276b34c6bbf70fc64dae1
parent77726c3ebbd052f77382e3ddf3aa003f42442f6b (diff)
downloadbinutils-f89bb7693885f552537481b00b2a3aa9a0d1ecd5.tar.gz
binutils-f89bb7693885f552537481b00b2a3aa9a0d1ecd5.tar.xz
binutils-f89bb7693885f552537481b00b2a3aa9a0d1ecd5.zip
gas/config/tc-i386.c: be more selective when filling in types
Set the bits in types which correspond to the size in use only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--gas/config/tc-i386.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 3025a5e3c8..fb9b29ebfe 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -8944,11 +8944,11 @@ lex_got (enum bfd_reloc_code_real *rel,
{
if (flag_code != CODE_64BIT)
{
- if (gotrel[j].sizemask & 2) {
+ if (gotrel[j].sizemask & size & 2) {
types->bitfield.imm16 = 1;
types->bitfield.disp16 = 1;
}
- if (gotrel[j].sizemask & 4) {
+ if (gotrel[j].sizemask & size & 4) {
types->bitfield.imm32 = 1;
types->bitfield.disp32 = 1;
}
@@ -9074,11 +9074,11 @@ lex_got (enum bfd_reloc_code_real *rel ATTRIBUTE_UNUSED,
{
if (flag_code != CODE_64BIT)
{
- if (gotrel[j].sizemask & 2) {
+ if (gotrel[j].sizemask & size & 2) {
types->bitfield.imm16 = 1;
types->bitfield.disp16 = 1;
}
- if (gotrel[j].sizemask & 4) {
+ if (gotrel[j].sizemask & size & 4) {
types->bitfield.imm32 = 1;
types->bitfield.disp32 = 1;
}