diff options
author | Eric Christopher <echristo@gmail.com> | 2004-02-26 21:27:32 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2004-02-26 21:27:32 +0000 |
commit | 73369e651700a53b4d1a3f869f31d385a226ee94 (patch) | |
tree | 1257597f6819ff2b0826352ca7f0fcd83b44ef31 /gas/config | |
parent | e7f16015619d9f1d2ad00f652c0a76d4e14fa737 (diff) | |
download | gdb-73369e651700a53b4d1a3f869f31d385a226ee94.zip gdb-73369e651700a53b4d1a3f869f31d385a226ee94.tar.gz gdb-73369e651700a53b4d1a3f869f31d385a226ee94.tar.bz2 |
2004-02-26 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (mips_dwarf2_addr_size): New.
* config/tc-mips.h (DWARF2_ADDR_SIZE): Use.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-mips.c | 13 | ||||
-rw-r--r-- | gas/config/tc-mips.h | 3 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 66f52b0..beaa11a 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -14419,3 +14419,16 @@ mips_dwarf2_format (void) else return dwarf2_format_32bit; } + +int +mips_dwarf2_addr_size (void) +{ + if (mips_abi == N64_ABI) + return 8; + /* GCC for 64-bit targets turns on mlong64 giving + us 64-bit addresses. */ + else if (mips_abi == EABI_ABI && !file_mips_gp32) + return 8; + else + return 4; +} diff --git a/gas/config/tc-mips.h b/gas/config/tc-mips.h index 110dc09..46a7653 100644 --- a/gas/config/tc-mips.h +++ b/gas/config/tc-mips.h @@ -183,7 +183,6 @@ extern void mips_enable_auto_align (void); extern enum dwarf2_format mips_dwarf2_format (void); #define DWARF2_FORMAT() mips_dwarf2_format () -#define DWARF2_ADDR_SIZE(bfd) \ - (DWARF2_FORMAT () == dwarf2_format_32bit ? 4 : 8) +#define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size () #endif /* TC_MIPS */ |