public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/106282] New: m68k: Problem with thread-local storage and -mcpu=5206
@ 2022-07-13 13:30 sebastian.huber@embedded-brains.de
  2022-07-14  8:25 ` [Bug target/106282] m68k: Problem with thread-local storage and -mcpu=5206 since r9-2326-gede9446c26a929 marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sebastian.huber@embedded-brains.de @ 2022-07-13 13:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106282

            Bug ID: 106282
           Summary: m68k: Problem with thread-local storage and -mcpu=5206
           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[] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

char *
_l64a_r (long value)
{
  char *ptr;
  char *result;
  int i, index;
  unsigned long tmp = (unsigned long)value & 0xffffffff;

  result = _tls_l64a_buf;
  ptr = result;

  for (i = 0; i < 6; ++i)
    {
      if (tmp == 0)
        {
          *ptr = '\0';
          break;
        }

      index = tmp & (64 - 1);
      *ptr++ = R64_ARRAY[index];
      tmp >>= 6;
    }

  return result;
}

compiled with

m68k-rtems6-gcc -mcpu=5206 -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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-07-07 10:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 13:30 [Bug target/106282] New: m68k: Problem with thread-local storage and -mcpu=5206 sebastian.huber@embedded-brains.de
2022-07-14  8:25 ` [Bug target/106282] m68k: Problem with thread-local storage and -mcpu=5206 since r9-2326-gede9446c26a929 marxin at gcc dot gnu.org
2023-02-16 18:29 ` [Bug target/106282] [10/11/12/13 Regression] " jsm28 at gcc dot gnu.org
2023-02-21 14:07 ` rguenth at gcc dot gnu.org
2023-03-26 20:36 ` cvs-commit at gcc dot gnu.org
2023-03-27 20:06 ` schwab@linux-m68k.org
2023-07-07 10:43 ` [Bug target/106282] [11/12 " rguenth at gcc dot gnu.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).