This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: ARM: Error bootstrapping the mainline compiler...
- To: Scott Bambrough <scottb at netwinder dot org>
- Subject: Re: ARM: Error bootstrapping the mainline compiler...
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Mon, 17 Apr 2000 20:43:48 +0100
- Cc: gcc bugs list <gcc-bugs at gcc dot gnu dot org>
- Cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
> I did a CVS update and a make bootstrap-lean this morning and got the following
> error. The .i and .s file can be found here:
>
> ftp://ftp.netwinder.org/users/s/scottb/gccbug-2000-04-17.tar.gz
OK. Found it. We were calculating the size of a NOP incorrectly, because
the is_thumb attribute was setup wrongly.
Please try the following patch.
* arm.md (is_thumb): Use variable thumb_code.
* arm.h (thumb_code): Declare it.
* arm.c (arm_override_options): Initialize it.
Index: arm.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/arm.c,v
retrieving revision 1.93
diff -p -r1.93 arm.c
*** arm.c 2000/04/11 03:08:01 1.93
--- arm.c 2000/04/17 19:39:47
*************** int arm_is_strong = 0;
*** 171,176 ****
--- 169,177 ----
/* Nonzero if this chip is a an ARM6 or an ARM7. */
int arm_is_6_or_7 = 0;
+ /* Nonzero if generating Thumb instructions. */
+ int thumb_code = 0;
+
/* In case of a PRE_INC, POST_INC, PRE_DEC, POST_DEC memory reference, we
must report the mode of the memory reference from PRINT_OPERAND to
PRINT_OPERAND_ADDRESS. */
*************** arm_override_options ()
*** 569,574 ****
--- 566,572 ----
arm_ld_sched = (tune_flags & FL_LDSCHED) != 0;
arm_is_strong = (tune_flags & FL_STRONG) != 0;
+ thumb_code = (TARGET_ARM == 0);
arm_is_6_or_7 = (((tune_flags & (FL_MODE26 | FL_MODE32))
&& !(tune_flags & FL_ARCH4))) != 0;
Index: arm.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/arm.h,v
retrieving revision 1.72
diff -p -r1.72 arm.h
*** arm.h 2000/04/12 00:46:26 1.72
--- arm.h 2000/04/17 19:39:47
*************** extern int arm_arch5;
*** 539,544 ****
--- 536,544 ----
/* Nonzero if this chip can benefit from load scheduling. */
extern int arm_ld_sched;
+
+ /* Nonzero if generating thumb code. */
+ extern int thumb_code;
/* Nonzero if this chip is a StrongARM. */
extern int arm_is_strong;
Index: arm.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/arm.md,v
retrieving revision 1.46
diff -p -r1.46 arm.md
*** arm.md 2000/04/08 14:29:52 1.46
--- arm.md 2000/04/17 19:39:47
***************
*** 40,46 ****
;; Attributes
! (define_attr "is_thumb" "no,yes" (const (symbol_ref "TARGET_ARM")))
; PROG_MODE attribute is used to determine whether condition codes are
; clobbered by a call insn: they are if in prog32 mode. This is controlled
--- 40,46 ----
;; Attributes
! (define_attr "is_thumb" "no,yes" (const (symbol_ref "thumb_code")))
; PROG_MODE attribute is used to determine whether condition codes are
; clobbered by a call insn: they are if in prog32 mode. This is controlled