2001-01-08 Bo Thorsen <bo@suse.de>

* config/tc-i386.c (i386_immediate, i386_displacement):
        GOTPCREL check fix.
This commit is contained in:
Andreas Jaeger
2001-01-08 09:37:43 +00:00
parent 482e8b3206
commit b77a7acd1b
2 changed files with 52 additions and 47 deletions

View File

@ -1,3 +1,8 @@
2001-01-08 Bo Thorsen <bo@suse.de>
* config/tc-i386.c (i386_immediate, i386_displacement):
GOTPCREL check fix.
2001-01-07 Ian Lance Taylor <ian@zembu.com>
* doc/c-i386.texi (i386-Arch): Remove spaces incorrectly inserted

View File

@ -1,5 +1,5 @@
/* i386.c -- Assemble code for the Intel 80386
Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@ -3132,6 +3132,14 @@ i386_immediate (imm_start)
i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
len = 6;
}
else if (strncmp (cp + 1, "GOTPCREL", 8) == 0)
{
if (flag_code == CODE_64BIT)
i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL;
else
as_bad ("GOTPCREL relocations are supported only in 64bit mode.");
len = 8;
}
else if (strncmp (cp + 1, "GOT", 3) == 0)
{
if (flag_code == CODE_64BIT)
@ -3140,14 +3148,6 @@ i386_immediate (imm_start)
i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
len = 3;
}
else if (strncmp (cp + 1, "GOTPCREL", 3) == 0)
{
if (flag_code == CODE_64BIT)
i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL;
else
as_bad ("GOTPCREL relocations are supported only in 64bit mode.");
len = 3;
}
else
as_bad (_("bad reloc specifier in expression"));
@ -3370,6 +3370,13 @@ i386_displacement (disp_start, disp_end)
i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF;
len = 6;
}
else if (strncmp (cp + 1, "GOTPCREL", 8) == 0)
{
if (flag_code != CODE_64BIT)
as_bad ("GOTPCREL relocation is supported only in 64bit mode.");
i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL;
len = 8;
}
else if (strncmp (cp + 1, "GOT", 3) == 0)
{
if (flag_code == CODE_64BIT)
@ -3378,13 +3385,6 @@ i386_displacement (disp_start, disp_end)
i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32;
len = 3;
}
else if (strncmp (cp + 1, "GOTPCREL", 3) == 0)
{
if (flag_code != CODE_64BIT)
as_bad ("GOTPCREL relocation is supported only in 64bit mode.");
i.disp_reloc[this_operand] = BFD_RELOC_X86_64_GOTPCREL;
len = 3;
}
else
as_bad (_("bad reloc specifier in expression"));