public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: mengqinggang <mengqinggang@loongson.cn>
To: binutils@sourceware.org
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn,
	liuzhensong@loongson.cn, cailulu@loongson.cn, xry111@xry111.site,
	i.swmail@xen0n.name, maskray@google.com, luweining@loongson.cn,
	wanglei@loongson.cn, hejinyang@loongson.cn,
	mengqinggang <mengqinggang@loongson.cn>
Subject: [PATCH v2 0/2] Add new relocation R_LARCH_CALL36
Date: Thu, 14 Dec 2023 14:39:14 +0800	[thread overview]
Message-ID: <20231214063916.2340161-1-mengqinggang@loongson.cn> (raw)

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

-- 
2.36.0


             reply	other threads:[~2023-12-14  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14  6:39 mengqinggang [this message]
2023-12-14  6:39 ` [PATCH v2 1/2] LoongArch: " mengqinggang
2023-12-14  6:39 ` [PATCH v2 2/2] LoongArch: Add call36 and tail36 pseudo instructions for medium code model mengqinggang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231214063916.2340161-1-mengqinggang@loongson.cn \
    --to=mengqinggang@loongson.cn \
    --cc=binutils@sourceware.org \
    --cc=cailulu@loongson.cn \
    --cc=chenglulu@loongson.cn \
    --cc=hejinyang@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=luweining@loongson.cn \
    --cc=maskray@google.com \
    --cc=wanglei@loongson.cn \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).