aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2004-01-22 10:33:24 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-01-22 09:33:24 +0000
commit1fd05073984ebdf3e087613adce163587b33e1e5 (patch)
treebba1cfa3da2367fff9c8dd448d57ba93e3262348
parentb2f24c85c8b21cd649d11da2eb8c65079d3f21b7 (diff)
downloadgcc-1fd05073984ebdf3e087613adce163587b33e1e5.zip
gcc-1fd05073984ebdf3e087613adce163587b33e1e5.tar.gz
gcc-1fd05073984ebdf3e087613adce163587b33e1e5.tar.bz2
re PR target/13559 (deviation from the psABI for small structures)
PR target/13559 * config/sparc/sparc.c (function_arg_record_value_3): Revert to 'word_mode' once the first slot has been filled. From-SVN: r76342
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sparc/sparc.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5c01e68..5a19971 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2004-01-22 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR target/13559
+ * config/sparc/sparc.c (function_arg_record_value_3): Revert
+ to 'word_mode' once the first slot has been filled.
+
2004-01-22 Olivier Hainque <hainque@act-europe.fr>
* config/sparc/sparc.c (function_arg_record_value_1): Fix
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index d3eb998..8805bbe 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -4972,7 +4972,7 @@ struct function_arg_record_value_parms
int named; /* whether the argument is named. */
int regbase; /* regno of the base register. */
int stack; /* 1 if part of the argument is on the stack. */
- int intoffset; /* offset of the pending integer field. */
+ int intoffset; /* offset of the first pending integer field. */
unsigned int nregs; /* number of words passed in registers. */
};
@@ -5124,6 +5124,7 @@ function_arg_record_value_3 (HOST_WIDE_INT bitpos,
this_slotno += 1;
intoffset = (intoffset | (UNITS_PER_WORD-1)) + 1;
+ mode = word_mode;
parms->nregs += 1;
intslots -= 1;
}
@@ -5251,6 +5252,7 @@ function_arg_record_value (tree type, enum machine_mode mode,
parms.intoffset = 0;
function_arg_record_value_1 (type, 0, &parms, false);
+ /* Take into account pending integer fields. */
if (parms.intoffset != -1)
{
unsigned int startbit, endbit;