1//===- NVPTXInstrFormats.td - NVPTX Instruction Formats-------*- tblgen -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10//===----------------------------------------------------------------------===// 11// Describe NVPTX instructions format 12// 13//===----------------------------------------------------------------------===// 14 15// Vector instruction type enum 16class VecInstTypeEnum<bits<4> val> { 17 bits<4> Value=val; 18} 19def VecNOP : VecInstTypeEnum<0>; 20 21// Generic NVPTX Format 22 23class NVPTXInst<dag outs, dag ins, string asmstr, list<dag> pattern> 24 : Instruction { 25 field bits<14> Inst; 26 27 let Namespace = "NVPTX"; 28 dag OutOperandList = outs; 29 dag InOperandList = ins; 30 let AsmString = asmstr; 31 let Pattern = pattern; 32 33 // TSFlagFields 34 bits<4> VecInstType = VecNOP.Value; 35 bit IsSimpleMove = 0; 36 bit IsLoad = 0; 37 bit IsStore = 0; 38 39 let TSFlags{3-0} = VecInstType; 40 let TSFlags{4-4} = IsSimpleMove; 41 let TSFlags{5-5} = IsLoad; 42 let TSFlags{6-6} = IsStore; 43} 44