On Thu, Mar 7, 2019 at 10:50 AM Martin Liška <mli...@suse.cz> wrote:
>
> On 3/7/19 9:54 AM, Uros Bizjak wrote:
> > On Thu, Mar 7, 2019 at 9:45 AM Martin Liška <mli...@suse.cz> wrote:
> >>
> >> Hi.
> >>
> >> Thanks to Intel guys, we've done some re-measurement in PR86952
> >> about usage of jump tables when retpolines are used.
> >> Numbers prove that disabling of JT should be the best for now.
> >>
> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>
> >> Ready to be installed?
> >> Thanks,
> >> Martin
> >
> > Please add a comment above your change.
>
> Sure, should be improved.

Eh, we didn't understand each other... Please add comment here:

+  if (ix86_indirect_branch != indirect_branch_keep
+      && !opts_set->x_flag_jump_tables)
+    opts->x_flag_jump_tables = 0;

so in future, it will still be documented why this part of the code is needed.

Uros.

> Martin
>
> >
> > Uros.
> >
> >>
> >> gcc/ChangeLog:
> >>
> >> 2019-03-06  Martin Liska  <mli...@suse.cz>
> >>
> >>         PR target/86952
> >>         * config/i386/i386.c (ix86_option_override_internal): Disable
> >>         jump tables when retpolines are used.
> >>
> >> gcc/testsuite/ChangeLog:
> >>
> >> 2019-03-06  Martin Liska  <mli...@suse.cz>
> >>
> >>         PR target/86952
> >>         * gcc.target/i386/pr86952.c: New test.
> >>         * gcc.target/i386/indirect-thunk-7.c: Use jump tables to match
> >>         scanned pattern.
> >>         * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
> >> ---
> >>  gcc/config/i386/i386.c                        |  4 ++++
> >>  .../gcc.target/i386/indirect-thunk-7.c        |  2 +-
> >>  .../gcc.target/i386/indirect-thunk-inline-7.c |  2 +-
> >>  gcc/testsuite/gcc.target/i386/pr86952.c       | 23 +++++++++++++++++++
> >>  4 files changed, 29 insertions(+), 2 deletions(-)
> >>  create mode 100644 gcc/testsuite/gcc.target/i386/pr86952.c
> >>
> >>
>

Reply via email to