aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Skeleton/SkeletonInstrInfo.td
blob: 33902b57c1fe583cc0fff2dd49f8af1e98d5f1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//===- SkeletonInstrInfo.td - Describe the Instruction Set ------*- C++ -*-===//
// 
//                     The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
// 
//===----------------------------------------------------------------------===//
//
// Skeleton instruction information.  Fill in stuff here.
//
//===----------------------------------------------------------------------===//

class Format<bits<4> val> {
  bits<4> Value = val;
}

// Some of the powerpc instruction formats, plus a pseudo-instruction format:
def Pseudo : Format<0>;
def IForm : Format<1>;
def BForm : Format<2>;

// Look at how other targets factor commonality between instructions.
class SkelInst<string nm, bits<6> opcd, Format f> : Instruction {
  let Namespace = "Skeleton";

  let Name = nm;
  bits<6> Opcode = opcd;
  Format Form = f;
  bits<4> FormBits = Form.Value;
}

// Pseudo-instructions:
def PHI : SkelInst<"PHI", 0, Pseudo>;          // PHI node...
def NOP : SkelInst<"NOP", 0, Pseudo>;          // No-op
def ADJCALLSTACKDOWN : SkelInst<"ADJCALLSTACKDOWN", 0, Pseudo>;
def ADJCALLSTACKUP : SkelInst<"ADJCALLSTACKUP", 0, Pseudo>;