Commit c7dbc549 by Jeff Law

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.
parent 819852b9
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> 2020-02-28 Michael Meissner <meissner@linux.ibm.com>
PR target/93937 PR target/93937
......
...@@ -2961,7 +2961,7 @@ static void ...@@ -2961,7 +2961,7 @@ static void
v850_asm_trampoline_template (FILE *f) v850_asm_trampoline_template (FILE *f)
{ {
fprintf (f, "\tjarl .+4,r12\n"); 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, "\tld.w 16[r12],r12\n");
fprintf (f, "\tjmp [r12]\n"); fprintf (f, "\tjmp [r12]\n");
fprintf (f, "\tnop\n"); fprintf (f, "\tnop\n");
......
...@@ -438,8 +438,9 @@ enum reg_class ...@@ -438,8 +438,9 @@ enum reg_class
/* Base register for access to arguments of the function. */ /* Base register for access to arguments of the function. */
#define ARG_POINTER_REGNUM 35 #define ARG_POINTER_REGNUM 35
/* Register in which static-chain is passed to a function. */ /* Register in which static-chain is passed to a function.
#define STATIC_CHAIN_REGNUM 20 This must be a call used register. */
#define STATIC_CHAIN_REGNUM 19
/* If defined, this macro specifies a table of register pairs used to /* If defined, this macro specifies a table of register pairs used to
eliminate unneeded registers that point into the stack frame. If eliminate unneeded registers that point into the stack frame. If
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment