mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
CodeGen-Windows: Only emit _fltused if a VarArg function is called with floating point args.
This should be the minimum set of functions that could possibly need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116978 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -5030,16 +5030,16 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) {
|
||||
// See if any floating point values are being passed to this external
|
||||
// function. This is used to emit an undefined reference to fltused on
|
||||
// Windows.
|
||||
if (!F->hasLocalLinkage() && F->hasName()) {
|
||||
MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI();
|
||||
for (unsigned i = 0, e = I.getNumArgOperands(); i != e &&
|
||||
!MMI.callsExternalFunctionWithFloatingPointArguments(); ++i) {
|
||||
MachineModuleInfo &MMI = DAG.getMachineFunction().getMMI();
|
||||
if (F->isVarArg() &&
|
||||
!MMI.callsExternalVAFunctionWithFloatingPointArguments()) {
|
||||
for (unsigned i = 0, e = I.getNumArgOperands(); i != e; ++i) {
|
||||
const Type* T = I.getArgOperand(i)->getType();
|
||||
for (po_iterator<const Type*> i = po_begin(T),
|
||||
e = po_end(T);
|
||||
i != e; ++i) {
|
||||
if (i->isFloatingPointTy()) {
|
||||
MMI.setCallsExternalFunctionWithFloatingPointArguments(true);
|
||||
MMI.setCallsExternalVAFunctionWithFloatingPointArguments(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user