vcomp: Implement 32-bit atomic integer functions.
This commit is contained in:
parent
3009244d9c
commit
7bf779f377
|
@ -22,6 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "wine/port.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -221,6 +222,70 @@ static void vcomp_free_thread_data(void)
|
||||||
vcomp_set_thread_data(NULL);
|
vcomp_set_thread_data(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_add_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
interlocked_xchg_add(dest, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_and_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old & val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_div_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old / val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_div_ui4(unsigned int *dest, unsigned int val)
|
||||||
|
{
|
||||||
|
unsigned int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg((int *)dest, old / val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_mul_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old * val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_or_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old | val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_shl_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old << val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_shr_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old >> val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_shr_ui4(unsigned int *dest, unsigned int val)
|
||||||
|
{
|
||||||
|
unsigned int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg((int *)dest, old >> val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_sub_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
interlocked_xchg_add(dest, -val);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CDECL _vcomp_atomic_xor_i4(int *dest, int val)
|
||||||
|
{
|
||||||
|
int old;
|
||||||
|
do old = *dest; while (interlocked_cmpxchg(dest, old ^ val, old) != old);
|
||||||
|
}
|
||||||
|
|
||||||
int CDECL omp_get_dynamic(void)
|
int CDECL omp_get_dynamic(void)
|
||||||
{
|
{
|
||||||
TRACE("stub\n");
|
TRACE("stub\n");
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
@ stub _vcomp_atomic_add_i1
|
@ stub _vcomp_atomic_add_i1
|
||||||
@ stub _vcomp_atomic_add_i2
|
@ stub _vcomp_atomic_add_i2
|
||||||
@ stub _vcomp_atomic_add_i4
|
@ cdecl _vcomp_atomic_add_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_add_i8
|
@ stub _vcomp_atomic_add_i8
|
||||||
@ stub _vcomp_atomic_add_r4
|
@ stub _vcomp_atomic_add_r4
|
||||||
@ stub _vcomp_atomic_add_r8
|
@ stub _vcomp_atomic_add_r8
|
||||||
@ stub _vcomp_atomic_and_i1
|
@ stub _vcomp_atomic_and_i1
|
||||||
@ stub _vcomp_atomic_and_i2
|
@ stub _vcomp_atomic_and_i2
|
||||||
@ stub _vcomp_atomic_and_i4
|
@ cdecl _vcomp_atomic_and_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_and_i8
|
@ stub _vcomp_atomic_and_i8
|
||||||
@ stub _vcomp_atomic_div_i1
|
@ stub _vcomp_atomic_div_i1
|
||||||
@ stub _vcomp_atomic_div_i2
|
@ stub _vcomp_atomic_div_i2
|
||||||
@ stub _vcomp_atomic_div_i4
|
@ cdecl _vcomp_atomic_div_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_div_i8
|
@ stub _vcomp_atomic_div_i8
|
||||||
@ stub _vcomp_atomic_div_r4
|
@ stub _vcomp_atomic_div_r4
|
||||||
@ stub _vcomp_atomic_div_r8
|
@ stub _vcomp_atomic_div_r8
|
||||||
@ stub _vcomp_atomic_div_ui1
|
@ stub _vcomp_atomic_div_ui1
|
||||||
@ stub _vcomp_atomic_div_ui2
|
@ stub _vcomp_atomic_div_ui2
|
||||||
@ stub _vcomp_atomic_div_ui4
|
@ cdecl _vcomp_atomic_div_ui4(ptr long)
|
||||||
@ stub _vcomp_atomic_div_ui8
|
@ stub _vcomp_atomic_div_ui8
|
||||||
@ stub _vcomp_atomic_mul_i1
|
@ stub _vcomp_atomic_mul_i1
|
||||||
@ stub _vcomp_atomic_mul_i2
|
@ stub _vcomp_atomic_mul_i2
|
||||||
@ stub _vcomp_atomic_mul_i4
|
@ cdecl _vcomp_atomic_mul_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_mul_i8
|
@ stub _vcomp_atomic_mul_i8
|
||||||
@ stub _vcomp_atomic_mul_r4
|
@ stub _vcomp_atomic_mul_r4
|
||||||
@ stub _vcomp_atomic_mul_r8
|
@ stub _vcomp_atomic_mul_r8
|
||||||
@ stub _vcomp_atomic_or_i1
|
@ stub _vcomp_atomic_or_i1
|
||||||
@ stub _vcomp_atomic_or_i2
|
@ stub _vcomp_atomic_or_i2
|
||||||
@ stub _vcomp_atomic_or_i4
|
@ cdecl _vcomp_atomic_or_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_or_i8
|
@ stub _vcomp_atomic_or_i8
|
||||||
@ stub _vcomp_atomic_shl_i1
|
@ stub _vcomp_atomic_shl_i1
|
||||||
@ stub _vcomp_atomic_shl_i2
|
@ stub _vcomp_atomic_shl_i2
|
||||||
@ stub _vcomp_atomic_shl_i4
|
@ cdecl _vcomp_atomic_shl_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_shl_i8
|
@ stub _vcomp_atomic_shl_i8
|
||||||
@ stub _vcomp_atomic_shr_i1
|
@ stub _vcomp_atomic_shr_i1
|
||||||
@ stub _vcomp_atomic_shr_i2
|
@ stub _vcomp_atomic_shr_i2
|
||||||
@ stub _vcomp_atomic_shr_i4
|
@ cdecl _vcomp_atomic_shr_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_shr_i8
|
@ stub _vcomp_atomic_shr_i8
|
||||||
@ stub _vcomp_atomic_shr_ui1
|
@ stub _vcomp_atomic_shr_ui1
|
||||||
@ stub _vcomp_atomic_shr_ui2
|
@ stub _vcomp_atomic_shr_ui2
|
||||||
@ stub _vcomp_atomic_shr_ui4
|
@ cdecl _vcomp_atomic_shr_ui4(ptr long)
|
||||||
@ stub _vcomp_atomic_shr_ui8
|
@ stub _vcomp_atomic_shr_ui8
|
||||||
@ stub _vcomp_atomic_sub_i1
|
@ stub _vcomp_atomic_sub_i1
|
||||||
@ stub _vcomp_atomic_sub_i2
|
@ stub _vcomp_atomic_sub_i2
|
||||||
@ stub _vcomp_atomic_sub_i4
|
@ cdecl _vcomp_atomic_sub_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_sub_i8
|
@ stub _vcomp_atomic_sub_i8
|
||||||
@ stub _vcomp_atomic_sub_r4
|
@ stub _vcomp_atomic_sub_r4
|
||||||
@ stub _vcomp_atomic_sub_r8
|
@ stub _vcomp_atomic_sub_r8
|
||||||
@ stub _vcomp_atomic_xor_i1
|
@ stub _vcomp_atomic_xor_i1
|
||||||
@ stub _vcomp_atomic_xor_i2
|
@ stub _vcomp_atomic_xor_i2
|
||||||
@ stub _vcomp_atomic_xor_i4
|
@ cdecl _vcomp_atomic_xor_i4(ptr long)
|
||||||
@ stub _vcomp_atomic_xor_i8
|
@ stub _vcomp_atomic_xor_i8
|
||||||
@ cdecl _vcomp_barrier()
|
@ cdecl _vcomp_barrier()
|
||||||
@ stub _vcomp_copyprivate_broadcast
|
@ stub _vcomp_copyprivate_broadcast
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
@ stub _vcomp_atomic_add_i1
|
@ stub _vcomp_atomic_add_i1
|
||||||
@ stub _vcomp_atomic_add_i2
|
@ stub _vcomp_atomic_add_i2
|
||||||
@ stub _vcomp_atomic_add_i4
|
@ cdecl _vcomp_atomic_add_i4(ptr long) vcomp._vcomp_atomic_add_i4
|
||||||
@ stub _vcomp_atomic_add_i8
|
@ stub _vcomp_atomic_add_i8
|
||||||
@ stub _vcomp_atomic_add_r4
|
@ stub _vcomp_atomic_add_r4
|
||||||
@ stub _vcomp_atomic_add_r8
|
@ stub _vcomp_atomic_add_r8
|
||||||
@ stub _vcomp_atomic_and_i1
|
@ stub _vcomp_atomic_and_i1
|
||||||
@ stub _vcomp_atomic_and_i2
|
@ stub _vcomp_atomic_and_i2
|
||||||
@ stub _vcomp_atomic_and_i4
|
@ cdecl _vcomp_atomic_and_i4(ptr long) vcomp._vcomp_atomic_and_i4
|
||||||
@ stub _vcomp_atomic_and_i8
|
@ stub _vcomp_atomic_and_i8
|
||||||
@ stub _vcomp_atomic_div_i1
|
@ stub _vcomp_atomic_div_i1
|
||||||
@ stub _vcomp_atomic_div_i2
|
@ stub _vcomp_atomic_div_i2
|
||||||
@ stub _vcomp_atomic_div_i4
|
@ cdecl _vcomp_atomic_div_i4(ptr long) vcomp._vcomp_atomic_div_i4
|
||||||
@ stub _vcomp_atomic_div_i8
|
@ stub _vcomp_atomic_div_i8
|
||||||
@ stub _vcomp_atomic_div_r4
|
@ stub _vcomp_atomic_div_r4
|
||||||
@ stub _vcomp_atomic_div_r8
|
@ stub _vcomp_atomic_div_r8
|
||||||
@ stub _vcomp_atomic_div_ui1
|
@ stub _vcomp_atomic_div_ui1
|
||||||
@ stub _vcomp_atomic_div_ui2
|
@ stub _vcomp_atomic_div_ui2
|
||||||
@ stub _vcomp_atomic_div_ui4
|
@ cdecl _vcomp_atomic_div_ui4(ptr long) vcomp._vcomp_atomic_div_ui4
|
||||||
@ stub _vcomp_atomic_div_ui8
|
@ stub _vcomp_atomic_div_ui8
|
||||||
@ stub _vcomp_atomic_mul_i1
|
@ stub _vcomp_atomic_mul_i1
|
||||||
@ stub _vcomp_atomic_mul_i2
|
@ stub _vcomp_atomic_mul_i2
|
||||||
@ stub _vcomp_atomic_mul_i4
|
@ cdecl _vcomp_atomic_mul_i4(ptr long) vcomp._vcomp_atomic_mul_i4
|
||||||
@ stub _vcomp_atomic_mul_i8
|
@ stub _vcomp_atomic_mul_i8
|
||||||
@ stub _vcomp_atomic_mul_r4
|
@ stub _vcomp_atomic_mul_r4
|
||||||
@ stub _vcomp_atomic_mul_r8
|
@ stub _vcomp_atomic_mul_r8
|
||||||
@ stub _vcomp_atomic_or_i1
|
@ stub _vcomp_atomic_or_i1
|
||||||
@ stub _vcomp_atomic_or_i2
|
@ stub _vcomp_atomic_or_i2
|
||||||
@ stub _vcomp_atomic_or_i4
|
@ cdecl _vcomp_atomic_or_i4(ptr long) vcomp._vcomp_atomic_or_i4
|
||||||
@ stub _vcomp_atomic_or_i8
|
@ stub _vcomp_atomic_or_i8
|
||||||
@ stub _vcomp_atomic_shl_i1
|
@ stub _vcomp_atomic_shl_i1
|
||||||
@ stub _vcomp_atomic_shl_i2
|
@ stub _vcomp_atomic_shl_i2
|
||||||
@ stub _vcomp_atomic_shl_i4
|
@ cdecl _vcomp_atomic_shl_i4(ptr long) vcomp._vcomp_atomic_shl_i4
|
||||||
@ stub _vcomp_atomic_shl_i8
|
@ stub _vcomp_atomic_shl_i8
|
||||||
@ stub _vcomp_atomic_shr_i1
|
@ stub _vcomp_atomic_shr_i1
|
||||||
@ stub _vcomp_atomic_shr_i2
|
@ stub _vcomp_atomic_shr_i2
|
||||||
@ stub _vcomp_atomic_shr_i4
|
@ cdecl _vcomp_atomic_shr_i4(ptr long) vcomp._vcomp_atomic_shr_i4
|
||||||
@ stub _vcomp_atomic_shr_i8
|
@ stub _vcomp_atomic_shr_i8
|
||||||
@ stub _vcomp_atomic_shr_ui1
|
@ stub _vcomp_atomic_shr_ui1
|
||||||
@ stub _vcomp_atomic_shr_ui2
|
@ stub _vcomp_atomic_shr_ui2
|
||||||
@ stub _vcomp_atomic_shr_ui4
|
@ cdecl _vcomp_atomic_shr_ui4(ptr long) vcomp._vcomp_atomic_shr_ui4
|
||||||
@ stub _vcomp_atomic_shr_ui8
|
@ stub _vcomp_atomic_shr_ui8
|
||||||
@ stub _vcomp_atomic_sub_i1
|
@ stub _vcomp_atomic_sub_i1
|
||||||
@ stub _vcomp_atomic_sub_i2
|
@ stub _vcomp_atomic_sub_i2
|
||||||
@ stub _vcomp_atomic_sub_i4
|
@ cdecl _vcomp_atomic_sub_i4(ptr long) vcomp._vcomp_atomic_sub_i4
|
||||||
@ stub _vcomp_atomic_sub_i8
|
@ stub _vcomp_atomic_sub_i8
|
||||||
@ stub _vcomp_atomic_sub_r4
|
@ stub _vcomp_atomic_sub_r4
|
||||||
@ stub _vcomp_atomic_sub_r8
|
@ stub _vcomp_atomic_sub_r8
|
||||||
@ stub _vcomp_atomic_xor_i1
|
@ stub _vcomp_atomic_xor_i1
|
||||||
@ stub _vcomp_atomic_xor_i2
|
@ stub _vcomp_atomic_xor_i2
|
||||||
@ stub _vcomp_atomic_xor_i4
|
@ cdecl _vcomp_atomic_xor_i4(ptr long) vcomp._vcomp_atomic_xor_i4
|
||||||
@ stub _vcomp_atomic_xor_i8
|
@ stub _vcomp_atomic_xor_i8
|
||||||
@ cdecl _vcomp_barrier() vcomp._vcomp_barrier
|
@ cdecl _vcomp_barrier() vcomp._vcomp_barrier
|
||||||
@ stub _vcomp_copyprivate_broadcast
|
@ stub _vcomp_copyprivate_broadcast
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
@ stub _vcomp_atomic_add_i1
|
@ stub _vcomp_atomic_add_i1
|
||||||
@ stub _vcomp_atomic_add_i2
|
@ stub _vcomp_atomic_add_i2
|
||||||
@ stub _vcomp_atomic_add_i4
|
@ cdecl _vcomp_atomic_add_i4(ptr long) vcomp._vcomp_atomic_add_i4
|
||||||
@ stub _vcomp_atomic_add_i8
|
@ stub _vcomp_atomic_add_i8
|
||||||
@ stub _vcomp_atomic_add_r4
|
@ stub _vcomp_atomic_add_r4
|
||||||
@ stub _vcomp_atomic_add_r8
|
@ stub _vcomp_atomic_add_r8
|
||||||
@ stub _vcomp_atomic_and_i1
|
@ stub _vcomp_atomic_and_i1
|
||||||
@ stub _vcomp_atomic_and_i2
|
@ stub _vcomp_atomic_and_i2
|
||||||
@ stub _vcomp_atomic_and_i4
|
@ cdecl _vcomp_atomic_and_i4(ptr long) vcomp._vcomp_atomic_and_i4
|
||||||
@ stub _vcomp_atomic_and_i8
|
@ stub _vcomp_atomic_and_i8
|
||||||
@ stub _vcomp_atomic_div_i1
|
@ stub _vcomp_atomic_div_i1
|
||||||
@ stub _vcomp_atomic_div_i2
|
@ stub _vcomp_atomic_div_i2
|
||||||
@ stub _vcomp_atomic_div_i4
|
@ cdecl _vcomp_atomic_div_i4(ptr long) vcomp._vcomp_atomic_div_i4
|
||||||
@ stub _vcomp_atomic_div_i8
|
@ stub _vcomp_atomic_div_i8
|
||||||
@ stub _vcomp_atomic_div_r4
|
@ stub _vcomp_atomic_div_r4
|
||||||
@ stub _vcomp_atomic_div_r8
|
@ stub _vcomp_atomic_div_r8
|
||||||
@ stub _vcomp_atomic_div_ui1
|
@ stub _vcomp_atomic_div_ui1
|
||||||
@ stub _vcomp_atomic_div_ui2
|
@ stub _vcomp_atomic_div_ui2
|
||||||
@ stub _vcomp_atomic_div_ui4
|
@ cdecl _vcomp_atomic_div_ui4(ptr long) vcomp._vcomp_atomic_div_ui4
|
||||||
@ stub _vcomp_atomic_div_ui8
|
@ stub _vcomp_atomic_div_ui8
|
||||||
@ stub _vcomp_atomic_mul_i1
|
@ stub _vcomp_atomic_mul_i1
|
||||||
@ stub _vcomp_atomic_mul_i2
|
@ stub _vcomp_atomic_mul_i2
|
||||||
@ stub _vcomp_atomic_mul_i4
|
@ cdecl _vcomp_atomic_mul_i4(ptr long) vcomp._vcomp_atomic_mul_i4
|
||||||
@ stub _vcomp_atomic_mul_i8
|
@ stub _vcomp_atomic_mul_i8
|
||||||
@ stub _vcomp_atomic_mul_r4
|
@ stub _vcomp_atomic_mul_r4
|
||||||
@ stub _vcomp_atomic_mul_r8
|
@ stub _vcomp_atomic_mul_r8
|
||||||
@ stub _vcomp_atomic_or_i1
|
@ stub _vcomp_atomic_or_i1
|
||||||
@ stub _vcomp_atomic_or_i2
|
@ stub _vcomp_atomic_or_i2
|
||||||
@ stub _vcomp_atomic_or_i4
|
@ cdecl _vcomp_atomic_or_i4(ptr long) vcomp._vcomp_atomic_or_i4
|
||||||
@ stub _vcomp_atomic_or_i8
|
@ stub _vcomp_atomic_or_i8
|
||||||
@ stub _vcomp_atomic_shl_i1
|
@ stub _vcomp_atomic_shl_i1
|
||||||
@ stub _vcomp_atomic_shl_i2
|
@ stub _vcomp_atomic_shl_i2
|
||||||
@ stub _vcomp_atomic_shl_i4
|
@ cdecl _vcomp_atomic_shl_i4(ptr long) vcomp._vcomp_atomic_shl_i4
|
||||||
@ stub _vcomp_atomic_shl_i8
|
@ stub _vcomp_atomic_shl_i8
|
||||||
@ stub _vcomp_atomic_shr_i1
|
@ stub _vcomp_atomic_shr_i1
|
||||||
@ stub _vcomp_atomic_shr_i2
|
@ stub _vcomp_atomic_shr_i2
|
||||||
@ stub _vcomp_atomic_shr_i4
|
@ cdecl _vcomp_atomic_shr_i4(ptr long) vcomp._vcomp_atomic_shr_i4
|
||||||
@ stub _vcomp_atomic_shr_i8
|
@ stub _vcomp_atomic_shr_i8
|
||||||
@ stub _vcomp_atomic_shr_ui1
|
@ stub _vcomp_atomic_shr_ui1
|
||||||
@ stub _vcomp_atomic_shr_ui2
|
@ stub _vcomp_atomic_shr_ui2
|
||||||
@ stub _vcomp_atomic_shr_ui4
|
@ cdecl _vcomp_atomic_shr_ui4(ptr long) vcomp._vcomp_atomic_shr_ui4
|
||||||
@ stub _vcomp_atomic_shr_ui8
|
@ stub _vcomp_atomic_shr_ui8
|
||||||
@ stub _vcomp_atomic_sub_i1
|
@ stub _vcomp_atomic_sub_i1
|
||||||
@ stub _vcomp_atomic_sub_i2
|
@ stub _vcomp_atomic_sub_i2
|
||||||
@ stub _vcomp_atomic_sub_i4
|
@ cdecl _vcomp_atomic_sub_i4(ptr long) vcomp._vcomp_atomic_sub_i4
|
||||||
@ stub _vcomp_atomic_sub_i8
|
@ stub _vcomp_atomic_sub_i8
|
||||||
@ stub _vcomp_atomic_sub_r4
|
@ stub _vcomp_atomic_sub_r4
|
||||||
@ stub _vcomp_atomic_sub_r8
|
@ stub _vcomp_atomic_sub_r8
|
||||||
@ stub _vcomp_atomic_xor_i1
|
@ stub _vcomp_atomic_xor_i1
|
||||||
@ stub _vcomp_atomic_xor_i2
|
@ stub _vcomp_atomic_xor_i2
|
||||||
@ stub _vcomp_atomic_xor_i4
|
@ cdecl _vcomp_atomic_xor_i4(ptr long) vcomp._vcomp_atomic_xor_i4
|
||||||
@ stub _vcomp_atomic_xor_i8
|
@ stub _vcomp_atomic_xor_i8
|
||||||
@ cdecl _vcomp_barrier() vcomp._vcomp_barrier
|
@ cdecl _vcomp_barrier() vcomp._vcomp_barrier
|
||||||
@ stub _vcomp_copyprivate_broadcast
|
@ stub _vcomp_copyprivate_broadcast
|
||||||
|
|
Loading…
Reference in New Issue