mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Teach IntrinsicLowering.cpp about the sin, cos, and pow intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4859e277f7
commit
c4c9660129
@ -114,6 +114,51 @@ void IntrinsicLowering::AddPrototypes(Module &M) {
|
||||
I->arg_begin()->getType());
|
||||
}
|
||||
break;
|
||||
case Intrinsic::sin:
|
||||
switch((int)I->arg_begin()->getType()->getTypeID()) {
|
||||
case Type::FloatTyID:
|
||||
EnsureFunctionExists(M, "sinf", I->arg_begin(), I->arg_end(),
|
||||
Type::FloatTy);
|
||||
case Type::DoubleTyID:
|
||||
EnsureFunctionExists(M, "sin", I->arg_begin(), I->arg_end(),
|
||||
Type::DoubleTy);
|
||||
case Type::X86_FP80TyID:
|
||||
case Type::FP128TyID:
|
||||
case Type::PPC_FP128TyID:
|
||||
EnsureFunctionExists(M, "sinl", I->arg_begin(), I->arg_end(),
|
||||
I->arg_begin()->getType());
|
||||
}
|
||||
break;
|
||||
case Intrinsic::cos:
|
||||
switch((int)I->arg_begin()->getType()->getTypeID()) {
|
||||
case Type::FloatTyID:
|
||||
EnsureFunctionExists(M, "cosf", I->arg_begin(), I->arg_end(),
|
||||
Type::FloatTy);
|
||||
case Type::DoubleTyID:
|
||||
EnsureFunctionExists(M, "cos", I->arg_begin(), I->arg_end(),
|
||||
Type::DoubleTy);
|
||||
case Type::X86_FP80TyID:
|
||||
case Type::FP128TyID:
|
||||
case Type::PPC_FP128TyID:
|
||||
EnsureFunctionExists(M, "cosl", I->arg_begin(), I->arg_end(),
|
||||
I->arg_begin()->getType());
|
||||
}
|
||||
break;
|
||||
case Intrinsic::pow:
|
||||
switch((int)I->arg_begin()->getType()->getTypeID()) {
|
||||
case Type::FloatTyID:
|
||||
EnsureFunctionExists(M, "powf", I->arg_begin(), I->arg_end(),
|
||||
Type::FloatTy);
|
||||
case Type::DoubleTyID:
|
||||
EnsureFunctionExists(M, "pow", I->arg_begin(), I->arg_end(),
|
||||
Type::DoubleTy);
|
||||
case Type::X86_FP80TyID:
|
||||
case Type::FP128TyID:
|
||||
case Type::PPC_FP128TyID:
|
||||
EnsureFunctionExists(M, "powl", I->arg_begin(), I->arg_end(),
|
||||
I->arg_begin()->getType());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user