Closed Bug 422337 Opened 16 years ago Closed 16 years ago

Bad assembly on m68k

Categories

(Core :: XPCOM, defect)

Other
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9beta5

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

This was filed as debian bug ( http://bugs.debian.org/402011 ) a while ago.
I'm copy/pasting the original bug report below:

Currently epiphany-browser fails to build as seen here:
http://buildd.debian.org/fetch.cgi?&pkg=epiphany-browser&ver=2.14.3-3&arch=m68k&stamp=1163307325&file=log

The problem is the XPTC_InvokeByIndex() function, gcc can assign input
and output parameters the same register unless told otherwise, in this
case the stack adjustment was overwritten by the return value and thus
later the wrong registers values were restored from stack.
The attached patch fixes this problem and also cleans up the inline
assembly a bit.
While I'm at it, I also corrected the other m68k assembly part, the
change to nsXPTCStubBase::Stub was not entirely correct as it removed a
bit too many registers. OTOH the same can be implemented without any
inline assembly.

(Sorry not to have forwarded this earlier)
Attachment #308815 - Flags: review?(dbaron)
Assignee: nobody → mh+mozilla
Component: XPConnect → XPCOM
QA Contact: xpconnect → xpcom
Attachment #308815 - Flags: review?(dbaron) → review?(benjamin)
Comment on attachment 308815 [details] [diff] [review]
patch against trunk

I'll take your word for this because I don't know 68k assembly, and I don't know anyone else who maintains the 68k port anyway.
Attachment #308815 - Flags: review?(benjamin)
Attachment #308815 - Flags: review+
Attachment #308815 - Flags: approval1.9?
FWIW, this patch has been in use in debian for a bit more than a year on the xulrunner package (which is used as backend for epiphany), and is part of the last debian stable release (etch). I don't have figures about how many users have actually used it, though.
Comment on attachment 308815 [details] [diff] [review]
patch against trunk

a1.9+=damons
Attachment #308815 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_m68k.cpp;
/cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_m68k.cpp,v  <--  xptcinvoke_linux_m68k.cpp
new revision: 1.5; previous revision: 1.4
done
Checking in xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp;
/cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_m68k.cpp,v  <--  xptcstubs_linux_m68k.cpp
new revision: 1.7; previous revision: 1.6
done
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: