[PATCH] [mips][msa] Test basic operations for the N32 ABI too.

Daniel Sanders daniel.sanders at imgtec.com
Wed Apr 29 09:20:33 PDT 2015


Thanks.


================
Comment at: lib/Target/Mips/Mips64InstrInfo.td:570-575
@@ -569,2 +569,8 @@
                     ISA_MIPS3;
+def : MipsInstAlias<"dneg $rt, $rs",
+                    (DSUB GPR64Opnd:$rt, ZERO_64, GPR64Opnd:$rs), 1>;
+def : MipsInstAlias<"dneg $rt",
+                    (DSUB GPR64Opnd:$rt, ZERO_64, GPR64Opnd:$rt), 0>;
+def : MipsInstAlias<"dnegu $rt, $rs",
+                    (DSUBu GPR64Opnd:$rt, ZERO_64, GPR64Opnd:$rs), 1>;
 def : MipsInstAlias<"dsubu $rt, $rs, $imm",
----------------
vkalintiris wrote:
> - I believe that we should mark these aliases as ISA_MIPS3.
> - I can't find the second form of the `dneg` alias anywhere in binutils.
> - `dnegu` isn't used in this patch.
> 
> Also, we should add some tests in test/MC for these aliases in a future patch.
> 
> I believe that we should mark these aliases as ISA_MIPS3.

Makes sense to me.

> I can't find the second form of the dneg alias anywhere in binutils.

I mostly included this because the 1-operand form of neg is accepted by IAS. GAS accepts it as well with 'dneg $1' being equivalent to 'dneg $1, $1'. 

> dnegu isn't used in this patch.

I'll add some assembler/disassembler tests for it (and the others).

================
Comment at: test/CodeGen/Mips/msa/basic_operations.ll:5-6
@@ -3,1 +4,4 @@
+; RUN: llc -march=mips64el -target-abi n32 -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=ALL -check-prefix=N32 -check-prefix=MIPS64 -check-prefix=ALL-LE %s
+; R!N: llc -march=mips64 -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=ALL -check-prefix=N64 -check-prefix=MIPS64 -check-prefix=ALL-BE %s
+; R!N: llc -march=mips64el -mattr=+msa,+fp64 < %s | FileCheck -check-prefix=ALL -check-prefix=N64 -check-prefix=MIPS64 -check-prefix=ALL-LE %s
 
----------------
vkalintiris wrote:
> Small typo: R1N -> RUN
This isn't actually a typo. It's a placeholder that keeps the currently broken N64 disabled until the next patch. It shouldn't have been left in the patch though so I'll drop these two lines and merge them with the s/R!N/RUN/ from D9342 instead.

http://reviews.llvm.org/D9341

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list