On 8/20/2021 11:07 AM, 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.
OK.

Q. Looking out further, is it going to continue to make sense to have loongson continue to be based on the mips port, or is it going to make more sense to have a distinct loongson port?

Jeff

Reply via email to