public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: Richard Earnshaw <rearnsha@arm.com>
Cc: Mircea Gherzan <mgherzan@gmail.com>,
	"crossgcc@sourceware.org" <crossgcc@sourceware.org>
Subject: Re: ARM-PXA toolchain
Date: Tue, 08 Nov 2011 22:37:00 -0000	[thread overview]
Message-ID: <201111082336.24516.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <4EB96479.8070708@arm.com>

Mircea, Richard, All,

On Tuesday 08 November 2011 18:18:49 Richard Earnshaw wrote:
> On 08/11/11 12:23, Mircea Gherzan wrote:
> > I can't check the coding for I can't compile a simple:
> > 	void my_vstmia(void)
> > 	{
> >     		__asm__("stc     p11, cr8, [ip], #64");
> >     		__asm__("vstmia  ip!, {d8 - d51}");
> > 	}
> 
> That's a heck of a lot of double-precision registers!  Perhaps you meant
> D15, not D51.

Aha! Good catch! :-)

Compiled with Mircea's original toolchain settings, and changing 'd51'
to 'd15' as spotted by Richard, I was able to compile that code snippet
(notice however the -O0 to not optimise at all):

  $ arm-unknown-linux-gnueabi-gcc -march=armv7-a -mcpu=cortex-a9 \
                                  -mfpu=vfpv3-d16 -mhard-float   \
                                  -O0 -o ess.o -c ess.c
  $ arm-unknown-linux-gnueabi-objdump -d ess.o
[--SNIP--]
  00000000 <my_vstmia>:
     0: e52db004        push    {fp}            ; (str fp, [sp, #-4]!)
     4: e28db000        add     fp, sp, #0
     8: ecac8b10        vstmia  ip!, {d8-d15}
     c: ecac8b10        vstmia  ip!, {d8-d15}
    10: e28bd000        add     sp, fp, #0
    14: e8bd0800        pop     {fp}
    18: e12fff1e        bx      lr

At any optimisation level,  -O{s,1,2,3}, the assembly now looks like:

  00000000 <my_vstmia>:
     0:   ecac8b10        vstmia  ip!, {d8-d15}
     4:   ecac8b10        vstmia  ip!, {d8-d15}
     8:   e12fff1e        bx      lr

So yes, the stc and the vstmia opcodes in the code snippet above are both
encoded into the same assembly instruction. But still, it does not tell
whether it's due to 'as' being smart, or the two opcodes actually being
the same in that situation...

Anyway, I would highly be surprised that eglibc would not run on non-VFP
hardware at all. So definitely, it looks (to me) like a bug in QEMU.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

  reply	other threads:[~2011-11-08 22:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 16:28 Mircea Gherzan
2011-11-06 16:55 ` Yann E. MORIN
2011-11-06 19:46   ` Mircea Gherzan
2011-11-07  1:16     ` Yann E. MORIN
2011-11-08 12:23       ` Mircea Gherzan
2011-11-08 17:19         ` Richard Earnshaw
2011-11-08 22:37           ` Yann E. MORIN [this message]
2011-11-09  8:39             ` Mircea Gherzan
2011-11-10 20:16         ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201111082336.24516.yann.morin.1998@anciens.enib.fr \
    --to=yann.morin.1998@anciens.enib.fr \
    --cc=crossgcc@sourceware.org \
    --cc=mgherzan@gmail.com \
    --cc=rearnsha@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).