diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2008-05-23 09:53:16 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2008-05-23 09:53:16 +0200 |
commit | 922e3e33b211d1f01056457b093c8196aff40333 (patch) | |
tree | 40050495f1a2d014b7c9ed11be27fad5038f05a0 /gcc/config/i386/i386.h | |
parent | 71995c2c69bc2484ca571b29cf376acd860c2f88 (diff) | |
download | gcc-922e3e33b211d1f01056457b093c8196aff40333.tar.gz |
re PR target/36079 (cld instruction is not emitted anymore.)
PR target/36079
* configure.ac: Handle --enable-cld.
* configure: Regenerated.
* config.gcc: Add USE_IX86_CLD to tm_defines for x86 targets.
* config/i386/i386.h (struct machine_function): Add needs_cld field.
(ix86_current_function_needs_cld): New define.
* config/i386/i386.md (UNSPEC_CLD): New unspec volatile constant.
(cld): New isns pattern.
(strmov_singleop, rep_mov, strset_singleop, rep_stos, cmpstrnqi_nz_1,
cmpstrnqi_1, strlenqi_1): Set ix86_current_function_needs_cld flag.
* config/i386/i386.opt (mcld): New option.
* config/i386/i386.c (ix86_expand_prologue): Emit cld insn if
TARGET_CLD and ix86_current_function_needs_cld.
(override_options): Use -mcld by default for 32-bit code if
USE_IX86_CLD.
* doc/install.texi (Options specification): Document --enable-cld.
* doc/invoke.texi (Machine Dependent Options)
[i386 and x86-64 Options]: Add -mcld option.
(Intel 386 and AMD x86-64 Options): Document -mcld option.
From-SVN: r135792
Diffstat (limited to 'gcc/config/i386/i386.h')
-rw-r--r-- | gcc/config/i386/i386.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 72ead0795c2..0b5ca139350 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2432,8 +2432,9 @@ struct machine_function GTY(()) int save_varrargs_registers; int accesses_prev_frame; int optimize_mode_switching[MAX_386_ENTITIES]; - /* Set by ix86_compute_frame_layout and used by prologue/epilogue expander to - determine the style used. */ + int needs_cld; + /* Set by ix86_compute_frame_layout and used by prologue/epilogue + expander to determine the style used. */ int use_fast_prologue_epilogue; /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE has been computed for. */ @@ -2453,6 +2454,7 @@ struct machine_function GTY(()) #define ix86_stack_locals (cfun->machine->stack_locals) #define ix86_save_varrargs_registers (cfun->machine->save_varrargs_registers) #define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching) +#define ix86_current_function_needs_cld (cfun->machine->needs_cld) #define ix86_tls_descriptor_calls_expanded_in_cfun \ (cfun->machine->tls_descriptor_call_expanded_p) /* Since tls_descriptor_call_expanded is not cleared, even if all TLS |