public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* ARM wmmx instructions from gcc ?
@ 2009-08-31 15:26 Danny Backx
  2009-08-31 15:40 ` Dave Korn
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Backx @ 2009-08-31 15:26 UTC (permalink / raw)
  To: gcc

Hi,

Does anyone know how well gcc-4.4 works with ARM and wmmx instructions ?

I'm working on cegcc. It currently says :
pavilion: {86} arm-mingw32ce-gcc -mcpu=iwmmxt t.c
t.c:1: error: iwmmxt requires an AAPCS compatible ABI for proper
operation
pavilion: {87} 

It's clear to me where in the source this message is generated.

It is not clear whether this is caused by errors in my port, or whether
gcc has some other problem with this.

Has anyone used this ?

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

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

* Re: ARM wmmx instructions from gcc ?
  2009-08-31 15:26 ARM wmmx instructions from gcc ? Danny Backx
@ 2009-08-31 15:40 ` Dave Korn
  2009-08-31 19:30   ` Danny Backx
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Korn @ 2009-08-31 15:40 UTC (permalink / raw)
  To: danny.backx; +Cc: gcc

Danny Backx wrote:
> Hi,
> 
> Does anyone know how well gcc-4.4 works with ARM and wmmx instructions ?
> 
> I'm working on cegcc. It currently says :
> pavilion: {86} arm-mingw32ce-gcc -mcpu=iwmmxt t.c
> t.c:1: error: iwmmxt requires an AAPCS compatible ABI for proper
> operation
> pavilion: {87} 
> 
> It's clear to me where in the source this message is generated.
> 
> It is not clear whether this is caused by errors in my port, or whether
> gcc has some other problem with this.

  You should mention that long double alignment macro that the guy on the
cegcc list thought it was connected with.  ARM_DOUBLEWORD_ALIGN.  If I was
following that discussion correctly, the ABI requires it, and you have it
#defined to zero to fix the problem you were getting with float double
function argument passing, but maybe what this means is that it there's some
more fundamental problem in the ABI-related MD macros, that fixing it this way
ended up just papering over.

    cheers,
      DaveK

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

* Re: ARM wmmx instructions from gcc ?
  2009-08-31 15:40 ` Dave Korn
@ 2009-08-31 19:30   ` Danny Backx
  2009-09-02 12:35     ` Paul Brook
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Backx @ 2009-08-31 19:30 UTC (permalink / raw)
  To: Dave Korn; +Cc: gcc

On Sun, 2009-08-30 at 21:39 +0100, Dave Korn wrote:
> Danny Backx wrote:
> > Hi,
> > 
> > Does anyone know how well gcc-4.4 works with ARM and wmmx instructions ?
> > 
> > I'm working on cegcc. It currently says :
> > pavilion: {86} arm-mingw32ce-gcc -mcpu=iwmmxt t.c
> > t.c:1: error: iwmmxt requires an AAPCS compatible ABI for proper
> > operation
> > pavilion: {87} 
> > 
> > It's clear to me where in the source this message is generated.
> > 
> > It is not clear whether this is caused by errors in my port, or whether
> > gcc has some other problem with this.
> 
>   You should mention that long double alignment macro that the guy on the
> cegcc list thought it was connected with.  ARM_DOUBLEWORD_ALIGN.  If I was
> following that discussion correctly, the ABI requires it, and you have it
> #defined to zero to fix the problem you were getting with float double
> function argument passing, but maybe what this means is that it there's some
> more fundamental problem in the ABI-related MD macros, that fixing it this way
> ended up just papering over.

I (naively) kept my message simple, hoping to get a reaction like :
- I use this all the time in gcc-4.4 so the issue must be in your port
or
- nobody's been using that stuff for ages, it's almost certainly broken.

I guess life is not as simple as that :-)

You already extended my message with a great summary, so I'm finding it
hard to add sensible stuff to it.

