]> git.ipfire.org Git - thirdparty/gcc.git/commit
LoongArch: Define builtin macros for ISA evolutions
authorYang Yujie <yangyujie@loongson.cn>
Tue, 23 Apr 2024 02:42:48 +0000 (10:42 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Tue, 23 Apr 2024 03:29:04 +0000 (11:29 +0800)
commit77e114bb0dc03d1df7f84221e3132d19030c34b4
treef4658da3ad496b588ff0e240e786a2d4921fa649
parentb4ebdd153b2b068082b452772095260b03b78cc2
LoongArch: Define builtin macros for ISA evolutions

Detailed description of these definitions can be found at
https://github.com/loongson/la-toolchain-conventions, which
the LoongArch GCC port aims to conform to.

gcc/ChangeLog:

* config.gcc: Add loongarch-evolution.o.
* config/loongarch/genopts/genstr.sh: Enable generation of
loongarch-evolution.[cc,h].
* config/loongarch/t-loongarch: Likewise.
* config/loongarch/genopts/gen-evolution.awk: New file.
* config/loongarch/genopts/isa-evolution.in: Mark ISA version
of introduction for each ISA evolution feature.
* config/loongarch/loongarch-c.cc (loongarch_cpu_cpp_builtins):
Define builtin macros for enabled ISA evolutions and the ISA
version.
* config/loongarch/loongarch-cpu.cc: Use loongarch-evolution.h.
* config/loongarch/loongarch.h: Likewise.
* config/loongarch/loongarch-cpucfg-map.h: Delete.
* config/loongarch/loongarch-evolution.cc: New file.
* config/loongarch/loongarch-evolution.h: New file.
* config/loongarch/loongarch-opts.h (ISA_HAS_FRECIPE): Define.
(ISA_HAS_DIV32): Likewise.
(ISA_HAS_LAM_BH): Likewise.
(ISA_HAS_LAMCAS): Likewise.
(ISA_HAS_LD_SEQ_SA): Likewise.
gcc/config.gcc
gcc/config/loongarch/genopts/gen-evolution.awk [new file with mode: 0644]
gcc/config/loongarch/genopts/genstr.sh
gcc/config/loongarch/genopts/isa-evolution.in
gcc/config/loongarch/loongarch-c.cc
gcc/config/loongarch/loongarch-cpu.cc
gcc/config/loongarch/loongarch-evolution.cc [new file with mode: 0644]
gcc/config/loongarch/loongarch-evolution.h [moved from gcc/config/loongarch/loongarch-cpucfg-map.h with 52% similarity]
gcc/config/loongarch/loongarch-opts.h
gcc/config/loongarch/loongarch.h
gcc/config/loongarch/t-loongarch