This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with implementing Wine optimization experiment


On 08/15/2016 05:56 AM, Richard Biener wrote:
On Mon, Aug 15, 2016 at 2:16 AM, Jeff Law <law@redhat.com> wrote:
On 08/14/2016 01:57 AM, Trevor Saunders wrote:
On Sun, Aug 14, 2016 at 01:23:16AM -0500, Daniel Santos wrote:
I'm experimenting with ways to optimize wine (x86 target only) and I
believe
I can shrink wine's total text size by around 7% by outlining the lengthy
pro- and epilogues required for ms_abi functions making sysv_abi calls.
Theoretically, fewer instruction cache misses will offset the extra 4
instructions per function and result in a net performance gain. However,
I'm
new to the gcc project and a novice x86 assembly programmer as well (have
been wanting to work on gcc for a while now!) In short, I want to:

1. Replace the prologue that pushes di, sp and xmm6-15 with a single call
to
a global "ms_abi_push_regs" routine
2. Replace the epilogue that pops these regs with a jmp to a global
"ms_abi_pop_regs" routine
3. Add the two routines somewhere so that they are linked into the
output.

I think you want to put those into libgcc then.
Right.  That's what I've done with out-of-line prologues/epilogues in the
past.
In the static part, of course.  Not sure if we always have/link that
on x86_64/i?86.

Richard.

Thanks all! Well, Wine's libs certainly do not appear to be dynamically linked with libgcc, and I didn't know that it had such a static portion, so thank you for this! Getting this in will solve half of the problem.

Also, I should have mentioned that I see this as a stop-gap to actually performing static analysis and completely disabling floating point in Wine's libs where ever possible, but that's a much larger project. So I'm hoping to be able to show some improvements from this mechanism.

Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]