i386.h (enum ix86_enitity): Add X86_DIRFLAG.
authorUros Bizjak <uros@gcc.gnu.org>
Mon, 6 Jun 2016 22:35:18 +0000 (00:35 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 6 Jun 2016 22:35:18 +0000 (00:35 +0200)
commitc7ca8ef875201d4eaa685edbb31fc97eaaa903d8
tree9f439388509de6078944a34a327284a7a0125c55
parent1f40cff37998535a8f6f3eb6989327d8be3c8efb
i386.h (enum ix86_enitity): Add X86_DIRFLAG.

* config/i386/i386.h (enum ix86_enitity): Add X86_DIRFLAG.
(enum x86_dirflag_state): New enum.
(NUM_MODES_FOR_MODE_SWITCHING): Add X86_DIRFLAG_ANY.
(machine_function): Remove needs_cld.
(ix86_current_function_needs_cld): Remove.
* config/i386/i386.c (ix86_set_func_type): Set
ix86_optimize_mode_switching[X86_DIRFLAG] to 1.
(ix86_expand_prologue): Do not emit CLD here.
(ix86_dirflag_mode_needed): New function.
(ix86_dirflag_mode_entry): Ditto.
(ix86_mode_needed): Handle X86_DIRFLAG entity.
(ix86_mode_after): Ditto.
(ix86_mode_entry): Ditto.
(ix86_mode_exit): Ditto.
(ix86_emit_mode_set): Ditto.
* config/i386/i386.md (strmov_singleop): Set
ix86_optimize_mode_switching[X86_DIRFLAG] to 1 for TARGET_CLD.
Do not set ix86_current_function_needs_cld.
(rep_mov): Ditto.
(strset_singleop): Ditto.
(rep_stos): Ditto.
(cmpstrnqi_nz_1): Ditto.
(cmpstrnqi_1): Ditto.
(strlenqi_1): Ditto.

From-SVN: r237156
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.md