diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-02 20:53:33 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-04-02 20:53:33 +0000 |
commit | f7e44ef8d54653cdfd8dfe39adfc5eabdf91cca2 (patch) | |
tree | 6be0cc89ef76cf8507321a7096af35f9ac2d8c70 /lib/Target/Sparc/InstSelectSimple.cpp | |
parent | 254bacd79a07632548de2f1c91d2768572764f66 (diff) |
Add support for call instructions (0-ary only for now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12629 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Sparc/InstSelectSimple.cpp')
-rw-r--r-- | lib/Target/Sparc/InstSelectSimple.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/Sparc/InstSelectSimple.cpp b/lib/Target/Sparc/InstSelectSimple.cpp index 890e55d4d3..05a1920946 100644 --- a/lib/Target/Sparc/InstSelectSimple.cpp +++ b/lib/Target/Sparc/InstSelectSimple.cpp @@ -58,7 +58,8 @@ namespace { } void visitBinaryOperator(BinaryOperator &I); - void visitReturnInst(ReturnInst &RI); + void visitCallInst(CallInst &I); + void visitReturnInst(ReturnInst &RI); void visitInstruction(Instruction &I) { std::cerr << "Unhandled instruction: " << I; @@ -226,6 +227,11 @@ bool V8ISel::runOnFunction(Function &Fn) { return true; } +void V8ISel::visitCallInst(CallInst &I) { + assert (I.getNumOperands () == 1 && "Can't handle call args yet"); + BuildMI (BB, V8::CALL, 1).addPCDisp (I.getOperand (0)); + BuildMI (BB, V8::NOP, 0); // NOP in delay slot +} void V8ISel::visitReturnInst(ReturnInst &I) { if (I.getNumOperands () == 1) { |