diff mbox

[MIPS] Enable LSA/DLSA for MSA

Message ID B5E67142681B53468FAF6B7C313565624F4EBEA9@hhmail02.hh.imgtec.org
State New
Headers show

Commit Message

Robert Suchanek May 13, 2016, 2:48 p.m. UTC
Hi,

The below enables LSA/DLSA instructions for -mmsa.

Ok to commit?

Regards,
Robert

	* config/mips/mips.h (ISA_HAS_LSA): Enable for -mmsa.
	(ISA_HAS_DLSA): Ditto.
---
 gcc/config/mips/mips.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Matthew Fortune May 16, 2016, 9:38 a.m. UTC | #1
Robert Suchanek <Robert.Suchanek@imgtec.com>
> The below enables LSA/DLSA instructions for -mmsa.
> 
> Ok to commit?

OK.

There is a corresponding testsuite change needed for this
as some code quality tests change if LSA is available.  This
is the HAS_LSA 'ghost' option in mips.exp.  I'm happy to leave
this to be dealt with as part of the overall MSA testsuite
patch though.

Thanks,
Matthew
Robert Suchanek May 16, 2016, 2:27 p.m. UTC | #2
Hi Matthew,
> > Ok to commit?
> 
> OK.

Done as r236289.
 
> There is a corresponding testsuite change needed for this
> as some code quality tests change if LSA is available.  This
> is the HAS_LSA 'ghost' option in mips.exp.  I'm happy to leave
> this to be dealt with as part of the overall MSA testsuite
> patch though.

It's on my TODO list and will update the patch with MSA tests
to put all tests in one go.

Regards,
Robert
diff mbox

Patch

diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h
index 1efa61a..e8897d1 100644
--- a/gcc/config/mips/mips.h
+++ b/gcc/config/mips/mips.h
@@ -209,10 +209,12 @@  struct mips_cpu_info {
 #endif
 
 /* ISA has LSA available.  */
-#define ISA_HAS_LSA		(mips_isa_rev >= 6)
+#define ISA_HAS_LSA		(mips_isa_rev >= 6 || ISA_HAS_MSA)
 
 /* ISA has DLSA available.  */
-#define ISA_HAS_DLSA		(TARGET_64BIT && mips_isa_rev >= 6)
+#define ISA_HAS_DLSA		(TARGET_64BIT \
+				 && (mips_isa_rev >= 6 \
+				     || ISA_HAS_MSA))
 
 /* The ISA compression flags that are currently in effect.  */
 #define TARGET_COMPRESSION (target_flags & (MASK_MIPS16 | MASK_MICROMIPS))