public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kees at outflux dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/101891] New: Adjust -fzero-call-used-regs to always use XOR Date: Thu, 12 Aug 2021 19:47:40 +0000 [thread overview] Message-ID: <bug-101891-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101891 Bug ID: 101891 Summary: Adjust -fzero-call-used-regs to always use XOR Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: kees at outflux dot net Target Milestone: --- Currently -fzero-call-used-regs will use a pattern of: XOR regA,regA MOV regA,regB MOV regA,regC ... RET However, this introduces both a register ordering dependency (e.g. the CPU cannot clear regB without clearing regA first), and while greatly reduces available ROP gadgets, it does technically leave a set of "MOV" ROP gadgets at the end of functions (e.g. "MOV regA,regC; RET"). Please switch to always using XOR: XOR regA,regA XOR regB,regB XOR regC,regC ... RET
next reply other threads:[~2021-08-12 19:47 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-12 19:47 kees at outflux dot net [this message] 2021-08-12 20:08 ` [Bug target/101891] " pinskia at gcc dot gnu.org 2022-01-28 20:29 ` qinzhao at gcc dot gnu.org 2022-05-05 13:35 ` qinzhao at gcc dot gnu.org 2022-05-09 15:37 ` cvs-commit at gcc dot gnu.org 2022-05-09 15:43 ` qinzhao at gcc dot gnu.org 2022-05-24 15:04 ` cvs-commit at gcc dot gnu.org 2022-05-24 15:55 ` cvs-commit at gcc dot gnu.org 2022-05-24 15:55 ` qinzhao at gcc dot gnu.org 2022-05-24 16:42 ` arjan at linux dot intel.com 2022-05-24 18:47 ` qing.zhao at oracle dot com 2022-05-24 18:55 ` arjan at linux dot intel.com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101891-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).