blob: e6fc019b1e3e3e8858cc45b76dc0ba29282c329d [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// XFAIL: vg_leak
3
4class Instruction<bits<4> opc, string Name> {
5 bits<4> opcode = opc;
6 string name = Name;
7}
8
9multiclass basic_r<bits<4> opc> {
10 def rr : Instruction<opc, "rr">;
11 def rm : Instruction<opc, "rm">;
12}
13
14multiclass basic_s<bits<4> opc> {
15 defm SS : basic_r<opc>;
16 defm SD : basic_r<opc>;
17}
18
19multiclass basic_p<bits<4> opc> {
20 defm PS : basic_r<opc>;
21 defm PD : basic_r<opc>;
22}
23
24defm ADD : basic_s<0xf>, basic_p<0xf>;
25defm SUB : basic_s<0xe>, basic_p<0xe>;