Use fastcall on Mac OS X x86: __attribute__(regparm(3))

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: Mark Mentovai, Assigned: Mark Mentovai)

Tracking

({fixed1.8.0.2, fixed1.8.1})

Trunk
PowerPC
Mac OS X
fixed1.8.0.2, fixed1.8.1
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.8.0.2 +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [camino-1.0])

Attachments

(2 attachments)

(Assignee)

Description

11 years ago
Bug 297604 made Mac OS X on x86 not use the fastcall calling convention where other operating systems use it.  This was done because dyld would eat the registers used to hold parameters when symbols were lazily bound.

I've verified that the dyld helper now saves and restores the registers used by the fastcall convention, namely, EAX, ECX, and EDX, so the contents of these registers are preserved for calls through the lazy binding mechanism.  Vector registers XMM0 through XMM3 are also saved and restored, allowing vector arguments to be passed through normal calling convention (note the ABI only specifies XMM0 through XMM2 for ths purpose.)  Disabling fastcall on Mac OS X is therefore no longer necessary.
(Assignee)

Comment 1

11 years ago
Created attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate
Attachment #208403 - Flags: review?(joshmoz)

Comment 2

11 years ago
(In reply to comment #1)
> Created an attachment (id=208403) [edit]
> Use fastcall on Mac OS X x86 where appropriate

Looks good.  I can confirm that this bug was fixed in dyld shortly after WWDC and is fixed on the shipping Intel-based Macs.
(Assignee)

Comment 3

11 years ago
Comment on attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate

This patch is essentially just a backout of 297604, adjusted to reflect the current state of the tree.

Updated

11 years ago
Attachment #208403 - Flags: review?(joshmoz) → review+
(Assignee)

Comment 4

11 years ago
Created attachment 209382 [details] [diff] [review]
As checked in on trunk

The context varies, the patch is the same.
(Assignee)

Comment 5

11 years ago
Checked in on trunk.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
(Assignee)

Comment 6

11 years ago
Comment on attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate

Let's get this for x86 Mac builds.
Attachment #208403 - Flags: approval1.8.0.2?
(Assignee)

Updated

11 years ago
Blocks: 324651
(Assignee)

Comment 7

11 years ago
On CAMINO_1_0_BRANCH.
(Assignee)

Updated

11 years ago
Whiteboard: [camino-1.0]
Comment on attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate

approved for 180 branch, a=dveditz for drivers
Attachment #208403 - Flags: approval1.8.0.2? → approval1.8.0.2+
Flags: blocking1.8.0.2+
(Assignee)

Comment 9

11 years ago
Comment on attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate

This is cross-module and Mac-only, so I'm self-approving as Mac widget owner.
Attachment #208403 - Flags: approval-branch-1.8.1+
(Assignee)

Comment 10

11 years ago
Fixed: 1_8, 1_8_0.
Keywords: fixed1.8.0.2, fixed1.8.1

Updated

9 years ago
Component: XP Miscellany → General
QA Contact: brendan → general

Updated

9 years ago
Component: General → XPCOM
QA Contact: general → xpcom
You need to log in before you can comment on or make changes to this bug.