Here are two references to why ARM_DOUBLEWORD_ALIGN was added there :
- the commit message
http://sourceforge.net/mailarchive/message.php?msg_name=E1Itn8S-0001xI-Nu%40sc8-pr-svn3.sourceforge.net
- the explanation
http://sourceforge.net/mailarchive/message.php?msg_name=473F27A8.1060805%40portugalmail.pt

The end result of all that was this code in gcc/config/arm/wince-pe.h :
#undef  DEFAULT_STRUCTURE_SIZE_BOUNDARY
#define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8

#undef ARM_DOUBLEWORD_ALIGN
#define ARM_DOUBLEWORD_ALIGN 0
#undef BIGGEST_ALIGNMENT
#define BIGGEST_ALIGNMENT 64

So, question time again : could this be in my port, or a more
fundamental issue as Dave hints ?

How can I find out ?

BTW the message on the cegcc list that started all this :
http://sourceforge.net/mailarchive/forum.php?thread_name=21121251665810%
40webmail35.yandex.ru&forum_name=cegcc-devel

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

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

* Re: ARM wmmx instructions from gcc ?
  2009-08-31 19:30   ` Danny Backx
@ 2009-09-02 12:35     ` Paul Brook
  2009-09-02 15:36       ` Danny Backx
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Brook @ 2009-09-02 12:35 UTC (permalink / raw)
  To: gcc, danny.backx; +Cc: Dave Korn

> So, question time again : could this be in my port, or a more
> fundamental issue as Dave hints ?

Both. By my reading the ABI you're trying to implement does not provide the 
guarantees required to use iwmmxt instructions. There are ways around this, 
but none of them are simple or pretty. The simplest answer is "don't do that".

Paul

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

* Re: ARM wmmx instructions from gcc ?
  2009-09-02 12:35     ` Paul Brook
@ 2009-09-02 15:36       ` Danny Backx
  2009-09-03 11:31         ` Paul Brook
  0 siblings, 1 reply; 6+ messages in thread
From: Danny Backx @ 2009-09-02 15:36 UTC (permalink / raw)
  To: Paul Brook; +Cc: gcc, Dave Korn

On Wed, 2009-09-02 at 13:34 +0100, Paul Brook wrote:
> > So, question time again : could this be in my port, or a more
> > fundamental issue as Dave hints ?
> 
> Both. By my reading the ABI you're trying to implement does not provide the 
> guarantees required to use iwmmxt instructions. There are ways around this, 
> but none of them are simple or pretty. The simplest answer is "don't do that".

Hi Paul,

Thanks for the answer, but I'm not sure what you've told me and why.
Could you expand a little ?

Don't do what ? Use WMMX instructions in GCC ?
or
Don't try to use the current implementation with WMMX ?

Thanks,

	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

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

* Re: ARM wmmx instructions from gcc ?
  2009-09-02 15:36       ` Danny Backx
@ 2009-09-03 11:31         ` Paul Brook
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Brook @ 2009-09-03 11:31 UTC (permalink / raw)
  To: danny.backx; +Cc: gcc, Dave Korn

> > Both. By my reading the ABI you're trying to implement does not provide
> > the guarantees required to use iwmmxt instructions. There are ways around
> > this, but none of them are simple or pretty. The simplest answer is
> > "don't do that".
>
> Hi Paul,
>
> Thanks for the answer, but I'm not sure what you've told me and why.
> Could you expand a little ?
>
> Don't do what ? Use WMMX instructions in GCC ?
> or
> Don't try to use the current implementation with WMMX ?

iwmmxt instructions require doubleword data alignment . Your target 
[apparently] can't provide that. You loose.

Paul

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

end of thread, other threads:[~2009-09-03 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-31 15:26 ARM wmmx instructions from gcc ? Danny Backx
2009-08-31 15:40 ` Dave Korn
2009-08-31 19:30   ` Danny Backx
2009-09-02 12:35     ` Paul Brook
2009-09-02 15:36       ` Danny Backx
2009-09-03 11:31         ` Paul Brook

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