[PATCH] D16889: [mips] Addition of the immediate cases for the instructions [d]div, [d]divu

Srdjan Obucina via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 08:34:12 PDT 2016


obucina added inline comments.

================
Comment at: test/MC/Mips/macro-ddiv.s:121-125
@@ +120,7 @@
+# CHECK-NOTRAP: mflo $4                   # encoding: [0x00,0x00,0x20,0x12]
+# CHECK-TRAP: lui $1, 1                   # encoding: [0x3c,0x01,0x00,0x01]
+# CHECK-TRAP: ddiv $zero, $4, $1          # encoding: [0x00,0x81,0x00,0x1e]
+# CHECK-TRAP: mflo $4                     # encoding: [0x00,0x00,0x20,0x12]
+
+  ddiv $4,0x1a5a5
+# CHECK-NOTRAP: lui $1, 1                 # encoding: [0x3c,0x01,0x00,0x01]
----------------
dsanders wrote:
> obucina wrote:
> > In gcc, for constants larger than 32 bits, we get the error message: 
> > "Error: number (0x0000000fffffffff) larger than 32 bits".
> > 
> > Do we need to get the same error in llvm for 64bit constants?
> I don't get this error:
>   $ cat t.s
>   ddiv $2, $3, 0xffffffff
>   $ mips-mti-linux-gnu-gcc -c -o t.o t.s -mips64r2
You have eight Fs, we have nine. Try with nine.


http://reviews.llvm.org/D16889





More information about the llvm-commits mailing list