changeset 613:19cbc612380a

Add bool-special cases in tango.core.Atomic.
author Christian Kamm <kamm incasoftware de>
date Sun, 21 Sep 2008 17:23:17 +0200
parents d97b017a8aef
children 452e6e2618bf
files runtime/llvmdc.diff
diffstat 1 files changed, 26 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/llvmdc.diff	Sun Sep 21 17:18:35 2008 +0200
+++ b/runtime/llvmdc.diff	Sun Sep 21 17:23:17 2008 +0200
@@ -1,6 +1,6 @@
 Index: object.di
 ===================================================================
---- object.di	(revision 3936)
+--- object.di	(revision 3939)
 +++ object.di	(working copy)
 @@ -150,6 +150,9 @@
      void function() dtor;
@@ -14,7 +14,7 @@
  
 Index: lib/unittest.sh
 ===================================================================
---- lib/unittest.sh	(revision 3936)
+--- lib/unittest.sh	(revision 3939)
 +++ lib/unittest.sh	(working copy)
 @@ -18,8 +18,9 @@
    --help: This message
@@ -71,7 +71,7 @@
 +fi
 Index: lib/common/tango/core/BitManip.d
 ===================================================================
---- lib/common/tango/core/BitManip.d	(revision 3936)
+--- lib/common/tango/core/BitManip.d	(revision 3939)
 +++ lib/common/tango/core/BitManip.d	(working copy)
 @@ -171,6 +171,10 @@
       */
@@ -86,7 +86,7 @@
      public import std.intrinsic;
 Index: lib/common/tango/core/Thread.d
 ===================================================================
---- lib/common/tango/core/Thread.d	(revision 3936)
+--- lib/common/tango/core/Thread.d	(revision 3939)
 +++ lib/common/tango/core/Thread.d	(working copy)
 @@ -244,8 +244,29 @@
          }
@@ -135,7 +135,7 @@
                      popad;
 Index: lib/gc/basic/gcx.d
 ===================================================================
---- lib/gc/basic/gcx.d	(revision 3936)
+--- lib/gc/basic/gcx.d	(revision 3939)
 +++ lib/gc/basic/gcx.d	(working copy)
 @@ -2178,6 +2178,28 @@
              __builtin_unwind_init();
@@ -179,7 +179,7 @@
          asm
 Index: lib/gc/basic/gcbits.d
 ===================================================================
---- lib/gc/basic/gcbits.d	(revision 3936)
+--- lib/gc/basic/gcbits.d	(revision 3939)
 +++ lib/gc/basic/gcbits.d	(working copy)
 @@ -39,6 +39,10 @@
  {
@@ -194,7 +194,7 @@
      version = Asm86;
 Index: tango/text/convert/Layout.d
 ===================================================================
---- tango/text/convert/Layout.d	(revision 3936)
+--- tango/text/convert/Layout.d	(revision 3939)
 +++ tango/text/convert/Layout.d	(working copy)
 @@ -47,6 +47,12 @@
          alias void* Arg;
@@ -231,7 +231,7 @@
                          long[64] longargs = void;
 Index: tango/core/Vararg.d
 ===================================================================
---- tango/core/Vararg.d	(revision 3936)
+--- tango/core/Vararg.d	(revision 3939)
 +++ tango/core/Vararg.d	(working copy)
 @@ -15,6 +15,10 @@
  {
@@ -246,9 +246,9 @@
      /**
 Index: tango/core/Atomic.d
 ===================================================================
---- tango/core/Atomic.d	(revision 3936)
+--- tango/core/Atomic.d	(revision 3939)
 +++ tango/core/Atomic.d	(working copy)
-@@ -270,6 +270,161 @@
+@@ -270,6 +270,173 @@
  
  
  ////////////////////////////////////////////////////////////////////////////////
@@ -280,6 +280,10 @@
 +            {
 +                return cast(T)llvm_atomic_load_add!(size_t)(cast(size_t*)&val, 0);
 +            }
++            else static if (is(T == bool))
++            {
++                return llvm_atomic_load_add!(ubyte)(cast(ubyte*)&val, cast(ubyte)0) ? 1 : 0;
++            }
 +            else
 +            {
 +                return llvm_atomic_load_add!(T)(&val, cast(T)0);
@@ -371,6 +375,10 @@
 +            {
 +                return cast(T)llvm_atomic_load_add!(size_t)(cast(size_t*)&val, 1);
 +            }
++	    else static if (is(T == bool))
++	    {
++                return llvm_atomic_load_add!(ubyte)(cast(ubyte*)&val, 1)?1:0;
++	    }
 +            else
 +            {
 +                return llvm_atomic_load_add!(T)(&val, cast(T)1);
@@ -398,6 +406,10 @@
 +            {
 +                return cast(T)llvm_atomic_load_sub!(size_t)(cast(size_t*)&val, 1);
 +            }
++	    else static if (is(T == bool))
++	    {
++                return llvm_atomic_load_sub!(ubyte)(cast(ubyte*)&val, 1)?1:0;
++	    }
 +            else
 +            {
 +                return llvm_atomic_load_sub!(T)(&val, cast(T)1);
@@ -412,7 +424,7 @@
  
 Index: tango/math/Math.d
 ===================================================================
---- tango/math/Math.d	(revision 3936)
+--- tango/math/Math.d	(revision 3939)
 +++ tango/math/Math.d	(working copy)
 @@ -76,6 +76,14 @@
          version = DigitalMars_D_InlineAsm_X86;
@@ -561,7 +573,7 @@
  debug(UnitTest) {
 Index: tango/math/internal/BignumX86.d
 ===================================================================
---- tango/math/internal/BignumX86.d	(revision 3936)
+--- tango/math/internal/BignumX86.d	(revision 3939)
 +++ tango/math/internal/BignumX86.d	(working copy)
 @@ -49,6 +49,8 @@
  private:
@@ -574,7 +586,7 @@
   *
 Index: tango/stdc/stdlib.d
 ===================================================================
---- tango/stdc/stdlib.d	(revision 3936)
+--- tango/stdc/stdlib.d	(revision 3939)
 +++ tango/stdc/stdlib.d	(working copy)
 @@ -94,6 +94,11 @@
  {
@@ -590,7 +602,7 @@
      private import gcc.builtins;
 Index: tango/stdc/stdarg.d
 ===================================================================
---- tango/stdc/stdarg.d	(revision 3936)
+--- tango/stdc/stdarg.d	(revision 3939)
 +++ tango/stdc/stdarg.d	(working copy)
 @@ -13,6 +13,10 @@
  {