public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/46179] New: Codegen/TLS: invalid assembler syntax
@ 2010-10-26 3:33 fthain at telegraphics dot com.au
2010-10-26 21:04 ` [Bug target/46179] " schwab@linux-m68k.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: fthain at telegraphics dot com.au @ 2010-10-26 3:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
Summary: Codegen/TLS: invalid assembler syntax
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: fthain@telegraphics.com.au
Target: m68k-linux-gnu
Created attachment 22157
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22157
pre-processed source from gen_uuid.c from util-linux
gcc version 4.5.2 20101021 (prerelease) (GCC)
$ m68k-linux-gnu-gcc -c gen_uuid.i -O2
/tmp/cceVtxzz.s: Assembler messages:
/tmp/cceVtxzz.s:709: Error: syntax error -- statement `move.l
%d1,last.5137@TLSLE+4(%a0)' ignored
/tmp/cceVtxzz.s:886: Error: syntax error -- statement `move.l
%d1,last.5137@TLSLE+4(%a0)' ignored
Some background may be found here (relating to debian's gcc-4.4 package which
has TLS backported):
http://lists.debian.org/debian-68k/2010/10/msg00037.html
(In that compiler, the code generated is an offset against TLSLDO, but shows
the same bug.)
The bug was initially filed for binutils (since closed as invalid):
http://sourceware.org/bugzilla/show_bug.cgi?id=12157
Bug may be worked around with -O0.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
@ 2010-10-26 21:04 ` schwab@linux-m68k.org
2010-10-26 22:14 ` mkuvyrkov at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2010-10-26 21:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.10.26 21:04:21
Ever Confirmed|0 |1
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2010-10-26 21:04:21 UTC ---
Reduced testcase:
struct a { int a, b; };
void
foo (struct a x)
{
static __thread struct a y;
y = x;
}
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
2010-10-26 21:04 ` [Bug target/46179] " schwab@linux-m68k.org
@ 2010-10-26 22:14 ` mkuvyrkov at gcc dot gnu.org
2010-10-27 0:47 ` fthain at telegraphics dot com.au
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2010-10-26 22:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #2 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> 2010-10-26 22:14:02 UTC ---
Just to check that this is not a lingering issue from backporting, do you have
the following comment in gcc/config/m68k/m68k.c ? I fixed a very similar issue
before checking the final GCC TLS patch.
/* Combine and, possibly, other optimizations may do good job
converting
(const (unspec [(symbol)]))
into
(const (plus (unspec [(symbol)])
(const_int N))).
The problem with this is emitting @TLS or @GOT decorations.
The decoration is emitted when processing (unspec), so the
result would be "#symbol@TLSLE+N" instead of "#symbol+N@TLSLE".
It seems that the easiest solution to this is to convert such
operands to
(const (unspec [(plus (symbol)
(const_int N))])).
Note, that the top level of operand remains intact, so we don't have
to patch up anything outside of the operand. */
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
2010-10-26 21:04 ` [Bug target/46179] " schwab@linux-m68k.org
2010-10-26 22:14 ` mkuvyrkov at gcc dot gnu.org
@ 2010-10-27 0:47 ` fthain at telegraphics dot com.au
2010-10-27 8:41 ` schwab@linux-m68k.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fthain at telegraphics dot com.au @ 2010-10-27 0:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #3 from Finn Thain <fthain at telegraphics dot com.au> 2010-10-27 00:47:23 UTC ---
> Just to check that this is not a lingering issue from backporting, do you have
> the following comment in gcc/config/m68k/m68k.c ?
Yes, I checked that much. After that, I checked that the FINAL_PRESCAN_INSN
macro was being expanded properly:
$ m68k-linux-gnu-nm gcc/final.o | grep m68k
U m68k_final_prescan_insn
U m68k_illegitimate_symbolic_constant_p
U m68k_output_addr_const_extra
At that point, I decided to build the gcc 4.5 snapshot (which needs no
backporting at all), and found the same failure. Then I filed the bug report...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (2 preceding siblings ...)
2010-10-27 0:47 ` fthain at telegraphics dot com.au
@ 2010-10-27 8:41 ` schwab@linux-m68k.org
2010-10-27 13:28 ` fthain at telegraphics dot com.au
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2010-10-27 8:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #4 from Andreas Schwab <schwab@linux-m68k.org> 2010-10-27 08:41:05 UTC ---
The invalid address is generated by output_move_double.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (3 preceding siblings ...)
2010-10-27 8:41 ` schwab@linux-m68k.org
@ 2010-10-27 13:28 ` fthain at telegraphics dot com.au
2010-10-28 15:21 ` fthain at telegraphics dot com.au
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fthain at telegraphics dot com.au @ 2010-10-27 13:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #5 from Finn Thain <fthain at telegraphics dot com.au> 2010-10-27 13:28:01 UTC ---
> The invalid address is generated by output_move_double.
I have to say it, the .md files I looked at are hands-down the most complex and
baroque code I've ever seen. So I don't understand them. But, that's where
output_move_double gets called.
And apparently, somehow, ColdFire (and 68000) avoid this issue... What's the
solution? Should I somehow find a test case that breaks on ColdFire so that
Maxim gets to fix this? (Just kidding ;-)
Or maybe have output_move_double call a new routine that does the same
reshuffling that m68k_final_prescan_insn does -- a wrapper around the
*handle_movsi invocation. Or is that going to be too expensive?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (4 preceding siblings ...)
2010-10-27 13:28 ` fthain at telegraphics dot com.au
@ 2010-10-28 15:21 ` fthain at telegraphics dot com.au
2010-10-28 15:34 ` fthain at telegraphics dot com.au
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fthain at telegraphics dot com.au @ 2010-10-28 15:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #6 from Finn Thain <fthain at telegraphics dot com.au> 2010-10-28 15:21:36 UTC ---
Created attachment 22191
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22191
possible fix
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (5 preceding siblings ...)
2010-10-28 15:21 ` fthain at telegraphics dot com.au
@ 2010-10-28 15:34 ` fthain at telegraphics dot com.au
2010-11-01 16:08 ` tg at mirbsd dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: fthain at telegraphics dot com.au @ 2010-10-28 15:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #7 from Finn Thain <fthain at telegraphics dot com.au> 2010-10-28 15:34:06 UTC ---
On Sun, 24 Oct 2010, Andreas Schwab wrote:
> This should habe [sic] been fixed up by m68k_final_prescan_insn.
(In reply to comment #4)
> The invalid address is generated by output_move_double.
Hmm. I think Andreas is dropping hints...
Is anyone able to regression test this patch for ColdFire? It seems to fix the
680x0 test cases.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (6 preceding siblings ...)
2010-10-28 15:34 ` fthain at telegraphics dot com.au
@ 2010-11-01 16:08 ` tg at mirbsd dot org
2010-11-04 13:12 ` mkuvyrkov at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: tg at mirbsd dot org @ 2010-11-01 16:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #8 from Thorsten Glaser <tg at mirbsd dot org> 2010-11-01 16:08:18 UTC ---
I can confirm that attachment 22191 fixes the original problem, namely that
one source file from util-linux, for me. No testsuite run, though ☹
Built on Debian/m68k, natively.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (7 preceding siblings ...)
2010-11-01 16:08 ` tg at mirbsd dot org
@ 2010-11-04 13:12 ` mkuvyrkov at gcc dot gnu.org
2010-11-04 16:27 ` tg at mirbsd dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2010-11-04 13:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #9 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> 2010-11-04 13:12:01 UTC ---
(In reply to comment #8)
> I can confirm that attachment 22191 [details] fixes the original problem, namely that
> one source file from util-linux, for me. No testsuite run, though ☹
The patch looks OK to me. Would you please post it to gcc-patches@?
>
> Built on Debian/m68k, natively.
Does this mean you bootstrapped the compiler? I think bootstrapping GCC with
C, C++ and, possibly, Fortran, would provide a good enough test coverage for
m68k.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (8 preceding siblings ...)
2010-11-04 13:12 ` mkuvyrkov at gcc dot gnu.org
@ 2010-11-04 16:27 ` tg at mirbsd dot org
2010-12-12 14:04 ` schwab at gcc dot gnu.org
2010-12-12 14:09 ` schwab@linux-m68k.org
11 siblings, 0 replies; 13+ messages in thread
From: tg at mirbsd dot org @ 2010-11-04 16:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #10 from Thorsten Glaser <tg at mirbsd dot org> 2010-11-04 16:27:00 UTC ---
https://www.freewrt.org/~tg/debs68k/dists/sid/main/PS-ok-unrel/gcc-4.4/
I built a Debian source package, which means three-stage bootstrap and then
building the RTL with the just compiled GCC for C, C++, Objective-C, I think
also Objective-C++, and Fortran. (I only used C and C++ compilers later,
though, unless some package snuck in some of the others.)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (9 preceding siblings ...)
2010-11-04 16:27 ` tg at mirbsd dot org
@ 2010-12-12 14:04 ` schwab at gcc dot gnu.org
2010-12-12 14:09 ` schwab@linux-m68k.org
11 siblings, 0 replies; 13+ messages in thread
From: schwab at gcc dot gnu.org @ 2010-12-12 14:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
--- Comment #11 from Andreas Schwab <schwab at gcc dot gnu.org> 2010-12-12 14:03:59 UTC ---
Author: schwab
Date: Sun Dec 12 14:03:55 2010
New Revision: 167724
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167724
Log:
Author: Finn Thain <fthain@telegraphics.com.au>
PR target/46179
* gcc/config/m68k/m68k.c (handle_move_double): Insert calls to
m68k_final_prescan_insn to clean up @TLS operand syntax.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m68k/m68k.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/46179] Codegen/TLS: invalid assembler syntax
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
` (10 preceding siblings ...)
2010-12-12 14:04 ` schwab at gcc dot gnu.org
@ 2010-12-12 14:09 ` schwab@linux-m68k.org
11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2010-12-12 14:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
--- Comment #12 from Andreas Schwab <schwab@linux-m68k.org> 2010-12-12 14:08:48 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2010-12-12 14:09 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-26 3:33 [Bug target/46179] New: Codegen/TLS: invalid assembler syntax fthain at telegraphics dot com.au
2010-10-26 21:04 ` [Bug target/46179] " schwab@linux-m68k.org
2010-10-26 22:14 ` mkuvyrkov at gcc dot gnu.org
2010-10-27 0:47 ` fthain at telegraphics dot com.au
2010-10-27 8:41 ` schwab@linux-m68k.org
2010-10-27 13:28 ` fthain at telegraphics dot com.au
2010-10-28 15:21 ` fthain at telegraphics dot com.au
2010-10-28 15:34 ` fthain at telegraphics dot com.au
2010-11-01 16:08 ` tg at mirbsd dot org
2010-11-04 13:12 ` mkuvyrkov at gcc dot gnu.org
2010-11-04 16:27 ` tg at mirbsd dot org
2010-12-12 14:04 ` schwab at gcc dot gnu.org
2010-12-12 14:09 ` schwab@linux-m68k.org
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).