[PATCH 2/2] linux-user: Add support for MIPS Loongson 2F/3E

Philippe Mathieu-Daudé posted 2 patches 5 years, 2 months ago
Maintainers: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aurelien Jarno <aurelien@aurel32.net>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
There is a newer version of this series
[PATCH 2/2] linux-user: Add support for MIPS Loongson 2F/3E
Posted by Philippe Mathieu-Daudé 5 years, 2 months ago
Userland EFL binaries using Longsoon SIMD instructions have the
HWCAP_LOONGSON_MMI bit set. Binaries compiled for Longsoon 3E
have the HWCAP_LOONGSON_EXT bit set for the LQ / SQ instructions.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 linux-user/elfload.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 17371f8b8cd..be82fcb2c0a 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1012,6 +1012,8 @@ static uint32_t get_elf_hwcap(void)
 
     GET_FEATURE(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6);
     GET_FEATURE(ASE_MSA, HWCAP_MIPS_MSA);
+    GET_FEATURE(ASE_LMMI, HWCAP_LOONGSON_MMI);
+    GET_FEATURE(ASE_LEXT, HWCAP_LOONGSON_EXT);
 
 #undef GET_FEATURE
 
-- 
2.26.2

Re: [PATCH 2/2] linux-user: Add support for MIPS Loongson 2F/3E
Posted by Philippe Mathieu-Daudé 5 years, 2 months ago
On Tue, Dec 1, 2020 at 9:40 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Userland EFL binaries using Longsoon SIMD instructions have the
> HWCAP_LOONGSON_MMI bit set. Binaries compiled for Longsoon 3E
> have the HWCAP_LOONGSON_EXT bit set for the LQ / SQ instructions.
>

Eventually I can respin with references:

2F since 8e2d5831e4b ("target/mips: Legalize Loongson insn flags").
3E since af868995e1b ("target/mips: Add Loongson-3 CPU definition").

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  linux-user/elfload.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> index 17371f8b8cd..be82fcb2c0a 100644
> --- a/linux-user/elfload.c
> +++ b/linux-user/elfload.c
> @@ -1012,6 +1012,8 @@ static uint32_t get_elf_hwcap(void)
>
>      GET_FEATURE(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6);
>      GET_FEATURE(ASE_MSA, HWCAP_MIPS_MSA);
> +    GET_FEATURE(ASE_LMMI, HWCAP_LOONGSON_MMI);
> +    GET_FEATURE(ASE_LEXT, HWCAP_LOONGSON_EXT);
>
>  #undef GET_FEATURE
>
> --
> 2.26.2
>

Re: [PATCH 2/2] linux-user: Add support for MIPS Loongson 2F/3E
Posted by Philippe Mathieu-Daudé 5 years, 2 months ago
On 12/1/20 9:45 AM, Philippe Mathieu-Daudé wrote:
> On Tue, Dec 1, 2020 at 9:40 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> Userland EFL binaries using Longsoon SIMD instructions have the

Well I'll respin to fix the EFL -> ELF typo.

>> HWCAP_LOONGSON_MMI bit set. Binaries compiled for Longsoon 3E
>> have the HWCAP_LOONGSON_EXT bit set for the LQ / SQ instructions.
>>
> 
> Eventually I can respin with references:
> 
> 2F since 8e2d5831e4b ("target/mips: Legalize Loongson insn flags").
> 3E since af868995e1b ("target/mips: Add Loongson-3 CPU definition").
> 
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  linux-user/elfload.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/linux-user/elfload.c b/linux-user/elfload.c
>> index 17371f8b8cd..be82fcb2c0a 100644
>> --- a/linux-user/elfload.c
>> +++ b/linux-user/elfload.c
>> @@ -1012,6 +1012,8 @@ static uint32_t get_elf_hwcap(void)
>>
>>      GET_FEATURE(ISA_MIPS32R6 | ISA_MIPS64R6, HWCAP_MIPS_R6);
>>      GET_FEATURE(ASE_MSA, HWCAP_MIPS_MSA);
>> +    GET_FEATURE(ASE_LMMI, HWCAP_LOONGSON_MMI);
>> +    GET_FEATURE(ASE_LEXT, HWCAP_LOONGSON_EXT);
>>
>>  #undef GET_FEATURE
>>
>> --
>> 2.26.2
>>
>