On Wed, Jun 11, 2008 at 11:54:49PM +0200, Helge Deller wrote:
> Hello Sune,
...
> Attached are the basic pieces which should get it working with the 
> qt4-x11_4.4.0-3 source package. My machine is still compiling, but it seems 
> OK so far...
>
> First of all, I reused the "parisc" architecture code from the Trolls.
> hppa and parisc are the same architectures, so why introduce something new? 

I agree with this approach.

I also want to remind that Carlos once was inspired to document how
futexes would (have been?) be implemented in parisc:
    http://wiki.parisc-linux.org/FutexImplementation

Not sure it's useful here but might be worth reviewing once.

...
> And this part replaces the debian patch "70_hppa_ldcw_fix.diff".
> Maybe you could name this one "71_hppa_ldcw_fix.diff" and add it to the 
> to-be-applied patches list?
> Benefit of my version is, that the q_ldcw() assembler statement will be 
> inlined any will perform better than a call to an external funtion.
...
> diff -up ./src/corelib/arch/parisc/qatomic_parisc.cpp.org 
> ./src/corelib/arch/parisc/qatomic_parisc.cpp
> --- ./src/corelib/arch/parisc/qatomic_parisc.cpp.org  2008-06-10 
> 00:02:32.000000000 +0200
> +++ ./src/corelib/arch/parisc/qatomic_parisc.cpp      2008-06-10 
> 00:09:54.000000000 +0200
> @@ -72,7 +72,21 @@ static int *align16(int *lock)
>
>  extern "C" {
>
> +#if defined(Q_OS_LINUX)
> +    #if defined(__LP64__)
> +     #define __LDCW  "ldcw,co"
> +    #else
> +     #define __LDCW  "ldcw"
> +    #endif

Some historical discussion around ",co" completer:
    
http://lists.parisc-linux.org/pipermail/parisc-linux-cvs/2003-February/032223.html

ISTR ",co" wasn't actually useful since no parisc CPU was ever made with
weakly ordered memory.


> +    #define q_ldcw(addr) ({                                  \
> +     unsigned __ret;                                         \
> +     __asm__ __volatile__(__LDCW " 0(%1),%0"                 \
> +                             : "=r" (__ret) : "r" (addr));   \
> +     __ret;                                                  \

And I think you will also need "memory" added to the asm:
    
http://lists.parisc-linux.org/pipermail/parisc-linux/2004-September/049068.html

or at least the equivalent of mb()....and as that thread shows, I had trouble 
with
it then too.

Unlock side of things also seems relevant:
    
http://lists.parisc-linux.org/pipermail/parisc-linux-cvs/2004-August/034445.html

hth,
grant


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to