diff options
author | jake <jake@FreeBSD.org> | 2002-02-26 17:09:24 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-02-26 17:09:24 +0000 |
commit | 52438c9de8dacb0ce0ef498a93f02930c4d39337 (patch) | |
tree | 859d2744acc1d178e8e615bb394d0836f69bf0fb /sys/sparc64 | |
parent | 57b097e18ce888ddd81fe5d6bb4145bb08cbe650 (diff) | |
download | FreeBSD-src-52438c9de8dacb0ce0ef498a93f02930c4d39337.zip FreeBSD-src-52438c9de8dacb0ce0ef498a93f02930c4d39337.tar.gz |
Apparently gcc3.1 is now using deprcated v8 instructions in v9 code
due to them being faster in certain cases. Therefore we need to save
and restore the v8 %y register around traps in kernel mode as well as
traps in usermode.
Tested by: obrien, tmm
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/sparc64/exception.S | 21 | ||||
-rw-r--r-- | sys/sparc64/sparc64/exception.s | 21 |
2 files changed, 30 insertions, 12 deletions
diff --git a/sys/sparc64/sparc64/exception.S b/sys/sparc64/sparc64/exception.S index 8100c3d..4bddf8c 100644 --- a/sys/sparc64/sparc64/exception.S +++ b/sys/sparc64/sparc64/exception.S @@ -2660,7 +2660,8 @@ ENTRY(tl1_trap) rdpr %tpc, %l1 rdpr %tnpc, %l2 rdpr %pil, %l3 - rdpr %wstate, %l4 + rd %y, %l4 + rdpr %wstate, %l5 #if KTR_COMPILE & KTR_TRAP CATR(KTR_TRAP, "tl1_trap: td=%p type=%#lx pil=%#lx pc=%#lx sp=%#lx" @@ -2677,13 +2678,14 @@ ENTRY(tl1_trap) wrpr %g0, 1, %tl - and %l4, WSTATE_OTHER_MASK, %l4 - wrpr %l4, WSTATE_KERNEL, %wstate + and %l5, WSTATE_OTHER_MASK, %l5 + wrpr %l5, WSTATE_KERNEL, %wstate stx %l0, [%sp + SPOFF + CCFSZ + TF_TSTATE] stx %l1, [%sp + SPOFF + CCFSZ + TF_TPC] stx %l2, [%sp + SPOFF + CCFSZ + TF_TNPC] stb %l3, [%sp + SPOFF + CCFSZ + TF_PIL] + stw %l4, [%sp + SPOFF + CCFSZ + TF_Y] stw %o0, [%sp + SPOFF + CCFSZ + TF_TYPE] stx %o3, [%sp + SPOFF + CCFSZ + TF_TAR] @@ -2714,6 +2716,7 @@ ENTRY(tl1_trap) ldx [%sp + SPOFF + CCFSZ + TF_TPC], %l1 ldx [%sp + SPOFF + CCFSZ + TF_TNPC], %l2 ldub [%sp + SPOFF + CCFSZ + TF_PIL], %l3 + lduw [%sp + SPOFF + CCFSZ + TF_Y], %l4 ldx [%sp + SPOFF + CCFSZ + TF_G1], %g1 ldx [%sp + SPOFF + CCFSZ + TF_G2], %g2 @@ -2728,6 +2731,7 @@ ENTRY(tl1_trap) mov %l2, %g3 wrpr %l3, 0, %pil + wr %l4, 0, %y restore @@ -2766,7 +2770,8 @@ ENTRY(tl1_intr) rdpr %tpc, %l1 rdpr %tnpc, %l2 rdpr %pil, %l3 - rdpr %wstate, %l4 + rd %y, %l4 + rdpr %wstate, %l5 #if KTR_COMPILE & KTR_INTR CATR(KTR_INTR, @@ -2786,13 +2791,14 @@ ENTRY(tl1_intr) wrpr %g0, 1, %tl - and %l4, WSTATE_OTHER_MASK, %l4 - wrpr %l4, WSTATE_KERNEL, %wstate + and %l5, WSTATE_OTHER_MASK, %l5 + wrpr %l5, WSTATE_KERNEL, %wstate stx %l0, [%sp + SPOFF + CCFSZ + TF_TSTATE] stx %l1, [%sp + SPOFF + CCFSZ + TF_TPC] stx %l2, [%sp + SPOFF + CCFSZ + TF_TNPC] stb %l3, [%sp + SPOFF + CCFSZ + TF_PIL] + stw %l4, [%sp + SPOFF + CCFSZ + TF_Y] mov %o0, %l7 mov T_INTERRUPT | T_KERNEL, %o1 @@ -2833,6 +2839,8 @@ ENTRY(tl1_intr) call critical_exit nop + lduw [%sp + SPOFF + CCFSZ + TF_Y], %l4 + ldx [%sp + SPOFF + CCFSZ + TF_G1], %g1 ldx [%sp + SPOFF + CCFSZ + TF_G2], %g2 ldx [%sp + SPOFF + CCFSZ + TF_G3], %g3 @@ -2845,6 +2853,7 @@ ENTRY(tl1_intr) mov %l1, %g2 mov %l2, %g3 wrpr %l3, 0, %pil + wr %l4, 0, %y restore diff --git a/sys/sparc64/sparc64/exception.s b/sys/sparc64/sparc64/exception.s index 8100c3d..4bddf8c 100644 --- a/sys/sparc64/sparc64/exception.s +++ b/sys/sparc64/sparc64/exception.s @@ -2660,7 +2660,8 @@ ENTRY(tl1_trap) rdpr %tpc, %l1 rdpr %tnpc, %l2 rdpr %pil, %l3 - rdpr %wstate, %l4 + rd %y, %l4 + rdpr %wstate, %l5 #if KTR_COMPILE & KTR_TRAP CATR(KTR_TRAP, "tl1_trap: td=%p type=%#lx pil=%#lx pc=%#lx sp=%#lx" @@ -2677,13 +2678,14 @@ ENTRY(tl1_trap) wrpr %g0, 1, %tl - and %l4, WSTATE_OTHER_MASK, %l4 - wrpr %l4, WSTATE_KERNEL, %wstate + and %l5, WSTATE_OTHER_MASK, %l5 + wrpr %l5, WSTATE_KERNEL, %wstate stx %l0, [%sp + SPOFF + CCFSZ + TF_TSTATE] stx %l1, [%sp + SPOFF + CCFSZ + TF_TPC] stx %l2, [%sp + SPOFF + CCFSZ + TF_TNPC] stb %l3, [%sp + SPOFF + CCFSZ + TF_PIL] + stw %l4, [%sp + SPOFF + CCFSZ + TF_Y] stw %o0, [%sp + SPOFF + CCFSZ + TF_TYPE] stx %o3, [%sp + SPOFF + CCFSZ + TF_TAR] @@ -2714,6 +2716,7 @@ ENTRY(tl1_trap) ldx [%sp + SPOFF + CCFSZ + TF_TPC], %l1 ldx [%sp + SPOFF + CCFSZ + TF_TNPC], %l2 ldub [%sp + SPOFF + CCFSZ + TF_PIL], %l3 + lduw [%sp + SPOFF + CCFSZ + TF_Y], %l4 ldx [%sp + SPOFF + CCFSZ + TF_G1], %g1 ldx [%sp + SPOFF + CCFSZ + TF_G2], %g2 @@ -2728,6 +2731,7 @@ ENTRY(tl1_trap) mov %l2, %g3 wrpr %l3, 0, %pil + wr %l4, 0, %y restore @@ -2766,7 +2770,8 @@ ENTRY(tl1_intr) rdpr %tpc, %l1 rdpr %tnpc, %l2 rdpr %pil, %l3 - rdpr %wstate, %l4 + rd %y, %l4 + rdpr %wstate, %l5 #if KTR_COMPILE & KTR_INTR CATR(KTR_INTR, @@ -2786,13 +2791,14 @@ ENTRY(tl1_intr) wrpr %g0, 1, %tl - and %l4, WSTATE_OTHER_MASK, %l4 - wrpr %l4, WSTATE_KERNEL, %wstate + and %l5, WSTATE_OTHER_MASK, %l5 + wrpr %l5, WSTATE_KERNEL, %wstate stx %l0, [%sp + SPOFF + CCFSZ + TF_TSTATE] stx %l1, [%sp + SPOFF + CCFSZ + TF_TPC] stx %l2, [%sp + SPOFF + CCFSZ + TF_TNPC] stb %l3, [%sp + SPOFF + CCFSZ + TF_PIL] + stw %l4, [%sp + SPOFF + CCFSZ + TF_Y] mov %o0, %l7 mov T_INTERRUPT | T_KERNEL, %o1 @@ -2833,6 +2839,8 @@ ENTRY(tl1_intr) call critical_exit nop + lduw [%sp + SPOFF + CCFSZ + TF_Y], %l4 + ldx [%sp + SPOFF + CCFSZ + TF_G1], %g1 ldx [%sp + SPOFF + CCFSZ + TF_G2], %g2 ldx [%sp + SPOFF + CCFSZ + TF_G3], %g3 @@ -2845,6 +2853,7 @@ ENTRY(tl1_intr) mov %l1, %g2 mov %l2, %g3 wrpr %l3, 0, %pil + wr %l4, 0, %y restore |