blob: 0aea21280da0d1af32a779af6ab44bc26cf14084 [file] [log] [blame]
Peter Collingbourne5d5c0622011-10-06 13:39:59 +00001// RUN: llvm-tblgen %s | grep ADDPSrr | count 1
Bruno Cardoso Lopes270562b2010-06-05 02:11:52 +00002
3class Instruction<bits<4> opc, string Name> {
4 bits<4> opcode = opc;
5 string name = Name;
6}
7
8multiclass basic_r<bits<4> opc> {
9 def rr : Instruction<opc, "rr">;
10 def rm : Instruction<opc, "rm">;
11}
12
13multiclass basic_s<bits<4> opc> {
14 defm SS : basic_r<opc>;
15 defm SD : basic_r<opc>;
16}
17
18multiclass basic_p<bits<4> opc> {
19 defm PS : basic_r<opc>;
20 defm PD : basic_r<opc>;
21}
22
23defm ADD : basic_s<0xf>, basic_p<0xf>;
24defm SUB : basic_s<0xe>, basic_p<0xe>;