diff options
author | Dale Johannesen <dalej@apple.com> | 2007-08-09 01:04:01 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-08-09 01:04:01 +0000 |
commit | 5411a3937f4303f9c3fc50be92f985a4532d95e6 (patch) | |
tree | 90394f22a626d92d93f7963d8dbd7e56d1152ba5 /lib/Target/X86 | |
parent | 48bd15ed72bcf9464989516c078ed9d15030c95e (diff) | |
download | external_llvm-5411a3937f4303f9c3fc50be92f985a4532d95e6.zip external_llvm-5411a3937f4303f9c3fc50be92f985a4532d95e6.tar.gz external_llvm-5411a3937f4303f9c3fc50be92f985a4532d95e6.tar.bz2 |
long double 9 of N. This finishes up the X86-32 bits
(constants are still not handled). Adds ConvertActions
to control fp-to-fp conversions (these are currently
defaulted for all other targets, so no changes there).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index f8ff6a0..3af3934 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -298,6 +298,14 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM) setOperationAction(ISD::ConstantFP, MVT::f64, Expand); setOperationAction(ISD::ConstantFP, MVT::f32, Expand); addLegalFPImmediate(+0.0); // xorps / xorpd + + // Conversions to long double (in X87) go through memory. + setConvertAction(MVT::f32, MVT::f80, Expand); + setConvertAction(MVT::f64, MVT::f80, Expand); + + // Conversions from long double (in X87) go through memory. + setConvertAction(MVT::f80, MVT::f32, Expand); + setConvertAction(MVT::f80, MVT::f64, Expand); } else { // Set up the FP register classes. addRegisterClass(MVT::f64, X86::RFP64RegisterClass); @@ -307,7 +315,11 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM) setOperationAction(ISD::UNDEF, MVT::f32, Expand); setOperationAction(ISD::FCOPYSIGN, MVT::f64, Expand); setOperationAction(ISD::FCOPYSIGN, MVT::f32, Expand); - setOperationAction(ISD::FP_ROUND, MVT::f32, Expand); + + // Floating truncations need to go through memory. + setConvertAction(MVT::f80, MVT::f32, Expand); + setConvertAction(MVT::f64, MVT::f32, Expand); + setConvertAction(MVT::f80, MVT::f64, Expand); if (!UnsafeFPMath) { setOperationAction(ISD::FSIN , MVT::f64 , Expand); |