https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #16 from Timothy Pearson ---
(In reply to Bill Schmidt from comment #15)
> PHP's reliance on frequent indirect branches makes it essentially the worst
> case for this sort of thing. When Spectre v2 CVE mitigations are in place
> for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #14 from Timothy Pearson ---
(In reply to Bill Schmidt from comment #13)
> This was prototyped and measured against the firmware fixes with
> indistinguishable results. So the complexity of a software solution, with
> its impacts on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #12 from Timothy Pearson ---
After quite a bit of investigation, this is down to the Spectre v2 user mode
protections on POWER9, which (from what I understand) involve completely
disabling the branch predictor.
My question then comes
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #10 from Timothy Pearson ---
(In reply to Bill Schmidt from comment #9)
> You mentioned you're on a POWER9 machine. It could be that you have
> firmware with Spectre mitigations applied, which will affect all indirect
> branches. It
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #6 from Timothy Pearson ---
Understood. I'll update this report if we find a way to get the predictor
working optimally in this scenario.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #4 from Timothy Pearson ---
(In reply to Andrew Pinski from comment #3)
> This is 100% the equivalent code.
>
> jmp *(%r15) # opline.199_67->handler
> Does two things:
> loads a pointer from %r15 and then jumps to that pointer.
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85216
--- Comment #2 from Timothy Pearson ---
(In reply to David Edelsohn from comment #1)
> What two additional instructions? x86 is a CISC architecture and Power is a
> RISC architecture. x86 has an instruction that directly performs an
> indirect
: target
Assignee: unassigned at gcc dot gnu.org
Reporter: tpearson at raptorengineering dot com
Target Milestone: ---
On ppc64[el] systems, GCC emits suboptimal code for the PHP VM (version 7.2.3)
that results in significant performance loss versus a standard x86 machine.
This