From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 21E523856DE5; Wed, 13 Jul 2022 13:30:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21E523856DE5 From: "sebastian.huber@embedded-brains.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106282] New: m68k: Problem with thread-local storage and -mcpu=5206 Date: Wed, 13 Jul 2022 13:30:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sebastian.huber@embedded-brains.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 13:30:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106282 Bug ID: 106282 Summary: m68k: Problem with thread-local storage and -mcpu=3D5206 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sebastian.huber@embedded-brains.de Target Milestone: --- The following test code (derived from Newlib l64a.c): _Thread_local char _tls_l64a_buf[8]; static const char R64_ARRAY[] =3D "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; char * _l64a_r (long value) { char *ptr; char *result; int i, index; unsigned long tmp =3D (unsigned long)value & 0xffffffff; result =3D _tls_l64a_buf; ptr =3D result; for (i =3D 0; i < 6; ++i) { if (tmp =3D=3D 0) { *ptr =3D '\0'; break; } index =3D tmp & (64 - 1); *ptr++ =3D R64_ARRAY[index]; tmp >>=3D 6; } return result; } compiled with m68k-rtems6-gcc -mcpu=3D5206 -O2 -c test.c fails with /tmp/ccO3QdNm.s: Assembler messages: /tmp/ccO3QdNm.s:24: Error: syntax error -- statement `lea (_tls_l64a_buf@TLSLE+6,%a0),%a0' ignored=