Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

as problem

1 view
Skip to first unread message

Christopher C. Chimelis

unread,
Jan 18, 2002, 9:11:05 PM1/18/02
to

On 19 Jan 2002, Falk Hueffner wrote:

> I would like to compile some stuff containing inline assembler like:
>
> void foo() {
> long x;
> asm("unpkbw %1, %0" : "=r"(x) : "r"(123456));
> }
>
> This works if I pass -Wa,-mpca56. But it will *not* work if I also use
> -mcpu=ev56 for gcc, since gcc then emits .arch ev56 into the .s, and
> as complains ev56 can't handle unpkbw. What should I do? Convince gcc
> not to emit .arch? Convince as to prefer the command line option? Some
> other suggestions?

Basically, you can't use any of those MVI extensions on any processor that
doesn't support it (>= PCA56, IIRC). That code should probably have a
conditional around it that depends on an amask check of the processor's
support for MVI.

C


--
To UNSUBSCRIBE, email to debian-alp...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Falk Hueffner

unread,
Jan 18, 2002, 10:08:51 PM1/18/02
to
"Christopher C. Chimelis" <ch...@debian.org> writes:

> On 19 Jan 2002, Falk Hueffner wrote:
>
> > I would like to compile some stuff containing inline assembler like:
> >
> > void foo() {
> > long x;
> > asm("unpkbw %1, %0" : "=r"(x) : "r"(123456));
> > }
> >
> > This works if I pass -Wa,-mpca56. But it will *not* work if I also use
> > -mcpu=ev56 for gcc, since gcc then emits .arch ev56 into the .s, and
> > as complains ev56 can't handle unpkbw. What should I do? Convince gcc
> > not to emit .arch? Convince as to prefer the command line option? Some
> > other suggestions?
>
> Basically, you can't use any of those MVI extensions on any processor that
> doesn't support it (>= PCA56, IIRC). That code should probably have a
> conditional around it that depends on an amask check of the processor's
> support for MVI.

Yes, I know, and it is protected by amask. I just want it to
compile/assemble, but the assembler refuses to do so if it finds .arch
ev56.

Falk

Christopher C. Chimelis

unread,
Jan 18, 2002, 11:08:31 PM1/18/02
to

On 19 Jan 2002, Falk Hueffner wrote:

> > > This works if I pass -Wa,-mpca56. But it will *not* work if I also use
> > > -mcpu=ev56 for gcc, since gcc then emits .arch ev56 into the .s, and
> > > as complains ev56 can't handle unpkbw. What should I do? Convince gcc
> > > not to emit .arch? Convince as to prefer the command line option? Some
> > > other suggestions?
> >
> > Basically, you can't use any of those MVI extensions on any processor that
> > doesn't support it (>= PCA56, IIRC). That code should probably have a
> > conditional around it that depends on an amask check of the processor's
> > support for MVI.
>
> Yes, I know, and it is protected by amask. I just want it to
> compile/assemble, but the assembler refuses to do so if it finds .arch
> ev56.

So you want ev56 scheduling with pca56 instruction support to get this to
assemble? IIRC, the scheduling code between the two processors doesn't
differ...only it's instruction support. '-mcpu=pca56 -mno-bwx' may
allow it to compile and assemble while disabling generation of code to use
the BWX instruction sets (which aren't present on ev56, but are on pca56).

C

Stefan Schroepfer

unread,
Jan 19, 2002, 3:23:05 AM1/19/02
to
Christopher C. Chimelis wrote:

>
> So you want ev56 scheduling with pca56 instruction support to get this to
> assemble? IIRC, the scheduling code between the two processors doesn't
> differ...only it's instruction support. '-mcpu=pca56 -mno-bwx' may
> allow it to compile and assemble while disabling generation of code to use
> the BWX instruction sets (which aren't present on ev56, but are on pca56).


Minor correction: ev56 does have the BWX extension, that's
what makes it different from ev5 (besides a structure shrink,
IIRC). So the table of instruction set extensions inside the
21164 family should read:

BWX MVI
ev5 - -
ev56 X -
pca56 X X

Regards,
Stefan Schroepfer

Falk Hueffner

unread,
Jan 19, 2002, 11:22:39 AM1/19/02
to
"Christopher C. Chimelis" <ch...@debian.org> writes:

> So you want ev56 scheduling with pca56 instruction support to get
> this to assemble? IIRC, the scheduling code between the two
> processors doesn't differ...only it's instruction support.
> '-mcpu=pca56 -mno-bwx' may allow it to compile and assemble while
> disabling generation of code to use the BWX instruction sets (which
> aren't present on ev56, but are on pca56).

Actually, the -mcpu=ev56 is from a small autodetection script and
could also be anything else, though the problem only occurs with
ev56. I'll try to handle it specially and replace it with -mcpu=pca56
-mno-mvi.

Falk

Donsbach, Jeff

unread,
Jan 21, 2002, 11:50:07 AM1/21/02
to

Sorry, EV56 does support BWX. EV5 does not. But you are correct in that
it does not support the MVI extensions.

There could also be some scheduling differences to account for the
larger L1 instruction cache in the PCA56 (16K-I,8K-D in PCA56, as
oppossed to 8K-I, 8K-D in EV56 and EV5). I am not familiar enough with
GCC to know if that is indeed true or not.

Jeff D


-----Original Message-----
From: Christopher C. Chimelis [mailto:ch...@debian.org]
Sent: Friday, January 18, 2002 11:08 PM
To: Falk Hueffner
Cc: debian...@lists.debian.org
Subject: Re: as problem

So you want ev56 scheduling with pca56 instruction support to get this
to
assemble? IIRC, the scheduling code between the two processors doesn't
differ...only it's instruction support. '-mcpu=pca56 -mno-bwx' may
allow it to compile and assemble while disabling generation of code to
use
the BWX instruction sets (which aren't present on ev56, but are on
pca56).

C

0 new messages