This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Adding official support into the main tree for SPARC Leon
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Konrad Eisele <konrad at gaisler dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, gcc at gcc dot gnu dot org, Luís Vitório Cargnini <lvcargnini at gmail dot com>, David Miller <davem at davemloft dot net>
- Date: Mon, 31 Oct 2011 10:37:49 +0100
- Subject: Re: Adding official support into the main tree for SPARC Leon
- References: <A7C71AE2-A3CF-413F-AD3E-8B6BEBB6B833@gmail.com> <201009011804.33922.ebotcazou@adacore.com> <4EA50C36.8060602@gaisler.com>
[CCing David Miller, the SPARC binutils maintainer]
> I want to once again ask for write credentials so that
> I can submit patches for the sparc-leon architecture:
> The first patch is for the 'gcc' repository while the
> second patch is for the 'binutils' repository. They are both
> related so I think it makes sense to send them together.
> I dont have write access to binutils eather so, I thought you
> might be able to apply them on both.
> Some background: Leon supports the umac/smac instructions.
> The Leon3-Ft and Leon4 also support the SMP compare-and-swap (casa)
OK, so you're proposing a new 'leon' sub-architecture for binutils.
> The appended 2 patches do:
> 1. 0001-sparc-leon-Use-Aleon-assembler-switch-for-mcpu-leon-.patch
> Append "-Aleon" to the assembler
This looks incomplete. Don't you also want to enable the instructions?
> 2. 0001-sparc-leon-add-leon-architecture-to-GAS.patch
> Define new "leon" processor type in GAS + enable for "leon"
> umac/smac and "casa".
The configure.tgt change looks useless to me.
Other nits:
@@ -1668,9 +1671,8 @@ EFPOP2_2 ("efcmpes", 0x055, "e,f"),
{ "cpop2", F3(2, 0x37, 0), F3(~2, ~0x37, ~1), "[1+2],d", F_ALIAS, v6notv9 },
/* sparclet specific insns */
-
-COMMUTEOP ("umac", 0x3e, sparclet),
-COMMUTEOP ("smac", 0x3f, sparclet),
+COMMUTEOP ("umac", 0x3e, sparclet|MASK_LEON),
+COMMUTEOP ("smac", 0x3f, sparclet|MASK_LEON),
COMMUTEOP ("umacd", 0x2e, sparclet),
COMMUTEOP ("smacd", 0x2f, sparclet),
COMMUTEOP ("umuld", 0x09, sparclet),
sparclet|leon
-{ "casa", F3(3, 0x3c, 0), F3(~3, ~0x3c, ~0), "[1]A,2,d", 0, v9 },
-{ "casa", F3(3, 0x3c, 1), F3(~3, ~0x3c, ~1), "[1]o,2,d", 0, v9 },
+{ "casa", F3(3, 0x3c, 0), F3(~3, ~0x3c, ~0), "[1]A,2,d", 0, v9|MASK_LEON },
+{ "casa", F3(3, 0x3c, 1), F3(~3, ~0x3c, ~1), "[1]o,2,d", 0, v9|MASK_LEON },
v9|leon
+{ "cas", F3(3, 0x3c, 0)|ASI(0x80), F3(~3, ~0x3c, ~0)|ASI(~0x80), "[1],2,d",
F_ALIAS, v9|MASK_LEON }, /* casa [rs1]ASI_P,rs2,rd */
+{ "casl", F3(3, 0x3c, 0)|ASI(0x88), F3(~3, ~0x3c, ~0)|ASI(~0x88), "[1],2,d",
F_ALIAS, v9|MASK_LEON }, /* casa [rs1]ASI_P_L,rs2,rd */
Likewise.
--
Eric Botcazou