blob: 4198e2637bcc4710bfec4d336b13643e9f0c63f5 [file] [log] [blame]
Chris Lattner7c5a3d32005-08-16 17:14:42 +00001//===-- PPC32ISelLowering.cpp - PPC32 DAG Lowering Impl. --------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the interfaces that PPC uses to lower LLVM code into a
11// selection DAG.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H
16#define LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H
17
18#include "llvm/Target/TargetLowering.h"
19
20namespace llvm {
21 class PPC32TargetLowering : public TargetLowering {
22 int VarArgsFrameIndex; // FrameIndex for start of varargs area.
23 int ReturnAddrIndex; // FrameIndex for return slot.
24 public:
25 PPC32TargetLowering(TargetMachine &TM);
26
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);
31
32 /// LowerCallTo - This hook lowers an abstract call to a function into an
33 /// actual call.
34 virtual std::pair<SDOperand, SDOperand>
35 LowerCallTo(SDOperand Chain, const Type *RetTy, bool isVarArg,
36 unsigned CC,
37 bool isTailCall, SDOperand Callee, ArgListTy &Args,
38 SelectionDAG &DAG);
39
40 virtual SDOperand LowerVAStart(SDOperand Chain, SDOperand VAListP,
41 Value *VAListV, SelectionDAG &DAG);
42
43 virtual std::pair<SDOperand,SDOperand>
44 LowerVAArg(SDOperand Chain, SDOperand VAListP, Value *VAListV,
45 const Type *ArgTy, SelectionDAG &DAG);
46
47 virtual std::pair<SDOperand, SDOperand>
48 LowerFrameReturnAddress(bool isFrameAddr, SDOperand Chain, unsigned Depth,
49 SelectionDAG &DAG);
50 };
51}
52
53#endif // LLVM_TARGET_POWERPC_PPC32ISELLOWERING_H