This is the mail archive of the
mailing list for the GCC project.
Re: [repost] switch() statements on ARM/Thumb
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Adrian von Bidder <avbidder at acter dot ch>
- Cc: Richard dot Earnshaw at arm dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 03 Dec 2001 17:39:53 +0000
- Subject: Re: [repost] switch() statements on ARM/Thumb
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Since nobody commented on it last time I posted this I assume it's got
> lost in the flood of email...
Well, I've been away from email for the last month...
> This patch [attached as I fear inline patches won't survive] corrects
> code generation on for switch() statements on ARM/thumb when -fpic is
> given. Other cases should not have changed.
> Works against cvs, applies cleanly to 3.0.2, too.
2001-11-22 Adrian von Bidder <email@example.com>
* arm.h (CASE_VECTOR_PC_RELATIVE, ASM_OUTPUT_ADDR_DIFF_ELT): define
ASM_OUTPUT_ADDR_DIFF_ELT is already defined in arm/aout.h and arm/aof.h;
re-defining in arm.h is wrong, since it is incompatible with support for
AOF object formats.
CASE_VECTOR_PC_RELATIVE isn't required for ARM; GCC always uses an
ADDR_DIFF format for PIC.
* arm.md (thumbpic_casesi): new pattern for switch() statements
(*thumb_subsi3imm_insn, *thumb_mulsi3_power2, *thumb_adr):
I'll look at this in more detail later, when I've caught up a bit more.
Do you have an assignment on file?