Closed Bug 885182 Opened 11 years ago Closed 11 years ago

IonScript data fields aligned to 4 bytes even on x64

Categories

(Core :: JavaScript Engine, enhancement)

x86_64
All
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: sunfish, Unassigned)

Details

Attachments

(1 file)

In Ion.cpp, DataAlignment is unconditionally set to 4. This causes several data fields, including fields containing pointers, to be aligned on 4-byte boundaries, causing accesses to them to be misaligned accesses.
Attached patch a proposed fixSplinter Review
sizeof(void *) ought to be a reasonable default setting. That way, pointer data will be aligned on all popular architectures.
Attachment #765176 - Flags: review?(mrosenberg)
Attachment #765176 - Flags: review?(mrosenberg) → review+
https://hg.mozilla.org/mozilla-central/rev/cc2e2aff6206
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
mjrosenb: I think we also we to align on 8 bytes on ARM, such as we can have fast loads of double extracted from the constant stored for bailouts and others?
Flags: needinfo?(mrosenberg)
Needinfo 2 years old; removing.
Flags: needinfo?(marty.rosenberg)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: