public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] LoongArch: Modify the method of obtaining symbolic addresses.
@ 2022-07-19 13:08 Lulu Cheng
  2022-07-19 13:08 ` [PATCH v1 1/2] " Lulu Cheng
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Lulu Cheng @ 2022-07-19 13:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: xry111, i, xuchenghua, Lulu Cheng

1. The original LA macro instruction is split into two instructions to
   obtain the address of the symbol if enable '-mexplicit-relocs'.
2. Currently, '-mcmodel=' only supports 'normal' mode, because other mode
   behaviors are not yet determined. This function is gradually improved
   by the subsequent handling.
3. Modify the method that calls global functions. From 'la.global + jirl'
   to 'bl'.
4. Some R_LARCH_64 in section .eh_frame will to generate  R_LARCH_NONE, we
   change ASM_PREFERRED_EH_DATA_FORMAT from 'WD_EH_PE_absptr' to
   'WD_EH_PE_pcrel | DW_EH_PE_sdata4' then relocation to R_LARCH_32_PCREL
   from R_LARCH_64 in setction .eh_frame and not generate dynamic relocation
   for R_LARCH_32_PCREL.

This new symbol loading method not support by upstream binutils yet,
this GCC port requires the following patches applied to binutils to build.

https://sourceware.org/pipermail/binutils/2022-July/121849.html
https://sourceware.org/pipermail/binutils/2022-July/121850.html
https://sourceware.org/pipermail/binutils/2022-July/121851.html
https://sourceware.org/pipermail/binutils/2022-July/121852.html
https://sourceware.org/pipermail/binutils/2022-July/121853.html

Lulu Cheng (2):
  LoongArch: Modify the method of obtaining symbolic addresses.
  LoongArch: Modify the definition of the ASM_PREFERRED_EH_DATA_FORMAT
    macro.

 .../config/loongarch/loongarch-common.cc      |   1 +
 gcc/config/loongarch/constraints.md           |  24 +-
 gcc/config/loongarch/genopts/loongarch.opt.in |   4 +
 gcc/config/loongarch/loongarch-protos.h       |   9 +-
 gcc/config/loongarch/loongarch.cc             | 660 +++++++++++++-----
 gcc/config/loongarch/loongarch.h              |   4 +-
 gcc/config/loongarch/loongarch.md             | 401 +++--------
 gcc/config/loongarch/loongarch.opt            |   4 +
 gcc/config/loongarch/predicates.md            |  56 +-
 9 files changed, 629 insertions(+), 534 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-26  6:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 13:08 [PATCH v1 0/2] LoongArch: Modify the method of obtaining symbolic addresses Lulu Cheng
2022-07-19 13:08 ` [PATCH v1 1/2] " Lulu Cheng
2022-07-19 14:29   ` Xi Ruoyao
2022-07-20  0:40     ` Lulu Cheng
2022-07-19 13:08 ` [PATCH v1 2/2] LoongArch: Modify the definition of the ASM_PREFERRED_EH_DATA_FORMAT macro Lulu Cheng
2022-07-26  6:36 ` [pushed][PATCH v1 0/2] LoongArch: Modify the method of obtaining symbolic addresses Lulu Cheng

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).