1 //===- XtensaOperators.td - Xtensa-specific operators ---------*- tblgen-*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
12 def SDT_XtensaCallSeqStart : SDCallSeqStart<[SDTCisVT<0, i32>, SDTCisVT<1, i32>]>;
13 def SDT_XtensaCallSeqEnd : SDCallSeqEnd<[SDTCisVT<0, i32>, SDTCisVT<1, i32>]>;
14 def SDT_XtensaCall : SDTypeProfile<0, -1, [SDTCisPtrTy<0>]>;
16 def SDT_XtensaWrapPtr : SDTypeProfile<1, 1,
20 def SDT_XtensaBrJT : SDTypeProfile<0, 2,
21 [SDTCisPtrTy<0>, SDTCisVT<1, i32>]>;
23 def SDT_XtensaSelectCC : SDTypeProfile<1, 5,
28 def SDT_XtensaSRC : SDTypeProfile<1, 3, [SDTCisVT<0, i32>, SDTCisVT<1, i32>,
29 SDTCisVT<2, i32>, SDTCisVT<3, i32>]>;
31 def SDT_XtensaEXTUI : SDTypeProfile<1, 3, [SDTCisVT<0, i32>, SDTCisVT<1, i32>,
32 SDTCisVT<2, i32>, SDTCisVT<3, i32>]>;
34 //===----------------------------------------------------------------------===//
36 //===----------------------------------------------------------------------===//
37 def Xtensa_call: SDNode<"XtensaISD::CALL", SDT_XtensaCall,
38 [SDNPHasChain, SDNPOutGlue, SDNPOptInGlue, SDNPVariadic]>;
40 def Xtensa_ret: SDNode<"XtensaISD::RET", SDTNone,
41 [SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
43 def Xtensa_pcrel_wrapper: SDNode<"XtensaISD::PCREL_WRAPPER", SDT_XtensaWrapPtr, []>;
45 def Xtensa_callseq_start: SDNode<"ISD::CALLSEQ_START", SDT_XtensaCallSeqStart,
46 [SDNPHasChain, SDNPSideEffect, SDNPOutGlue]>;
48 def Xtensa_callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_XtensaCallSeqEnd,
49 [SDNPHasChain, SDNPSideEffect, SDNPOptInGlue,
52 def Xtensa_brjt: SDNode<"XtensaISD::BR_JT", SDT_XtensaBrJT, [SDNPHasChain]>;
54 def Xtensa_select_cc: SDNode<"XtensaISD::SELECT_CC", SDT_XtensaSelectCC,
57 def Xtensa_srcl: SDNode<"XtensaISD::SRCL", SDT_XtensaSRC>;
59 def Xtensa_srcr: SDNode<"XtensaISD::SRCR", SDT_XtensaSRC>;
61 def Xtensa_extui: SDNode<"XtensaISD::EXTUI", SDT_XtensaEXTUI>;