This is the mail archive of the gcc-patches@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: [PATCH 2/5] x86: Add -mindirect-branch-loop=


On 01/07/2018 03:59 PM, H.J. Lu wrote:
> Add -mindirect-branch-loop= option to control loop filler in call and
> return thunks generated by -mindirect-branch=.  'lfence' uses "lfence"
> as loop filler.  'pause' uses "pause" as loop filler.  'nop' uses "nop"
> as loop filler.  The default is 'lfence'.
> 
> gcc/
> 
> 	* config/i386/i386-opts.h (indirect_branch_loop): New.
> 	* config/i386/i386.c (output_indirect_thunk): Support
> 	-mindirect-branch-loop=.
> 	* config/i386/i386.opt (mindirect-branch-loop=): New option.
> 	(indirect_branch_loop): New.
> 	(lfence): Likewise.
> 	(pause): Likewise.
> 	(nop): Likewise.
> 	* doc/invoke.texi: Document -mindirect-branch-loop= option.
> 
> gcc/testsuite/
> 
> 	* gcc.target/i386/indirect-thunk-loop-1.c: New test.
> 	* gcc.target/i386/indirect-thunk-loop-2.c: Likewise.
> 	* gcc.target/i386/indirect-thunk-loop-3.c: Likewise.
> 	* gcc.target/i386/indirect-thunk-loop-4.c: Likewise.
> 	* gcc.target/i386/indirect-thunk-loop-5.c: Likewise.
I think we should drop the ability to change the filler until such time
as we really need it.  Just pick one and go with it.  I think David
suggested that they wanted "pause".  I'm obviously fine with that.


jeff


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