Add option -mfence-as-lock-add=[no|yes].
authorAndrew Senkevich <andrew.senkevich@intel.com>
Fri, 29 Jan 2016 12:46:50 +0000 (15:46 +0300)
committerAndrew Senkevich <andrew.senkevich@intel.com>
Fri, 29 Jan 2016 12:46:50 +0000 (15:46 +0300)
commite4e00185b58fd15c74913f19f4d5fb311b239e21
tree92754b63964dbcf1598666118acc3876c61c1382
parentd64450d73aedfbd3521872e1ff7ec4f16ef0aae1
Add option -mfence-as-lock-add=[no|yes].

With -mfence-as-lock-add=yes lfence, mfence and sfence will be encoded
as lock addl $0x0, (%{r,e}sp).

gas/:

    * config/tc-i386.c (avoid_fence): New.
    (output_insn): Encode as lock addl $0x0, (%{r,e}sp) if avoid_fence
    is true.
    (OPTION_FENCE_AS_LOCK_ADD): New.
    (md_longopts): Add -mfence-as-lock-add.
    (md_parse_option): Handle -mfence-as-lock-add.
    (md_show_usage): Add -mfence-as-lock-add=[no|yes].
    * doc/c-i386.texi (-mfence-as-lock-add): Document.

gas/testsuite/:

    * gas/i386/i386.exp: Run new tests.
    * gas/i386/fence-as-lock-add.s: New.
    * gas/i386/fence-as-lock-add-yes.d: Likewise.
    * gas/i386/fence-as-lock-add-no.d: Likewise.
    * gas/i386/x86-64-fence-as-lock-add-yes.d: Likewise.
    * gas/i386/x86-64-fence-as-lock-add-no.d: Likewise.
gas/ChangeLog
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/fence-as-lock-add-no.d [new file with mode: 0644]
gas/testsuite/gas/i386/fence-as-lock-add-yes.d [new file with mode: 0644]
gas/testsuite/gas/i386/fence-as-lock-add.s [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/x86-64-fence-as-lock-add-no.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-fence-as-lock-add-yes.d [new file with mode: 0644]
This page took 0.039114 seconds and 4 git commands to generate.