Last Comment Bug 323337 - Use fastcall on Mac OS X x86: __attribute__(regparm(3))
: Use fastcall on Mac OS X x86: __attribute__(regparm(3))
Status: RESOLVED FIXED
[camino-1.0]
: fixed1.8.0.2, fixed1.8.1
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: PowerPC Mac OS X
: -- normal (vote)
: ---
Assigned To: Mark Mentovai
:
Mentors:
Depends on: 297604
Blocks: 324651
  Show dependency treegraph
 
Reported: 2006-01-13 12:25 PST by Mark Mentovai
Modified: 2008-08-04 18:17 PDT (History)
3 users (show)
dveditz: blocking1.8.0.2+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Use fastcall on Mac OS X x86 where appropriate (4.18 KB, patch)
2006-01-13 12:27 PST, Mark Mentovai
jaas: review+
mark: approval‑branch‑1.8.1+
dveditz: approval1.8.0.2+
Details | Diff | Review
As checked in on trunk (4.51 KB, patch)
2006-01-23 12:11 PST, Mark Mentovai
no flags Details | Diff | Review

Description Mark Mentovai 2006-01-13 12:25:38 PST
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.
Comment 1 Mark Mentovai 2006-01-13 12:27:00 PST
Created attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate
Comment 2 Eric Albert 2006-01-13 13:00:44 PST
(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.
Comment 3 Mark Mentovai 2006-01-13 14:09:59 PST
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.
Comment 4 Mark Mentovai 2006-01-23 12:11:36 PST
Created attachment 209382 [details] [diff] [review]
As checked in on trunk

The context varies, the patch is the same.
Comment 5 Mark Mentovai 2006-01-23 12:11:55 PST
Checked in on trunk.
Comment 6 Mark Mentovai 2006-01-23 12:12:16 PST
Comment on attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate

Let's get this for x86 Mac builds.
Comment 7 Mark Mentovai 2006-02-02 18:59:09 PST
On CAMINO_1_0_BRANCH.
Comment 8 Daniel Veditz [:dveditz] 2006-02-21 15:18:36 PST
Comment on attachment 208403 [details] [diff] [review]
Use fastcall on Mac OS X x86 where appropriate

approved for 180 branch, a=dveditz for drivers
Comment 9 Mark Mentovai 2006-02-21 19:15:47 PST
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.
Comment 10 Mark Mentovai 2006-02-21 19:20:14 PST
Fixed: 1_8, 1_8_0.

Note You need to log in before you can comment on or make changes to this bug.