[PATCH v3 0/4] LoongArch: target configuration interface update

2023-08-31 Thread Yang Yujie
t triplet) 4. Using "-mno-lasx" do not cause a fallback to "-msimd=none" as long as the -march= architecture or the default --with-simd= setting has LSX support. Yang Yujie (4): LoongArch: improved target configuration interface LoongArch: define preprocessi

[PATCH v3 1/4] LoongArch: improved target configuration interface

2023-08-31 Thread Yang Yujie
The configure script and the GCC driver are updated so that it is easier to customize and control GCC builds for targeting different LoongArch implementations. * Make --with-abi obsolete, since it might cause different default ABI under the same target triplet, which is undesirable. The default

[PATCH v3 4/4] LoongArch: support loongarch*-elf target

2023-08-31 Thread Yang Yujie
gcc/ChangeLog: * config.gcc: add loongarch*-elf target. * config/loongarch/elf.h: New file. Link against newlib by default. libgcc/ChangeLog: * config.host: add loongarch*-elf target. --- gcc/config.gcc | 15 ++- gcc/config/loongarch/elf.h | 5

[PATCH v3 3/4] LoongArch: add new configure option --with-strict-align-lib

2023-08-31 Thread Yang Yujie
LoongArch processors may not support memory accesses without natural alignments. Building libraries with -mstrict-align may help with toolchain binary compatiblity and performance on these implementations (e.g. Loongson 2K1000LA). No significant performance degredation is observed on current main

[PATCH 0/4] LoongArch: target configuration interface update

2023-08-29 Thread Yang Yujie
h= architecture or the default --with-simd= setting has LSX support. 5. Other bug fixes. Yang Yujie (4): LoongArch: improved target configuration interface LoongArch: define preprocessing macros "__loongarch_{arch,tune}" LoongArch: add new configure option --with-strict-align

[PATCH v2 4/4] LoongArch: support loongarch*-elf target

2023-08-29 Thread Yang Yujie
gcc/ChangeLog: * config.gcc: add loongarch*-elf target. * config/loongarch/elf.h: New file. Link against newlib by default. libgcc/ChangeLog: * config.host: add loongarch*-elf target. --- gcc/config.gcc | 15 ++- gcc/config/loongarch/elf.h | 5

[PATCH v2 1/4] LoongArch: improved target configuration interface

2023-08-29 Thread Yang Yujie
The configure script and the GCC driver are updated so that it is easier to customize and control GCC builds for targeting different LoongArch implementations. * Make --with-abi obsolete, since it might cause different default ABI under the same target triplet, which is undesirable. The default

[PATCH v2 2/4] LoongArch: define preprocessing macros "__loongarch_{arch, tune}"

2023-08-29 Thread Yang Yujie
These are exported according to the LoongArch Toolchain Conventions[1] as a replacement of the obsolete "_LOONGARCH_{ARCH,TUNE}" macros, which are expanded to strings representing the actual architecture and microarchitecture of the target. [1] currently relased at https://github.com/loongson/Loon

[PATCH v2 3/4] LoongArch: add new configure option --with-strict-align-lib

2023-08-29 Thread Yang Yujie
LoongArch processors may not support memory accesses without natural alignments. Building libraries with -mstrict-align may help with toolchain binary compatiblity and performance on these implementations (e.g. Loongson 2K1000LA). No significant performance degredation is observed on current main

[PING][PATCH] LoongArch: initial ada support on linux

2023-08-24 Thread Yang Yujie
gcc/ChangeLog: * ada/Makefile.rtl: Add LoongArch support. * ada/libgnarl/s-linux__loongarch.ads: New. * ada/libgnat/system-linux-loongarch.ads: New. * config/loongarch/loongarch.h: mark normalized options passed from driver to gnat1 as explicit for multilib.

[PATCH] LoongArch: initial ada support on linux

2023-08-20 Thread Yang Yujie
gcc/ChangeLog: * ada/Makefile.rtl: Add LoongArch support. * ada/libgnarl/s-linux__loongarch.ads: New. * ada/libgnat/system-linux-loongarch.ads: New. * config/loongarch/loongarch.h: mark normalized options passed from driver to gnat1 as explicit for multilib.

[PATCH v1 1/6] LoongArch: a symmetric multilib subdir layout

2023-08-13 Thread Yang Yujie
Multilib in gcc is asymmetric. i.e. a "default" / "toplevel" library variant is always built and installed, and: * it is installed directly under the gcc libdir (with no suffix); * it is selected / searched / linked against when the gcc driver does not receive any option from MULTILIB_OPTIONS

[PATCH v1 6/6] LoongArch: support loongarch*-elf target

2023-08-13 Thread Yang Yujie
gcc/ChangeLog: * config.gcc: add loongarch*-elf target. * config/loongarch/elf.h: New file. Link against newlib by default. libgcc/ChangeLog: * config.host: add loongarch*-elf target. --- gcc/config.gcc | 21 --- gcc/config/loongarch/elf.h

[PATCH v1 4/6] LoongArch: use -mstrict-align by default when building libraries

2023-08-13 Thread Yang Yujie
LoongArch processors may not support memory accesses without natural alignments. Building libraries with -mstrict-align may help with toolchain binary compatiblity and performance on these implementations (e.g. Loongson 2K1000LA). With this patch, no significant performance degredation is observe

[PATCH v1 2/6] LoongArch: improved target configuration interface

2023-08-13 Thread Yang Yujie
The configure script and the GCC driver are updated so that it is easier to customize and control GCC builds for targeting different LoongArch implementations. * Support options for LoongArch SIMD extensions: new configure options --with-simd={none,lsx,lasx}; new driver options -m[no]-l[a]sx /

[PATCH v1 3/6] LoongArch: define preprocessing macros "__loongarch_{arch, tune}"

2023-08-13 Thread Yang Yujie
These are exported according to the LoongArch Toolchain Conventions[1] as a replacement of the obsolete "_LOONGARCH_{ARCH,TUNE}" macros, which are expanded to strings representing the actual architecture and microarchitecture of the target. [1] currently relased at https://github.com/loongson/Loon

[PATCH v1 5/6] LoongArch: export headers for building GCC plugins

2023-08-13 Thread Yang Yujie
gcc/ChangeLog: * gcc/config/loongarch/t-loongarch: include loongarch-def.h, loongarch-tune.h and loongarch-driver.h in OPTIONS_H_EXTRA. Co-authored-by: Lulu Cheng --- gcc/config/loongarch/t-loongarch | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/conf

[PATCH v2] libgccjit: allow common objects in $(EXTRA_GCC_OBJS) and $(EXTRA_OBJS)

2022-05-19 Thread Yang Yujie
Hello, This patch fixes libgccjit build failure on loongarch* targets, and could probably be useful for future ports. For now, libgccjit is linked with objects from $(EXTRA_GCC_OBJS) and libbackend.a, which contains object files from $(EXTRA_OBJS). This effectively forbids any overlap between th

[PATCH] libgccjit: allow common objects in $(EXTRA_GCC_OBJS) and $(EXTRA_OBJS)

2022-04-24 Thread Yang Yujie
iver than ${cpu_arch}-common.o. Regression tested on loongarch64-linux-gnuf64 an x86_64-pc-linux-gnu. Ok for trunk? Yujie >From 5d9121fa052c556fd854596af35da8e5649e8f08 Mon Sep 17 00:00:00 2001 From: Yang Yujie Date: Fri, 22 Apr 2022 14:36:37 +0800 Subject: [PATCH] libgccjit: allow common objects i

<    1   2