|
From: Stephen W. <st...@ic...> - 2008-04-23 00:31:39
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Cary R. wrote: | --- On Tue, 4/22/08, Stephen Williams <st...@ic...> wrote: | | |> We need to look more carefully at the of_ADDI instruction. |> The |> most likely problem is the vector_to_array() call returning |> a |> wrong value. | | A very good guess! It's actually in vvp_vector4_t::subarray() in vvp_net.cc. In this case we are getting 32 bits at address 32, so on a 32 bit machine we are word aligned. The problem is that the atmp and btmp masking is failing. before the masking we have the correct value after it we have zero. This is caused by the fact that you cannot shift a 32 bit value by 32 bits. The same thing could also happen with 64 bit values. The 100 was a red hearing since it broke the word alignment. | | I will let you decide how you want to fix this. As I remember I fixed something like this in the exact same routine not too long ago. Of course that was before you rewrote it to work with the new layout ;-) Tell me what the attached program does for you on your machine. When I compile it for 64bit (cc foo.c) and 32bits (cc -m32 foo.c) I get the correct answer. And of course, on PPC32 I get the correct results. I expect (1<<32) to be 0 on a 32bit machine. Still, I'm fixing it here. Try pulling from git. - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFIDoNxrPt1Sc2b3ikRAvrqAJ9o+E9LANsuubWO2Y4rAofm3ovSCQCgl4Es MMQ8ASQhb0m0NPOnotmpK0k= =3dVZ -----END PGP SIGNATURE----- |