arm.c (arm_pad_arg_upward): Compare return value of DEFAULT_FUNCTION_ARG_PADDING...
authorPaul Brook <paul@codesourcery.com>
Thu, 7 Jul 2005 21:43:10 +0000 (21:43 +0000)
committerPaul Brook <pbrook@gcc.gnu.org>
Thu, 7 Jul 2005 21:43:10 +0000 (21:43 +0000)
2005-07-07  Paul Brook  <paul@codesourcery.com>

* config/arm/arm.c (arm_pad_arg_upward): Compare return value of
DEFAULT_FUNCTION_ARG_PADDING to upward.

[[Split portion of a mixed commit.]]

From-SVN: r101736.2

gcc/ChangeLog
gcc/config/arm/arm.c

index dbc36f7e2b41ed1b9d3ca2f9d18d1267a5fb743d..fc4e8eb5bd373cfc3a77c227c292b36d98b9a42c 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-07  Paul Brook  <paul@codesourcery.com>
+
+       * config/arm/arm.c (arm_pad_arg_upward): Compare return value of
+       DEFAULT_FUNCTION_ARG_PADDING to upward.
+
 2005-07-07  Richard Henderson  <rth@redhat.com>
 
        * function.c (locate_and_pad_parm): Record parameter alignment in
index 4a87848a35a58349791556b38baa7c876d89f27f..96d4add23df79b7ed83709e10b9284ec07c3a5b1 100644 (file)
@@ -6658,13 +6658,15 @@ arm_must_pass_in_stack (enum machine_mode mode, tree type)
 
 /* For use by FUNCTION_ARG_PADDING (MODE, TYPE).
    Return true if an argument passed on the stack should be padded upwards,
-   i.e. if the least-significant byte has useful data.  */
+   i.e. if the least-significant byte has useful data.
+   For legacy APCS ABIs we use the default.  For AAPCS based ABIs small
+   aggregate types are placed in the lowest memory address.  */
 
 bool
 arm_pad_arg_upward (enum machine_mode mode, tree type)
 {
   if (!TARGET_AAPCS_BASED)
-    return DEFAULT_FUNCTION_ARG_PADDING(mode, type);
+    return DEFAULT_FUNCTION_ARG_PADDING(mode, type) == upward;
 
   if (type && BYTES_BIG_ENDIAN && INTEGRAL_TYPE_P (type))
     return false;