[rtems commit] sparc,leon: avoid triggering TN-0009 bad sequence

Daniel Hellstrom danielh at rtems.org
Thu Mar 11 16:51:34 UTC 2021


Module:    rtems
Branch:    master
Commit:    acad761b9c721b1d063698c57a2f4555460030a3
Changeset: http://git.rtems.org/rtems/commit/?id=acad761b9c721b1d063698c57a2f4555460030a3

Author:    Daniel Hellstrom <daniel at gaisler.com>
Date:      Wed Nov 20 13:19:35 2019 +0100

sparc,leon: avoid triggering TN-0009 bad sequence

Update #4336.

---

 cpukit/score/cpu/sparc/sparc-counter-asm.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/sparc/sparc-counter-asm.S b/cpukit/score/cpu/sparc/sparc-counter-asm.S
index a1e18ae..fb7783e 100644
--- a/cpukit/score/cpu/sparc/sparc-counter-asm.S
+++ b/cpukit/score/cpu/sparc/sparc-counter-asm.S
@@ -31,8 +31,9 @@ SYM(_SPARC_Counter_read_default):
 	sethi	%hi(_SPARC_Counter + 12), %o1
 	ld	[%o1 + %lo(_SPARC_Counter + 12)], %o0
 	add	%o0, 1, %o0
+	st	%o0, [%o1 + %lo(_SPARC_Counter + 12)]
 	jmp	%o7 + 8
-	 st	%o0, [%o1 + %lo(_SPARC_Counter + 12)]
+	 nop
 
 	PUBLIC(_SPARC_Counter_read_up)
 	PUBLIC(_SPARC_Get_timecount_up)



More information about the vc mailing list