From b24bcfb3e64849e2fefec8e708dabb7d65946a3d Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 18 Sep 1997 23:19:55 +0000 Subject: v850.c (compute_register_save_size): Correct register number. * v850.c (compute_register_save_size): Correct register number. * v850.md (save_interrupt, return_interrupt): Correct register number. * v850/lib1funcs.asm (save_interrupt): Correct register number. (return_interrupt): Use stack pointer, not element pointer. From-SVN: r15550 --- gcc/ChangeLog | 9 +++++++++ gcc/config/v850/lib1funcs.asm | 8 ++++---- gcc/config/v850/v850.c | 2 +- gcc/config/v850/v850.md | 6 +++--- 4 files changed, 17 insertions(+), 8 deletions(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ce57ca..5e235af 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Thu Sep 18 10:43:07 1997 Nick Clifton + + * v850.c (compute_register_save_size): Correct register + number. + * v850.md (save_interrupt, return_interrupt): Correct + register number. + * v850/lib1funcs.asm (save_interrupt): Correct register number. + (return_interrupt): Use stack pointer, not element pointer. + 1997-09-18 Brendan Kehoe * configure.in, configure: Make sure to create the stage* and include diff --git a/gcc/config/v850/lib1funcs.asm b/gcc/config/v850/lib1funcs.asm index 2a2bc09..82ad089 100644 --- a/gcc/config/v850/lib1funcs.asm +++ b/gcc/config/v850/lib1funcs.asm @@ -1157,7 +1157,7 @@ __save_r6_r9: .align 2 .globl __save_interrupt .type __save_interrupt,@function - /* Save registers r1, r5 on stack and load up with expected values */ + /* Save registers r1, r4 on stack and load up with expected values */ /* Note, 12 bytes of stack have already been allocated. */ /* Called via: jalr __save_interrupt,r10 */ __save_interrupt: @@ -1179,9 +1179,9 @@ __save_interrupt: __return_interrupt: ld.w 0[sp],ep ld.w 4[sp],gp - ld.w 8[ep],r1 - ld.w 12[ep],r10 - add 12,sp + ld.w 8[sp],r1 + ld.w 12[sp],r10 + add 16,sp reti .size __return_interrupt,.-__return_interrupt #endif /* L_save_interrupt */ diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index c3de80b..03dd1d0 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -1386,7 +1386,7 @@ compute_register_save_size (p_reg_saved) These registers are handled specially, so don't list them on the list of registers to save in the prologue. */ case 1: /* temp used to hold ep */ - case 5: /* gp */ + case 4: /* gp */ case 10: /* temp used to call interrupt save/restore */ case EP_REGNUM: /* ep */ size += 4; diff --git a/gcc/config/v850/v850.md b/gcc/config/v850/v850.md index 5db807b..bb5020d 100644 --- a/gcc/config/v850/v850.md +++ b/gcc/config/v850/v850.md @@ -1120,7 +1120,7 @@ [(set (reg:SI 3) (plus:SI (reg:SI 3) (const_int -16))) (set (mem:SI (reg:SI 3)) (reg:SI 30)) (set (mem:SI (plus:SI (reg:SI 3) (const_int -4))) (reg:SI 10)) - (set (mem:SI (plus:SI (reg:SI 3) (const_int -8))) (reg:SI 5)) + (set (mem:SI (plus:SI (reg:SI 3) (const_int -8))) (reg:SI 4)) (set (mem:SI (plus:SI (reg:SI 3) (const_int -12))) (reg:SI 1))] "" "add -16,sp\;st.w r10,12[sp]\;jarl __save_interrupt,r10" @@ -1164,13 +1164,13 @@ [(set_attr "length" "4") (set_attr "cc" "clobber")]) -;; Restore r1, r5, r10, and return from the interrupt +;; Restore r1, r4, r10, and return from the interrupt (define_insn "restore_interrupt" [(return) (set (reg:SI 3) (plus:SI (reg:SI 3) (const_int 16))) (set (reg:SI 30) (mem:SI (plus:SI (reg:SI 3) (const_int 12)))) (set (reg:SI 10) (mem:SI (plus:SI (reg:SI 3) (const_int 8)))) - (set (reg:SI 5) (mem:SI (plus:SI (reg:SI 3) (const_int 4)))) + (set (reg:SI 4) (mem:SI (plus:SI (reg:SI 3) (const_int 4)))) (set (reg:SI 1) (mem:SI (reg:SI 3)))] "" "jr __return_interrupt" -- cgit v1.1