| Submitter | Uros Bizjak |
|---|---|
| Date | April 18, 2012, 10:12 a.m. |
| Message ID | <CAFULd4b-2zx7neC_Tvx1hTxuLm7vBZaDq_sJRT=UAB0VjULDrA@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/153461/ |
| State | New |
| Headers | show |
Comments
Sure, thanks for prompt! On Wed, Apr 18, 2012 at 2:12 PM, Uros Bizjak <ubizjak@gmail.com> wrote: > On Wed, Apr 18, 2012 at 11:34 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote: >> Hello guys, >> Since there is no more objections to my RFC, started here [1], >> I've implemented rest __atomic builtins in the same way. >> It corresponds to Spec, which can be found here [2]. > > Can you please implement printing of HLE prefix with %K operand > modifier, like sync.md example in attached (untested) patch? > > Uros.
Patch
Index: i386/i386.md =================================================================== --- i386/i386.md (revision 186558) +++ i386/i386.md (working copy) @@ -58,6 +58,7 @@ ;; X -- don't print any sort of PIC '@' suffix for a symbol. ;; & -- print some in-use local-dynamic symbol name. ;; H -- print a memory address offset by 8; used for sse high-parts +;; K -- print HLE lock prefix ;; Y -- print condition for XOP pcom* instruction. ;; + -- print a branch hint as 'cs' or 'ds' prefix ;; ; -- print a semicolon (after prefixes due to bug in older gas). Index: i386/sync.md =================================================================== --- i386/sync.md (revision 186558) +++ i386/sync.md (working copy) @@ -455,7 +455,7 @@ (match_operand:SWI 2 "nonmemory_operand" "0"))) (clobber (reg:CC FLAGS_REG))] "TARGET_XADD" - "lock{%;} xadd{<imodesuffix>}\t{%0, %1|%1, %0}") + "lock{%;} %K3xadd{<imodesuffix>}\t{%0, %1|%1, %0}") ;; This peephole2 and following insn optimize ;; __sync_fetch_and_add (x, -N) == N into just lock {add,sub,inc,dec}