aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2012-03-12 15:52:51 +0000
committerTristan Gingold <gingold@gcc.gnu.org>2012-03-12 15:52:51 +0000
commit472b8fdc56b2ff0f8f222a783d0a8174ae96c94a (patch)
tree9d36d4c47b5a11a84cc5fc3c7b9024f9c4bc0100 /gcc
parentc4bc5c255acdf119ddc6f55cf26627895f216ce4 (diff)
downloadgcc-472b8fdc56b2ff0f8f222a783d0a8174ae96c94a.zip
gcc-472b8fdc56b2ff0f8f222a783d0a8174ae96c94a.tar.gz
gcc-472b8fdc56b2ff0f8f222a783d0a8174ae96c94a.tar.bz2
ia64.c (ia64_function_arg_1): Move code around.
2012-03-12 Tristan Gingold <gingold@adacore.com> * config/ia64/ia64.c (ia64_function_arg_1): Move code around. (ia64_function_arg_advance): Ditto. From-SVN: r185246
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/ia64/ia64.c33
2 files changed, 22 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 425f07a..f311999 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-12 Tristan Gingold <gingold@adacore.com>
+
+ * config/ia64/ia64.c (ia64_function_arg_1): Move code around.
+ (ia64_function_arg_advance): Ditto.
+
2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc (mips*-*-openbsd*): Remove.
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index b5fad9f..5b2d748 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -4491,6 +4491,15 @@ ia64_function_arg_1 (cumulative_args_t cum_v, enum machine_mode mode,
if (cum->words + offset >= MAX_ARGUMENT_SLOTS)
return 0;
+ /* On OpenVMS argument is either in Rn or Fn. */
+ if (TARGET_ABI_OPEN_VMS)
+ {
+ if (FLOAT_MODE_P (mode))
+ return gen_rtx_REG (mode, FR_ARG_FIRST + cum->words);
+ else
+ return gen_rtx_REG (mode, basereg + cum->words);
+ }
+
/* Check for and handle homogeneous FP aggregates. */
if (type)
hfa_mode = hfa_element_mode (type, 0);
@@ -4577,15 +4586,6 @@ ia64_function_arg_1 (cumulative_args_t cum_v, enum machine_mode mode,
return gen_rtx_PARALLEL (mode, gen_rtvec_v (i, loc));
}
- /* On OpenVMS variable argument is either in Rn or Fn. */
- else if (TARGET_ABI_OPEN_VMS && named == 0)
- {
- if (FLOAT_MODE_P (mode))
- return gen_rtx_REG (mode, FR_ARG_FIRST + cum->words);
- else
- return gen_rtx_REG (mode, basereg + cum->words);
- }
-
/* Integral and aggregates go in general registers. If we have run out of
FR registers, then FP values must also go in general registers. This can
happen when we have a SFmode HFA. */
@@ -4736,6 +4736,14 @@ ia64_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
cum->atypes[cum->words] = ia64_arg_type (mode);
cum->words += words + offset;
+ /* On OpenVMS argument is either in Rn or Fn. */
+ if (TARGET_ABI_OPEN_VMS)
+ {
+ cum->int_regs = cum->words;
+ cum->fp_regs = cum->words;
+ return;
+ }
+
/* Check for and handle homogeneous FP aggregates. */
if (type)
hfa_mode = hfa_element_mode (type, 0);
@@ -4776,13 +4784,6 @@ ia64_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
cum->fp_regs = fp_regs;
}
- /* On OpenVMS variable argument is either in Rn or Fn. */
- else if (TARGET_ABI_OPEN_VMS && named == 0)
- {
- cum->int_regs = cum->words;
- cum->fp_regs = cum->words;
- }
-
/* Integral and aggregates go in general registers. So do TFmode FP values.
If we have run out of FR registers, then other FP values must also go in
general registers. This can happen when we have a SFmode HFA. */