Thu Jul 3 13:48:11 1997 Michael Snyder (msnyder@cleaver.cygnus.com)
authorMichael Snyder <msnyder@vmware.com>
Thu, 3 Jul 1997 20:50:11 +0000 (20:50 +0000)
committerMichael Snyder <msnyder@vmware.com>
Thu, 3 Jul 1997 20:50:11 +0000 (20:50 +0000)
        * mips-tdep.c (mips_push_arguments): don't left-adjust 32-bit
        integers in 64-bit register parameters before function calls.

gdb/ChangeLog
gdb/mips-tdep.c

index 4cf2199cfcbef2855ed40b6c648cbcad0276a57d..232511ed2e5c09083e425ad09f32fb681f68fc62 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jul  3 13:48:11 1997  Michael Snyder  (msnyder@cleaver.cygnus.com)
+
+       * mips-tdep.c (mips_push_arguments): don't left-adjust 32-bit
+       integers in 64-bit register parameters before function calls.
+
 Mon Jun 30 17:54:51 1997  Michael Snyder  (msnyder@cleaver.cygnus.com)
 
        * mips-tdep.c (mips_push_arguments): special-case handling for
index f68ecee496ac7e9ba1bc5d18d4c93a4badfac405..de60faedc8407a5511b7f236141921a4890fbd56 100644 (file)
@@ -1375,19 +1375,19 @@ mips_push_arguments(nargs, args, sp, struct_return, struct_addr)
                {
                  CORE_ADDR regval = extract_address (val, partial_len);
 
-                 /* A simple argument being passed in a general register.
-                    If the length is smaller than the register size, we
-                    have to adjust the alignment on big endian targets.  
+                 /* A non-floating-point argument being passed in a 
+                    general register.  If a struct or union, and if
+                    small enough for a single register, we have to 
+                    adjust the alignment.
 
-                    For structs, it appears that we have to 
-                    do the same even in little endian mode.
+                    It does not seem to be necessary to do the
+                    same for integral types.
 
-                    But don't do this adjustment on EABI targets. */
+                    Also don't do this adjustment on EABI targets.  */
 
                  if (!MIPS_EABI &&
                      TYPE_LENGTH (arg_type) < MIPS_REGSIZE &&
-                     (TARGET_BYTE_ORDER == BIG_ENDIAN ||
-                      typecode == TYPE_CODE_STRUCT    ||
+                     (typecode == TYPE_CODE_STRUCT ||
                       typecode == TYPE_CODE_UNION))
                    regval <<= ((MIPS_REGSIZE - partial_len) * 
                                TARGET_CHAR_BIT);