Skip to content

Commit

Permalink
LongArch64: Rename core
Browse files Browse the repository at this point in the history
Use microarchitecture name instead of meaningless strings to name the core
1. Rename LOONGSONGENERIC to LA64_GENERIC
2. Rename LOONGSON3R5 to LA464
3. Rename LOONGSON2K1000 t0 LA264
  • Loading branch information
XiWeiGu committed Sep 19, 2024
1 parent fca86e3 commit 9405fdd
Show file tree
Hide file tree
Showing 15 changed files with 495 additions and 145 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/loongarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
fail-fast: false
matrix:
include:
- target: LOONGSONGENERIC
- target: LA_GENERIC
triple: loongarch64-unknown-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC
- target: LOONGSON3R5
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA_GENERIC
- target: LA464
triple: loongarch64-unknown-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5
- target: LOONGSON2K1000
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464
- target: LA264
triple: loongarch64-unknown-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264
- target: DYNAMIC_ARCH
triple: loongarch64-unknown-linux-gnu
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/loongarch64_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
fail-fast: false
matrix:
include:
- target: LOONGSONGENERIC
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSONGENERIC
- target: LOONGSON3R5
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON3R5
- target: LOONGSON2K1000
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LOONGSON2K1000
- target: LA_GENERIC
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA_GENERIC
- target: LA464
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA464
- target: LA264
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=LA264
- target: DYNAMIC_ARCH
opts: NO_SHARED=1 DYNAMIC_ARCH=1 TARGET=GENERIC

Expand Down
2 changes: 1 addition & 1 deletion Makefile.prebuild
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ endif
getarch : getarch.c cpuid.S dummy $(CPUIDEMU)
avx512=$$(./c_check$(SCRIPTSUFFIX) - - "$(CC)" $(TARGET_FLAGS) $(CFLAGS) | grep NO_AVX512); \
rv64gv=$$(./c_check$(SCRIPTSUFFIX) - - "$(CC)" $(TARGET_FLAGS) $(CFLAGS) | grep NO_RV64GV); \
$(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} $${rv64gv:+-D$${rv64gv}} -o $(@F) getarch.c cpuid.S $(CPUIDEMU)
$(HOSTCC) $(HOST_CFLAGS) $(EXFLAGS) $${avx512:+-D$${avx512}} $${rv64gv:+-D$${rv64gv}} -lm -o $(@F) getarch.c cpuid.S $(CPUIDEMU)

getarch_2nd : getarch_2nd.c $(TARGET_CONF) dummy
ifndef TARGET_CORE
Expand Down
6 changes: 3 additions & 3 deletions Makefile.system
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ endif
endif

ifeq ($(ARCH), loongarch64)
DYNAMIC_CORE = LOONGSON3R5 LOONGSON2K1000 LOONGSONGENERIC
DYNAMIC_CORE = LA64_GENERIC LA264 LA464
endif

ifeq ($(ARCH), riscv64)
Expand Down Expand Up @@ -990,8 +990,8 @@ BINARY_DEFINED = 1
endif

ifeq ($(ARCH), loongarch64)
LA64_ABI=$(shell $(CC) -mabi=lp64d -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo lp64d)
LA64_ARCH=$(shell $(CC) -march=loongarch64 -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo loongarch64)
LA64_ABI=$(shell $(CC) -mabi=lp64d -lm -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo lp64d)
LA64_ARCH=$(shell $(CC) -march=loongarch64 -lm -c $(TOPDIR)/cpuid_loongarch64.c -o /dev/null > /dev/null 2> /dev/null && echo loongarch64)
ifneq ($(LA64_ABI), lp64d)
LA64_ABI=lp64
endif
Expand Down
6 changes: 3 additions & 3 deletions TargetList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ x280
RISCV64_ZVL256B

11.LOONGARCH64:
LOONGSONGENERIC
LOONGSON3R5
LOONGSON2K1000
LA64_GENERIC
LA264
LA464

12. Elbrus E2000:
E2K
Expand Down
Loading

0 comments on commit 9405fdd

Please sign in to comment.