diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-11-16 21:10:09 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-11-16 21:10:09 +0000 |
commit | 51356f864933f664f7dfbf6e25ddcd97b587441a (patch) | |
tree | 036743ae971e4dddc0469a67fd6d6272b0801af8 /gcc/dwarfout.c | |
parent | d70e58b6facc61184689890af429c7f0def003e8 (diff) | |
download | ppe42-gcc-51356f864933f664f7dfbf6e25ddcd97b587441a.tar.gz ppe42-gcc-51356f864933f664f7dfbf6e25ddcd97b587441a.zip |
Check target endianness at run time, not compile time
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index ccf436b5d18..4287e106a09 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -2204,12 +2204,10 @@ location_or_const_value_attribute (decl) if (declared_type == passed_type) rtl = DECL_INCOMING_RTL (decl); -#if (BYTES_BIG_ENDIAN == 0) - else + else if (! BYTES_BIG_ENDIAN) if (TREE_CODE (declared_type) == INTEGER_TYPE) if (TYPE_SIZE (declared_type) <= TYPE_SIZE (passed_type)) rtl = DECL_INCOMING_RTL (decl); -#endif /* (BYTES_BIG_ENDIAN == 0) */ } if (rtl == NULL_RTX) @@ -2519,19 +2517,18 @@ bit_offset_attribute (decl) highest_order_object_bit_offset = object_offset_in_bytes * BITS_PER_UNIT; highest_order_field_bit_offset = bitpos_int; -#if (BYTES_BIG_ENDIAN == 0) - highest_order_field_bit_offset - += (unsigned) TREE_INT_CST_LOW (DECL_SIZE (decl)); + if (! BYTES_BIG_ENDIAN) + { + highest_order_field_bit_offset + += (unsigned) TREE_INT_CST_LOW (DECL_SIZE (decl)); - highest_order_object_bit_offset += simple_type_size_in_bits (type); -#endif /* (BYTES_BIG_ENDIAN == 0) */ + highest_order_object_bit_offset += simple_type_size_in_bits (type); + } bit_offset = -#if (BYTES_BIG_ENDIAN == 0) - highest_order_object_bit_offset - highest_order_field_bit_offset; -#else /* (BYTES_BIG_ENDIAN != 0) */ - highest_order_field_bit_offset - highest_order_object_bit_offset; -#endif /* (BYTES_BIG_ENDIAN != 0) */ + (! BYTES_BIG_ENDIAN + ? highest_order_object_bit_offset - highest_order_field_bit_offset + : highest_order_field_bit_offset - highest_order_object_bit_offset); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_bit_offset); ASM_OUTPUT_DWARF_DATA2 (asm_out_file, bit_offset); |