WebAssembly: print basic integer assembly.
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyISelLowering.h
index efd60a7bacd6a5ce5d84b4445f272630b61acd8c..3e8252604d6ce143e4dab0c4b85674d77bcd0d34 100644 (file)
@@ -24,6 +24,8 @@ namespace WebAssemblyISD {
 
 enum {
   FIRST_NUMBER = ISD::BUILTIN_OP_END,
+  RETURN,
+  ARGUMENT,
 
   // add memory opcodes starting at ISD::FIRST_TARGET_MEMORY_OPCODE here...
 };
@@ -42,6 +44,22 @@ private:
   /// Keep a pointer to the WebAssemblySubtarget around so that we can make the
   /// right decision when generating code for different targets.
   const WebAssemblySubtarget *Subtarget;
+
+  bool CanLowerReturn(CallingConv::ID CallConv, MachineFunction &MF,
+                      bool isVarArg,
+                      const SmallVectorImpl<ISD::OutputArg> &Outs,
+                      LLVMContext &Context) const override;
+
+  SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg,
+                      const SmallVectorImpl<ISD::OutputArg> &Outs,
+                      const SmallVectorImpl<SDValue> &OutVals, SDLoc dl,
+                      SelectionDAG &DAG) const override;
+
+  SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv,
+                               bool IsVarArg,
+                               const SmallVectorImpl<ISD::InputArg> &Ins,
+                               SDLoc DL, SelectionDAG &DAG,
+                               SmallVectorImpl<SDValue> &InVals) const override;
 };
 
 } // end namespace llvm