From 6930aa7f19e4b3fd5ae6fc5178f650a706b0ffcd Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Wed, 28 May 2014 10:29:37 +0200 Subject: 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 535dc83105..a7d6910219 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] -- cgit v1.2.3