consistent with the names of the other client requests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1534
/* Sidestep the normal check which disallows using valgrind.h directly. */
#define __VALGRIND_SOMESKIN_H
-#include "valgrind.h" /* for VG_NON_SIMD_tstCALL[12] */
+#include "valgrind.h" /* for VALGRIND_NON_SIMD_tstCALL[12] */
/*------------------------------------------------------------*/
/*--- Command line options ---*/
MAYBE_SLOPPIFY(n);
if (VG_(is_running_on_simd_CPU)()) {
- v = (void*)VG_NON_SIMD_tstCALL1( SK_(malloc), n );
+ v = (void*)VALGRIND_NON_SIMD_tstCALL1( SK_(malloc), n );
} else if (VG_(clo_alignment) != 4) {
v = VG_(arena_malloc_aligned)(VG_AR_CLIENT, VG_(clo_alignment), n);
} else {
MAYBE_SLOPPIFY(n);
if (VG_(is_running_on_simd_CPU)()) {
- v = (void*)VG_NON_SIMD_tstCALL1( SK_(__builtin_new), n );
+ v = (void*)VALGRIND_NON_SIMD_tstCALL1( SK_(__builtin_new), n );
} else if (VG_(clo_alignment) != 4) {
v = VG_(arena_malloc_aligned)(VG_AR_CLIENT, VG_(clo_alignment), n);
} else {
MAYBE_SLOPPIFY(n);
if (VG_(is_running_on_simd_CPU)()) {
- v = (void*)VG_NON_SIMD_tstCALL1( SK_(__builtin_vec_new), n );
+ v = (void*)VALGRIND_NON_SIMD_tstCALL1( SK_(__builtin_vec_new), n );
} else if (VG_(clo_alignment) != 4) {
v = VG_(arena_malloc_aligned)(VG_AR_CLIENT, VG_(clo_alignment), n);
} else {
if (p == NULL)
return;
if (VG_(is_running_on_simd_CPU)()) {
- (void)VG_NON_SIMD_tstCALL1( SK_(free), p );
+ (void)VALGRIND_NON_SIMD_tstCALL1( SK_(free), p );
} else {
VG_(arena_free)(VG_AR_CLIENT, p);
}
if (p == NULL)
return;
if (VG_(is_running_on_simd_CPU)()) {
- (void)VG_NON_SIMD_tstCALL1( SK_(__builtin_delete), p );
+ (void)VALGRIND_NON_SIMD_tstCALL1( SK_(__builtin_delete), p );
} else {
VG_(arena_free)(VG_AR_CLIENT, p);
}
if (p == NULL)
return;
if (VG_(is_running_on_simd_CPU)()) {
- (void)VG_NON_SIMD_tstCALL1( SK_(__builtin_vec_delete), p );
+ (void)VALGRIND_NON_SIMD_tstCALL1( SK_(__builtin_vec_delete), p );
} else {
VG_(arena_free)(VG_AR_CLIENT, p);
}
MAYBE_SLOPPIFY(size);
if (VG_(is_running_on_simd_CPU)()) {
- v = (void*)VG_NON_SIMD_tstCALL2( SK_(calloc), nmemb, size );
+ v = (void*)VALGRIND_NON_SIMD_tstCALL2( SK_(calloc), nmemb, size );
} else {
v = VG_(arena_calloc)(VG_AR_CLIENT, VG_(clo_alignment), nmemb, size);
}
return NULL;
}
if (VG_(is_running_on_simd_CPU)()) {
- v = (void*)VG_NON_SIMD_tstCALL2( SK_(realloc), ptrV, new_size );
+ v = (void*)VALGRIND_NON_SIMD_tstCALL2( SK_(realloc), ptrV, new_size );
} else {
v = VG_(arena_realloc)(VG_AR_CLIENT, ptrV, VG_(clo_alignment), new_size);
}
MAYBE_SLOPPIFY(n);
if (VG_(is_running_on_simd_CPU)()) {
- v = (void*)VG_NON_SIMD_tstCALL2( SK_(memalign), alignment, n );
+ v = (void*)VALGRIND_NON_SIMD_tstCALL2( SK_(memalign), alignment, n );
} else {
v = VG_(arena_malloc_aligned)(VG_AR_CLIENT, alignment, n);
}
/* These requests allow control to move from the simulated CPU to the
real CPU, calling an arbitary function */
-#define VG_NON_SIMD_CALL0(_qyy_fn) \
+#define VALGRIND_NON_SIMD_CALL0(_qyy_fn) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_CALL0, \
_qyy_res; \
})
-#define VG_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1) \
+#define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_CALL1, \
_qyy_res; \
})
-#define VG_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \
+#define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_CALL2, \
_qyy_res; \
})
-#define VG_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \
+#define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_CALL3, \
/* These requests are similar to those above; they insert the current
ThreadState as the first argument to the called function. */
-#define VG_NON_SIMD_tstCALL0(_qyy_fn) \
+#define VALGRIND_NON_SIMD_tstCALL0(_qyy_fn) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_tstCALL0, \
_qyy_res; \
})
-#define VG_NON_SIMD_tstCALL1(_qyy_fn, _qyy_arg1) \
+#define VALGRIND_NON_SIMD_tstCALL1(_qyy_fn, _qyy_arg1) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_tstCALL1, \
_qyy_res; \
})
-#define VG_NON_SIMD_tstCALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \
+#define VALGRIND_NON_SIMD_tstCALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_tstCALL2, \
_qyy_res; \
})
-#define VG_NON_SIMD_tstCALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \
+#define VALGRIND_NON_SIMD_tstCALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \
({unsigned int _qyy_res; \
VALGRIND_MAGIC_SEQUENCE(_qyy_res, 0 /* default return */, \
VG_USERREQ__CLIENT_tstCALL3, \
/* Is the client running on the simulated CPU or the real one?
Nb: If it is, and you want to call a function to be run on the real CPU,
- use one of the VG_NON_SIMD_CALL[123] macros in valgrind.h to call it.
+ use one of the VALGRIND_NON_SIMD_CALL[123] macros in valgrind.h to call it.
Nb: don't forget the function parentheses when using this in a
condition... write this: