public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/63359] New: aarch64: 32bit registers in inline asm
@ 2014-09-24 13:26 glisse at gcc dot gnu.org
  2014-09-24 13:55 ` [Bug target/63359] " james.molloy at arm dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: glisse at gcc dot gnu.org @ 2014-09-24 13:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63359
           Summary: aarch64: 32bit registers in inline asm
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
            Target: aarch64-linux-gnu

int f(int i){
  asm("clz %0, %0":"+r"(i));
  return i;
}

produces:

    clz x0, x0

I need to write "clz %w0, %w0" to get the expected:

    clz w0, w0

What I would like:
1) on x86, the type of i is used to get the right register name. If this can't
be done on aarch64 (did ARM forbid it?), it may be useful to warn when I pass
the wrong type.
2) I need a documented way to get 32bit regs, and %w0 is not documented in the
gcc manual. Besides, clang rejects it, so please find a common syntax...


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

end of thread, other threads:[~2020-06-15 11:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-24 13:26 [Bug target/63359] New: aarch64: 32bit registers in inline asm glisse at gcc dot gnu.org
2014-09-24 13:55 ` [Bug target/63359] " james.molloy at arm dot com
2014-09-24 14:44 ` rearnsha at gcc dot gnu.org
2014-09-24 14:47 ` james.molloy at arm dot com
2014-09-24 14:57 ` rearnsha at gcc dot gnu.org
2014-09-24 15:04 ` james.molloy at arm dot com
2014-09-24 15:07 ` glisse at gcc dot gnu.org
2014-09-24 15:21 ` rearnsha at gcc dot gnu.org
2014-09-24 15:27 ` james.molloy at arm dot com
2020-06-15 11:07 ` andysem at mail dot ru

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).