[llvm-commits] [llvm] r40792 - in /llvm/trunk/lib/Target: Alpha/AlphaTargetMachine.cpp IA64/IA64TargetMachine.cpp PowerPC/PPCSubtarget.h Sparc/SparcTargetMachine.cpp TargetData.cpp X86/X86TargetMachine.cpp

Dan Gohman djg at cray.com
Fri Aug 3 14:06:21 PDT 2007


> --- llvm/trunk/lib/Target/X86/X86TargetMachine.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86TargetMachine.cpp Fri Aug  3 15:20:50 2007
> @@ -115,8 +115,8 @@
>                                     bool is64Bit)
>    : Subtarget(M, FS, is64Bit),
>      DataLayout(Subtarget.is64Bit() ?
> -               std::string("e-p:64:64-f64:32:64-i64:32:64") :
> -               std::string("e-p:32:32-f64:32:64-i64:32:64")),
> +               std::string("e-p:64:64-f64:32:64-i64:32:64-f80:128:128") :
> +               std::string("e-p:32:32-f64:32:64-i64:32:64-f80:128:128")),

sizeof(long double) on i686-pc-linux-gnu (32-bit) is 12, and __alignof is 4.

> +    PPC_FP128TyID,   ///<  5: 128 bit floating point type (two 64-bits)

Is there a different name for this? PowerPC isn't the only platform that
uses (or could use) a double-double approach.

Also, what LLVM instruction would be used for conversions between this
type and the regular FP128 type? The current fpext/fptrunc instructions don't
seem to cover this case. Maybe fptrunc could be generalized to cover all
floating-point conversions for which there are values for the operand type
which cannot be exactly represented in the result type.

Dan

-- 
Dan Gohman, Cray Inc.



More information about the llvm-commits mailing list