llvm.org GIT mirror llvm / aa32ba6
Merging r230146: ------------------------------------------------------------------------ r230146 | Matthew.Arsenault | 2015-02-21 16:29:00 -0500 (Sat, 21 Feb 2015) | 2 lines R600/SI: Fix mad*k definitions ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@236021 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 5 years ago
4 changed file(s) with 40 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
290290 printImmediate64(Op.getImm(), O);
291291 else
292292 llvm_unreachable("Invalid register class size");
293 } else if (Desc.OpInfo[OpNo].OperandType == MCOI::OPERAND_IMMEDIATE) {
294 printImmediate32(Op.getImm(), O);
293295 } else {
294296 // We hit this for the immediate instruction bits that don't yet have a
295297 // custom printer.
305305 let Inst{24-17} = vdst;
306306 let Inst{30-25} = op;
307307 let Inst{31} = 0x0; //encoding
308 }
309
310 class VOP2_MADKe op> : Enc64 {
311
312 bits<8> vdst;
313 bits<9> src0;
314 bits<8> vsrc1;
315 bits<32> src2;
316
317 let Inst{8-0} = src0;
318 let Inst{16-9} = vsrc1;
319 let Inst{24-17} = vdst;
320 let Inst{30-25} = op;
321 let Inst{31} = 0x0; // encoding
322 let Inst{63-32} = src2;
308323 }
309324
310325 class VOP3e op> : Enc64 {
806806 def VOP_I64_I64_I64 : VOPProfile <[i64, i64, i64, untyped]>;
807807
808808 def VOP_F32_F32_F32_F32 : VOPProfile <[f32, f32, f32, f32]>;
809 def VOP_MADK : VOPProfile <[f32, f32, f32, f32]> {
810 field dag Ins = (ins VCSrc_32:$src0, VGPR_32:$vsrc1, u32imm:$src2);
811 field string Asm = " $dst, $src0, $vsrc1, $src2";
812 }
809813 def VOP_F64_F64_F64_F64 : VOPProfile <[f64, f64, f64, f64]>;
810814 def VOP_I32_I32_I32_I32 : VOPProfile <[i32, i32, i32, i32]>;
811815 def VOP_I64_I32_I32_I64 : VOPProfile <[i64, i32, i32, i64]>;
11901194 [(set P.DstVT:$dst, (node P.Src0VT:$src0, P.Src1VT:$src1))]),
11911195 revOp, P.HasModifiers
11921196 >;
1197
1198 multiclass VOP2MADK pattern = []> {
1199
1200 def "" : VOP2_Pseudo ;
1201
1202 let isCodeGenOnly = 0 in {
1203 def _si : VOP2Common
1204 !strconcat(opName, VOP_MADK.Asm), []>,
1205 SIMCInstr ,
1206 VOP2_MADKe ;
1207
1208 def _vi : VOP2Common
1209 !strconcat(opName, VOP_MADK.Asm), []>,
1210 SIMCInstr ,
1211 VOP2_MADKe ;
1212 } // End isCodeGenOnly = 0
1213 }
11931214
11941215 class VOPC_Pseudo pattern, string opName> :
11951216 VOPCCommon ,
14681468 defm V_MAC_F32 : VOP2Inst , "v_mac_f32", VOP_F32_F32_F32>;
14691469 } // End isCommutable = 1
14701470
1471 defm V_MADMK_F32 : VOP2Inst , "v_madmk_f32", VOP_F32_F32_F32>;
1471 defm V_MADMK_F32 : VOP2MADK , "v_madmk_f32">;
14721472
14731473 let isCommutable = 1 in {
1474 defm V_MADAK_F32 : VOP2Inst , "v_madak_f32", VOP_F32_F32_F32>;
1474 defm V_MADAK_F32 : VOP2MADK , "v_madak_f32">;
14751475 } // End isCommutable = 1
14761476
14771477 let isCommutable = 1, Defs = [VCC] in { // Carry-out goes to VCC