public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
@ 2016-08-24 16:06 Jose E. Marchesi
  2016-08-25 11:08 ` Nick Clifton
  0 siblings, 1 reply; 5+ messages in thread
From: Jose E. Marchesi @ 2016-08-24 16:06 UTC (permalink / raw)
  To: binutils


This patch fixes a typo in the mnemonic of the camellia_fl instruction,
which was implemented before as camellia_fi.

Tested in sparc64-linux-gnu.
No regressions.

Ok for master?


diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1744cf8..7dc5a25 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* testsuite/gas/sparc/crypto.d: Rename invalid opcode camellia_fi to
+	camellia_fl.
+	* testsuite/gas/sparc/crypto.s: Likewise.
+
 2016-08-19  Tamar Christina  <tamar.christina@arm.com>
 
 	* config/tc-arm.c (do_co_reg2c): Added constraint.
diff --git a/gas/testsuite/gas/sparc/crypto.d b/gas/testsuite/gas/sparc/crypto.d
index daebb65..a7d8a38 100644
--- a/gas/testsuite/gas/sparc/crypto.d
+++ b/gas/testsuite/gas/sparc/crypto.d
@@ -31,7 +31,7 @@ Disassembly of section .text:
   54:	9f b2 e7 0d 	kasumi_fi_fi  %f42, %f44, %f46
   58:	a6 cb 63 4f 	kasumi_fl_xor  %f44, %f46, %f48, %f50
   5c:	aa cb e7 71 	kasumi_fi_xor  %f46, %f48, %f50, %f52
-  60:	af b4 e7 95 	camellia_fi  %f50, %f52, %f54
+  60:	af b4 e7 95 	camellia_fl  %f50, %f52, %f54
   64:	b3 b5 67 b7 	camellia_fli  %f52, %f54, %f56
   68:	ba cd f7 99 	camellia_f  %f54, %f56, %f58, %f60
   6c:	81 b0 29 00 	mpmul  0
diff --git a/gas/testsuite/gas/sparc/crypto.s b/gas/testsuite/gas/sparc/crypto.s
index 217a742..4557551 100644
--- a/gas/testsuite/gas/sparc/crypto.s
+++ b/gas/testsuite/gas/sparc/crypto.s
@@ -24,7 +24,7 @@
 	kasumi_fi_fi	%f42, %f44, %f46
 	kasumi_fl_xor	%f44, %f46, %f48, %f50
 	kasumi_fi_xor	%f46, %f48, %f50, %f52
-	camellia_fi	%f50, %f52, %f54
+	camellia_fl	%f50, %f52, %f54
 	camellia_fli	%f52, %f54, %f56
 	camellia_f	%f54, %f56, %f58, %f60
 	mpmul	0
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 4b17726..4188956 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-24  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* sparc-opc.c (sparc_opcodes): Fix typo in opcode, camellia_fi ->
+	camellia_fl.
+
 2016-08-24  Anton Kolesov  <Anton.Kolesov@synopsys.com>
 
 	* arc-dis.h: Wrap around in extern "C".
diff --git a/opcodes/sparc-opc.c b/opcodes/sparc-opc.c
index 9d68223..04dd338 100644
--- a/opcodes/sparc-opc.c
+++ b/opcodes/sparc-opc.c
@@ -2155,7 +2155,7 @@ SLCBCC("cbnefr", 15),
 { "des_iip",    F3F(2, 0x36, 0x135), F3F(~2, ~0x36, ~0x135), "v,H", F_FLOAT, HWCAP_DES, 0, v9e },
 { "des_kexpand",F3F(2, 0x36, 0x136), F3F(~2, ~0x36, ~0x136), "v,X,H", F_FLOAT, HWCAP_DES, 0, v9e },
 {"kasumi_fi_fi",F3F(2, 0x36, 0x138), F3F(~2, ~0x36, ~0x138), "v,B,H", F_FLOAT, HWCAP_KASUMI, 0, v9e },
-{ "camellia_fi",F3F(2, 0x36, 0x13c), F3F(~2, ~0x36, ~0x13c), "v,B,H", F_FLOAT, HWCAP_CAMELLIA, 0, v9e },
+{ "camellia_fl",F3F(2, 0x36, 0x13c), F3F(~2, ~0x36, ~0x13c), "v,B,H", F_FLOAT, HWCAP_CAMELLIA, 0, v9e },
 {"camellia_fli",F3F(2, 0x36, 0x13d), F3F(~2, ~0x36, ~0x13d), "v,B,H", F_FLOAT, HWCAP_CAMELLIA, 0, v9e },
 { "md5",        F3F(2, 0x36, 0x140), F3F(~2, ~0x36, ~0x140), "", F_FLOAT, HWCAP_MD5, 0, v9e },
 { "sha1",       F3F(2, 0x36, 0x141), F3F(~2, ~0x36, ~0x141), "", F_FLOAT, HWCAP_SHA1, 0, v9e },

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

* Re: [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
  2016-08-24 16:06 [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl Jose E. Marchesi
@ 2016-08-25 11:08 ` Nick Clifton
  2016-08-25 15:02   ` Jose E. Marchesi
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Clifton @ 2016-08-25 11:08 UTC (permalink / raw)
  To: Jose E. Marchesi, binutils

Hi Jose,

> This patch fixes a typo in the mnemonic of the camellia_fl instruction,
> which was implemented before as camellia_fi.

Is there any chance that the misspelt mnemonic could be present in assembler
source files out in the wild ?  Ie do we need to support the misspelt 
mnemonic for backwards compatibility ?  Or maybe issue a error message 
describing the correct spelling ?

Cheers
  Nick

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

* Re: [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
  2016-08-25 11:08 ` Nick Clifton
