[Buildroot] [PATCH 1/3] arch: add support for loongarch64
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Tue May 14 08:02:17 UTC 2024
On Tue, 14 May 2024 08:26:09 +0200
Waldemar Brodkorb <wbx at openadk.org> wrote:
> Signed-off-by: Waldemar Brodkorb <wbx at openadk.org>
> ---
> arch/Config.in | 12 ++++++++++++
> arch/Config.in.loongarch64 | 14 ++++++++++++++
> package/glibc/Config.in | 1 +
> package/musl/Config.in | 1 +
> 4 files changed, 28 insertions(+)
> create mode 100644 arch/Config.in.loongarch64
This needs an entry in the DEVELOPERS file.
Is this architecture supported in all versions of binutils/gcc/gdb we
support?
> diff --git a/arch/Config.in.loongarch64 b/arch/Config.in.loongarch64
> new file mode 100644
> index 0000000000..2b5bac095d
> --- /dev/null
> +++ b/arch/Config.in.loongarch64
> @@ -0,0 +1,14 @@
> +config BR2_ARCH
> + default "loongarch64"
> +
> +config BR2_NORMALIZED_ARCH
> + default "loongarch"
> +
> +config BR2_ENDIAN
> + default "LITTLE"
> +
> +config BR2_READELF_ARCH_NAME
> + default "LoongArch"
> +
Based on the gcc documentation, I see two -march values:
‘loongarch64’
A generic CPU with 64-bit extensions.
‘la464’
LoongArch LA464 CPU with LBT, LSX, LASX, LVZ.
And also 3 ABIs:
‘lp64d’
Uses 64-bit general purpose registers and 32/64-bit
floating-point registers for parameter passing. Data model is
LP64, where ‘int’ is 32 bits, while ‘long int’ and pointers
are 64 bits.
‘lp64f’
Uses 64-bit general purpose registers and 32-bit
floating-point registers for parameter passing. Data model is
LP64, where ‘int’ is 32 bits, while ‘long int’ and pointers
are 64 bits.
‘lp64s’
Uses 64-bit general purpose registers and no floating-point
registers for parameter passing. Data model is LP64, where
‘int’ is 32 bits, while ‘long int’ and pointers are 64 bits.
Should we do something about this?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
More information about the buildroot
mailing list