Fix build on PPC64LE

Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
This commit is contained in:
Timothy Pearson
2016-06-26 20:09:39 -05:00
parent 47b06d3255
commit 203eda1d47
9 changed files with 37 additions and 10 deletions

View File

@ -63,6 +63,16 @@ namespace nv {
// also utilizes a full barrier
// currently treating laod like x86 - this could be wrong
// this is the easiest but slowest way to do this
nvCompilerReadWriteBarrier();
uint32 ret = *ptr; // replace with ldrex?
nvCompilerReadWriteBarrier();
return ret;
#elif POSH_CPU_PPC64
// need more specific cpu type for ppc64?
// also utilizes a full barrier
// currently treating load like x86 - this could be wrong
// this is the easiest but slowest way to do this
nvCompilerReadWriteBarrier();
uint32 ret = *ptr; // replace with ldrex?
@ -87,6 +97,11 @@ namespace nv {
nvCompilerReadWriteBarrier();
*ptr = value; //strex?
nvCompilerReadWriteBarrier();
#elif POSH_CPU_PPC64
// this is the easiest but slowest way to do this
nvCompilerReadWriteBarrier();
*ptr = value; //strex?
nvCompilerReadWriteBarrier();
#else
#error "Atomics not implemented."
#endif