[rtems commit] SPARC: optimize window overflow trap entry

Daniel Hellstrom danielh at rtems.org
Tue Dec 2 13:04:27 UTC 2014


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

Author:    Daniel Hellstrom <daniel at gaisler.com>
Date:      Wed May 28 10:29:37 2014 +0200

SPARC: optimize window overflow trap entry

By using a optimized trap entry we can move instructions from
the window overflow function into the trap entry vector. By
using the saved locals instead of g1 we don't need to save
that register temporarily. Also spead out non store instructions
inbetween stores to use the write buffer better.

---

 c/src/lib/libcpu/sparc/reg_win/window.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/c/src/lib/libcpu/sparc/reg_win/window.S b/c/src/lib/libcpu/sparc/reg_win/window.S
index 535dc83..a7d6910 100644
--- a/c/src/lib/libcpu/sparc/reg_win/window.S
+++ b/c/src/lib/libcpu/sparc/reg_win/window.S
@@ -60,6 +60,7 @@ SYM(window_overflow_trap_handler):
         srl  %l3, 1, %l3                 ! l3  = WIM >> 1
         wr   %l3, %l2, %wim              ! WIM = (WIM >> 1) ^
                                          !       (WIM << (Number Windows - 1))
+                                         ! 3 instruction delay not needed here
         std  %i0, [%sp + 0x20]           ! save input register set
         std  %i2, [%sp + 0x28]
         std  %i4, [%sp + 0x30]




More information about the vc mailing list