From: Richard Sandiford Date: Mon, 2 Feb 2009 19:40:20 +0000 (+0000) Subject: mips.h (FILE_HAS_64BIT_SYMBOLS): New macro. X-Git-Tag: releases/gcc-4.4.0~670 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e8a796f8134502faf706f6ad4eff9273a70edd4;p=thirdparty%2Fgcc.git mips.h (FILE_HAS_64BIT_SYMBOLS): New macro. gcc/ * config/mips/mips.h (FILE_HAS_64BIT_SYMBOLS): New macro. (ABI_HAS_64BIT_SYMBOLS): Use it. (DWARF2_ADDR_SIZE): Use it instead of ABI_HAS_64BIT_SYMBOLS. From-SVN: r143878 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ed5b7fc92e3..3e703aca0269 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-02-02 Richard Sandiford + + * config/mips/mips.h (FILE_HAS_64BIT_SYMBOLS): New macro. + (ABI_HAS_64BIT_SYMBOLS): Use it. + (DWARF2_ADDR_SIZE): Use it instead of ABI_HAS_64BIT_SYMBOLS. + 2009-02-02 Paul Brook * config/arm/arm.md (arm_addsi3): Add r/r/k alternative. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index f5de061d44c3..464148704f33 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -767,9 +767,15 @@ enum mips_code_readable_setting { /* Likewise for 32-bit regs. */ #define ABI_NEEDS_32BIT_REGS (mips_abi == ABI_32) -/* True if symbols are 64 bits wide. At present, n64 is the only - ABI for which this is true. */ -#define ABI_HAS_64BIT_SYMBOLS (mips_abi == ABI_64 && !TARGET_SYM32) +/* True if the file format uses 64-bit symbols. At present, this is + only true for n64, which uses 64-bit ELF. */ +#define FILE_HAS_64BIT_SYMBOLS (mips_abi == ABI_64) + +/* True if symbols are 64 bits wide. This is usually determined by + the ABI's file format, but it can be overridden by -msym32. Note that + overriding the size with -msym32 changes the ABI of relocatable objects, + although it doesn't change the ABI of a fully-linked object. */ +#define ABI_HAS_64BIT_SYMBOLS (FILE_HAS_64BIT_SYMBOLS && !TARGET_SYM32) /* ISA has instructions for managing 64-bit fp and gp regs (e.g. mips3). */ #define ISA_HAS_64BIT_REGS (ISA_MIPS3 \ @@ -1218,7 +1224,14 @@ enum mips_code_readable_setting { #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG #endif -#define DWARF2_ADDR_SIZE (ABI_HAS_64BIT_SYMBOLS ? 8 : 4) +/* The size of DWARF addresses should be the same as the size of symbols + in the target file format. They shouldn't depend on things like -msym32, + because many DWARF consumers do not allow the mixture of address sizes + that one would then get from linking -msym32 code with -msym64 code. + + Note that the default POINTER_SIZE test is not appropriate for MIPS. + EABI64 has 64-bit pointers but uses 32-bit ELF. */ +#define DWARF2_ADDR_SIZE (FILE_HAS_64BIT_SYMBOLS ? 8 : 4) /* By default, turn on GDB extensions. */ #define DEFAULT_GDB_EXTENSIONS 1