diff options
| author | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-01 13:22:04 +0000 |
|---|---|---|
| committer | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-01 13:22:04 +0000 |
| commit | 5e0e972350871a7e705ddec5652ebb46e47bce9a (patch) | |
| tree | dfac44a5e08525b91e08bfda1477e101a4c47b40 | |
| parent | 1b8e315389fe99671f1972015018ca0eef7912c9 (diff) | |
| download | ppe42-gcc-5e0e972350871a7e705ddec5652ebb46e47bce9a.tar.gz ppe42-gcc-5e0e972350871a7e705ddec5652ebb46e47bce9a.zip | |
* config/m68k/m68k.c(m68k_output_mi_thunk): For ColdFire, use %d0 as
a scratch to perform an add to memory.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82547 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/config/m68k/m68k.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aa5a1a9df14..ebe0dc21bcf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> PR target/14018 diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index 1aebe96c548..da17f65f9cd 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -3334,6 +3334,23 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED, "\tsubq.l %I%d,4(%Rsp)\n" : "\tsubql %I%d,%Rsp@(4)\n", (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 asm_fprintf (file, MOTOROLA ? "\tadd.l %I%wd,4(%Rsp)\n" : |

