[Bug target/46179] Codegen/TLS: invalid assembler syntax
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179 --- Comment #13 from Andreas Schwab --- Author: schwab Date: Wed Aug 8 20:01:26 2018 New Revision: 263432 URL: https://gcc.gnu.org/viewcvs?rev=263432=gcc=rev Log: m68k: handle more cases of TLS symbols with offset PR target/46179 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define. * config/m68k/m68k.c (handle_move_double): Don't call m68k_final_prescan_insn. (m68k_adjust_decorated_operand): Renamed from m68k_final_prescan_insn, remove first and third operand and simplify. (print_operand): Call it. (print_operand_address): Call it. PR target/46179 * gcc.target/m68k/tls-dimode.c: New file. Added: trunk/gcc/testsuite/gcc.target/m68k/tls-dimode.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/m68k/m68k.c trunk/gcc/config/m68k/m68k.h trunk/gcc/testsuite/ChangeLog
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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=gccview=revrev=167724 Log: Author: Finn Thain fth...@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
[Bug target/46179] Codegen/TLS: invalid assembler syntax
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179 Andreas Schwab sch...@linux-m68k.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED Target Milestone|--- |4.6.0 --- Comment #12 from Andreas Schwab sch...@linux-m68k.org 2010-12-12 14:08:48 UTC --- Fixed.
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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-patc...@? 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.
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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.)
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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.
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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.
[Bug target/46179] Codegen/TLS: invalid assembler syntax
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179 --- Comment #4 from Andreas Schwab sch...@linux-m68k.org 2010-10-27 08:41:05 UTC --- The invalid address is generated by output_move_double.
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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?
[Bug target/46179] Codegen/TLS: invalid assembler syntax
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46179 Andreas Schwab sch...@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 sch...@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; }
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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 #sym...@tlsle+n instead of #symbo...@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. */
[Bug target/46179] Codegen/TLS: invalid assembler syntax
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...