aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2012-02-19 16:44:54 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2012-02-19 16:44:54 +0000
commit5adeb246868dba536895e60100ef20162b6d1911 (patch)
treead8b1e20eb94789217582fe66f9f9acb4948492a /libgcc/config
parent3e95c6caec8cdb2683a2b57d6b2bf68be15a1769 (diff)
downloadgcc-5adeb246868dba536895e60100ef20162b6d1911.zip
gcc-5adeb246868dba536895e60100ef20162b6d1911.tar.gz
gcc-5adeb246868dba536895e60100ef20162b6d1911.tar.bz2
mips.c (mips16_build_call_stub): Add CFI information to stubs with non-sibling calls.
gcc/ * config/mips/mips.c (mips16_build_call_stub): Add CFI information to stubs with non-sibling calls. libgcc/ * config/mips/mips16.S (CALL_STUB_RET): Add CFI information. From-SVN: r184379
Diffstat (limited to 'libgcc/config')
-rw-r--r--libgcc/config/mips/mips16.S26
1 files changed, 17 insertions, 9 deletions
diff --git a/libgcc/config/mips/mips16.S b/libgcc/config/mips/mips16.S
index c82a55d..1899ab2 100644
--- a/libgcc/config/mips/mips16.S
+++ b/libgcc/config/mips/mips16.S
@@ -566,15 +566,23 @@ CALL_STUB_NO_RET (__mips16_call_stub_10, 10)
being called is 16 bits, in which case the copy is unnecessary;
however, it's faster to always do the copy. */
-#define CALL_STUB_RET(NAME, CODE, MODE) \
-STARTFN (NAME); \
- move $18,$31; \
- STUB_ARGS_##CODE; \
- .set noreorder; \
- jalr $2; \
- move $25,$2; \
- .set reorder; \
- MOVE_##MODE##_RET (f, $18); \
+#define CALL_STUB_RET(NAME, CODE, MODE) \
+STARTFN (NAME); \
+ .cfi_startproc; \
+ /* Create a fake CFA 4 bytes below the stack pointer. */ \
+ .cfi_def_cfa 29,-4; \
+ /* "Save" $sp in itself so we don't use the fake CFA. \
+ This is: DW_CFA_val_expression r29, { DW_OP_reg29 }. */ \
+ .cfi_escape 0x16,29,1,0x6d; \
+ move $18,$31; \
+ .cfi_register 31,18; \
+ STUB_ARGS_##CODE; \
+ .set noreorder; \
+ jalr $2; \
+ move $25,$2; \
+ .set reorder; \
+ MOVE_##MODE##_RET (f, $18); \
+ .cfi_endproc; \
ENDFN (NAME)
/* First, instantiate the single-float set. */