diff options
Diffstat (limited to 'llvm/lib/Target/SPIRV/SPIRVInstrFormats.td')
| -rw-r--r-- | llvm/lib/Target/SPIRV/SPIRVInstrFormats.td | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstrFormats.td b/llvm/lib/Target/SPIRV/SPIRVInstrFormats.td new file mode 100644 index 000000000000..c78c8ee11590 --- /dev/null +++ b/llvm/lib/Target/SPIRV/SPIRVInstrFormats.td @@ -0,0 +1,31 @@ +//===-- SPIRVInstrFormats.td - SPIR-V Instruction Formats --*- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +def StringImm: Operand<i32>{ + let PrintMethod="printStringImm"; +} + +class Op<bits<16> Opcode, dag outs, dag ins, string asmstr, list<dag> pattern = []> + : Instruction { + field bits<16> Inst; + + let Inst = Opcode; + + let Namespace = "SPIRV"; + let DecoderNamespace = "SPIRV"; + + dag OutOperandList = outs; + dag InOperandList = ins; + let AsmString = asmstr; + let Pattern = pattern; +} + +// Pseudo instructions +class Pseudo<dag outs, dag ins> : Op<0, outs, ins, ""> { + let isPseudo = 1; +} |
