diff options
author | Richard Henderson <rth@redhat.com> | 2011-11-09 11:51:49 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-11-09 11:51:49 -0800 |
commit | 8ee9fac21ec877d5e0bbcd3460eb584bbeccf836 (patch) | |
tree | 5eb7fbe12a188f836f5b73e1ad1f49fdf125139c /libitm/config | |
parent | a5b3d713ccade591a3dd972f5586912f8ef5cb48 (diff) | |
download | gcc-8ee9fac21ec877d5e0bbcd3460eb584bbeccf836.zip gcc-8ee9fac21ec877d5e0bbcd3460eb584bbeccf836.tar.gz gcc-8ee9fac21ec877d5e0bbcd3460eb584bbeccf836.tar.bz2 |
libitm: Avoid non-portable x86 branch prediction mnemonic.
From-SVN: r181233
Diffstat (limited to 'libitm/config')
-rw-r--r-- | libitm/config/x86/cacheline.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libitm/config/x86/cacheline.h b/libitm/config/x86/cacheline.h index 15a95b0..f91d7cc 100644 --- a/libitm/config/x86/cacheline.h +++ b/libitm/config/x86/cacheline.h @@ -144,7 +144,7 @@ gtm_cacheline::operator= (const gtm_cacheline & __restrict s) } #endif -// ??? Support masked integer stores more efficiently with an unlocked cmpxchg +// Support masked integer stores more efficiently with an unlocked cmpxchg // insn. My reasoning is that while we write to locations that we do not wish // to modify, we do it in an uninterruptable insn, and so we either truely // write back the original data or the insn fails -- unlike with a @@ -171,7 +171,8 @@ gtm_cacheline::store_mask (uint32_t *d, uint32_t s, uint8_t m) "and %[m], %[n]\n\t" "or %[s], %[n]\n\t" "cmpxchg %[n], %[d]\n\t" - "jnz,pn 0b" + ".byte 0x2e\n\t" // predict not-taken, aka jnz,pn + "jnz 0b" : [d] "+m"(*d), [n] "=&r" (n), [o] "+a"(o) : [s] "r" (s & bm), [m] "r" (~bm)); } @@ -198,7 +199,8 @@ gtm_cacheline::store_mask (uint64_t *d, uint64_t s, uint8_t m) "and %[m], %[n]\n\t" "or %[s], %[n]\n\t" "cmpxchg %[n], %[d]\n\t" - "jnz,pn 0b" + ".byte 0x2e\n\t" // predict not-taken, aka jnz,pn + "jnz 0b" : [d] "+m"(*d), [n] "=&r" (n), [o] "+a"(o) : [s] "r" (s & bm), [m] "r" (~bm)); #else |