[v2,0/2] Add new relocation R_LARCH_CALL36

Message ID 20231214063916.2340161-1-mengqinggang@loongson.cn
Headers
Series Add new relocation R_LARCH_CALL36 |

Message

mengqinggang Dec. 14, 2023, 6:39 a.m. UTC
  R_LARCH_CALL36 is used for medium code model function call
pcaddu18i+jirl, and these two instructions must adjacent.

Add call36 and tail36 pseudo instructions.

Changes from v1 t0 v2:
  call func -> call36 func
  tail func -> tail36 $t0, func

mengqinggang (2):
  LoongArch: Add new relocation R_LARCH_CALL36
  LoongArch: Add call36 and tail36 pseudo instructions for medium code
    model

 bfd/bfd-in2.h                                 |  1 +
 bfd/elfnn-loongarch.c                         | 19 ++++++++++-----
 bfd/elfxx-loongarch.c                         | 24 +++++++++++++++++++
 bfd/libbfd.h                                  |  1 +
 bfd/reloc.c                                   |  3 +++
 gas/config/tc-loongarch.c                     |  6 ++++-
 gas/testsuite/gas/loongarch/medium-call.d     | 21 ++++++++++++++++
 gas/testsuite/gas/loongarch/medium-call.s     |  8 +++++++
 include/elf/loongarch.h                       |  2 ++
 .../ld-loongarch-elf/ld-loongarch-elf.exp     | 12 ++++++++++
 ld/testsuite/ld-loongarch-elf/medium-call.s   |  9 +++++++
 opcodes/loongarch-opc.c                       | 11 +++++++++
 12 files changed, 110 insertions(+), 7 deletions(-)
 create mode 100644 gas/testsuite/gas/loongarch/medium-call.d
 create mode 100644 gas/testsuite/gas/loongarch/medium-call.s
 create mode 100644 ld/testsuite/ld-loongarch-elf/medium-call.s