This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Problem building ecos for arm with thumb instruction set
- To: "Trenton D. Adams" <tadams at theone dot dnsalias dot com>
- Subject: Re: [ECOS] Problem building ecos for arm with thumb instruction set
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 06 Sep 2001 22:00:13 +0100
- Cc: 'Dzanh Nguyen' <dzanh at indigita dot com>,ecos-discuss at sources dot redhat dot com
- Organization: Red Hat UK Ltd.
- References: <001501c130c8$f4033d50$090110ac@TRENT>
"Trenton D. Adams" wrote:
>
> I believe you have to compile a thumb version of your tools. eg.
> thumb-elf-gcc and not arm-elf-gcc. Also, you have to be using GCC
> greater than 2.95.2.
That's not what he's doing - he's using arm-elf-gcc -mthumb which is
correct for a recent gcc.
The real answer is to use this patch for GCC, and rebuild.
Index: arm.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.h,v
retrieving revision 1.98.4.2
diff -u -5 -p -r1.98.4.2 arm.h
--- arm.h 2001/05/24 21:03:58 1.98.4.2
+++ arm.h 2001/09/06 20:59:41
@@ -1077,11 +1077,11 @@ enum reg_class
or could index an array. */
#define REGNO_REG_CLASS(REGNO) arm_regno_class (REGNO)
/* The class value for index registers, and the one for base regs. */
#define INDEX_REG_CLASS (TARGET_THUMB ? LO_REGS : GENERAL_REGS)
-#define BASE_REG_CLASS (TARGET_THUMB ? BASE_REGS : GENERAL_REGS)
+#define BASE_REG_CLASS (TARGET_THUMB ? LO_REGS : GENERAL_REGS)
/* When SMALL_REGISTER_CLASSES is nonzero, the compiler allows
registers explicitly used in the rtl to be used as spill registers
but prevents the compiler from extending the lifetime of these
registers. */
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine