summaryrefslogtreecommitdiffstats
path: root/c/src/exec
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec')
-rw-r--r--c/src/exec/score/cpu/sparc/cpu.h4
-rw-r--r--c/src/exec/score/cpu/sparc/cpu_asm.S2
2 files changed, 4 insertions, 2 deletions
diff --git a/c/src/exec/score/cpu/sparc/cpu.h b/c/src/exec/score/cpu/sparc/cpu.h
index 592a3a438f..cf50f035d6 100644
--- a/c/src/exec/score/cpu/sparc/cpu.h
+++ b/c/src/exec/score/cpu/sparc/cpu.h
@@ -472,7 +472,7 @@ typedef struct {
unsigned32 i6_fp;
unsigned32 i7;
unsigned32 y;
- unsigned32 pad0_offset;
+ unsigned32 tpc;
} CPU_Interrupt_frame;
#endif /* ASM */
@@ -501,7 +501,7 @@ typedef struct {
#define ISF_I6_FP_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x40
#define ISF_I7_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x44
#define ISF_Y_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x48
-#define ISF_PAD0_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x4c
+#define ISF_TPC_OFFSET CPU_MINIMUM_STACK_FRAME_SIZE + 0x4c
#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE CPU_MINIMUM_STACK_FRAME_SIZE + 0x50
#ifndef ASM
diff --git a/c/src/exec/score/cpu/sparc/cpu_asm.S b/c/src/exec/score/cpu/sparc/cpu_asm.S
index 39962eedeb..d980d4bff7 100644
--- a/c/src/exec/score/cpu/sparc/cpu_asm.S
+++ b/c/src/exec/score/cpu/sparc/cpu_asm.S
@@ -336,6 +336,7 @@ SYM(_ISR_Handler):
! Is this a synchronous trap?
be,a win_ovflow ! No, then skip the adjustment
nop ! DELAY
+ mov %l1, %l6 ! save trapped pc for debug info
mov %l2, %l1 ! do not return to the instruction
add %l2, 4, %l2 ! indicated
@@ -441,6 +442,7 @@ save_isf:
rd %y, %g1
st %g1, [%sp + ISF_Y_OFFSET] ! save y
+ st %l6, [%sp + ISF_TPC_OFFSET] ! save real trapped pc
mov %sp, %o1 ! 2nd arg to ISR Handler