public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [SPARC] Reject 'cas' mnemonic on LEON
@ 2014-04-28 10:24 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2014-04-28 10:24 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

Hi,

this fixes an oversight in the support for the LEON architecture:
  https://sourceware.org/ml/binutils/2013-08/msg00038.html

We cannot accept 'cas' on LEON because 'cas' is a synthetic instruction meant 
for 'casa 0x80' where 0x80 is the ASI (Address Space Identifier) and 0x80 is 
not an allowed ASI for SPARC-V8, the underlying architecture of LEON.

The compiler has already been changed to emit 'casa' directly.

Tested for sparc-elf and with a patched compiler, OK for mainline?


2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>

opcodes/
	* sparc-opc.c (cas): Disable for LEON.
	(casl): Likewise.

	
-- 
Eric Botcazou

[-- Attachment #2: leon_cas_binutils.diff --]
[-- Type: text/x-patch, Size: 1296 bytes --]

diff --git a/opcodes/sparc-opc.c b/opcodes/sparc-opc.c
index 659c548..67176e6 100644
--- a/opcodes/sparc-opc.c
+++ b/opcodes/sparc-opc.c
@@ -1797,8 +1797,8 @@ SLCBCC("cbnefr", 15),
 { "signx",	F3(2, 0x27, 0), F3(~2, ~0x27, ~0)|(1<<12)|ASI(~0)|RS2_G0, "r", F_ALIAS, 0, v9 }, /* sra rd,%g0,rd */
 { "clruw",	F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|ASI(~0)|RS2_G0, "1,d", F_ALIAS, 0, v9 }, /* srl rs1,%g0,rd */
 { "clruw",	F3(2, 0x26, 0), F3(~2, ~0x26, ~0)|(1<<12)|ASI(~0)|RS2_G0, "r", F_ALIAS, 0, v9 }, /* srl rd,%g0,rd */
-{ "cas",	F3(3, 0x3c, 0)|ASI(0x80), F3(~3, ~0x3c, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, 0, v9andleon }, /* casa [rs1]ASI_P,rs2,rd */
-{ "casl",	F3(3, 0x3c, 0)|ASI(0x88), F3(~3, ~0x3c, ~0)|ASI(~0x88), "[1],2,d", F_ALIAS, 0, v9andleon }, /* casa [rs1]ASI_P_L,rs2,rd */
+{ "cas",	F3(3, 0x3c, 0)|ASI(0x80), F3(~3, ~0x3c, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, 0, v9 }, /* casa [rs1]ASI_P,rs2,rd */
+{ "casl",	F3(3, 0x3c, 0)|ASI(0x88), F3(~3, ~0x3c, ~0)|ASI(~0x88), "[1],2,d", F_ALIAS, 0, v9 }, /* casa [rs1]ASI_P_L,rs2,rd */
 { "casx",	F3(3, 0x3e, 0)|ASI(0x80), F3(~3, ~0x3e, ~0)|ASI(~0x80), "[1],2,d", F_ALIAS, 0, v9 }, /* casxa [rs1]ASI_P,rs2,rd */
 { "casxl",	F3(3, 0x3e, 0)|ASI(0x88), F3(~3, ~0x3e, ~0)|ASI(~0x88), "[1],2,d", F_ALIAS, 0, v9 }, /* casxa [rs1]ASI_P_L,rs2,rd */
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-28 10:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-28 10:24 [SPARC] Reject 'cas' mnemonic on LEON Eric Botcazou

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