search for: vcast

Displaying 2 results from an estimated 2 matches for "vcast".

Did you mean: cast
2012 Feb 28
0
[LLVMdev] [patch] atomic functions on darwin
..._) +#include <libkern/OSAtomic.h> +// __APPLE__ should take precedence over __GNUC__ +// sys::cas_flag is int32_t from Support/Atomic.h, so use '32' variants +// prototypes lack the 'volatile' qualifier, so we need to cast them away +template <class T> +static inline +T* vcast(volatile T* ptr) { return const_cast<T*>(ptr); } +#endif + void sys::MemoryFence() { #if LLVM_HAS_ATOMICS == 0 return; -#else -# if defined(__GNUC__) +#elif defined(__APPLE__) + OSMemoryBarrier(); +#elif defined(__GNUC__) __sync_synchronize(); -# elif defined(_MSC_VER) +#elif defin...
2011 Nov 29
6
[LLVMdev] The nsw story
The old and popular tradition of "int" being the default all-purpose type in C hit a snag with the arrival of 64-bit general-purpose architectures, when, for reasons of memory usage and compatibility, "int" was fixed at 32 bits. This meant it was no longer the same size as a pointer, the size of an array index, or the widest native integer type. (Sequence of events simplified