Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Write hint 64 on linux
@ 1999-11-08  5:00 Peter Boyle
  1999-11-09  5:00 ` Andreas Krall
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Peter Boyle @ 1999-11-08  5:00 UTC (permalink / raw)




Hi there,

has anyone managed to get assembly source on a linux alpha that
contains wh64 (new to ev6) compiled on a linux box. I have
compaq fort/ccc but they seem to use gnu as to compile .s files,
which doesn't recognise the opcode.

This is a real shame since one piddly wee instruction
it makes an approx 130MB/s difference
on my simulation code (620->750) and a 100Mflop increase
in the performance on a ds10. 

Anyone got any ideas???


Cheers, 


Peter Boyle	pboyle@physics.gla.ac.uk






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

* Re: Write hint 64 on linux
  1999-11-08  5:00 Write hint 64 on linux Peter Boyle
@ 1999-11-09  5:00 ` Andreas Krall
  1999-11-09  5:00 ` Steven Hobbs
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Andreas Krall @ 1999-11-09  5:00 UTC (permalink / raw)


In article <Pine.GSO.3.95.991108212115.6710A-100000@holyrood.ed.ac.uk>,
	Peter Boyle <pboyle@holyrood.ed.ac.uk> writes:
> has anyone managed to get assembly source on a linux alpha that
> contains wh64 (new to ev6) compiled on a linux box. I have
> compaq fort/ccc but they seem to use gnu as to compile .s files,
> which doesn't recognise the opcode.
> 
> Anyone got any ideas???

The assembler understands all opcodes if encoded as constants:

here is an example how to code an "amask   1,v0", do the same with wh64.

	.long   0x47e03c20    /* amask   1,v0 */

-- 
andi@complang.tuwien.ac.at               Andreas Krall
http://www.complang.tuwien.ac.at/andi/   Inst. f. Computersprachen, TU Wien
tel: (+431) 58801/18511                  Argentinierstr. 8/4/1851
fax: (+431) 58801/18598                  A-1040 Wien     AUSTRIA     EUROPE



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

* Re: Write hint 64 on linux
  1999-11-08  5:00 Write hint 64 on linux Peter Boyle
  1999-11-09  5:00 ` Andreas Krall
@ 1999-11-09  5:00 ` Steven Hobbs
  1999-11-10  5:00 ` Robert Harley
  1999-11-10  5:00 ` Addy
  3 siblings, 0 replies; 6+ messages in thread
From: Steven Hobbs @ 1999-11-09  5:00 UTC (permalink / raw)



In article <Pine.GSO.3.95.991108212115.6710A-100000@holyrood.ed.ac.uk>,
Peter Boyle <pboyle@holyrood.ed.ac.uk> writes:

>has anyone managed to get assembly source on a linux alpha that
>contains wh64 (new to ev6) compiled on a linux box. I have
>compaq fort/ccc but they seem to use gnu as to compile .s files,
>which doesn't recognise the opcode.
>
>This is a real shame since one piddly wee instruction
>it makes an approx 130MB/s difference
>on my simulation code (620->750) and a 100Mflop increase
>in the performance on a ds10. 
>
>Anyone got any ideas???

Be careful when you locate a version of the assembler that accepts the
wh64 opcode.  The first implementations of wh64 in the GNU assembler
for Alpha did not properly encode the unused register fields for this
instruction.  An incorrectly encoded wh64 can hurt performance rather
than help it.

Normally a Compaq compiler will directly produce a .o object file
without using a .s assembly file as an intermediate.  Under these
normal conditions the wh64 instruction will be properly encoded.




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

* Re: Write hint 64 on linux
  1999-11-08  5:00 Write hint 64 on linux Peter Boyle
  1999-11-09  5:00 ` Andreas Krall
  1999-11-09  5:00 ` Steven Hobbs
@ 1999-11-10  5:00 ` Robert Harley
  1999-11-10  5:00 ` Addy
  3 siblings, 0 replies; 6+ messages in thread
From: Robert Harley @ 1999-11-10  5:00 UTC (permalink / raw)



Peter Boyle <pboyle@holyrood.ed.ac.uk> writes:
> has anyone managed to get assembly source on a linux alpha that
> contains wh64 (new to ev6) compiled on a linux box.

With GCC, you might be able to wing it like this:

  static void inline wh64(long *p) {
    register long *q asm ("$16") = p;
    asm volatile (".long 0x63F0F800" : : "r" (q));
  }


Bye,
  Rob.



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

* Re: Write hint 64 on linux
  1999-11-08  5:00 Write hint 64 on linux Peter Boyle
                   ` (2 preceding siblings ...)
  1999-11-10  5:00 ` Robert Harley
@ 1999-11-10  5:00 ` Addy
  1999-11-10  5:00   ` Thomas Dzubin
  3 siblings, 1 reply; 6+ messages in thread
From: Addy @ 1999-11-10  5:00 UTC (permalink / raw)


I've been using the 'ecb' instruction using inline assembler and
Compaq ccc;


#if defined(__DECC) || defined(__DECXX)

long asm(const char *, ...);
#pragma intrinsic( asm ) 

asm("ecb 0(%a0)", address);

#endif


Also, as a little warning ... last time I tried the '-arch ev6' option
with the Compaq C compiler (on Tru64 and Linux) it generated
incorrect code. What happened was in a loop which
cleared memory, the compiler inserted a write-hint 64 instruction, but
for an incorrect address. This caused 'random' 64-byte cache lines
of my data to be read as all zero!

This should have been reported to Compaq ... 

Addy.

 



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

* Re: Write hint 64 on linux
  1999-11-10  5:00 ` Addy
@ 1999-11-10  5:00   ` Thomas Dzubin
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Dzubin @ 1999-11-10  5:00 UTC (permalink / raw)


Thanks to Addy and Robert!  These posts have been the most useful
Usenet posts I've seen all week...

I am going to try out these suggestions ASAP!



In comp.sys.dec Addy <addy@tinofspamaddy.freeserve.co.uk> wrote:
> I've been using the 'ecb' instruction using inline assembler and
> Compaq ccc;


> #if defined(__DECC) || defined(__DECXX)

> long asm(const char *, ...);
> #pragma intrinsic( asm ) 

> asm("ecb 0(%a0)", address);

> #endif


> Also, as a little warning ... last time I tried the '-arch ev6' option
> with the Compaq C compiler (on Tru64 and Linux) it generated
> incorrect code. What happened was in a loop which
> cleared memory, the compiler inserted a write-hint 64 instruction, but
> for an incorrect address. This caused 'random' 64-byte cache lines
> of my data to be read as all zero!

> This should have been reported to Compaq ... 

> Addy.

>  

-- 
----------------------------------------------------------------------------
Thomas Dzubin, Network Analyst and PDP-11 tinkerer
Vancouver, Saskatoon, or Calgary CANADA



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

end of thread, other threads:[~1999-11-10  5:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-11-08  5:00 Write hint 64 on linux Peter Boyle
1999-11-09  5:00 ` Andreas Krall
1999-11-09  5:00 ` Steven Hobbs
1999-11-10  5:00 ` Robert Harley
1999-11-10  5:00 ` Addy
1999-11-10  5:00   ` Thomas Dzubin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox