diff gcc/config/arm/lib1funcs.asm @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
line wrap: on
line diff
--- a/gcc/config/arm/lib1funcs.asm	Fri Feb 12 23:41:23 2010 +0900
+++ b/gcc/config/arm/lib1funcs.asm	Mon May 24 12:47:05 2010 +0900
@@ -2,7 +2,7 @@
 @ Division routines, written by Richard Earnshaw, (rearnsha@armltd.co.uk)
 
 /* Copyright 1995, 1996, 1998, 1999, 2000, 2003, 2004, 2005, 2007, 2008,
-   2009  Free Software Foundation, Inc.
+   2009, 2010 Free Software Foundation, Inc.
 
 This file is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by the
@@ -31,10 +31,10 @@
 
 #ifdef __ARM_EABI__
 /* Some attributes that are common to all routines in this file.  */
-	/* Tag_ABI_align8_needed: This code does not require 8-byte
+	/* Tag_ABI_align_needed: This code does not require 8-byte
 	   alignment from the caller.  */
 	/* .eabi_attribute 24, 0  -- default setting.  */
-	/* Tag_ABI_align8_preserved: This code preserves 8-byte 
+	/* Tag_ABI_align_preserved: This code preserves 8-byte
 	   alignment in any callee.  */
 	.eabi_attribute 25, 1
 #endif /* __ARM_EABI__ */
@@ -112,6 +112,18 @@
 #error Unable to determine architecture.
 #endif
 
+/* There are times when we might prefer Thumb1 code even if ARM code is
+   permitted, for example, the code might be smaller, or there might be
+   interworking problems with switching to ARM state if interworking is
+   disabled.  */
+#if (defined(__thumb__)			\
+     && !defined(__thumb2__)		\
+     && (!defined(__THUMB_INTERWORK__)	\
+	 || defined (__OPTIMIZE_SIZE__)	\
+	 || defined(__ARM_ARCH_6M__)))
+# define __prefer_thumb__
+#endif
+
 /* How to return from a function call depends on the architecture variant.  */
 
 #if (__ARM_ARCH__ > 4) || defined(__ARM_ARCH_4T__)
@@ -917,7 +929,7 @@
 /* ------------------------------------------------------------------------ */
 #ifdef L_udivsi3
 
-#if defined(__ARM_ARCH_6M__)
+#if defined(__prefer_thumb__)
 
 	FUNC_START udivsi3
 	FUNC_ALIAS aeabi_uidiv udivsi3
@@ -974,7 +986,7 @@
 
 	DIV_FUNC_END udivsi3 unsigned
 
-#if defined(__ARM_ARCH_6M__)
+#if defined(__prefer_thumb__)
 FUNC_START aeabi_uidivmod
 	cmp	r1, #0
 	beq	LSYM(Ldiv0)
@@ -1042,7 +1054,7 @@
 /* ------------------------------------------------------------------------ */
 #ifdef L_divsi3
 
-#if defined(__ARM_ARCH_6M__)
+#if defined(__prefer_thumb__)
 
 	FUNC_START divsi3	
 	FUNC_ALIAS aeabi_idiv divsi3
@@ -1130,7 +1142,7 @@
 	
 	DIV_FUNC_END divsi3 signed
 
-#if defined(__ARM_ARCH_6M__)
+#if defined(__prefer_thumb__)
 FUNC_START aeabi_idivmod
 	cmp	r1, #0
 	beq	LSYM(Ldiv0)