diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-12 15:28:24 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-12 15:28:24 -0800 |
commit | 274bbd9fad5cda69f80304861829fa9ca3909f69 (patch) | |
tree | 385b54a6e3992250272356b85cd14d71497523e3 /lib | |
parent | 3f8c01408b2da198cde0a3bd6d534fd68fa9f35f (diff) |
horrible wip +missing ensureFuncs
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/NaCl/ExpandI64.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/Transforms/NaCl/ExpandI64.cpp b/lib/Transforms/NaCl/ExpandI64.cpp index e46f1ea485..3f6de3b168 100644 --- a/lib/Transforms/NaCl/ExpandI64.cpp +++ b/lib/Transforms/NaCl/ExpandI64.cpp @@ -388,24 +388,31 @@ dump("CE2"); int Num = FT->getNumParams(); for (int i = 0; i < Num; i++) { Type *T = FT->getParamType(i); +dump("argg"); if (!isIllegal(T)) { +dump(" legal"); Args.push_back(CI->getArgOperand(i)); } else { +dump(" illegal!"); Args.push_back(Zero); // will be fixed Args.push_back(Zero); } } dumpv("calling with %d args, to something hasing %d args", Args.size(), F->getFunctionType()->getNumParams()); Instruction *L = CopyDebug(CallInst::Create(F, Args, "", I), I); +dump("CE3"); Instruction *H = NULL; // legalize return value as well, if necessary if (isIllegal(I->getType())) { + ensureFuncs(); H = CopyDebug(CallInst::Create(GetHigh, "", I), I); } +dump("CE4"); SplitInfo &Split = Splits[I]; - Split.ToFix.push_back(L); Split.LowHigh.Low = L; - Split.ToFix.push_back(H); Split.LowHigh.High = H; + Split.ToFix.push_back(L); + Split.LowHigh.Low = L; + Split.LowHigh.High = H; break; } case Instruction::FPToSI: { |