Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7386,22 +7386,19 @@ tools are selected during the Xcode/Developer Tools installation." "$LINENO" 5
i*86)
printf "%s\n" "#define i386 1" >>confdefs.h

PR_MD_ASFILES=os_Linux_x86.s
;;
ia64)
PR_MD_ASFILES=os_Linux_ia64.s
;;
x86_64)
if test -n "$USE_64"; then
PR_MD_ASFILES=os_Linux_x86_64.s
:
elif test -n "$USE_X32"; then
PR_MD_ASFILES=os_Linux_x86_64.s
CC="$CC -mx32"
CXX="$CXX -mx32"
else
printf "%s\n" "#define i386 1" >>confdefs.h

PR_MD_ASFILES=os_Linux_x86.s
CC="$CC -m32"
CXX="$CXX -m32"
fi
Expand Down
5 changes: 1 addition & 4 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1431,21 +1431,18 @@ tools are selected during the Xcode/Developer Tools installation.])
;;
i*86)
AC_DEFINE(i386)
PR_MD_ASFILES=os_Linux_x86.s
;;
ia64)
PR_MD_ASFILES=os_Linux_ia64.s
;;
x86_64)
if test -n "$USE_64"; then
PR_MD_ASFILES=os_Linux_x86_64.s
:
elif test -n "$USE_X32"; then
PR_MD_ASFILES=os_Linux_x86_64.s
CC="$CC -mx32"
CXX="$CXX -mx32"
else
AC_DEFINE(i386)
PR_MD_ASFILES=os_Linux_x86.s
CC="$CC -m32"
CXX="$CXX -m32"
fi
Expand Down
30 changes: 14 additions & 16 deletions pr/include/md/_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@
#endif

#if defined(__i386__)
#if defined(__GNUC__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does Firefox's config/external/nspr/pr/moz.build still list os_Linux_x86.s / os_Linux_x86_64.s?
if so, it needs updating in the same landing, otherwise the next NSPR import breaks the build

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, moz.build:31 and :34 still list them. They need to be removed when NSPR with this change is vendored.

/* Use GCC built-in functions */
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_x86_AtomicIncrement(PRInt32* val);
#define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement
extern PRInt32 _PR_x86_AtomicDecrement(PRInt32* val);
#define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement
extern PRInt32 _PR_x86_AtomicAdd(PRInt32* ptr, PRInt32 val);
#define _MD_ATOMIC_ADD _PR_x86_AtomicAdd
extern PRInt32 _PR_x86_AtomicSet(PRInt32* val, PRInt32 newval);
#define _MD_ATOMIC_SET _PR_x86_AtomicSet
#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
#endif
#endif

#if defined(__ia64__)
Expand All @@ -131,16 +130,15 @@ extern PRInt32 _PR_ia64_AtomicSet(PRInt32* val, PRInt32 newval);
#endif

#if defined(__x86_64__)
#if defined(__GNUC__)
/* Use GCC built-in functions */
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_x86_64_AtomicIncrement(PRInt32* val);
#define _MD_ATOMIC_INCREMENT _PR_x86_64_AtomicIncrement
extern PRInt32 _PR_x86_64_AtomicDecrement(PRInt32* val);
#define _MD_ATOMIC_DECREMENT _PR_x86_64_AtomicDecrement
extern PRInt32 _PR_x86_64_AtomicAdd(PRInt32* ptr, PRInt32 val);
#define _MD_ATOMIC_ADD _PR_x86_64_AtomicAdd
extern PRInt32 _PR_x86_64_AtomicSet(PRInt32* val, PRInt32 newval);
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
#endif
#endif

#if defined(__loongarch__)
Expand Down
84 changes: 0 additions & 84 deletions pr/src/md/unix/os_Linux_x86.s

This file was deleted.

73 changes: 0 additions & 73 deletions pr/src/md/unix/os_Linux_x86_64.s

This file was deleted.

Loading