Commit 5050d266 by Peter Barada Committed by Bernardo Innocenti

m68k.c (m68k_output_mi_thunk): For ColdFire, use %d0 as a scratch to perform an add to memory.

	* config/m68k/m68k.c(m68k_output_mi_thunk):  For ColdFire, use %d0 as
	a scratch to perform an add to memory.

From-SVN: r82547
parent 225d221a
2004-06-01 Peter Barada <peter@the-baradas.com>
* config/m68k/m68k.c(m68k_output_mi_thunk): For ColdFire, use %d0 as
a scratch to perform an add to memory.
2004-06-01 Bernardo Innocenti <bernie@develer.com> 2004-06-01 Bernardo Innocenti <bernie@develer.com>
PR target/14018 PR target/14018
......
...@@ -3334,6 +3334,23 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, ...@@ -3334,6 +3334,23 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
"\tsubq.l %I%d,4(%Rsp)\n" : "\tsubq.l %I%d,4(%Rsp)\n" :
"\tsubql %I%d,%Rsp@(4)\n", "\tsubql %I%d,%Rsp@(4)\n",
(int) -delta); (int) -delta);
else if (TARGET_COLDFIRE)
{
/* ColdFire can't add/sub a constant to memory unless it is in
the range of addq/subq. So load the value into %d0 and
then add it to 4(%sp). */
if (delta >= -128 && delta <= 127)
asm_fprintf (file, MOTOROLA ?
"\tmoveq.l %I%wd,%Rd0\n" :
"\tmoveql %I%wd,%Rd0\n", delta);
else
asm_fprintf (file, MOTOROLA ?
"\tmove.l %I%wd,%Rd0\n" :
"\tmovel %I%wd,%Rd0\n", delta);
asm_fprintf (file, MOTOROLA ?
"\tadd.l %Rd0,4(%Rsp)\n" :
"\taddl %Rd0,%Rsp@(4)\n");
}
else else
asm_fprintf (file, MOTOROLA ? asm_fprintf (file, MOTOROLA ?
"\tadd.l %I%wd,4(%Rsp)\n" : "\tadd.l %I%wd,4(%Rsp)\n" :
......
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