diff options
Diffstat (limited to 'helgrind/tests/tc11_XCHG.c')
-rw-r--r-- | helgrind/tests/tc11_XCHG.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/helgrind/tests/tc11_XCHG.c b/helgrind/tests/tc11_XCHG.c index 50e285309..481f91639 100644 --- a/helgrind/tests/tc11_XCHG.c +++ b/helgrind/tests/tc11_XCHG.c @@ -18,6 +18,7 @@ #undef PLAT_arm_linux #undef PLAT_s390x_linux #undef PLAT_mips32_linux +#undef PLAT_tilegx_linux #if defined(__APPLE__) && defined(__i386__) # define PLAT_x86_darwin 1 @@ -39,6 +40,8 @@ # define PLAT_s390x_linux 1 #elif defined(__linux__) && defined(__mips__) # define PLAT_mips32_linux 1 +#elif defined(__linux__) && defined(__tilegx__) +# define PLAT_tilegx_linux 1 #endif @@ -115,6 +118,12 @@ # define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ XCHG_M_R(_addr,_lval) +#elif defined(PLAT_tilegx_linux) +# define XCHG_M_R(_addr,_lval) \ + _lval = __insn_exch4(&_addr, _lval) + +# define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ + XCHG_M_R(_addr, _lval) #else # error "Unsupported architecture" |