• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-tblgen %s | grep "bit IsDouble = 1;" | count 3
2
3class Instruction<bits<4> opc, string Name> {
4  bits<4> opcode = opc;
5  string name = Name;
6  bit IsDouble = 0;
7}
8
9multiclass basic_r<bits<4> opc> {
10  let name = "newname" in {
11    def rr : Instruction<opc, "rr">;
12    def rm : Instruction<opc, "rm">;
13  }
14
15  let name = "othername" in
16    def rx : Instruction<opc, "rx">;
17}
18
19multiclass basic_ss<bits<4> opc> {
20  let IsDouble = 0 in
21    defm SS : basic_r<opc>;
22
23  let IsDouble = 1 in
24    defm SD : basic_r<opc>;
25}
26
27defm ADD : basic_ss<0xf>;
28
29