summaryrefslogtreecommitdiff
path: root/c/src/lib/libcpu/sparc/reg_win/window.S
diff options
context:
space:
mode:
authorDaniel Cederman <cederman@gaisler.com>2016-10-04 09:05:04 +0200
committerDaniel Cederman <cederman@gaisler.com>2016-10-04 09:05:04 +0200
commit38ca68d664702b11ee417afa73363dccd945ceab (patch)
tree023a07ac249c2a8df67103ef589b27500709c839 /c/src/lib/libcpu/sparc/reg_win/window.S
parentc7d624eedc3995f4554505e565013a5103d37c48 (diff)
ERRATA-FIX: Change assembler sequence that can cause stst erratarcc-v1.2.20
See GRLIB-TN-0009: "LEON3FT Stale Cache Entry After Store with Data Tag Parity Error".
Diffstat (limited to 'c/src/lib/libcpu/sparc/reg_win/window.S')
-rw-r--r--c/src/lib/libcpu/sparc/reg_win/window.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/sparc/reg_win/window.S b/c/src/lib/libcpu/sparc/reg_win/window.S
index 3ec3f50a10..fa327ec28a 100644
--- a/c/src/lib/libcpu/sparc/reg_win/window.S
+++ b/c/src/lib/libcpu/sparc/reg_win/window.S
@@ -65,12 +65,19 @@ SYM(window_overflow_trap_handler):
mov %g1, %wim ! load new WIM
nop; nop; nop ! 3 slot delay
std %l0, [%sp + 0x00] ! save local register set
+ B2BSTORE_FIX
std %l2, [%sp + 0x08]
+ B2BSTORE_FIX
std %l4, [%sp + 0x10]
+ B2BSTORE_FIX
std %l6, [%sp + 0x18]
+ B2BSTORE_FIX
std %i0, [%sp + 0x20] ! save input register set
+ B2BSTORE_FIX
std %i2, [%sp + 0x28]
+ B2BSTORE_FIX
std %i4, [%sp + 0x30]
+ B2BSTORE_FIX
std %i6, [%sp + 0x38]
restore ! Go back to trap window.
mov %l7, %g1 ! restore g1
@@ -202,13 +209,20 @@ save_frame_loop:
*/
std %l0, [%sp + CPU_STACK_FRAME_L0_OFFSET]
+ B2BSTORE_FIX
std %l2, [%sp + CPU_STACK_FRAME_L2_OFFSET]
+ B2BSTORE_FIX
std %l4, [%sp + CPU_STACK_FRAME_L4_OFFSET]
+ B2BSTORE_FIX
std %l6, [%sp + CPU_STACK_FRAME_L6_OFFSET]
+ B2BSTORE_FIX
std %i0, [%sp + CPU_STACK_FRAME_I0_OFFSET]
+ B2BSTORE_FIX
std %i2, [%sp + CPU_STACK_FRAME_I2_OFFSET]
+ B2BSTORE_FIX
std %i4, [%sp + CPU_STACK_FRAME_I4_OFFSET]
+ B2BSTORE_FIX
std %i6, [%sp + CPU_STACK_FRAME_I6_FP_OFFSET]
sll %g4, 1, %g5 ! rotate the "wim" left 1