mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-30 17:33:24 +00:00
header file changes for varargs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22253 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc494e8312
commit
f542821385
@ -128,13 +128,14 @@ HANDLE_OTHER_INST(29, Call , CallInst ) // Call a function
|
||||
|
||||
HANDLE_OTHER_INST(30, Shl , ShiftInst ) // Shift operations
|
||||
HANDLE_OTHER_INST(31, Shr , ShiftInst )
|
||||
HANDLE_OTHER_INST(32, VANext , VANextInst ) // vanext instruction
|
||||
HANDLE_OTHER_INST(33, VAArg , VAArgInst ) // vaarg instruction
|
||||
//HANDLE_OTHER_INST(32, VANext , VANextInst ) // vanext instruction
|
||||
//HANDLE_OTHER_INST(33, VAArg , VAArgInst ) // vaarg instruction
|
||||
HANDLE_OTHER_INST(34, Select , SelectInst ) // select instruction
|
||||
|
||||
HANDLE_OTHER_INST(35, UserOp1, Instruction) // May be used internally in a pass
|
||||
HANDLE_OTHER_INST(36, UserOp2, Instruction)
|
||||
LAST_OTHER_INST(36)
|
||||
HANDLE_OTHER_INST(37, VAArg , VAArgInst ) // vaarg instruction
|
||||
LAST_OTHER_INST(37)
|
||||
|
||||
#undef FIRST_TERM_INST
|
||||
#undef HANDLE_TERM_INST
|
||||
|
@ -660,55 +660,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// VANextInst Class
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// VANextInst - This class represents the va_next llvm instruction, which
|
||||
/// advances a vararg list passed an argument of the specified type, returning
|
||||
/// the resultant list.
|
||||
///
|
||||
class VANextInst : public UnaryInstruction {
|
||||
PATypeHolder ArgTy;
|
||||
VANextInst(const VANextInst &VAN)
|
||||
: UnaryInstruction(VAN.getType(), VANext, VAN.getOperand(0)),
|
||||
ArgTy(VAN.getArgType()) {
|
||||
}
|
||||
|
||||
public:
|
||||
VANextInst(Value *List, const Type *Ty, const std::string &Name = "",
|
||||
Instruction *InsertBefore = 0)
|
||||
: UnaryInstruction(List->getType(), VANext, List, Name, InsertBefore),
|
||||
ArgTy(Ty) {
|
||||
}
|
||||
VANextInst(Value *List, const Type *Ty, const std::string &Name,
|
||||
BasicBlock *InsertAtEnd)
|
||||
: UnaryInstruction(List->getType(), VANext, List, Name, InsertAtEnd),
|
||||
ArgTy(Ty) {
|
||||
}
|
||||
|
||||
const Type *getArgType() const { return ArgTy; }
|
||||
|
||||
virtual VANextInst *clone() const;
|
||||
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const VANextInst *) { return true; }
|
||||
static inline bool classof(const Instruction *I) {
|
||||
return I->getOpcode() == VANext;
|
||||
}
|
||||
static inline bool classof(const Value *V) {
|
||||
return isa<Instruction>(V) && classof(cast<Instruction>(V));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// VAArgInst Class
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// VAArgInst - This class represents the va_arg llvm instruction, which returns
|
||||
/// an argument of the specified type given a va_list.
|
||||
/// an argument of the specified type given a va_list and increments that list
|
||||
///
|
||||
class VAArgInst : public UnaryInstruction {
|
||||
VAArgInst(const VAArgInst &VAA)
|
||||
|
@ -174,7 +174,6 @@ public:
|
||||
RetTy visitSelectInst(SelectInst &I) { DELEGATE(Instruction); }
|
||||
RetTy visitCallInst(CallInst &I) { DELEGATE(Instruction); }
|
||||
RetTy visitShiftInst(ShiftInst &I) { DELEGATE(Instruction); }
|
||||
RetTy visitVANextInst(VANextInst &I) { DELEGATE(Instruction); }
|
||||
RetTy visitVAArgInst(VAArgInst &I) { DELEGATE(Instruction); }
|
||||
|
||||
// Next level propagators... if the user does not overload a specific
|
||||
|
@ -268,7 +268,7 @@ public:
|
||||
/// LowerVAStart - This lowers the llvm.va_start intrinsic. If not
|
||||
/// implemented, this method prints a message and aborts.
|
||||
virtual std::pair<SDOperand, SDOperand>
|
||||
LowerVAStart(SDOperand Chain, SelectionDAG &DAG);
|
||||
LowerVAStart(SDOperand Chain, SelectionDAG &DAG, SDOperand Dest);
|
||||
|
||||
/// LowerVAEnd - This lowers llvm.va_end and returns the resultant chain. If
|
||||
/// not implemented, this defaults to a noop.
|
||||
@ -278,13 +278,12 @@ public:
|
||||
/// value/chain pair. If not implemented, this defaults to returning the
|
||||
/// input operand.
|
||||
virtual std::pair<SDOperand,SDOperand>
|
||||
LowerVACopy(SDOperand Chain, SDOperand L, SelectionDAG &DAG);
|
||||
LowerVACopy(SDOperand Chain, SDOperand Src, SDOperand Dest, SelectionDAG &DAG);
|
||||
|
||||
/// LowerVAArgNext - This lowers the vaarg and vanext instructions (depending
|
||||
/// on whether the first argument is true). If not implemented, this prints a
|
||||
/// message and aborts.
|
||||
/// LowerVAArgNext - This lowers the instruction
|
||||
/// If not implemented, this prints a message and aborts.
|
||||
virtual std::pair<SDOperand,SDOperand>
|
||||
LowerVAArgNext(bool isVANext, SDOperand Chain, SDOperand VAList,
|
||||
LowerVAArgNext(SDOperand Chain, SDOperand VAList,
|
||||
const Type *ArgTy, SelectionDAG &DAG);
|
||||
|
||||
/// LowerFrameReturnAddress - This hook lowers a call to llvm.returnaddress or
|
||||
|
Loading…
Reference in New Issue
Block a user