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: Konrad Eisele <konrad at gaisler dot com>
- To: Eric Botcazou <ebotcazou at adacore 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: Tue, 01 Nov 2011 09:13:36 +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> <201110311037.50150.ebotcazou@adacore.com>
I'll send new patches as a reply.
Eric Botcazou wrote:
> [CCing David Miller, the SPARC binutils maintainer]
> OK, so you're proposing a new 'leon' sub-architecture for binutils.
Yes.
>
>> 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?
The [casa,smac,umac] are used as inline assembler only.
>
>> 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.
I have removed it, if gcc's "-Aleon" would be added it is not needed.
>
> 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.
>
I fixed that.