forked from OSchip/llvm-project
Add support for call instructions (0-ary only for now).
llvm-svn: 12629
This commit is contained in:
parent
6f29c89597
commit
2fd46b6e43
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue