diff options
author | Yang Yujie <yangyujie@loongson.cn> | 2024-04-23 10:42:47 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2024-04-23 11:28:59 +0800 |
commit | b4ebdd153b2b068082b452772095260b03b78cc2 (patch) | |
tree | e04d9fc1186d11502b78617e0758d1d719443141 /gcc/doc | |
parent | 8c6ee63bcd653c736d4cabafcbfd4f62582391ff (diff) | |
download | gcc-b4ebdd153b2b068082b452772095260b03b78cc2.zip gcc-b4ebdd153b2b068082b452772095260b03b78cc2.tar.gz gcc-b4ebdd153b2b068082b452772095260b03b78cc2.tar.bz2 |
LoongArch: Define ISA versions
These ISA versions are defined as -march= parameters and
are recommended for building binaries for distribution.
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: Make la64v1.0 the default ISA preset of the lp64d ABI.
* config/loongarch/genopts/loongarch-strings: Define la64v1.0, la64v1.1.
* config/loongarch/genopts/loongarch.opt.in: Likewise.
* config/loongarch/loongarch-c.cc (LARCH_CPP_SET_PROCESSOR): Likewise.
(loongarch_cpu_cpp_builtins): Likewise.
* config/loongarch/loongarch-cpu.cc (get_native_prid): Likewise.
(fill_native_cpu_config): Likewise.
* config/loongarch/loongarch-def.cc (array_tune): Likewise.
* config/loongarch/loongarch-def.h: Likewise.
* config/loongarch/loongarch-driver.cc (driver_set_m_parm): Likewise.
(driver_get_normalized_m_opts): Likewise.
* config/loongarch/loongarch-opts.cc (default_tune_for_arch): Likewise.
(TUNE_FOR_ARCH): Likewise.
(arch_str): Likewise.
(loongarch_target_option_override): Likewise.
* config/loongarch/loongarch-opts.h (TARGET_uARCH_LA464): Likewise.
(TARGET_uARCH_LA664): Likewise.
* config/loongarch/loongarch-str.h (STR_CPU_ABI_DEFAULT): Likewise.
(STR_ARCH_ABI_DEFAULT): Likewise.
(STR_TUNE_GENERIC): Likewise.
(STR_ARCH_LA64V1_0): Likewise.
(STR_ARCH_LA64V1_1): Likewise.
* config/loongarch/loongarch.cc (loongarch_cpu_sched_reassociation_width): Likewise.
(loongarch_asm_code_end): Likewise.
* config/loongarch/loongarch.opt: Likewise.
* doc/invoke.texi: Likewise.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 7e517b8..2a35dc7 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -1049,7 +1049,7 @@ Objective-C and Objective-C++ Dialects}. -msign-extend-enabled -muser-enabled} @emph{LoongArch Options} -@gccoptlist{-march=@var{cpu-type} -mtune=@var{cpu-type} -mabi=@var{base-abi-type} +@gccoptlist{-march=@var{arch-type} -mtune=@var{tune-type} -mabi=@var{base-abi-type} -mfpu=@var{fpu-type} -msimd=@var{simd-type} -msoft-float -msingle-float -mdouble-float -mlsx -mno-lsx -mlasx -mno-lasx -mbranch-cost=@var{n} -mcheck-zero-division -mno-check-zero-division @@ -26852,34 +26852,51 @@ These command-line options are defined for LoongArch targets: @table @gcctabopt @opindex march -@item -march=@var{cpu-type} -Generate instructions for the machine type @var{cpu-type}. In contrast to -@option{-mtune=@var{cpu-type}}, which merely tunes the generated code -for the specified @var{cpu-type}, @option{-march=@var{cpu-type}} allows GCC -to generate code that may not run at all on processors other than the one -indicated. Specifying @option{-march=@var{cpu-type}} implies -@option{-mtune=@var{cpu-type}}, except where noted otherwise. +@item -march=@var{arch-type} +Generate instructions for the machine type @var{arch-type}. +@option{-march=@var{arch-type}} allows GCC to generate code that +may not run at all on processors other than the one indicated. -The choices for @var{cpu-type} are: +The choices for @var{arch-type} are: @table @samp @item native -This selects the CPU to generate code for at compilation time by determining -the processor type of the compiling machine. Using @option{-march=native} -enables all instruction subsets supported by the local machine (hence -the result might not run on different machines). Using @option{-mtune=native} -produces code optimized for the local machine under the constraints -of the selected instruction set. +Local processor type detected by the native compiler. @item loongarch64 -A generic CPU with 64-bit extensions. +Generic LoongArch 64-bit processor. @item la464 -LoongArch LA464 CPU with LBT, LSX, LASX, LVZ. +LoongArch LA464-based processor with LSX, LASX. +@item la664 +LoongArch LA664-based processor with LSX, LASX +and all LoongArch v1.1 instructions. +@item la64v1.0 +LoongArch64 ISA version 1.0. +@item la64v1.1 +LoongArch64 ISA version 1.1. @end table +More information about LoongArch ISA versions can be found at +@uref{https://github.com/loongson/la-toolchain-conventions}. + @opindex mtune -@item -mtune=@var{cpu-type} -Optimize the output for the given processor, specified by microarchitecture -name. +@item -mtune=@var{tune-type} +Optimize the generated code for the given processor target. + +The choices for @var{tune-type} are: + +@table @samp +@item native +Local processor type detected by the native compiler. +@item generic +Generic LoongArch processor. +@item loongarch64 +Generic LoongArch 64-bit processor. +@item la464 +LoongArch LA464 core. +@item la664 +LoongArch LA664 core. +@end table + @opindex mabi @item -mabi=@var{base-abi-type} |