Re: Toolchain for Maverick Crunch FPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 12 April 2007 14:02, Richard Earnshaw wrote:
> On Thu, 2007-04-12 at 14:16 +0300, Kai Ruottu wrote:
> > Things seem to be that the '-mcpu=ep9312 -mhard-float' combination will
> > crash the GCC build in both gcc-4.1.2 and gcc-4.2.0-20070316 prerelease
> > like :
>
> -mhard-float doesn't do what you think it does...
>
> I think you should be using:
>
> 	-mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp
>
> However, this isn't a combination that I test, so your mileage may
> vary... :-)

I suspect you'll find the maverick FPU code is somewhat bitrotten.

To expand on what Richard said above, -mhard-float is an alias 
for -mfloat-abi=hard. -mfloat-abi= determines where/when coprocessor 
instructions are used: soft=never, softfp=only within a function, hard=always 
(this changes the ABI). Not all combinations are implemented.

-mfpu= tells gcc which FPU model to use. It does not by itself enable 
generation of coprocessor instructions.

I'll admit that the meaning of these options isn't particularly intuitive.
You may also find that with older toolchains/targets the compiler and 
assembler might not be consistent in what setting they use. Recent EABI based 
toolchains have solved this problem using .fpu and .arch directives in the 
assembly file.

Paul

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux