* config/tc-mips.c (mips_set_options): Add sym32 field.
commitf46c31e0deab6f2734a7a3acacef62fa64bb6555
authorRichard Sandiford <rsandifo@nildram.co.uk>
Fri, 4 Mar 2005 09:51:11 +0000 (4 09:51 +0000)
committerRichard Sandiford <rsandifo@nildram.co.uk>
Fri, 4 Mar 2005 09:51:11 +0000 (4 09:51 +0000)
tree6430d2cf99e641a81a768bbda545def5d436e5e9
parentd5ac433a4ac13e6ac65e7f3844f6d04e3d03c845
* config/tc-mips.c (mips_set_options): Add sym32 field.
(mips_opts): Initialize it.
(HAVE_32BIT_ADDRESSES): Set to true if pointers are 32 bits wide.
(HAVE_64BIT_ADDRESSES): Redefine as !HAVE_32BIT_ADDRESSES.
(HAVE_32BIT_SYMBOLS, HAVE_64BIT_SYMBOLS): New macros.
(load_address): Use HAVE_64BIT_SYMBOLS instead of HAVE_64BIT_ADDRESSES
when deciding whether to use a symbolic %highest/%higher expansion.
(macro): Likewise.  Remove o64/n32 linux hack.  Always use
ADDRESS_ADD*_INSN for address addition in the expansion of "dla"
and "la".  Handle constants separately from symbolic expressions in
the "ld_st:" case, using 64-bit arithmetic if HAVE_64BIT_ADDRESSES
and using load_register to load the high part of the address.
(OPTION_MSYM32, OPTION_NO_MSYM32): New macros.
(OPTION_ELF_BASE): Bump by 2.
(md_longopts): Add entries for -msym32 and -mno-sym32.
(md_parse_option): Handle them.
(usage): Document them.
(s_mipsset): Handle ".set sym32" and ".set nosym32".
(s_cpload, s_cpsetup): Use HAVE_64BIT_SYMBOLS instead of
HAVE_64BIT_ADDRESSES to detect 64-bit values of "_gp".
* doc/c-mips.texi: Document ".set sym32", ".set nosym32",
-msym32 and -mno-sym32.
13 files changed:
gas/ChangeLog
gas/config/tc-mips.c
gas/doc/c-mips.texi
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/ldstla-eabi64.d [new file with mode: 0644]
gas/testsuite/gas/mips/ldstla-n32-shared.d [deleted file]
gas/testsuite/gas/mips/ldstla-n32.d [deleted file]
gas/testsuite/gas/mips/ldstla-n32.s [deleted file]
gas/testsuite/gas/mips/ldstla-n64-shared.d
gas/testsuite/gas/mips/ldstla-n64-sym32.d [new file with mode: 0644]
gas/testsuite/gas/mips/ldstla-n64.d
gas/testsuite/gas/mips/ldstla-sym32.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp