[PATCH] mips: msa: truncate immediate shift amount [PR101922]

Xi Ruoyao xry111@mengyan1223.wang
Fri Aug 20 17:37:33 GMT 2021


On Sat, 2021-08-21 at 01:07 +0800, Xi Ruoyao via Gcc-patches wrote:
> When -mloongson-mmi is enabled, SHIFT_COUNT_TRUNCATED is turned off.
> This causes untruncated immediate shift amount outputed into the asm,
> and the GNU assembler refuses to assemble it.
> 
> Truncate immediate shift amount when outputing the asm instruction to
> make GAS happy again.
> 
> gcc/
> 
>         PR target/101922
>         * config/mips/mips-protos.h (mips_msa_output_shift_immediate):
>           Declare.
>         * config/mips/mips.c (mips_msa_output_shift_immediate): New
>           function.
>         * config/mips/mips-msa.md (vashl<mode>3, vashr<mode>3,
>           vlshr<mode>3): Call it.
> 
> gcc/testsuite/
> 
>         PR target/101922
>         * gcc.target/mips/pr101922.c: New test.

Forgot to mention: tested on mips64el-linux-gnu, OK for trunk?



More information about the Gcc-patches mailing list