LoongArch: Support referring to FCSRs as $fcsrX
authorFeiyang Chen <chenfeiyang@loongson.cn>
Fri, 16 Jun 2023 03:16:10 +0000 (11:16 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Sun, 25 Jun 2023 07:06:32 +0000 (15:06 +0800)
commit4142b2368353bda6d2e5ff80640c012b80f84024
tree008063c1b9de2d1e466f13b7b603dbf298a551c5
parent0e389a1595b792a70aa76e60dc3e5244a10f2a55
LoongArch: Support referring to FCSRs as $fcsrX

Previously, FCSRs were referred to as $rX, which seemed strange.
We refer to FCSRs as $fcsrX, which ensures compatibility with LLVM
IAS as well.

gas/ChangeLog:

        * config/tc-loongarch.c:
        (loongarch_fc_normal_name): New definition.
        (loongarch_fc_numeric_name): New definition.
        (loongarch_single_float_opcodes): Modify `movgr2fcsr` and
        `movfcsr2gr`.
        testsuite/gas/loongarch/float_op.d: Likewise.
        testsuite/gas/loongarch/float_op.s: Likewise.

include/ChangeLog:

        * opcode/loongarch.h:
        (loongarch_fc_normal_name): New extern.
        (loongarch_fc_numeric_name): New extern.

opcodes/ChangeLog:

        * opcodes/loongarch-dis.c (loongarch_after_parse_args): Support
        referring to FCSRs as $fcsrX.
        * opcodes/loongarch-opc.c (loongarch_args_parser_can_match_arg_helper):
        Likewise.

Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn>
gas/config/tc-loongarch.c
gas/testsuite/gas/loongarch/float_op.d
gas/testsuite/gas/loongarch/float_op.s
include/opcode/loongarch.h
opcodes/loongarch-dis.c
opcodes/loongarch-opc.c