Bill Wendling | b4be7f6 | 2013-08-22 20:46:05 +0000 | [diff] [blame] | 1 | // RUN: llvm-tblgen %s | FileCheck %s |
NAKAMURA Takumi | a22657f | 2013-11-10 14:26:08 +0000 | [diff] [blame] | 2 | // XFAIL: vg_leak |
Bill Wendling | b4be7f6 | 2013-08-22 20:46:05 +0000 | [diff] [blame] | 3 | |
| 4 | // CHECK: ADDPSrr |
| 5 | // CHECK-NOT: ADDPSrr |
Bruno Cardoso Lopes | 270562b | 2010-06-05 02:11:52 +0000 | [diff] [blame] | 6 | |
| 7 | class Instruction<bits<4> opc, string Name> { |
| 8 | bits<4> opcode = opc; |
| 9 | string name = Name; |
| 10 | } |
| 11 | |
| 12 | multiclass basic_r<bits<4> opc> { |
| 13 | def rr : Instruction<opc, "rr">; |
| 14 | def rm : Instruction<opc, "rm">; |
| 15 | } |
| 16 | |
| 17 | multiclass basic_s<bits<4> opc> { |
| 18 | defm SS : basic_r<opc>; |
| 19 | defm SD : basic_r<opc>; |
| 20 | } |
| 21 | |
| 22 | multiclass basic_p<bits<4> opc> { |
| 23 | defm PS : basic_r<opc>; |
| 24 | defm PD : basic_r<opc>; |
| 25 | } |
| 26 | |
| 27 | defm ADD : basic_s<0xf>, basic_p<0xf>; |
| 28 | defm SUB : basic_s<0xe>, basic_p<0xe>; |