Index: lib/Target/ARC/ARCInstrInfo.td =================================================================== --- lib/Target/ARC/ARCInstrInfo.td +++ lib/Target/ARC/ARCInstrInfo.td @@ -125,18 +125,36 @@ (ins GPR32:$B, GPR32:$C), !strconcat(opasm, "\t$A, $B, $C"), []>; + def _f_rrr : F32_DOP_RR + { let Defs = [STATUS32]; } // 2 register with unsigned 6-bit immediate variant. def _rru6 : F32_DOP_RU6; + def _f_rru6 : F32_DOP_RU6 + { let Defs = [STATUS32]; } + // 2 register with 32-bit immediate variant. def _rrlimm : F32_DOP_RLIMM; + (outs GPR32:$A), + (ins GPR32:$B, i32imm:$LImm), + !strconcat(opasm, "\t$A, $B, $LImm"), + []>; + def _f_rrlimm : F32_DOP_RLIMM + { let Defs = [STATUS32]; } + // 2 matched-register with signed 12-bit immediate variant (add r0, r0, -1). def _rrs12 : F32_DOP_RS12 { let Constraints = "$B = $in"; } + def _f_rrs12 : F32_DOP_RS12:$S12), + !strconcat(opasm, ".f\t$B, $in, $S12"), + []> + { let Constraints = "$B = $in"; let Defs = [STATUS32]; } } // Special multivariant GEN4 DOP format instruction that take 2 registers. @@ -168,6 +192,10 @@ string opasm> { def _rr : F32_SOP_RR; + + def _f_rr : F32_SOP_RR + { let Defs = [STATUS32]; } } Index: test/MC/Disassembler/ARC/alu.txt =================================================================== --- test/MC/Disassembler/ARC/alu.txt +++ test/MC/Disassembler/ARC/alu.txt @@ -6,6 +6,9 @@ # CHECK: add %r4, %r0, %r0 0x00 0x20 0x04 0x00 +# CHECK: add.f %r4, %r0, %r0 +0x00 0x20 0x04 0x80 + # CHECK: add %r2, %r0, %r3 0x00 0x20 0xc2 0x00 @@ -18,21 +21,33 @@ # CHECK: and %r2, %r7, %r4 0x04 0x27 0x02 0x01 +# CHECK: and.f %r2, %r7, %r4 +0x04 0x27 0x02 0x81 + # CHECK: and %r2, %r7, 4 0x44 0x27 0x02 0x01 # CHECK: and %r1, %r1, 255 0x84 0x21 0xc3 0x0f +# CHECK: and.f %r1, %r1, 255 +0x84 0x21 0xc3 0x8f + # CHECK: asl %r1, %r1, 2 0x40 0x29 0x81 0x00 # CHECK: asl %r0, %r0, %r0 0x00 0x28 0x00 0x00 +# CHECK: asl.f %r0, %r0, %r0 +0x00 0x28 0x00 0x80 + # CHECK: asr %r1, %r2, 31 0x42 0x2a 0xc1 0x07 +# CHECK: asr.f %r1, %r2, 31 +0x42 0x2a 0xc1 0x87 + # CHECK: asr %r1, %r3, 7 0x42 0x2b 0xc1 0x01 @@ -54,6 +69,9 @@ # CHECK: or %r18, %r16, 61440 0x05 0x20 0x92 0x2f 0x00 0x00 0x00 0xf0 +# CHECK: or.f %r18, %r16, 61440 +0x05 0x20 0x92 0xaf 0x00 0x00 0x00 0xf0 + # CHECK: or %r1, %r1, %r14 0x05 0x21 0x81 0x03 @@ -69,6 +87,9 @@ # CHECK: sub %r2, %r7, %r4 0x02 0x27 0x02 0x01 +# CHECK: sub.f %r2, %r7, %r4 +0x02 0x27 0x02 0x81 + # CHECK: sub %r0, %r22, %r0 0x02 0x26 0x00 0x20 @@ -80,3 +101,6 @@ # CHECK: sub3 %fp, %fp, -1 0x99 0x23 0xff 0x3f + +# CHECK: sub3.f %fp, %fp, -1 +0x99 0x23 0xff 0xbf