Fix examples/tasksys.cpp to compile with 32-bit targets.

(Change a cmpxchgd to cmpxchl.)  Note that a number of the examples
still don't work with 32-bit compilation, why still TBD.
This commit is contained in:
Matt Pharr
2012-01-30 15:03:54 -08:00
parent e19f4931d1
commit 950f86200b

View File

@@ -273,7 +273,7 @@ lAtomicCompareAndSwapPointer(void **v, void *newValue, void *oldValue) {
#else #else
void *result; void *result;
#if (ISPC_POINTER_BYTES == 4) #if (ISPC_POINTER_BYTES == 4)
__asm__ __volatile__("lock\ncmpxchgd %2,%1" __asm__ __volatile__("lock\ncmpxchgl %2,%1"
: "=a"(result), "=m"(*v) : "=a"(result), "=m"(*v)
: "q"(newValue), "0"(oldValue) : "q"(newValue), "0"(oldValue)
: "memory"); : "memory");