aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>1994-11-16 21:10:09 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>1994-11-16 21:10:09 +0000
commitf76b9db2874507ed287d1fe39ca2b1e89ae95207 (patch)
tree036743ae971e4dddc0469a67fd6d6272b0801af8 /gcc/dbxout.c
parent1942e820686abbdd62515895e219476c26429945 (diff)
downloadgcc-f76b9db2874507ed287d1fe39ca2b1e89ae95207.zip
gcc-f76b9db2874507ed287d1fe39ca2b1e89ae95207.tar.gz
gcc-f76b9db2874507ed287d1fe39ca2b1e89ae95207.tar.bz2
Check target endianness at run time, not compile time
From-SVN: r8470
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index f09d52c..ddddd40 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -2136,11 +2136,10 @@ dbxout_parms (parms)
with the variable's declared type, and adjust the address
if the least significant bytes (which we are using) are not
the first ones. */
-#if BYTES_BIG_ENDIAN
- if (TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
+ if (BYTES_BIG_ENDIAN
+ && TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
current_sym_value += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms)))
- GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))));
-#endif
if (GET_CODE (DECL_RTL (parms)) == MEM
&& GET_CODE (XEXP (DECL_RTL (parms), 0)) == PLUS
@@ -2348,11 +2347,11 @@ dbxout_reg_parms (parms)
/* A parm declared char is really passed as an int,
so it occupies the least significant bytes.
On a big-endian machine those are not the low-numbered ones. */
-#if BYTES_BIG_ENDIAN
- if (offset != -1 && TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
+ if (BYTES_BIG_ENDIAN
+ && offset != -1
+ && TREE_TYPE (parms) != DECL_ARG_TYPE (parms))
offset += (GET_MODE_SIZE (TYPE_MODE (DECL_ARG_TYPE (parms)))
- GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))));
-#endif
if (INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1)) != offset) {...}
#endif
dbxout_symbol_location (parms, TREE_TYPE (parms),