Closed Bug 1028633 Opened 7 years ago Closed 7 years ago

Use gcc inline assembly in xptcstubs.cpp for clang-cl

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file, 1 obsolete file)

clang-cl's support for naked functions is also broken similar to gcc.  In particular, it clobbers eax.  It's best to just use the gcc inline assembly implementation here which works fine in both clang-cl and mingw.  Note that I had to add a bit of clang-cl specific code because of the name mangling differences.
Assignee: nobody → ehsan
Blocks: winclang
Attachment #8444028 - Flags: review?(benjamin)
Comment on attachment 8444028 [details] [diff] [review]
Use gcc inline assembly in xptcstubs.cpp for clang-cl

Err, this is the wrong patch...
Attachment #8444028 - Attachment is obsolete: true
Attachment #8444028 - Flags: review?(benjamin)
Attachment #8444101 - Flags: review?(benjamin)
Does clang-cl use the GCC ABI or the MSVC ABI?
Flags: needinfo?(ehsan)
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #4)
> Does clang-cl use the GCC ABI or the MSVC ABI?

MSVC ABI
Flags: needinfo?(ehsan)
Attachment #8444101 - Flags: review?(benjamin) → review+
Note that this patch just makes us use the gcc inline assembly to implement the stubs, it doesn't change anything ABI sensitive.

https://hg.mozilla.org/integration/mozilla-inbound/rev/6279aec8541c
https://hg.mozilla.org/mozilla-central/rev/6279aec8541c
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.