Re: in ccio_io_pdir_entry(),BUG_ON() seems to break gcc-4.2 optimization?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Grant,

Grant Grundler wrote:
On Sat, Jun 28, 2008 at 10:26:25PM +0000, Joel Soete wrote:
...
What's wrong with "ci" variable? It's just another register.
well the idea is that "ci" variable is just there as a tmp variable just used in this asm code, right. so why not simply get rid of its declaration (btw save a line of code ;-)) and just use a common temporay reg as r19?

No - don't do that. Let the compiler do the work of allocating registers.
It's really good at it. :)  Much better than you and I combined. :)

You and gcc already prove it to me ;-)

All we need to do is tell the compiler we need a register.

Ok

Taken also into account of David remarks, here is the latest stuff tested with success:

        __asm__ __volatile__ (
        "lci    %%r0(%%sr1, %2), %0\n"
        "\textru        %0,19,12,%0\n"
        "\tdepw         %0,15,12,%1\n"
        : "=r" (ci), "=r" (pa)
        : "r" (vba)
        );

Tx to all for kind comments, they learn me a lot ;-)

J.

cheers,
grant
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux