re PR middle-end/16815 (MIPS n32/n64 inefficient code for float arguments)
authorRichard Sandiford <rsandifo@redhat.com>
Thu, 7 Oct 2004 05:34:30 +0000 (05:34 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 7 Oct 2004 05:34:30 +0000 (05:34 +0000)
PR target/16815
* function.c (assign_parm_setup_block_p): Tighten BLOCK_REG_PADDING
check.
* config/pa/pa.h (BLOCK_REG_PADDING): Define in terms of
function_arg_padding.

From-SVN: r88660

gcc/ChangeLog
gcc/config/pa/pa.h
gcc/function.c

index 2913509155fb4708f7856c0f5d75dfafb8d44d64..7f361f9ade1128ba7ec88ac0d36e021de98cd22a 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
+
+       PR target/16815
+       * function.c (assign_parm_setup_block_p): Tighten BLOCK_REG_PADDING
+       check.
+       * config/pa/pa.h (BLOCK_REG_PADDING): Define in terms of
+       function_arg_padding.
+
 2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
 
        PR bootstrap/17857
index 5c5d8bf39f078b078911b9726df8d815ef28d298..18fb21706a3143df2216fedf30319dcccad0a693 100644 (file)
@@ -918,7 +918,8 @@ struct hppa_args {int words, nargs_prototype, incoming, indirect; };
    We use a DImode register in the parallel for 5 to 7 byte structures
    so that there is only one element.  This allows the object to be
    correctly padded.  */
-#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) (TARGET_64BIT ? upward : downward)
+#define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
+  function_arg_padding ((MODE), (TYPE))
 
 /* Do not expect to understand this without reading it several times.  I'm
    tempted to try and simply it, but I worry about breaking something.  */
index 0545b05a5cd8355eabafdd2e3dbd9bb10982344f..4c8d6c409c120bf2383f14e258299d45e6a173dc 100644 (file)
@@ -2513,8 +2513,12 @@ assign_parm_setup_block_p (struct assign_parm_data_one *data)
     return true;
 
 #ifdef BLOCK_REG_PADDING
-  if (data->locate.where_pad == (BYTES_BIG_ENDIAN ? upward : downward)
-      && GET_MODE_SIZE (data->promoted_mode) < UNITS_PER_WORD)
+  /* Only assign_parm_setup_block knows how to deal with register arguments
+     that are padded at the least significant end.  */
+  if (REG_P (data->entry_parm)
+      && GET_MODE_SIZE (data->promoted_mode) < UNITS_PER_WORD
+      && (BLOCK_REG_PADDING (data->passed_mode, data->passed_type, 1)
+         == (BYTES_BIG_ENDIAN ? upward : downward)))
     return true;
 #endif