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