summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-18 05:55:58 +0000
committerChris Lattner <sabre@nondot.org>2003-10-18 05:55:58 +0000
commitfb40334c25eb58adecc2da16905ce4fb726ae895 (patch)
tree32f97331b7e71c16e54c067bdbbbb94fe1289b60 /llvm/lib/Target/Sparc/SparcInstrSelection.cpp
parentfefd3bebc403859150546957bcdb7fb72254e714 (diff)
downloadbcm5719-llvm-fb40334c25eb58adecc2da16905ce4fb726ae895.tar.gz
bcm5719-llvm-fb40334c25eb58adecc2da16905ce4fb726ae895.zip
Update the sparc backend to at least compile correctly with the new varargs stuff even if it's not all implemented yet.
llvm-svn: 9223
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcInstrSelection.cpp')
-rw-r--r--llvm/lib/Target/Sparc/SparcInstrSelection.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
index 153bfc354c4..9633b3128d4 100644
--- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
+++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp
@@ -1408,6 +1408,9 @@ bool CodeGenIntrinsic(LLVMIntrinsic::ID iid, CallInst &callInstr,
{
switch (iid) {
case LLVMIntrinsic::va_start: {
+ // FIXME: this needs to be updated!
+ abort();
+
// Get the address of the first vararg value on stack and copy it to
// the argument of va_start(va_list* ap).
bool ignore;
@@ -1426,6 +1429,9 @@ bool CodeGenIntrinsic(LLVMIntrinsic::ID iid, CallInst &callInstr,
return true; // no-op on Sparc
case LLVMIntrinsic::va_copy:
+ // FIXME: this needs to be updated!
+ abort();
+
// Simple copy of current va_list (arg2) to new va_list (arg1)
mvec.push_back(BuildMI(V9::ORr, 3).
addMReg(target.getRegInfo().getZeroRegNum()).
@@ -2829,8 +2835,11 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
case 64: // reg: Phi(reg,reg)
break; // don't forward the value
- case 65: // reg: VaArg(reg): the va_arg instruction
+ case 65: // reg: VANext(reg): the va_next instruction
+ case 66: // reg: VAArg (reg): the va_arg instruction
{
+ abort(); // FIXME: This is incorrect!
+#if 0
// Use value initialized by va_start as pointer to args on the stack.
// Load argument via current pointer value, then increment pointer.
int argSize = target.getFrameInfo().getSizeOfEachArgOnStack();
@@ -2842,6 +2851,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
mvec.push_back(BuildMI(V9::ADDi, 3).addReg(vaArgI->getOperand(0)).
addSImm(argSize).addRegDef(vaArgI->getOperand(0)));
break;
+#endif
}
case 71: // reg: VReg
OpenPOWER on IntegriCloud