summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 14:32:13 +0000
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-15 14:32:13 +0000
commit2f31b77d88303bfa2995f350e5108fe58ae24fc7 (patch)
tree0cc5b87b3f2c8c3b76db1833ac1ac21ab542efaa
parent3817baeb247b3239c00beb407e03e32cb06900c2 (diff)
downloadppe42-gcc-2f31b77d88303bfa2995f350e5108fe58ae24fc7.tar.gz
ppe42-gcc-2f31b77d88303bfa2995f350e5108fe58ae24fc7.zip
* config/arm/lib1funcs.asm (div0) [L_dvmd_lnx]: Call raise instead
of making syscalls. * config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define. Set r7 also. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107018 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/lib1funcs.asm20
-rw-r--r--gcc/config/arm/linux-eabi.h17
3 files changed, 25 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6515936795c..f2b22fa98a2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-15 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/arm/lib1funcs.asm (div0) [L_dvmd_lnx]: Call raise instead
+ of making syscalls.
+ * config/arm/linux-eabi.h (CLEAR_INSN_CACHE): Define. Set r7 also.
+
2005-11-15 Jan Hubicka <jh@suse.cz>
* invoke.texi (large-unit-insns): Document.
diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm
index 364d9fea804..8494a973bfa 100644
--- a/gcc/config/arm/lib1funcs.asm
+++ b/gcc/config/arm/lib1funcs.asm
@@ -989,29 +989,15 @@ LSYM(Lover12):
#ifdef L_dvmd_lnx
@ GNU/Linux division-by zero handler. Used in place of L_dvmd_tls
-/* Constants taken from <asm/unistd.h> and <asm/signal.h> */
+/* Constant taken from <asm/signal.h>. */
#define SIGFPE 8
-#define __NR_SYSCALL_BASE 0x900000
-#define __NR_getpid (__NR_SYSCALL_BASE+ 20)
-#define __NR_kill (__NR_SYSCALL_BASE+ 37)
-#define __NR_gettid (__NR_SYSCALL_BASE+ 224)
-#define __NR_tkill (__NR_SYSCALL_BASE+ 238)
.code 32
FUNC_START div0
stmfd sp!, {r1, lr}
- swi __NR_gettid
- cmn r0, #1000
- swihs __NR_getpid
- cmnhs r0, #1000
- RETLDM r1 hs
- mov ip, r0
- mov r1, #SIGFPE
- swi __NR_tkill
- movs r0, r0
- movne r0, ip
- swine __NR_kill
+ mov r0, #SIGFPE
+ bl SYM(raise) __PLT__
RETLDM r1
FUNC_END div0
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index 62aa6dd10a1..6cd0989c8c5 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -1,5 +1,5 @@
/* Configuration file for ARM GNU/Linux EABI targets.
- Copyright (C) 2004
+ Copyright (C) 2004, 2005
Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC
@@ -68,3 +68,18 @@
non-AAPCS. */
#undef WCHAR_TYPE
#define WCHAR_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "long int")
+
+/* Clear the instruction cache from `beg' to `end'. This makes an
+ inline system call to SYS_cacheflush. It is modified to work with
+ both the original and EABI-only syscall interfaces. */
+#undef CLEAR_INSN_CACHE
+#define CLEAR_INSN_CACHE(BEG, END) \
+{ \
+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
+ register unsigned long _end __asm ("a2") = (unsigned long) (END); \
+ register unsigned long _flg __asm ("a3") = 0; \
+ register unsigned long _scno __asm ("r7") = 0xf0002; \
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_scno)); \
+}
OpenPOWER on IntegriCloud