apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1470349 - in /apr/apr/branches/1.5.x: ./ CHANGES atomic/unix/ia32.c test/testatomic.c
Date Sun, 21 Apr 2013 21:28:47 GMT
Author: sf
Date: Sun Apr 21 21:28:47 2013
New Revision: 1470349

URL: http://svn.apache.org/r1470349
Log:
Merge r1470348:

Fix amd64 assembler version of apr_atomic_xchgptr()

PR: 51851
Submitted by: Mattias Engdegård <mattiase acm org>

Modified:
    apr/apr/branches/1.5.x/   (props changed)
    apr/apr/branches/1.5.x/CHANGES
    apr/apr/branches/1.5.x/atomic/unix/ia32.c
    apr/apr/branches/1.5.x/test/testatomic.c

Propchange: apr/apr/branches/1.5.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1470348

Modified: apr/apr/branches/1.5.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/CHANGES?rev=1470349&r1=1470348&r2=1470349&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.5.x/CHANGES [utf-8] Sun Apr 21 21:28:47 2013
@@ -1,6 +1,9 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 1.5.0
 
+  *) Fix amd64 assembler version of apr_atomic_xchgptr(). PR 51851. [Mattias
+     Engdegård <mattiase acm org>]
+
   *) Fix PPC atomics to work with gcc 4.0. PR 54840. [Mattias Engdegård
      <mattiase acm org>]
 

Modified: apr/apr/branches/1.5.x/atomic/unix/ia32.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/atomic/unix/ia32.c?rev=1470349&r1=1470348&r2=1470349&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/atomic/unix/ia32.c (original)
+++ apr/apr/branches/1.5.x/atomic/unix/ia32.c Sun Apr 21 21:28:47 2013
@@ -117,7 +117,7 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo
 #elif APR_SIZEOF_VOIDP == 8
     asm volatile ("xchgq %q2, %1"
                   : "=a" (prev), "+m" (*mem)
-                  : "r" ((unsigned long)with));
+                  : "0" (with));
 #else
 #error APR_SIZEOF_VOIDP value not supported
 #endif

Modified: apr/apr/branches/1.5.x/test/testatomic.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.5.x/test/testatomic.c?rev=1470349&r1=1470348&r2=1470349&view=diff
==============================================================================
--- apr/apr/branches/1.5.x/test/testatomic.c (original)
+++ apr/apr/branches/1.5.x/test/testatomic.c Sun Apr 21 21:28:47 2013
@@ -84,11 +84,12 @@ static void test_xchg32(abts_case *tc, v
 static void test_xchgptr(abts_case *tc, void *data)
 {
     int a;
-    volatile void *target_ptr = NULL;
+    void *ref = "little piggy";
+    volatile void *target_ptr = ref;
     void *old_ptr;
 
     old_ptr = apr_atomic_xchgptr(&target_ptr, &a);
-    ABTS_PTR_EQUAL(tc, NULL, old_ptr);
+    ABTS_PTR_EQUAL(tc, ref, old_ptr);
     ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr);
 }
 



Mime
View raw message