diff options
author | 2012-11-14 20:01:19 +0000 | |
---|---|---|
committer | 2012-11-14 20:01:19 +0000 | |
commit | ba5ae86fcdcaeda00f3955816972f8fd9733f123 (patch) | |
tree | 7c17195a6b507383c86badb2836b3087d020e4a0 | |
parent | Generously sprinkle RTX_FRAME_RELATED_P() in the prologue and epilogue code, (diff) | |
download | wireguard-openbsd-ba5ae86fcdcaeda00f3955816972f8fd9733f123.tar.xz wireguard-openbsd-ba5ae86fcdcaeda00f3955816972f8fd9733f123.zip |
Do not bother reloading r1 from the stack in the epilogue, if it has not been
clobbered (e.g. in leaf functions). While saving it helps debugging, reading
it back is just useless in that case.
-rw-r--r-- | gnu/usr.bin/gcc/gcc/config/m88k/m88k.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c index 9bc2163e0e0..4c5dbe03712 100644 --- a/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c +++ b/gnu/usr.bin/gcc/gcc/config/m88k/m88k.c @@ -2160,7 +2160,9 @@ preserve_registers (base, store_p) memory ops. */ if (nregs > 2 && !save_regs[FRAME_POINTER_REGNUM]) offset -= 4; - emit_ldst (store_p, 1, SImode, offset, 1); + /* Do not reload r1 in the epilogue unless really necessary */ + if (store_p || regs_ever_live[1]) + emit_ldst (store_p, 1, SImode, offset, 1); offset -= 4; base = offset; } |