public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] MIPS/gas: SAA/SAAD macro clean-ups
@ 2014-08-21 12:05 Maciej W. Rozycki
  2014-08-21 14:45 ` Pinski, Andrew
  2014-08-25 21:04 ` Richard Sandiford
  0 siblings, 2 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2014-08-21 12:05 UTC (permalink / raw)
  To: binutils

Hi,

 This change removes code duplication for the SAA macro in line with other 
such macros and also adds a !microMIPS internal consistency guard as 
there's no microMIPS encoding of the underlying SAA/SAAD instructions.

 No regressions across mips-elf, mips-sde-elf, mips-sgi-irix5,
mips-sgi-irix6, mips-freebsd, mips-linux, mips-vxworks, mips64-freebsd,
mips64-linux, mips64el-freebsd, mips64el-linux, mipsel-elf,
mipsel-freebsd, mipsel-linux, mipsel-vxworks, mipsisa32-elf,
mipsisa32-linux, mipsisa32el-elf, mipsisa32el-linux, mipsisa64-elf,
mipsisa64-linux, mipsisa64el-elf, mipsisa64el-linux.  OK to apply?

2014-03-24  Maciej W. Rozycki  <macro@codesourcery.com>

	gas/
	* config/tc-mips.c (macro) <M_SAA_AB>: Remove duplicate code and
	jump to...
	<M_SAAD_AB>: ... here.  Assert that !microMIPS.

  Maciej

binutils-gas-mips-saa.diff
Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
===================================================================
--- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c	2014-04-04 15:27:21.038037358 +0100
+++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c	2014-04-04 16:00:19.748876849 +0100
@@ -11895,11 +11895,11 @@ macro (struct mips_cl_insn *ip, char *st
 	
     case M_SAA_AB:
       s = "saa";
-      offbits = 0;
-      fmt = "t,(b)";
-      goto ld_st;
+      goto saa_saad;
     case M_SAAD_AB:
       s = "saad";
+    saa_saad:
+      gas_assert (!mips_opts.micromips);
       offbits = 0;
       fmt = "t,(b)";
       goto ld_st;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS/gas: SAA/SAAD macro clean-ups
  2014-08-21 12:05 [PATCH] MIPS/gas: SAA/SAAD macro clean-ups Maciej W. Rozycki
@ 2014-08-21 14:45 ` Pinski, Andrew
  2014-08-25 21:04 ` Richard Sandiford
  1 sibling, 0 replies; 3+ messages in thread
From: Pinski, Andrew @ 2014-08-21 14:45 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: <binutils@sourceware.org>



> On Aug 21, 2014, at 5:05 AM, "Maciej W. Rozycki" <macro@codesourcery.com> wrote:
> 
> Hi,
> 
> This change removes code duplication for the SAA macro in line with other 
> such macros and also adds a !microMIPS internal consistency guard as 
> there's no microMIPS encoding of the underlying SAA/SAAD instructions.
> 
> No regressions across mips-elf, mips-sde-elf, mips-sgi-irix5,
> mips-sgi-irix6, mips-freebsd, mips-linux, mips-vxworks, mips64-freebsd,
> mips64-linux, mips64el-freebsd, mips64el-linux, mipsel-elf,
> mipsel-freebsd, mipsel-linux, mipsel-vxworks, mipsisa32-elf,
> mipsisa32-linux, mipsisa32el-elf, mipsisa32el-linux, mipsisa64-elf,
> mipsisa64-linux, mipsisa64el-elf, mipsisa64el-linux.  OK to apply?

This is ok from my point of view though I cannot approve it. 

Thanks,
Andrew

> 
> 2014-03-24  Maciej W. Rozycki  <macro@codesourcery.com>
> 
>    gas/
>    * config/tc-mips.c (macro) <M_SAA_AB>: Remove duplicate code and
>    jump to...
>    <M_SAAD_AB>: ... here.  Assert that !microMIPS.
> 
>  Maciej
> 
> binutils-gas-mips-saa.diff
> Index: binutils-fsf-trunk-quilt/gas/config/tc-mips.c
> ===================================================================
> --- binutils-fsf-trunk-quilt.orig/gas/config/tc-mips.c    2014-04-04 15:27:21.038037358 +0100
> +++ binutils-fsf-trunk-quilt/gas/config/tc-mips.c    2014-04-04 16:00:19.748876849 +0100
> @@ -11895,11 +11895,11 @@ macro (struct mips_cl_insn *ip, char *st
>    
>     case M_SAA_AB:
>       s = "saa";
> -      offbits = 0;
> -      fmt = "t,(b)";
> -      goto ld_st;
> +      goto saa_saad;
>     case M_SAAD_AB:
>       s = "saad";
> +    saa_saad:
> +      gas_assert (!mips_opts.micromips);
>       offbits = 0;
>       fmt = "t,(b)";
>       goto ld_st;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS/gas: SAA/SAAD macro clean-ups
  2014-08-21 12:05 [PATCH] MIPS/gas: SAA/SAAD macro clean-ups Maciej W. Rozycki
  2014-08-21 14:45 ` Pinski, Andrew
@ 2014-08-25 21:04 ` Richard Sandiford
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Sandiford @ 2014-08-25 21:04 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: binutils

"Maciej W. Rozycki" <macro@codesourcery.com> writes:
> 2014-03-24  Maciej W. Rozycki  <macro@codesourcery.com>
>
> 	gas/
> 	* config/tc-mips.c (macro) <M_SAA_AB>: Remove duplicate code and
> 	jump to...
> 	<M_SAAD_AB>: ... here.  Assert that !microMIPS.

OK, thanks.

Richard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-25 21:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-21 12:05 [PATCH] MIPS/gas: SAA/SAAD macro clean-ups Maciej W. Rozycki
2014-08-21 14:45 ` Pinski, Andrew
2014-08-25 21:04 ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).