[PATCH] D18352: [mips][microMIPS] Implement BC1EQZC, BC1NEZC, BC2EQZC and BC2NEZC instructions

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 04:13:54 PDT 2016


sdardis accepted this revision.
sdardis added a comment.
This revision is now accepted and ready to land.

LGTM with 2 tiny nits.


================
Comment at: test/MC/Mips/micromips32r6/valid.s:338-345
@@ -337,1 +337,9 @@
   swp $16, 8($4)           # CHECK: swp $16, 8($4)         # encoding: [0x22,0x04,0x90,0x08]
+  bc1eqzc $f0, 4           # CHECK: bc1eqzc $f0, 4         # encoding: [0x41,0x00,0x00,0x02]
+  bc1eqzc $f31, 4          # CHECK: bc1eqzc $f31, 4        # encoding: [0x41,0x1f,0x00,0x02]
+  bc1nezc $f0, 4           # CHECK: bc1nezc $f0, 4         # encoding: [0x41,0x20,0x00,0x02]
+  bc1nezc $f31, 4          # CHECK: bc1nezc $f31, 4        # encoding: [0x41,0x3f,0x00,0x02]
+  bc2eqzc $0, 8            # CHECK: bc2eqzc $0, 8          # encoding: [0x41,0x40,0x00,0x04]
+  bc2eqzc $31, 8           # CHECK: bc2eqzc $31, 8         # encoding: [0x41,0x5f,0x00,0x04]
+  bc2nezc $0, 8            # CHECK: bc2nezc $0, 8          # encoding: [0x41,0x60,0x00,0x04]
+  bc2nezc $31, 8           # CHECK: bc2nezc $31, 8         # encoding: [0x41,0x7f,0x00,0x04]
----------------
Checking each instruction once is sufficient. Just avoid using $zero or 0 as an operand because that may mask errors if values default to zero.

================
Comment at: test/MC/Mips/micromips64r6/valid.s:276-283
@@ -275,2 +275,10 @@
         dsrav $4, $5, $6         # CHECK: dsrav $4, $5, $6        # encoding: [0x58,0xa6,0x20,0x90]
+        bc1eqzc $f0, 4           # CHECK: bc1eqzc $f0, 4          # encoding: [0x41,0x00,0x00,0x02]
+        bc1eqzc $f31, 4          # CHECK: bc1eqzc $f31, 4         # encoding: [0x41,0x1f,0x00,0x02]
+        bc1nezc $f0, 4           # CHECK: bc1nezc $f0, 4          # encoding: [0x41,0x20,0x00,0x02]
+        bc1nezc $f31, 4          # CHECK: bc1nezc $f31, 4         # encoding: [0x41,0x3f,0x00,0x02]
+        bc2eqzc $0, 8            # CHECK: bc2eqzc $0, 8           # encoding: [0x41,0x40,0x00,0x04]
+        bc2eqzc $31, 8           # CHECK: bc2eqzc $31, 8          # encoding: [0x41,0x5f,0x00,0x04]
+        bc2nezc $0, 8            # CHECK: bc2nezc $0, 8           # encoding: [0x41,0x60,0x00,0x04]
+        bc2nezc $31, 8           # CHECK: bc2nezc $31, 8          # encoding: [0x41,0x7f,0x00,0x04]
 
----------------
Here too.


http://reviews.llvm.org/D18352





More information about the llvm-commits mailing list