@ 2016-08-25 15:02   ` Jose E. Marchesi
  2016-08-25 16:15     ` Nick Clifton
  0 siblings, 1 reply; 5+ messages in thread
From: Jose E. Marchesi @ 2016-08-25 15:02 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

    
    > This patch fixes a typo in the mnemonic of the camellia_fl instruction,
    > which was implemented before as camellia_fi.
    
    Is there any chance that the misspelt mnemonic could be present in assembler
    source files out in the wild ?  Ie do we need to support the misspelt 
    mnemonic for backwards compatibility ?  Or maybe issue a error message 
    describing the correct spelling ?

There is always that possibility.  AFAIK the instruction has always been
documented in the SPARC specs as camellia_fl.  However, some people may
have read sparc-opc.c, find camellia_fi and use it.

We could:
a) Silently support both spellings, but this would mean code not
   portable to other systems using different assemblers, such as
   Solaris.
b) Support both spellings emitting a warning if the invalid mnemonic is
   used.  Same problem than above, but we give a chance to the
   programmer to fix the error.
c) As you suggested, emit an error if camellia_fi is used, describing
   the problem.
d) Just support camellia_fl and emit a generic error "invalid
   instruction" if camellia_fi is used.  This is what the submitted
   patch implements.

If we want to address this at all, I would probably implement a).  The
only people using camellia_fi will be people looking at GAS's sources,
so the portability issue probably is not that important in these
scenarios.

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

* Re: [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
  2016-08-25 15:02   ` Jose E. Marchesi
@ 2016-08-25 16:15     ` Nick Clifton
  2016-08-26 14:22       ` Jose E. Marchesi
  0 siblings, 1 reply; 5+ messages in thread
From: Nick Clifton @ 2016-08-25 16:15 UTC (permalink / raw)
  To: Jose E. Marchesi; +Cc: binutils

Hi Jose,

>     Is there any chance that the misspelt mnemonic could be present in assembler
>     source files out in the wild ?  Ie do we need to support the misspelt 
>     mnemonic for backwards compatibility ?  Or maybe issue a error message 
>     describing the correct spelling ?
> 
> There is always that possibility.  AFAIK the instruction has always been
> documented in the SPARC specs as camellia_fl.  However, some people may
> have read sparc-opc.c, find camellia_fi and use it.
> 
> We could:
> a) Silently support both spellings, but this would mean code not
>    portable to other systems using different assemblers, such as
>    Solaris.
> b) Support both spellings emitting a warning if the invalid mnemonic is
>    used.  Same problem than above, but we give a chance to the
>    programmer to fix the error.
> c) As you suggested, emit an error if camellia_fi is used, describing
>    the problem.
> d) Just support camellia_fl and emit a generic error "invalid
>    instruction" if camellia_fi is used.  This is what the submitted
>    patch implements.
> 
> If we want to address this at all, I would probably implement a).  The
> only people using camellia_fi will be people looking at GAS's sources,
> so the portability issue probably is not that important in these
> scenarios.

Well I would prefer c), but lets keep things simple and go with d) - ie 
your patch as is.  If someone complains about their assembler source no 
longer assembling because of the change we can always point out that 
they were using an invalid mnemonic name, and that they should have
checked the official SPARC ISA documentation and not the GAS sources.

So - patch approved - please apply.

Cheers
  Nick

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

* Re: [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl
  2016-08-25 16:15     ` Nick Clifton
@ 2016-08-26 14:22       ` Jose E. Marchesi
  0 siblings, 0 replies; 5+ messages in thread
From: Jose E. Marchesi @ 2016-08-26 14:22 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

    
    >     Is there any chance that the misspelt mnemonic could be present in assembler
    >     source files out in the wild ?  Ie do we need to support the misspelt 
    >     mnemonic for backwards compatibility ?  Or maybe issue a error message 
    >     describing the correct spelling ?
    > 
    > There is always that possibility.  AFAIK the instruction has always been
    > documented in the SPARC specs as camellia_fl.  However, some people may
    > have read sparc-opc.c, find camellia_fi and use it.
    > 
    > We could:
    > a) Silently support both spellings, but this would mean code not
    >    portable to other systems using different assemblers, such as
    >    Solaris.
    > b) Support both spellings emitting a warning if the invalid mnemonic is
    >    used.  Same problem than above, but we give a chance to the
    >    programmer to fix the error.
    > c) As you suggested, emit an error if camellia_fi is used, describing
    >    the problem.
    > d) Just support camellia_fl and emit a generic error "invalid
    >    instruction" if camellia_fi is used.  This is what the submitted
    >    patch implements.
    > 
    > If we want to address this at all, I would probably implement a).  The
    > only people using camellia_fi will be people looking at GAS's sources,
    > so the portability issue probably is not that important in these
    > scenarios.
    
    Well I would prefer c), but lets keep things simple and go with d) - ie 
    your patch as is.  If someone complains about their assembler source no 
    longer assembling because of the change we can always point out that 
    they were using an invalid mnemonic name, and that they should have
    checked the official SPARC ISA documentation and not the GAS sources.
    
    So - patch approved - please apply.
    
Pushed to master.
Thanks!

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

end of thread, other threads:[~2016-08-26 14:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 16:06 [PATCH] [SPARC] opcodes, gas: fix mnemonic of camellia_fl Jose E. Marchesi
2016-08-25 11:08 ` Nick Clifton
2016-08-25 15:02   ` Jose E. Marchesi
2016-08-25 16:15     ` Nick Clifton
2016-08-26 14:22       ` Jose E. Marchesi

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).