On Tue, 2024-05-07 at 18:01 +0800, Lulu Cheng wrote:
> 
> 在 2024/5/7 下午5:42, Xi Ruoyao 写道:
> > On Tue, 2024-05-07 at 17:07 +0800, Xi Ruoyao wrote:
> > > Hmm, after this change the default (-march=la64v1.0) is enabling LSX:
> > > 
> > > $ echo "int dummy;" | cc -c -v |& tail -n1
> > > COLLECT_GCC_OPTIONS='-c' '-v' '-mabi=lp64d' '-march=la64v1.0' '-
> > > mfpu=64'
> > > '-msimd=lsx' '-mcmodel=normal' '-mtune=generic'
> > > 
> > > Is this expected or there's something wrong?
> > Note that
> > https://github.com/loongson/la-toolchain-conventions?tab=readme-ov-file#configuring-the-target-isa
> > says:
> > 
> > LoongArch V1.1 features:
> > 
> > Enable or disable features introduced by LoongArch V1.1. The LSX / LASX
> > part of the LoongArch v1.1 update should only be enabled with lsx / lasx
> > itself enabled.
> > 
> > So to me -march=la64v1.0 should not imply -mlsx.
> 
> 
> The link 
> https://github.com/loongson/la-toolchain-conventions?tab=readme-ov-file#target-presets
>  
> has a detailed description of -march.
> -march=la64v1.0 will open lsx by default.

Hmm, I think it's worthy noted in
https://gcc.gnu.org/gcc-14/changes.html then.  I.e, for the

"It is now recommended to use -march=la64v1.0 as the only compiler
option to describe the target ISA when building binaries for
distribution."

paragraph, add something like:

"GCC now defaults to -march=la64v1.0 for loongarch64-* targets unless 
configured with a different --with-arch= option.  The -march=la64v1.0
option also implies -mlsx."

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to