Skip to content

Commit

Permalink
Add low-level option for avoiding float stores from va_start until
Browse files Browse the repository at this point in the history
soft-float is properly supported.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215221 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jsonn committed Aug 8, 2014
1 parent c9def6b commit 6f3e49e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Target/PowerPC/PPCISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#include "llvm/Target/TargetOptions.h"
using namespace llvm;

// FIXME: Remove this once soft-float is supported.
static cl::opt<bool> DisablePPCFloatInVariadic("disable-ppc-float-in-variadic",
cl::desc("disable saving float registers for va_start on PPC"), cl::Hidden);

static cl::opt<bool> DisablePPCPreinc("disable-ppc-preinc",
cl::desc("disable preincrement load/store generation on PPC"), cl::Hidden);

Expand Down Expand Up @@ -2494,7 +2498,9 @@ PPCTargetLowering::LowerFormalArguments_32SVR4(
PPC::F1, PPC::F2, PPC::F3, PPC::F4, PPC::F5, PPC::F6, PPC::F7,
PPC::F8
};
const unsigned NumFPArgRegs = array_lengthof(FPArgRegs);
unsigned NumFPArgRegs = array_lengthof(FPArgRegs);
if (DisablePPCFloatInVariadic)
NumFPArgRegs = 0;

FuncInfo->setVarArgsNumGPR(CCInfo.getFirstUnallocated(GPArgRegs,
NumGPArgRegs));
Expand Down

0 comments on commit 6f3e49e

Please sign in to comment.