10b57cec5SDimitry Andric//===--- HexagonOperands.td -----------------------------------------------===// 20b57cec5SDimitry Andric// 30b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric// 70b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andricdef f32ImmOperand : AsmOperandClass { let Name = "f32Imm"; } 100b57cec5SDimitry Andricdef f32Imm : Operand<f32> { let ParserMatchClass = f32ImmOperand; } 110b57cec5SDimitry Andricdef f64ImmOperand : AsmOperandClass { let Name = "f64Imm"; } 120b57cec5SDimitry Andricdef f64Imm : Operand<f64> { let ParserMatchClass = f64ImmOperand; } 130b57cec5SDimitry Andricdef s8_0Imm64Pred : PatLeaf<(i64 imm), [{ return isInt<8>(N->getSExtValue()); }]>; 140b57cec5SDimitry Andricdef s9_0ImmOperand : AsmOperandClass { let Name = "s9_0Imm"; } 150b57cec5SDimitry Andricdef s9_0Imm : Operand<i32> { let ParserMatchClass = s9_0ImmOperand; } 160b57cec5SDimitry Andricdef s27_2ImmOperand : AsmOperandClass { let Name = "s27_2Imm"; let RenderMethod = "addSignedImmOperands"; } 170b57cec5SDimitry Andricdef s27_2Imm : Operand<i32> { let ParserMatchClass = s27_2ImmOperand; } 180b57cec5SDimitry Andricdef r32_0ImmPred : PatLeaf<(i32 imm), [{ 190b57cec5SDimitry Andric int64_t v = (int64_t)N->getSExtValue(); 200b57cec5SDimitry Andric return isInt<32>(v); 210b57cec5SDimitry Andric}]>; 220b57cec5SDimitry Andricdef u9_0ImmPred : PatLeaf<(i32 imm), [{ 230b57cec5SDimitry Andric int64_t v = (int64_t)N->getSExtValue(); 240b57cec5SDimitry Andric return isUInt<9>(v); 250b57cec5SDimitry Andric}]>; 26*bdd1243dSDimitry Andric 270b57cec5SDimitry Andricdef u64_0ImmOperand : AsmOperandClass { let Name = "u64_0Imm"; let RenderMethod = "addImmOperands"; } 280b57cec5SDimitry Andricdef u64_0Imm : Operand<i64> { let ParserMatchClass = u64_0ImmOperand; } 290b57cec5SDimitry Andricdef n1ConstOperand : AsmOperandClass { let Name = "n1Const"; } 300b57cec5SDimitry Andricdef n1Const : Operand<i32> { let ParserMatchClass = n1ConstOperand; } 31*bdd1243dSDimitry Andricdef sgp10ConstOperand : AsmOperandClass { let Name = "sgp10Const"; } 32*bdd1243dSDimitry Andricdef sgp10Const : Operand<i32> { let ParserMatchClass = sgp10ConstOperand; } 330b57cec5SDimitry Andric 340b57cec5SDimitry Andricdef bblabel : Operand<i32>; 350b57cec5SDimitry Andricdef bbl : SDNode<"ISD::BasicBlock", SDTPtrLeaf, [], "BasicBlockSDNode">; 36