Bug 12157 - m68k statement ignored syntax error when @TLSLDO+4(%a0)
Summary: m68k statement ignored syntax error when @TLSLDO+4(%a0)
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: gas (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL: http://lists.debian.org/debian-68k/20...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-24 11:47 UTC by Thorsten Glaser
Modified: 2010-10-24 12:58 UTC (History)
0 users

See Also:
Host: m68k-linux-gnu
Target: m68k-linux-gnu
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Glaser 2010-10-24 11:47:07 UTC
Hi,

we’re not sure if this is a binutils bug, for not accepting this, or a
gcc bug, for producing code like this. (Personally, I don’t even know
m68k well…) If it’s a gcc bug, please tell me so and I’ll submit it there.

Sample code and diagnostics:

root@aranym:~ # cat x.s
        .globl  __tls_get_addr
        .text
        add.l #last.5547@TLSLDO,%a2
        move.l %a1,last.5547@TLSLDO(%a0)
        move.l %a2,last.5547@TLSLDO+4(%a0)
        .section        .tbss
        .align  2
        .type   last.5547, @object
        .size   last.5547, 8
last.5547:
        .zero   8
root@aranym:~ # as --version
GNU assembler (GNU Binutils for Debian) 2.20.1-system.20100303
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `m68k-linux-gnu'.
root@aranym:~ # dpkg-query -W binutils
binutils        2.20.1-15
root@aranym:~ # as x.s
x.s: Assembler messages:
x.s:5: Error: syntax error -- statement `move.l %a2,last.5547@TLSLDO+4(%a0)' ignored

This is on Debian/m68k, which I’m currently putting through a transition
to do TLS manually. I’ve not tried any other version because building
binutils takes half a day or so, and maybe someone can shed some insight
into this already, but if it’s necessary, I will.
Comment 1 Thorsten Glaser 2010-10-24 11:50:16 UTC
Added URL (to mailing list thread), host/target triplets.

Note how it seems to not like the “+4” but everything else works.
These binutils have been used to produce TLS-capable linux-2.6,
gcc-4.4 and eglibc Debian binary packages, by the way, but it
chokes on util-linux now out of all things (uuid/src/gen_uuid.c).
Comment 2 Andreas Schwab 2010-10-24 12:58:26 UTC
This is invalid syntax.  The decoration cannot be put in the middle of an expression.