ARM linux-2.6.8 build fail with gcc-3.4.x

James E Wilson wilson@specifixinc.com
Tue Sep 14 02:42:00 GMT 2004


Dan Kegel wrote:
> The vanilla linux kernel for ARM has a function get_fiq_regs() which
> contains an asm which marks the high 8 registers (including r11,
> the frame pointer under apcs) as clobbered to keep gcc from putting
> any inputs there.

Here are a few suggestions that may or may not work and may or may not 
be feasible:
1) Extend the extended asm syntax so we can distinguish between 
registers clobbered because they are modified by the asm, and registers 
clobbered because we don't want any inputs in those registers. 
Currently, we have only the former, and that requires an error for this 
example as it isn't safe to clobber the FP register when it is being 
used to hold the frame pointer.
2) Modify the ARM port to add a new register class that contains only 
the low 8 registers, add a new constraint letter for it, and modify the 
asm to use that constraint letter.  Document that the constraint letter 
exists for use by the linux kernel.  There is already a LO_REGS register 
class, but the 'l' constraint only works for thumb code, so we would 
need a new letter for the linux kernel.
3) Write the functions in assembly language.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list