blob: 72f48b6d8066481f5be946ddcb6efa81c46a738e [file] [log] [blame]
Peter Collingbourne5d5c0622011-10-06 13:39:59 +00001// RUN: llvm-tblgen %s | grep "bit IsDouble = 1;" | count 3
Bruno Cardoso Lopesee65db32010-06-10 02:42:59 +00002
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