open AMDIL, '<', 'AMDILInstructions.td';
-my @INST_ENUMS = ('NONE', 'FEQ', 'FGE', 'FLT', 'FNE', 'MOVE_f32', 'MOVE_i32', 'UGT', 'IGE', 'INE', 'UGE', 'IEQ', 'SMULHI_i32', 'SMUL_i32', 'LOG_f32', 'RSQ_f32', 'SIN_f32', 'COS_f32');
+my @INST_ENUMS = ('NONE', 'FEQ', 'FGE', 'FLT', 'FNE', 'MOVE_f32', 'MOVE_i32', 'UGT', 'IGE', 'INE', 'UGE', 'IEQ', 'LOG_f32', 'RSQ_f32', 'SIN_f32', 'COS_f32');
while (<AMDIL>) {
if ($_ =~ /defm\s+([A-Z_]+)\s+:\s+([A-Za-z0-9]+)</) {
// Signed 32bit integer math instructions start here
//===---------------------------------------------------------------------===//
defm NEGATE : UnaryOpMCi32<IL_OP_I_NEGATE, IL_inegate>;
-defm SMUL : BinaryOpMCi32<IL_OP_I_MUL, mul>;
-defm SMULHI : BinaryOpMCi32<IL_OP_I_MUL_HIGH, mulhs>;
// get rid of the addri via the tablegen instead of custom lowered instruction
defm EADD : BinaryOpMCi32<IL_OP_I_ADD, adde>;
def INTTOANY_i32: OneInOneOut<IL_OP_MOV, (outs GPRI32:$dst), (ins GPRI32:$src0),
// Unsigned 32bit integer math instructions start here
//===---------------------------------------------------------------------===//
defm UMUL : BinaryOpMCi32<IL_OP_U_MUL, IL_umul>;
-defm UMULHI : BinaryOpMCi32<IL_OP_U_MUL_HIGH, mulhu>;
defm UDIV : BinaryOpMCi32<IL_OP_U_DIV, udiv>;
defm NATIVE_UDIV : BinaryIntrinsicInt<IL_OP_U_DIV, int_AMDIL_udiv>;
let mayLoad=0, mayStore=0 in {
class MULHI_INT_Common <bits<32> inst> : R600_2OP <
inst, "MULHI_INT $dst, $src0, $src1",
- [] >{
- let AMDILOp = AMDILInst.SMULHI_i32;
-}
+ [(set R600_Reg32:$dst, (mulhs R600_Reg32:$src0, R600_Reg32:$src1))]
+>;
class MULHI_UINT_Common <bits<32> inst> : R600_2OP <
inst, "MULHI $dst, $src0, $src1",
class MULLO_INT_Common <bits<32> inst> : R600_2OP <
inst, "MULLO_INT $dst, $src0, $src1",
- [] >{
- let AMDILOp = AMDILInst.SMUL_i32;
-}
+ [(set R600_Reg32:$dst, (mul R600_Reg32:$src0, R600_Reg32:$src1))]
+>;
class MULLO_UINT_Common <bits<32> inst> : R600_2OP <
inst, "MULLO_UINT $dst, $src0, $src1",