[PATCH 3/5] x86: Add -mindirect-branch-register
Jan Hubicka
hubicka@ucw.cz
Sun Jan 14 10:47:00 GMT 2018
> Add -mindirect-branch-register to force indirect branch via register.
> This is implemented by disabling patterns of indirect branch via memory,
> similar to TARGET_X32.
>
> -mindirect-branch= and -mfunction-return= tests are updated with
> -mno-indirect-branch-register to avoid false test failures when
> -mindirect-branch-register is added to RUNTESTFLAGS for "make check".
>
> gcc/
>
> * config/i386/constraints.md (Bs): Disallow memory operand for
> -mindirect-branch-register.
> (Bw): Likewise.
> * config/i386/predicates.md (indirect_branch_operand): Likewise.
> (GOT_memory_operand): Likewise.
> (call_insn_operand): Likewise.
> (sibcall_insn_operand): Likewise.
> (GOT32_symbol_operand): Likewise.
> * config/i386/i386.md (indirect_jump): Call convert_memory_address
> for -mindirect-branch-register.
> (tablejump): Likewise.
> (*sibcall_memory): Likewise.
> (*sibcall_value_memory): Likewise.
> Disallow peepholes of indirect call and jump via memory for
> -mindirect-branch-register.
> (*call_pop): Replace m with Bw.
> (*call_value_pop): Likewise.
> (*sibcall_pop_memory): Replace m with Bs.
> * config/i386/i386.opt (mindirect-branch-register): New option.
> * doc/invoke.texi: Document -mindirect-branch-register option.
OK.
Honza
More information about the Gcc-patches
mailing list