Status

NSPR
NSPR
P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

other
4.10.4
ARM
iOS 7

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

4 years ago
Created attachment 8375235 [details] [diff] [review]
Patch

The patch is contributed by Sylvain Defresne of Google. The original
changelist is at https://codereview.chromium.org/159893002/.
Attachment #8375235 - Flags: review?(ted)
(Assignee)

Comment 1

4 years ago
pr/src/misc/prdtoa.c also contains some __arm__ code:
http://mxr.mozilla.org/nspr/ident?i=IEEE_ARM

We should review that code to see if it needs to be
extended with __aarch64__.
(Assignee)

Comment 2

4 years ago
Created attachment 8376618 [details] [diff] [review]
First tested patch by Sylvain Defresne

Sylvain Defresne tested these changes, so I checked them in first:
https://hg.mozilla.org/projects/nspr/rev/645a941272f1

He also reported the following about two files he didn't change:

nspr/pr/src/misc/prdtoa.c: Do not define IEEE_ARM when building for
aarch64, as the IEEE implementation behaves as IEEE_8087 (setting
IEEE_ARM cause the function PR_strtod to return incorrect values).

nspr/pr/include/pratom.h: Do not use intrisincs __sync_add_and_fetch,
__sync_sub_and_fetch and __sync_lock_test_and_set when building for
aarch64 as support for those intrisics has not been tested (but it
should be).
Attachment #8376618 - Flags: review+
Attachment #8376618 - Flags: checked-in+
(Assignee)

Comment 3

4 years ago
Created attachment 8376619 [details] [diff] [review]
Patch for prbit.h

I think this change to prbit.h should work, but it hasn't been tested.

As for the PR_ATOMIC_* macros in pratom.h, I now think it may be better
to define them using Apple's OSAtomic* functions rather than using compiler
intrinsics. Apple recommends that we "Use the Built-in Synchronization
Primitives" in the 64-Bit Transition Guide for Cocoa Touch:

https://developer.apple.com/library/ios/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW1
(Assignee)

Updated

4 years ago
Attachment #8375235 - Attachment is obsolete: true
Attachment #8375235 - Flags: review?(ted)
(Assignee)

Updated

4 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.