[LLVMdev] a target must have floating point support?

Chris Lattner sabre at nondot.org
Mon Aug 21 10:34:52 PDT 2006


On Sun, 20 Aug 2006 duraid at octopus.com.au wrote:
>> Most ARMs don't have an FPU. Should I add a fake
>> register class for MVT::f64?
>
> ...nothing will break if you just pretend f64 fits in your integer
> registers so long as you don't go anywhere near FP in your code. So just:
>
> addRegisterClass(MVT::f64, <your chosen integer reg class>)
>
> Also, if you *do* want to support (software) FP you should do that anyway,
> then just lower FP operations to library calls and/or custom LLVM
> sequences operating on your integer representation of floats.

Yep.  We don't support any targets that require software FP support, and 
I'm not very knowledgable about that area.  However, it would be very nice 
if the target-independent code did this lowering, so that the code 
could be shared across multiple targets.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list