This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/54445] TLS array lookup with negative constant is not combined into a single instruction
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 02 Sep 2012 14:06:26 +0000
- Subject: [Bug target/54445] TLS array lookup with negative constant is not combined into a single instruction
- Auto-submitted: auto-generated
- References: <bug-54445-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54445
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at redhat dot com
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-09-02 14:06:26 UTC ---
(In reply to comment #2)
> This is due to the definition of x86_64_immediate_operand predicate, following
> part:
>
> case UNSPEC:
> switch (XINT (op1, 1))
> {
> case UNSPEC_DTPOFF:
> case UNSPEC_NTPOFF:
> if (offset > 0
> && trunc_int_for_mode (offset, SImode) == offset)
> return true;
> }
>
> I don't know why negative offsets are not allowed here.
It was added by
http://gcc.gnu.org/ml/gcc-cvs/2002-10/msg00685.html
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=29d8dd5cee1f9ebd56b4473a690fcc54ad986265