WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
21571
VoidPtrPair breaks CTI on Linux
https://bugs.webkit.org/show_bug.cgi?id=21571
Summary
VoidPtrPair breaks CTI on Linux
Alp Toker
Reported
2008-10-13 11:18:21 PDT
VoidPtrPair return in revision
r37457
broke CTI on Linux, which I was hoping to switch on by default (
bug #20760
,
r37457
). The problem is that the convention on Linux is to always use the stack for struct returns (pcc convention) while gcc on Darwin uses the register for small structs. The new code assumes the latter. There are a few possible workarounds: 1) Build with -freg-struct-return. This sounds like quite a large change to calling conventions but curiously doesn't seem to break any applications or cause any regressions. If this is viable and is shown to prove performance elsewhere, we may actually want to turn this on in Linux builds at some point, but to do that we need to do more research. It would actually be nice to turn this on since it can generate better code for C++ smart pointers which are used extensively in WebCore. Not an immediate solution unless anyone can advice better here. 2) Use a union to vectorise the structure to a uint64_t and return that. This works, but generates different machine code even when building with -freg-struct-return so needs to be perf tested in Darwin builds or made platform-conditional. I have a patch to do this if anyone's interested. 3) ifdef the new code and re-introduce the original code conditionally. 4) Conditionally generate machine code that reads the structure's values according to the pcc convention. Any thoughts on which way to go?
Attachments
Add attachment
proposed patch, testcase, etc.
Alp Toker
Comment 1
2008-10-14 01:56:45 PDT
Noticed this in the gcc 4.3.0 release notes: * Fastcall for i386 has been changed not to pass aggregate arguments in registers, following Microsoft compilers.
http://gcc.gnu.org/gcc-4.3/changes.html
Alp Toker
Comment 2
2008-10-30 02:36:04 PDT
Landed in
r37995
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug