aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2023-11-10 16:22:44 +0100
committerUros Bizjak <ubizjak@gmail.com>2023-11-10 16:23:52 +0100
commit1ae921db2fbe0aed5860f560d52bf8920bd8e0f9 (patch)
tree3e6b04acbf7001b7b49ff2aa2ef6bfd2055b2e14 /gcc/fold-const.cc
parent99177446a22a489ccd60d374f13d8bb7237d54c2 (diff)
downloadgcc-1ae921db2fbe0aed5860f560d52bf8920bd8e0f9.zip
gcc-1ae921db2fbe0aed5860f560d52bf8920bd8e0f9.tar.gz
gcc-1ae921db2fbe0aed5860f560d52bf8920bd8e0f9.tar.bz2
i386: Clear stack protector scratch with zero/sign-extend instruction
Use unrelated register initializations using zero/sign-extend instructions to clear stack protector scratch register. Hanlde only SI -> DImode extensions for 64-bit targets, as this is the only extension that triggers the peephole in a non-negligible number. Also use explicit check for word_mode instead of mode iterator in peephole2 patterns to avoid pattern explosion. gcc/ChangeLog: * config/i386/i386.md (stack_protect_set_1 peephole2): Explicitly check operand 2 for word_mode. (stack_protect_set_1 peephole2 #2): Ditto. (stack_protect_set_2 peephole2): Ditto. (stack_protect_set_3 peephole2): Ditto. (*stack_protect_set_4z_<mode>_di): New insn patter. (*stack_protect_set_4s_<mode>_di): Ditto. (stack_protect_set_4 peephole2): New peephole2 pattern to substitute stack protector scratch register clear with unrelated register initialization involving zero/sign-extend instruction.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions