1 //===-- PPC32ISelLowering.cpp - PPC32 DAG Lowering Impl. --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by Chris Lattner and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the interfaces that PPC uses to lower LLVM code into a
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H
16 #define LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H
18 #include "llvm/Target/TargetLowering.h"
21 class PPC32TargetLowering : public TargetLowering {
22 int VarArgsFrameIndex; // FrameIndex for start of varargs area.
23 int ReturnAddrIndex; // FrameIndex for return slot.
25 PPC32TargetLowering(TargetMachine &TM);
27 /// LowerArguments - This hook must be implemented to indicate how we should
28 /// lower the arguments for the specified function, into the specified DAG.
29 virtual std::vector<SDOperand>
30 LowerArguments(Function &F, SelectionDAG &DAG);
32 /// LowerCallTo - This hook lowers an abstract call to a function into an
34 virtual std::pair<SDOperand, SDOperand>
35 LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg,
37 bool isTailCall, SDOperand Callee, ArgListTy &Args,
40 virtual SDOperand LowerVAStart(SDOperand Chain, SDOperand VAListP,
41 Value *VAListV, SelectionDAG &DAG);
43 virtual std::pair<SDOperand,SDOperand>
44 LowerVAArg(SDOperand Chain, SDOperand VAListP, Value *VAListV,
45 const Type *ArgTy, SelectionDAG &DAG);
47 virtual std::pair<SDOperand, SDOperand>
48 LowerFrameReturnAddress(bool isFrameAddr, SDOperand Chain, unsigned Depth,
53 #endif // LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H