dbxout.c (dbxout_parms): If mode of type of parameter living in memory doesn't match...
authorDoug Evans <devans@canuck.cygnus.com>
Sat, 16 May 1998 18:41:43 +0000 (18:41 +0000)
committerDoug Evans <devans@gcc.gnu.org>
Sat, 16 May 1998 18:41:43 +0000 (18:41 +0000)
* dbxout.c (dbxout_parms): If mode of type of parameter living
in memory doesn't match mode of DECL_RTL, make big endian correction.

From-SVN: r19808

gcc/ChangeLog
gcc/dbxout.c

index c281bdd8aaa5689e4a499bdd35ec3eef13268111..e6590a42ab9696f93ab82f5e9ce651e3079cba1a 100644 (file)
@@ -1,3 +1,8 @@
+Sat May 16 18:32:45 1998  Doug Evans  <devans@canuck.cygnus.com>
+
+       * dbxout.c (dbxout_parms): If mode of type of parameter living
+       in memory doesn't match mode of DECL_RTL, make big endian correction.
+
 Fri May 15 21:40:06 1998  John Wehle  (john@feith.com)
 
        * i386.md (movdi-1, movdi): Rewrite based on SI move patterns.
index dc7b754af435641c50260afe01c63d199467584b..513f9000556a9037dab86086bc529fcde3f6d027 100644 (file)
@@ -2403,6 +2403,15 @@ dbxout_parms (parms)
              current_sym_value = INTVAL (XEXP (XEXP (DECL_RTL (parms), 0), 1));
            current_sym_addr = 0;
 
+           /* Make a big endian correction if the mode of the type of the
+              parameter is not the same as the mode of the rtl.  */
+           if (BYTES_BIG_ENDIAN
+               && TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms))
+               && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD)
+             {
+               current_sym_value += UNITS_PER_WORD - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms)));
+             }
+
            FORCE_TEXT;
            if (DECL_NAME (parms))
              {