On Sat, Nov 13, 2010 at 2:27 AM, Paolo Bonzini <bonz...@gnu.org> wrote:
> On 11/12/2010 03:25 PM, H.J. Lu wrote:
>>
>> IRA may move instructions across an unspec_volatile,
>
> Do you have a testcase?
>

x86 has

;; Clear the upper 128bits of AVX registers, equivalent to a NOP
;; if the upper 128bits are unused.
(define_insn "avx_vzeroupper"
  [(unspec_volatile [(match_operand 0 "const_int_operand" "")]
                    UNSPECV_VZEROUPPER)]
  "TARGET_AVX"
  "vzeroupper"
  [(set_attr "type" "sse")
   (set_attr "modrm" "0")
   (set_attr "memory" "none")
   (set_attr "prefix" "vex")
   (set_attr "mode" "OI")])

It is no-nop, but it has to be in the place where it was expanded.
Since there is no register operand, IRA moves instructions across
it.  We have to undo IRA moves in ix86_reorg.

We have memory barrier. But we don't have register barrier.

-- 
H.J.

Reply via email to