зеркало из https://github.com/mozilla/pjs.git
Changed the assertion which used to trigger when nv < 0 in CompareAndSwap.
It now triggers when nv == -1. This is only relevant on a Solaris compiled for SPARC v8.
This commit is contained in:
Родитель
395b172fad
Коммит
dfbc18b043
|
@ -100,7 +100,7 @@ js_CompareAndSwap(prword *w, prword ov, prword nv)
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
unsigned int res;
|
unsigned int res;
|
||||||
#ifndef ULTRA_SPARC
|
#ifndef ULTRA_SPARC
|
||||||
PR_ASSERT(nv >= 0);
|
PR_ASSERT(nv != -1);
|
||||||
asm volatile ("
|
asm volatile ("
|
||||||
swap [%1],%4
|
swap [%1],%4
|
||||||
1: tst %4
|
1: tst %4
|
||||||
|
@ -132,7 +132,7 @@ mov 0,%0
|
||||||
#else /* !__GNUC__ */
|
#else /* !__GNUC__ */
|
||||||
extern int compare_and_swap(prword*,prword,prword);
|
extern int compare_and_swap(prword*,prword,prword);
|
||||||
#ifndef ULTRA_SPARC
|
#ifndef ULTRA_SPARC
|
||||||
PR_ASSERT(nv >= 0);
|
PR_ASSERT(nv != -1);
|
||||||
#else
|
#else
|
||||||
PR_ASSERT(ov != nv);
|
PR_ASSERT(ov != nv);
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче