LoongArch: gas: Add support for tls le relax.
authorchangjiachen <changjiachen@stu.xupt.edu.cn>
Thu, 28 Dec 2023 11:59:39 +0000 (19:59 +0800)
committerliuzhensong <liuzhensong@loongson.cn>
Fri, 29 Dec 2023 07:11:01 +0000 (15:11 +0800)
commit40372b03b36de07f1c5f5dc519eb000238736128
tree9429c4cbbe4a856470b53d47fbbdf2a0df200c71
parentb449f8428b4000f74d2949c9bb384ca8ae0cda60
LoongArch: gas: Add support for tls le relax.

Add tls le relax related relocs support and testsuites in gas.

The main test is three new relocation items,
R_LARCH_TLS_LE_ADD_R, R_LARCH_TLS_LE_HI20_R,
R_LARCH_TLS_LE_LO12_R can be generated properly
and tls le insn format check.

gas/ChangeLog:

* config/tc-loongarch.c:
(loongarch_args_parser_can_match_arg_helper): Add support for relax.
* gas/testsuite/gas/loongarch/reloc.d: Likewise.
* gas/testsuite/gas/loongarch/reloc.s: Likewise.
* gas/testsuite/gas/loongarch/loongarch.exp: Likewise.
* gas/testsuite/gas/loongarch/tls_le_insn_format_check.s: New test.
gas/config/tc-loongarch.c
gas/testsuite/gas/loongarch/loongarch.exp
gas/testsuite/gas/loongarch/reloc.d
gas/testsuite/gas/loongarch/reloc.s
gas/testsuite/gas/loongarch/tls_le_insn_format_check.s [new file with mode: 0644]