This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH/RFA] ARM MASK_RETURN_ADDR fix for mixed 26/32-bit


> This patch originates from Richard Earnshaw, and has been in use in
> NetBSD's 2.95.3-based compiler for some time.
> 
> Background: NetBSD runs on 26-bit as well as 32-bit ARM systems.  APCS26
> is not used on the 26-bit systems, rather they use the same ABI as the
> 32-bit systems.
> 
> Problem: GCC generates the correct return address mask for 26-bit systems
> only if APCS26 is in use.
> 
> Solution: This patch causes GCC to determine the 26/32-bit'ness of the
> system at run-time, and generate the appropriate return address mask.
> If APCS26 or an ARMv4-or-higher CPU is specified, the decision falls back
> to compile-time.
> 
> Tested on arm-elf sim, no regressions.  OK to commit?

The patch needs to be fixed to work with -mthumb before this can go in.  
For that case it should always return ~0 (Since I think we need to 
preserve the Thumb bit in this case).

R.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]