[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-alpha
Subject:    Re: wh64 (slow)
From:       Andrea Arcangeli <andrea () suse ! de>
Date:       2000-02-28 14:26:14
[Download RAW message or body]

On Mon, 28 Feb 2000, Richard Henderson wrote:

>  { "wh64",             MFC(0x18,0xF800), BASE, { ZA, PRB } },  /* ev56 una */


I would assemble the opcode myself with .byte 0xxx if the opcodes wouldn't
had to change in function of the register used as parameter. Binding a
variable to a register wouldn't been a big deal but I preferred to allow
the compiler to choose the best.

There's a missing "ZA," in my sources:

  { "wh64",		MFC(0x18,0xF800), BASE, { PRB } },	/* ev56 una */

these are the generated opcodes by my current gas:

   1200005f8:   00 f8 01 60     wh64    (t0)

00 f8 is certainly right. The opcode (first 6byte of the quad word) is ok
too. Rb is ok too.

Ra is set to zero. Shouldn't it be set to 31 to indicate it's unused? I'll
hack it to 31 by hand, now it's so:

   1200005f8:   00 f8 e1 63     wh64    (t0)

Hmm it seems to run faster now:

original 7602735, wh64 7605827 diff -3092, other 7543752 diff 58983

Not faster than the original though.

Now I did the change you pointed out to gas and now the binary gets
compiled as I hacked it 8))

   1200005f8:   00 f8 e1 63     wh64    (t0)

So yes Ra has definitely to be set to 31 not to zero ;).

But the numbers keep to be lower than before (another run):

original 7664299, wh64 7666746 diff -2447, other 7616947 diff 47352

Maybe we should run the wh64 some cycles before start writing to memory?

Note that my assembly version of clear_page runs faster than the original
one though.

This is the patch for binutils that fixes the bug:

--- binutils-2.9.1.0.25/opcodes/alpha-opc.c.~1~	Wed Mar  4 16:31:48 1998
+++ binutils-2.9.1.0.25/opcodes/alpha-opc.c	Mon Feb 28 15:20:26 2000
@@ -1012,7 +1012,7 @@
   { "rc",		MFC(0x18,0xE000), BASE, { RA } },
   { "ecb",		MFC(0x18,0xE800), BASE, { PRB } },	/* ev56 una */
   { "rs",		MFC(0x18,0xF000), BASE, { RA } },
-  { "wh64",		MFC(0x18,0xF800), BASE, { PRB } },	/* ev56 una */
+  { "wh64",		MFC(0x18,0xF800), BASE, { ZA, PRB } },	/* ev56 una */
 
   { "hw_mfpr",		OPR(0x19,0x00), EV4, { RA, RBA, EV4EXTHWINDEX } },
   { "hw_mfpr",		OP(0x19), OP_MASK, EV5, { RA, RBA, EV5HWINDEX } },

Andrea

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic