aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2020-02-29 13:45:37 -0700
committerJeff Law <law@redhat.com>2020-02-29 13:45:37 -0700
commitc7dbc54958321d296ca4e283f26f279f6a5342a7 (patch)
tree502e2a9e3c6e5a9bb8e3758b8424774333fd6dcc /gcc
parent819852b98eb2451672b35bf4a35bcfd41071e26e (diff)
downloadgcc-c7dbc54958321d296ca4e283f26f279f6a5342a7.zip
gcc-c7dbc54958321d296ca4e283f26f279f6a5342a7.tar.gz
gcc-c7dbc54958321d296ca4e283f26f279f6a5342a7.tar.bz2
Make STATIC_CHAIN_REGNUM a call used register.
* config/v850/v850.h (STATIC_CHAIN_REGNUM): Change to r19. * config/v850/v850.c (v850_asm_trampoline_template): Update accordingly.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/v850/v850.c2
-rw-r--r--gcc/config/v850/v850.h5
3 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7d95db8..2a69c68 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-02-28 Jeff Law <law@redhat.com>
+
+ * config/v850/v850.h (STATIC_CHAIN_REGNUM): Change to r19.
+ * config/v850/v850.c (v850_asm_trampoline_template): Update
+ accordingly.
+
2020-02-28 Michael Meissner <meissner@linux.ibm.com>
PR target/93937
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index 074adf8..4b0e28c 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -2961,7 +2961,7 @@ static void
v850_asm_trampoline_template (FILE *f)
{
fprintf (f, "\tjarl .+4,r12\n");
- fprintf (f, "\tld.w 12[r12],r20\n");
+ fprintf (f, "\tld.w 12[r12],r19\n");
fprintf (f, "\tld.w 16[r12],r12\n");
fprintf (f, "\tjmp [r12]\n");
fprintf (f, "\tnop\n");
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h
index 823bc5e..7ae583c 100644
--- a/gcc/config/v850/v850.h
+++ b/gcc/config/v850/v850.h
@@ -438,8 +438,9 @@ enum reg_class
/* Base register for access to arguments of the function. */
#define ARG_POINTER_REGNUM 35
-/* Register in which static-chain is passed to a function. */
-#define STATIC_CHAIN_REGNUM 20
+/* Register in which static-chain is passed to a function.
+ This must be a call used register. */
+#define STATIC_CHAIN_REGNUM 19
/* If defined, this macro specifies a table of register pairs used to
eliminate unneeded registers that point into the stack frame. If