Closed Bug 297604 Opened 19 years ago Closed 19 years ago

don't use regparm on Mac OS X

Categories

(Core :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jaas, Assigned: jaas)

References

Details

Attachments

(1 file)

We can't use regparm now that Mac OS X can be on ppc or x86.  Exclude Mac OS X from using regparm. 
Patch by Apple Computer, Inc. <- no guarantees from them, however
Attached patch patch v1.0Splinter Review
Attachment #186165 - Flags: superreview?(dbaron)
Attachment #186165 - Flags: review?(sfraser_bugs)
Attachment #186165 - Flags: superreview?(dbaron) → superreview?(bryner)
Comment on attachment 186165 [details] [diff] [review]
patch v1.0

Maybe it would be better to move this logic to configure, and have it define
HAVE_REGPARM_ATTRIBUTE?
Ronnie - can you give your explanation for this patch on the bug? You said it best at WWDC.
Status: NEW → ASSIGNED
Currently, Mac OS X on Intel doesn't properly handle regparm calls between different libraries -- the dyld 
stub tramples registers eax and edx. We'll hopefully fix this in a later release, but until then, regparm calls 
will get garbage parameters.

The problem is not that regparm is not defined, but rather that it behaves poorly. My hope is that this is 
just a temporary work-around, so I personally wouldn't invest the time in detecting this at autoconf time.
Ronnie - what releases of Mac OS X in particular have regparm issues? Just the
x86 developer release? If that is the case, then we should land the #ifdef fix
with a comment explaining the situation.
I do consider this to be a bug and will be pushing to get this bug fixed. That being said, I don't know when 
it will be fixed.
Ronnie - but what versions of Mac OS X is this a bug in?
Josh - Well, there's only one version of OS X on Intel currently, the release that came with the transition 
kits. :)
I just wanted to make sure there was no badness in any ppc versions of Mac OS X.
Josh - gcc doesn't support a regparm directive on ppc. This fix is in x86-specific code.
I missed reading the #ifdef (__i386__)... I was just looking at the file names
for arch specificity. My bad.
Comment on attachment 186165 [details] [diff] [review]
patch v1.0

What about these other uses of __i386__ ?
http://lxr.mozilla.org/mozilla/search?string=__i386__
Attachment #186165 - Flags: review?(sfraser_bugs) → review+
In most cases we can be considered i386, but it so happens that regparm is
broken on mactel right now so we need to special case it.
Attachment #186165 - Flags: superreview?(bryner) → superreview+
Attachment #186165 - Flags: superreview+ → superreview?(benjamin)
Comment on attachment 186165 [details] [diff] [review]
patch v1.0

bah
Attachment #186165 - Flags: superreview?(benjamin) → superreview+
Attachment #186165 - Flags: approval1.8b4?
Attachment #186165 - Flags: approval1.8b4? → approval1.8b4+
landed on trunk
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Blocks: 323337
regparm can be turned back on for the OS X Intel builds -- we support regparm properly in 10.4.4 on Intel.
Bug 323337 turned it back on.
Component: XP Miscellany → General
QA Contact: brendan → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: