diff -uNr qt-everywhere-opensource-src-4.7.2.orig//src/corelib/arch/parisc/arch.pri qt-everywhere-opensource-src-4.7.2/src/corelib/arch/parisc/arch.pri --- qt-everywhere-opensource-src-4.7.2.orig//src/corelib/arch/parisc/arch.pri 2011-02-22 12:04:00.000000000 +0000 +++ qt-everywhere-opensource-src-4.7.2/src/corelib/arch/parisc/arch.pri 2011-10-20 20:13:05.000000000 +0000 @@ -1,5 +1,4 @@ # # HP PA-RISC architecture # -SOURCES += $$QT_ARCH_CPP/q_ldcw.s \ - $$QT_ARCH_CPP/qatomic_parisc.cpp +SOURCES += $$QT_ARCH_CPP/qatomic_parisc.cpp diff -uNr qt-everywhere-opensource-src-4.7.2.orig//src/corelib/arch/parisc/q_ldcw.s qt-everywhere-opensource-src-4.7.2/src/corelib/arch/parisc/q_ldcw.s --- qt-everywhere-opensource-src-4.7.2.orig//src/corelib/arch/parisc/q_ldcw.s 2011-02-22 12:04:00.000000000 +0000 +++ qt-everywhere-opensource-src-4.7.2/src/corelib/arch/parisc/q_ldcw.s 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -;/**************************************************************************** -;** -;** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -;** All rights reserved. -;** Contact: Nokia Corporation (qt-info@nokia.com) -;** -;** This file is part of the QtGui module of the Qt Toolkit. -;** -;** $QT_BEGIN_LICENSE:LGPL$ -;** Commercial Usage -;** Licensees holding valid Qt Commercial licenses may use this file in -;** accordance with the Qt Commercial License Agreement provided with the -;** Software or, alternatively, in accordance with the terms contained in -;** a written agreement between you and Nokia. -;** -;** GNU Lesser General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU Lesser -;** General Public License version 2.1 as published by the Free Software -;** Foundation and appearing in the file LICENSE.LGPL included in the -;** packaging of this file. Please review the following information to -;** ensure the GNU Lesser General Public License version 2.1 requirements -;** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -;** -;** In addition, as a special exception, Nokia gives you certain additional -;** rights. These rights are described in the Nokia Qt LGPL Exception -;** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -;** -;** GNU General Public License Usage -;** Alternatively, this file may be used under the terms of the GNU -;** General Public License version 3.0 as published by the Free Software -;** Foundation and appearing in the file LICENSE.GPL included in the -;** packaging of this file. Please review the following information to -;** ensure the GNU General Public License version 3.0 requirements will be -;** met: http://www.gnu.org/copyleft/gpl.html. -;** -;** If you have questions regarding the use of this file, please contact -;** Nokia at qt-info@nokia.com. -;** $QT_END_LICENSE$ -;** -;****************************************************************************/ - .SPACE $PRIVATE$ - .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 - .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 - .SPACE $TEXT$ - .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 - .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY - .IMPORT $global$,DATA - .IMPORT $$dyncall,MILLICODE - .SPACE $TEXT$ - .SUBSPA $CODE$ - - .align 4 - .EXPORT q_ldcw,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR -q_ldcw - .PROC - .CALLINFO FRAME=0,CALLS,SAVE_RP - .ENTRY - ldcw 0(%r26),%r1 - bv %r0(%r2) - copy %r1,%r28 - .EXIT - .PROCEND diff -uNr qt-everywhere-opensource-src-4.7.2.orig//src/corelib/arch/parisc/qatomic_parisc.cpp qt-everywhere-opensource-src-4.7.2/src/corelib/arch/parisc/qatomic_parisc.cpp --- qt-everywhere-opensource-src-4.7.2.orig//src/corelib/arch/parisc/qatomic_parisc.cpp 2011-02-22 12:04:00.000000000 +0000 +++ qt-everywhere-opensource-src-4.7.2/src/corelib/arch/parisc/qatomic_parisc.cpp 2011-10-20 20:27:59.000000000 +0000 @@ -68,9 +68,19 @@ return off ? (int *)(ulong(lock) + 16 - off) : lock; } -extern "C" { +static int q_ldcw(volatile int *addr) { + + register int val; + asm volatile ( + " ldcwx 0(0,%2),%0 \n" +: "=r"(val), "+m"(*addr) +: "r"(addr) +: "memory"); + return (val == 0); + +} - int q_ldcw(volatile int *addr); +extern "C" { void q_atomic_lock(int *lock) {