aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2002-04-19 00:31:17 +0000
committerBob Wilson <bwilson@gcc.gnu.org>2002-04-19 00:31:17 +0000
commit57174693e009628a889fd760bacc263d2d5c054f (patch)
tree96516e8fa201023f0d7a897434ad8cf1b35ddc19 /gcc
parent46468cd96fb7916bec2ac3f1189e1805c543bece (diff)
downloadgcc-57174693e009628a889fd760bacc263d2d5c054f.zip
gcc-57174693e009628a889fd760bacc263d2d5c054f.tar.gz
gcc-57174693e009628a889fd760bacc263d2d5c054f.tar.bz2
lib2funcs.S (__xtensa_libgcc_window_spill, [...]): Use a syscall instructions to flush the register windows.
* config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill, __xtensa_nonlocal_goto): Use a syscall instructions to flush the register windows. From-SVN: r52503
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/xtensa/lib2funcs.S54
2 files changed, 21 insertions, 39 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 33c7b5b..2e7f60a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-18 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill,
+ __xtensa_nonlocal_goto): Use a syscall instructions to flush
+ the register windows.
+
2002-04-18 Zack Weinberg <zack@codesourcery.com>
* real.h: Define REAL_VALUE_TYPE_SIZE as 96 or 160, as
diff --git a/gcc/config/xtensa/lib2funcs.S b/gcc/config/xtensa/lib2funcs.S
index f607e01..bdc26e8 100644
--- a/gcc/config/xtensa/lib2funcs.S
+++ b/gcc/config/xtensa/lib2funcs.S
@@ -30,46 +30,19 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "xtensa/xtensa-config.h"
-/* __xtensa_libgcc_window_spill: This function uses a series of nested
- calls to flush out all but the current register window. This is
- used to set up the stack so that arbitrary frames can be accessed.
- The functions used for the nested calls are also reused by the
- nonlocal goto function below. */
-
- .align 4
- .global __xtensa_libgcc_window_spill
- .type __xtensa_libgcc_window_spill,@function
-__xtensa_libgcc_window_spill:
- entry sp, 48
- call4 .L__wdwspill_assist52 // called with call8, only need a call4
- retw
- .size __xtensa_libgcc_window_spill,.-__xtensa_libgcc_window_spill
+/* __xtensa_libgcc_window_spill: This function flushes out all but the
+ current register window. This is used to set up the stack so that
+ arbitrary frames can be accessed. */
- .align 4
-.L__wdwspill_assist56:
- entry sp, 16
- call4 .L__wdwspill_assist52
- retw
- .align 4
-.L__wdwspill_assist52:
- entry sp, 48
- call12 .L__wdwspill_assist40
- retw
- .align 4
-.L__wdwspill_assist40:
- entry sp, 48
- call12 .L__wdwspill_assist28
- retw
- .align 4
-.L__wdwspill_assist28:
- entry sp, 48
- call12 .L__wdwspill_assist16
- retw
- .align 4
-.L__wdwspill_assist16:
- entry sp, 16
- movi a15, 0
+ .align 4
+ .global __xtensa_libgcc_window_spill
+ .type __xtensa_libgcc_window_spill,@function
+__xtensa_libgcc_window_spill:
+ entry sp, 32
+ movi a2, 0
+ syscall
retw
+ .size __xtensa_libgcc_window_spill,.-__xtensa_libgcc_window_spill
/* __xtensa_nonlocal_goto: This code does all the hard work of a
@@ -90,7 +63,10 @@ __xtensa_nonlocal_goto:
entry sp, 32
/* flush registers */
- call8 .L__wdwspill_assist56
+ mov a5, a2
+ movi a2, 0
+ syscall
+ mov a2, a5
/* Because the save area for a0-a3 is stored one frame below
the one identified by a2, the only way to restore those