mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 23:29:22 +00:00
Add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
81bf03eb5c
commit
4183e31978
@ -94,9 +94,11 @@ unsigned FastISel::getRegForValue(Value *V) {
|
|||||||
Reg =
|
Reg =
|
||||||
getRegForValue(Constant::getNullValue(TD.getIntPtrType(V->getContext())));
|
getRegForValue(Constant::getNullValue(TD.getIntPtrType(V->getContext())));
|
||||||
} else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
|
} else if (ConstantFP *CF = dyn_cast<ConstantFP>(V)) {
|
||||||
|
// Try to emit the constant directly.
|
||||||
Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF);
|
Reg = FastEmit_f(VT, VT, ISD::ConstantFP, CF);
|
||||||
|
|
||||||
if (!Reg) {
|
if (!Reg) {
|
||||||
|
// Try to emit the constant by using an integer constant with a cast.
|
||||||
const APFloat &Flt = CF->getValueAPF();
|
const APFloat &Flt = CF->getValueAPF();
|
||||||
EVT IntVT = TLI.getPointerTy();
|
EVT IntVT = TLI.getPointerTy();
|
||||||
|
|
||||||
@ -320,6 +322,7 @@ bool FastISel::SelectCall(User *I) {
|
|||||||
Function *F = cast<CallInst>(I)->getCalledFunction();
|
Function *F = cast<CallInst>(I)->getCalledFunction();
|
||||||
if (!F) return false;
|
if (!F) return false;
|
||||||
|
|
||||||
|
// Handle selected intrinsic function calls.
|
||||||
unsigned IID = F->getIntrinsicID();
|
unsigned IID = F->getIntrinsicID();
|
||||||
switch (IID) {
|
switch (IID) {
|
||||||
default: break;
|
default: break;
|
||||||
@ -440,6 +443,8 @@ bool FastISel::SelectCall(User *I) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// An arbitrary call. Bail.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user