mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 08:33:14 +01:00
Add support for PPC 128bit doubledouble type.
On a PowerPC target the datatype real is mapped to PPC 128bit doubledouble type. Please note that this yet does not work if you cross compile from a different architecture.
This commit is contained in:
@@ -109,6 +109,9 @@ llvm::Type * IrTypeBasic::basic2llvm(Type* t)
|
||||
// only x86 has 80bit float
|
||||
if (global.params.cpu == ARCHx86 || global.params.cpu == ARCHx86_64)
|
||||
return llvm::Type::getX86_FP80Ty(ctx);
|
||||
// PPC has a special 128bit float
|
||||
else if (global.params.cpu == ARCHppc || global.params.cpu == ARCHppc_64)
|
||||
return llvm::Type::getPPC_FP128Ty(ctx);
|
||||
// other platforms use 64bit reals
|
||||
else
|
||||
return llvm::Type::getDoubleTy(ctx);
|
||||
@@ -125,7 +128,9 @@ llvm::Type * IrTypeBasic::basic2llvm(Type* t)
|
||||
case Tcomplex80:
|
||||
t2 = (global.params.cpu == ARCHx86 || global.params.cpu == ARCHx86_64)
|
||||
? llvm::Type::getX86_FP80Ty(ctx)
|
||||
: llvm::Type::getDoubleTy(ctx);
|
||||
: (global.params.cpu == ARCHppc || global.params.cpu == ARCHppc_64)
|
||||
? llvm::Type::getPPC_FP128Ty(ctx)
|
||||
: llvm::Type::getDoubleTy(ctx);
|
||||
return getComplexType(ctx, t2);
|
||||
|
||||
case Tbool:
|
||||
|
||||
Reference in New Issue
Block a user