mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-30 02:27:38 +01:00
Work around ECC v7.0 bug by manually definining __sync_val_compare_and_swap()
if it isn't defined yet. (Logical change 1.68)
This commit is contained in:
parent
a55f2acb86
commit
28fe6a6e8b
1 changed files with 9 additions and 0 deletions
|
@ -93,6 +93,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
#ifdef HAVE_IA64INTRIN_H
|
#ifdef HAVE_IA64INTRIN_H
|
||||||
# define HAVE_CMPXCHG
|
# define HAVE_CMPXCHG
|
||||||
# include <ia64intrin.h>
|
# include <ia64intrin.h>
|
||||||
|
/*
|
||||||
|
* ecc v7.0 is broken: it's missing __sync_val_compare_and_swap()
|
||||||
|
* even though the ia64 ABI requires it. Work around it:
|
||||||
|
*/
|
||||||
|
# ifndef __sync_val_compare_and_swap
|
||||||
|
# define __sync_val_compare_and_swap(x,y,z) \
|
||||||
|
_InterlockedCompareExchange64_rel(x,y,z)
|
||||||
|
# endif
|
||||||
|
|
||||||
# define cmpxchg_ptr(_ptr,_o,_n) \
|
# define cmpxchg_ptr(_ptr,_o,_n) \
|
||||||
((void *) __sync_val_compare_and_swap((long *) (_ptr), \
|
((void *) __sync_val_compare_and_swap((long *) (_ptr), \
|
||||||
(long) (_o), (long) (_n)))
|
(long) (_o), (long) (_n)))
|
||||||
|
|
Loading…
Reference in a new issue