This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: linux-2.6.6 kernel make error: fp cannot be used in asm here


> > I encountered another error that I couldn't find an
> > answer on the web.
> >
> >
> >>  CC      arch/arm/kernel/fiq.o
> >>arch/arm/kernel/fiq.c: In function `set_fiq_regs':
> >>arch/arm/kernel/fiq.c:126: error: fp cannot be used
> >> in asm here
> 
> That error comes from gcc/gcc/global.c.  I get the
> impression the code in fiq.c is touching the frame pointer
> when it shouldn't?  You probably need to ask the arm-linux people.
> And you might want to try using an older gcc; 3.3.4 might be
> worth a shot.
> - Dan


I had the same problem, and worked around it by commenting
out the r11, as below.  I still haven't had time to actually *try*
the resulting kernel, but I'm pretty sure this is ok...

__asm__ volatile (
	"mrs	%0, cpsr\n\
	mov	%1, %3\n\
	msr	cpsr_c, %1	@ select FIQ mode\n\
	mov	r0, r0\n\
	ldmia	%2, {r8 - r14}\n\
	msr	cpsr_c, %0	@ return to SVC mode\n\
	mov	r0, r0"
	: "=&r" (tmp), "=&r" (tmp2)
	: "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)
	/* These registers aren't modified by the above code in a way
	   visible to the compiler, but we mark them as clobbers anyway
	   so that GCC won't put any of the input or output operands in
	   them.  */
	: "r8", "r9", "r10", /*"r11", */"r12", "r13", "r14");

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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