1 //===-- Nios2ISelLowering.h - Nios2 DAG Lowering Interface ------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the interfaces that Nios2 uses to lower LLVM code into a
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2ISELLOWERING_H
16 #define LLVM_LIB_TARGET_NIOS2_NIOS2ISELLOWERING_H
19 #include "llvm/CodeGen/TargetLowering.h"
26 // Start the numbering from where ISD NodeType finishes.
27 FIRST_NUMBER
= ISD::BUILTIN_OP_END
,
29 // Get the Higher 16 bits from a 32-bit immediate
30 // No relation with Nios2 Hi register
32 // Get the Lower 16 bits from a 32-bit immediate
33 // No relation with Nios2 Lo register
40 class Nios2TargetLowering
: public TargetLowering
{
41 const Nios2Subtarget
*Subtarget
;
44 Nios2TargetLowering(const TargetMachine
&TM
, const Nios2Subtarget
&STI
);
46 /// getTargetNodeName - This method returns the name of a target specific
48 const char *getTargetNodeName(unsigned Opcode
) const override
;
50 SDValue
LowerFormalArguments(SDValue Chain
, CallingConv::ID CallConv
,
52 const SmallVectorImpl
<ISD::InputArg
> &Ins
,
53 const SDLoc
&dl
, SelectionDAG
&DAG
,
54 SmallVectorImpl
<SDValue
> &InVals
) const override
;
56 SDValue
LowerReturn(SDValue Chain
, CallingConv::ID CallConv
, bool isVarArg
,
57 const SmallVectorImpl
<ISD::OutputArg
> &Outs
,
58 const SmallVectorImpl
<SDValue
> &OutVals
, const SDLoc
&dl
,
59 SelectionDAG
&DAG
) const override
;
61 } // end namespace llvm
63 #endif // NIOS2_ISELLOWERING_H