On Mon, 2023-11-20 at 09:09 +0800, chenglulu wrote:
> 
> 在 2023/11/19 上午1:24, Xi Ruoyao 写道:
> > On Sat, 2023-11-18 at 16:16 +0800, chenglulu wrote:
> > > Pushed to r14-5567.
> > > 
> > > 在 2023/11/16 下午3:27, Lulu Cheng 写道:
> > > > When compiling with '-mcmodel=medium', the function call is made through
> > > > 'pcaddu18i+jirl' if binutils supports call36, otherwise the
> > > > native implementation 'pcalau12i+jirl' is used.
> > > > 
> > > > gcc/ChangeLog:
> > > > 
> > > >         * config.in: Regenerate.
> > > >         * config/loongarch/loongarch-opts.h (HAVE_AS_SUPPORT_CALL36): 
> > > > Define macro.
> > > >         * config/loongarch/loongarch.cc 
> > > > (loongarch_legitimize_call_address):
> > > >         If binutils supports call36, the function call is not split 
> > > > over expand.
> > > >         * config/loongarch/loongarch.md: Add call36 generation code.
> > > >         * config/loongarch/predicates.md: Likewise.
> > > >         * configure: Regenerate.
> > > >         * configure.ac: Check whether binutils supports call36.
> > With this change I get some test failures with "old" Binutils 2.41:
> > 
> > FAIL: gcc.target/loongarch/func-call-medium-1.c scan-assembler 
> > test:.*la.global\\t.*g\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-1.c scan-assembler 
> > test1:.*la.global\\t.*f\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-1.c scan-assembler 
> > test2:.*la.local\\t.*l\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-2.c scan-assembler 
> > test:.*la.global\\t.*g\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-2.c scan-assembler 
> > test1:.*la.local\\t.*f\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-2.c scan-assembler 
> > test2:.*la.local\\t.*l\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-3.c scan-assembler 
> > test2:.*la.local\\t.*l\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-4.c scan-assembler 
> > test1:.*la.local\\t.*f\\n\\tjirl
> > FAIL: gcc.target/loongarch/func-call-medium-4.c scan-assembler 
> > test2:.*la.local\\t.*l\\n\\tjirl
> > 
> > Some strange thing is happening: with -mexplicit-relocs=auto or always I
> > get pcalau12i + jirl as expected, but with -mexplicit-relocs=none I get
> > "pcaddu18i $r1,%call36(g)" and jirl.  This seems irony (!).
> > 
> Thank you for the revision.

Then I'll push
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637153.html if
this is an approval?

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to