public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/58133] New: GCC should emit arm assembly following the unified syntax
@ 2013-08-12  1:19 sven.koehler at gmail dot com
  2013-08-12 21:34 ` [Bug other/58133] " sven.koehler at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: sven.koehler at gmail dot com @ 2013-08-12  1:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58133

            Bug ID: 58133
           Summary: GCC should emit arm assembly following the unified
                    syntax
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sven.koehler at gmail dot com

I'm not aware of any command line switch to make gcc generate unified syntax.
The asm code that gcc generated in thumb mode follows the old devided syntax.
All documentation by Atmel these days is about the unified syntax. Also,
binutils has decided to disassemble to unified syntax by default.

A code example and how to reproduce the issue is given below.

Command:
arm-softfloat-eabi-gcc -mcpu=arm7tdmi -O2 -mthumb -S -o - foo.c

Contents of foo.c:
int main() { return 0; }

Generated Assembly (devided syntax):
main:
    mov    r0, #0
    bx    lr

Disassembly (unified syntax):
00000000 <main>:
   0:    2000          movs    r0, #0
   2:    4770          bx    lr

According to the documentation, mov r0,#0 is not a valid 16bit command.
The documentation however assumes the unified syntax.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489i/Cihcdbca.html


It might be argued that the transition from classic to unified syntax is to
error-prone or too much work. For me, it causes some trouble. I will have to
switch between unified syntax and devided syntax in inline assembly since gcc
uses devided and clang uses unified syntax.


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

* [Bug other/58133] GCC should emit arm assembly following the unified syntax
  2013-08-12  1:19 [Bug other/58133] New: GCC should emit arm assembly following the unified syntax sven.koehler at gmail dot com
@ 2013-08-12 21:34 ` sven.koehler at gmail dot com
  2013-08-19  9:58 ` rearnsha at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: sven.koehler at gmail dot com @ 2013-08-12 21:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58133

--- Comment #1 from Sven <sven.koehler at gmail dot com> ---
It seems, that for targets like -mcpu=cortex-m4 the gcc does generate unified
syntax. So is the unified syntax only used for newer targets that use the
thumb2 instruction set whereas the divided syntax is used for older thumb1
targets?


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

* [Bug other/58133] GCC should emit arm assembly following the unified syntax
  2013-08-12  1:19 [Bug other/58133] New: GCC should emit arm assembly following the unified syntax sven.koehler at gmail dot com
  2013-08-12 21:34 ` [Bug other/58133] " sven.koehler at gmail dot com
@ 2013-08-19  9:58 ` rearnsha at gcc dot gnu.org
  2013-08-19 10:39 ` sven.koehler at gmail dot com
  2015-06-24 21:25 ` ramana at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2013-08-19  9:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58133

Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |arm
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-08-19
     Ever confirmed|0                           |1

--- Comment #2 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Unified syntax is currently only supported for ARM and Thumb2 stated (for the
latter it's mandatory).  Thumb1, for historical reasons, still uses the old
syntax.

This is a known issue.


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

* [Bug other/58133] GCC should emit arm assembly following the unified syntax
  2013-08-12  1:19 [Bug other/58133] New: GCC should emit arm assembly following the unified syntax sven.koehler at gmail dot com
  2013-08-12 21:34 ` [Bug other/58133] " sven.koehler at gmail dot com
  2013-08-19  9:58 ` rearnsha at gcc dot gnu.org
@ 2013-08-19 10:39 ` sven.koehler at gmail dot com
  2015-06-24 21:25 ` ramana at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: sven.koehler at gmail dot com @ 2013-08-19 10:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58133

--- Comment #3 from Sven <sven.koehler at gmail dot com> ---
(In reply to Richard Earnshaw from comment #2)
> This is a known issue.

So what needs to be done? Where do I find the source/configuration/whatever of
the code generator for thumb mode?


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

* [Bug other/58133] GCC should emit arm assembly following the unified syntax
  2013-08-12  1:19 [Bug other/58133] New: GCC should emit arm assembly following the unified syntax sven.koehler at gmail dot com
                   ` (2 preceding siblings ...)
  2013-08-19 10:39 ` sven.koehler at gmail dot com
@ 2015-06-24 21:25 ` ramana at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-06-24 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Oh and Kyrylo fixed up vfp.md last year too. So it's only ARM state that
remains. I have a few patches in flight that I'm testing.


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

end of thread, other threads:[~2015-06-24 21:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12  1:19 [Bug other/58133] New: GCC should emit arm assembly following the unified syntax sven.koehler at gmail dot com
2013-08-12 21:34 ` [Bug other/58133] " sven.koehler at gmail dot com
2013-08-19  9:58 ` rearnsha at gcc dot gnu.org
2013-08-19 10:39 ` sven.koehler at gmail dot com
2015-06-24 21:25 ` ramana 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).