summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/sparc/access/access.S
diff options
context:
space:
mode:
authorDaniel Cederman <cederman@gaisler.com>2017-07-13 09:26:50 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-07-17 07:41:38 +0200
commit2f8704b6c8c3ce65cdf2b589a98de1d1d9dc8ffa (patch)
treebd540adf388432ec7db34e5d2c4a3d4b8574b344 /c/src/lib/libcpu/sparc/access/access.S
parentpsxtests: Add a mmap dedicated test case (diff)
downloadrtems-2f8704b6c8c3ce65cdf2b589a98de1d1d9dc8ffa.tar.bz2
sparc: Add assembly workaround for LEON3FT B2BST errata
This patch adds NOP instructions to prevent instruction sequences that are sensitive to the LEON3FT B2BST errata. See GRLIB-TN-0009: "LEON3FT Stale Cache Entry After Store with Data Tag Parity Error" for more information. The sequences are only modified if __FIX_LEON3FT_B2BST is defined. The patch works in conjunction with the -mfix-ut700, -mfix-gr712rc, and -mfix-ut699 GCC flags that prevents the sensitive sequences from being generated. Update #3057.
Diffstat (limited to 'c/src/lib/libcpu/sparc/access/access.S')
-rw-r--r--c/src/lib/libcpu/sparc/access/access.S28
1 files changed, 28 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/sparc/access/access.S b/c/src/lib/libcpu/sparc/access/access.S
index cb8693b776..9397cb815b 100644
--- a/c/src/lib/libcpu/sparc/access/access.S
+++ b/c/src/lib/libcpu/sparc/access/access.S
@@ -59,6 +59,33 @@ SYM(_ld64):
retl
ldd [%o0], %o0
+#if defined(__FIX_LEON3FT_B2BST)
+
+SYM(_st8):
+ stub %o1, [%o0]
+ retl
+ nop
+
+SYM(_st_be16):
+SYM(_st16):
+ stuh %o1, [%o0]
+ retl
+ nop
+
+SYM(_st_be32):
+SYM(_st32):
+ st %o1, [%o0]
+ retl
+ nop
+
+SYM(_st_be64):
+SYM(_st64):
+ std %o1, [%o0]
+ retl
+ nop
+
+#else
+
SYM(_st8):
retl
stb %o1, [%o0]
@@ -79,3 +106,4 @@ SYM(_st64):
mov %o1, %o2
retl
std %o2, [%o0]
+#endif