aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/pa
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-10-24 07:22:00 +0000
committerRichard Stallman <rms@gnu.org>1993-10-24 07:22:00 +0000
commit3529be8371acdc29c62bcb73f59cb54c6be85349 (patch)
tree2ec4449ce486073b3d34848f1940372f07e2586c /gcc/config/pa
parent5e10b3cc7c179bfd8939e000027a5cc4953d410d (diff)
downloadgcc-3529be8371acdc29c62bcb73f59cb54c6be85349.zip
gcc-3529be8371acdc29c62bcb73f59cb54c6be85349.tar.gz
gcc-3529be8371acdc29c62bcb73f59cb54c6be85349.tar.bz2
(output_arg_descriptor): Do not stop searching if a USE
for the static link or struct value register is found. From-SVN: r5879
Diffstat (limited to 'gcc/config/pa')
-rw-r--r--gcc/config/pa/pa.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 83590e5..239d8ce 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -3205,10 +3205,24 @@ output_arg_descriptor (insn)
for (prev_insn = PREV_INSN (insn); GET_CODE (prev_insn) == INSN;
prev_insn = PREV_INSN (prev_insn))
{
- if (!(GET_CODE (PATTERN (prev_insn)) == USE &&
- GET_CODE (XEXP (PATTERN (prev_insn), 0)) == REG &&
- FUNCTION_ARG_REGNO_P (REGNO (XEXP (PATTERN (prev_insn), 0)))))
+ /* Terminate search for arguments if a non-USE insn is encountered
+ or a USE insn which does not specify an argument, STATIC_CHAIN,
+ or STRUCT_VALUE register. */
+ if (!(GET_CODE (PATTERN (prev_insn)) == USE
+ && GET_CODE (XEXP (PATTERN (prev_insn), 0)) == REG
+ && (FUNCTION_ARG_REGNO_P (REGNO (XEXP (PATTERN (prev_insn), 0)))
+ || REGNO (XEXP (PATTERN (prev_insn), 0)) == STATIC_CHAIN_REGNUM
+ || REGNO (XEXP (PATTERN (prev_insn), 0))
+ == STRUCT_VALUE_REGNUM)))
break;
+
+ /* If this is a USE for the STATIC_CHAIN or STRUCT_VALUE register,
+ then skip it and continue the loop since those are not encoded
+ in the argument relocation bits. */
+ if (REGNO (XEXP (PATTERN (prev_insn), 0)) == STATIC_CHAIN_REGNUM
+ || REGNO (XEXP (PATTERN (prev_insn), 0)) == STRUCT_VALUE_REGNUM)
+ continue;
+
arg_mode = GET_MODE (XEXP (PATTERN (prev_insn), 0));
regno = REGNO (XEXP (PATTERN (prev_insn), 0));
if (regno >= 23 && regno <= 26)