aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@acm.org>2003-07-23 19:56:30 +0000
committerBob Wilson <bwilson@gcc.gnu.org>2003-07-23 19:56:30 +0000
commit07154156593021837537ef9af44b05730b4dd57f (patch)
tree78d293d278b9aa4bb4d5b67e0964d98e7d954f75
parent5f5bfdd010d2985e82a7ff91cc8c5b5fc35f5db9 (diff)
downloadgcc-07154156593021837537ef9af44b05730b4dd57f.zip
gcc-07154156593021837537ef9af44b05730b4dd57f.tar.gz
gcc-07154156593021837537ef9af44b05730b4dd57f.tar.bz2
crti.asm (_init, _fini): Increase frame size to 64.
* config/xtensa/crti.asm (_init, _fini): Increase frame size to 64. * config/xtensa/lib1funcs.asm (__mulsi3, __udivsi3, __divsi3, __umodsi3, __modsi3): Increase frame size to 32. From-SVN: r69719
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/xtensa/crti.asm4
-rw-r--r--gcc/config/xtensa/lib1funcs.asm29
3 files changed, 25 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6e591f3..2439b1d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-23 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/crti.asm (_init, _fini): Increase frame size to 64.
+ * config/xtensa/lib1funcs.asm (__mulsi3, __udivsi3, __divsi3,
+ __umodsi3, __modsi3): Increase frame size to 32.
+
2003-07-23 Geoffrey Keating <geoffk@apple.com>
* config/rs6000/host-darwin.c: ANSIfy, update comment for sigaltstack
diff --git a/gcc/config/xtensa/crti.asm b/gcc/config/xtensa/crti.asm
index 8019ed1..8668b0d 100644
--- a/gcc/config/xtensa/crti.asm
+++ b/gcc/config/xtensa/crti.asm
@@ -34,11 +34,11 @@
.type _init,@function
.align 4
_init:
- entry sp, 40
+ entry sp, 64
.section .fini
.globl _fini
.type _fini,@function
.align 4
_fini:
- entry sp, 40
+ entry sp, 64
diff --git a/gcc/config/xtensa/lib1funcs.asm b/gcc/config/xtensa/lib1funcs.asm
index 72cd958..632d562 100644
--- a/gcc/config/xtensa/lib1funcs.asm
+++ b/gcc/config/xtensa/lib1funcs.asm
@@ -30,8 +30,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "xtensa-config.h"
- # Define macros for the ABS and ADDX* instructions to handle cases
- # where they are not included in the Xtensa processor configuration.
+# Note: These functions use a minimum stack frame size of 32. This is
+# necessary for Xtensa configurations that only support a fixed register
+# window size of 8, where even leaf functions (such as these) need to
+# allocate space for a 4-word "extra save area".
+
+# Define macros for the ABS and ADDX* instructions to handle cases
+# where they are not included in the Xtensa processor configuration.
.macro do_abs dst, src, tmp
#if XCHAL_HAVE_ABS
@@ -75,7 +80,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
.global __mulsi3
.type __mulsi3,@function
__mulsi3:
- entry sp, 16
+ entry sp, 32
#if XCHAL_HAVE_MUL16
or a4, a2, a3
@@ -174,11 +179,11 @@ __mulsi3:
#endif /* L_mulsi3 */
- # Define a macro for the NSAU (unsigned normalize shift amount)
- # instruction, which computes the number of leading zero bits,
- # to handle cases where it is not included in the Xtensa processor
- # configuration.
-
+# Define a macro for the NSAU (unsigned normalize shift amount)
+# instruction, which computes the number of leading zero bits,
+# to handle cases where it is not included in the Xtensa processor
+# configuration.
+
.macro do_nsau cnt, val, tmp, a
#if XCHAL_HAVE_NSA
nsau \cnt, \val
@@ -237,7 +242,7 @@ __nsau_data:
.global __udivsi3
.type __udivsi3,@function
__udivsi3:
- entry sp, 16
+ entry sp, 32
bltui a3, 2, .Lle_one # check if the divisor <= 1
mov a6, a2 # keep dividend in a6
@@ -296,7 +301,7 @@ __udivsi3:
.global __divsi3
.type __divsi3,@function
__divsi3:
- entry sp, 16
+ entry sp, 32
xor a7, a2, a3 # sign = dividend ^ divisor
do_abs a6, a2, a4 # udividend = abs(dividend)
do_abs a3, a3, a4 # udivisor = abs(divisor)
@@ -361,7 +366,7 @@ __divsi3:
.global __umodsi3
.type __umodsi3,@function
__umodsi3:
- entry sp, 16
+ entry sp, 32
bltui a3, 2, .Lle_one # check if the divisor is <= 1
do_nsau a5, a2, a6, a7 # dividend_shift = nsau(dividend)
@@ -413,7 +418,7 @@ __umodsi3:
.global __modsi3
.type __modsi3,@function
__modsi3:
- entry sp, 16
+ entry sp, 32
mov a7, a2 # save original (signed) dividend
do_abs a2, a2, a4 # udividend = abs(dividend)
do_abs a3, a3, a4 # udivisor = abs(divisor)