public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/51423] New: Questions regarding Clobber List for inline ARM/NEON assembly
@ 2011-12-05 12:42 amit_chauhan21 at yahoo dot co.in
  2011-12-05 16:22 ` [Bug inline-asm/51423] " rearnsha at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: amit_chauhan21 at yahoo dot co.in @ 2011-12-05 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51423
           Summary: Questions regarding Clobber List for inline ARM/NEON
                    assembly
    Classification: Unclassified
           Product: gcc
           Version: 4.4.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: amit_chauhan21@yahoo.co.in


Dear All,

I am facing some random crashes in my applications on using the neon(inline)
assembly code. However with pure C code the application works fine. I had
following questions regarding neon inline assembly usage.


Q1> In Inline neon assembly does only d8-d15 registers are required to be added
in clobber list even if inline assembly uses d0-d7,d16-d31 registers?

Q2> Correct way to put the register in clobber list: s(32 bit) , d(64 bit) or
q(128bit) registers.

Thanks in Advanced.


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

* [Bug inline-asm/51423] Questions regarding Clobber List for inline ARM/NEON assembly
  2011-12-05 12:42 [Bug inline-asm/51423] New: Questions regarding Clobber List for inline ARM/NEON assembly amit_chauhan21 at yahoo dot co.in
@ 2011-12-05 16:22 ` rearnsha at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2011-12-05 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> 2011-12-05 16:22:14 UTC ---
Bugzilla is for reporting bugs, please use gcc-help@gcc.gnu.org for questions.

If you use specific registers in an ASM statement you have to declare all of
them, even if the register is call-clobbered.  The compiler does not try to
parse the contents of the asm statement (it does simple substitution of the
declared operands) so if you don't specify which registers you are modifying
the compiler might try to use them for other purposes.

In GCC-4.5 and earlier you have to specify the smallest addressable register
unit in any clobber list (so s0...s31 and d16...d31)[1].  GCC-4.6 and later are
smarter: the compiler now knows that q0 is equivalent to d0+d1 is equivalent to
s0+s1+s2+s3 etc.

[1] in these older compilers saying "q0" or "d0" will be interpreted as "s0"
and not clobber what you think it should.


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

end of thread, other threads:[~2011-12-05 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05 12:42 [Bug inline-asm/51423] New: Questions regarding Clobber List for inline ARM/NEON assembly amit_chauhan21 at yahoo dot co.in
2011-12-05 16:22 ` [Bug inline-asm/51423] " rearnsha 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).