This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2] ia64: don't use dynamic relocations for local symbols


On Sat, 2 Jan 2016 00:30:58 -0700
Jeff Law <law@redhat.com> wrote:

> > That way gcc will be able to compile glibc's ld: PR/60465
> Egad. PIC on ia64 is a mess. I can kind of see what Richard was trying 
> to do, but ewww. I don't think it's worth the effort to deep dive into 
> the PIC support and make ia64 handle things like most other ports -- 
> it's a dead architecture so ISTM the easiest fix is the right fix.
> 
> A few, relatively minor things.

> > diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
> > index f48cebc..6ea5072 100644
> > --- a/gcc/config/ia64/ia64.c
> > +++ b/gcc/config/ia64/ia64.c
> > @@ -1105,6 +1105,8 @@ ia64_expand_load_address (rtx dest, rtx src)
> >       emit_insn (gen_load_fptr (dest, src));
> >     else if (sdata_symbolic_operand (src, VOIDmode))
> >       emit_insn (gen_load_gprel (dest, src));
> > +  else if (local_symbolic_operand64 (src, VOIDmode))
> > +    emit_insn (gen_load_gprel64 (dest, src));
> Comment here.  Something like
> 
> /* We want to use gprel rather than ltoff relocations for
>     local symbolic operands.  */
Done. Hope not too wordy :)

> 
> >
> > +;; True if OP refers to a local symbol +any large offset).
> ;; True if OP refers to a local symbol [+ any offset ]
> 
> I haven't dug into the ia64 port (and I'm not planning to) to see if/how 
> it MINUS in symbolic expressions.  It's been the source of problems in 
> various ports trough the years.
> 
> Can you take the testcase from your post as well as the one from BZ60465 
> comment #37 (from you) and add them to the testsuite?
Added both tests.

> Note you're not running the full testsuite, just a few dozen ia64 
> specific tests, which will include your new tests.  ANd you're not 
> rebuilding the whole compiler between those steps, just ia64.o and 
> relinking the compiler.  So it ought to be reasonably fast.
> 
> So to summarize, I think your patch needs the two trivial comment fixes 
> noted above, 2 testcases and the before/after results of running just 
> the ia64.exp tests.  Repost with that and I'll get it into the tree.

--- ia64-before.log     2016-01-02 11:20:21.000000000 +0000
+++ ia64-after.log      2016-01-02 11:22:37.000000000 +0000
@@ -1 +1 @@
-Test Run By slyfox on Sat Jan  2 11:19:38 2016
+Test Run By slyfox on Sat Jan  2 11:22:16 2016
@@ -26,2 +25,0 @@
-FAIL: gcc.target/ia64/pr60465-gprel64-c37.c scan-assembler-not @ltoffx
-FAIL: gcc.target/ia64/pr60465-gprel64.c scan-assembler-not @ltoffx
@@ -31,2 +29,2 @@
-# of expected passes            147
-# of unexpected failures        11
+# of expected passes            149
+# of unexpected failures        9

I did ran tests only on amd64 host thus the execution failure tests.

Attached updated patch and test runs on a crosscompiler before
and after the change.

Now I'm building on real ia64 hardware as
    make bootstrap
    make -k check

for both clean and patched trees.

-- 

  Sergei

Attachment: 0001-ia64-don-t-use-dynamic-relocations-for-local-symbols.patch
Description: Text document

Test Run By slyfox on Sat Jan  2 11:22:16 2016
Target is ia64-unknown-linux-gnu
Host   is x86_64-pc-linux-gnu

                === gcc tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/slyfox/dev/git/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running /home/slyfox/dev/git/gcc/gcc/testsuite/gcc.target/ia64/ia64.exp ...
FAIL: gcc.target/ia64/20030225-2.c execution test
FAIL: gcc.target/ia64/20040303-1.c execution test
FAIL: gcc.target/ia64/asm-1.c execution test
FAIL: gcc.target/ia64/float80-1.c execution test
FAIL: gcc.target/ia64/float80-2.c execution test
FAIL: gcc.target/ia64/float80-varargs-1.c execution test
FAIL: gcc.target/ia64/pr42542-1.c execution test
FAIL: gcc.target/ia64/pr42542-2.c execution test
FAIL: gcc.target/ia64/pr42542-3.c execution test

                === gcc Summary ===

# of expected passes            149
# of unexpected failures        9
# of unsupported tests          4
/home/slyfox/dev/git/gcc-ia64/gcc/xgcc  version 6.0.0 20151228 (experimental) (GCC)
Test Run By slyfox on Sat Jan  2 11:19:38 2016
Target is ia64-unknown-linux-gnu
Host   is x86_64-pc-linux-gnu

                === gcc tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/slyfox/dev/git/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running /home/slyfox/dev/git/gcc/gcc/testsuite/gcc.target/ia64/ia64.exp ...
FAIL: gcc.target/ia64/20030225-2.c execution test
FAIL: gcc.target/ia64/20040303-1.c execution test
FAIL: gcc.target/ia64/asm-1.c execution test
FAIL: gcc.target/ia64/float80-1.c execution test
FAIL: gcc.target/ia64/float80-2.c execution test
FAIL: gcc.target/ia64/float80-varargs-1.c execution test
FAIL: gcc.target/ia64/pr42542-1.c execution test
FAIL: gcc.target/ia64/pr42542-2.c execution test
FAIL: gcc.target/ia64/pr42542-3.c execution test
FAIL: gcc.target/ia64/pr60465-gprel64-c37.c scan-assembler-not @ltoffx
FAIL: gcc.target/ia64/pr60465-gprel64.c scan-assembler-not @ltoffx

                === gcc Summary ===

# of expected passes            147
# of unexpected failures        11
# of unsupported tests          4
/home/slyfox/dev/git/gcc-ia64/gcc/xgcc  version 6.0.0 20151228 (experimental) (GCC)

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]