Re: [PATCH] LoongArch: Use finer-grained DBAR hints

2023-11-13 Thread chenglulu
在 2023/11/14 上午7:18, Xi Ruoyao 写道: /* snip */ (define_insn "mem_thread_fence_1" [(set (match_operand:BLK 0 "" "") (unspec:BLK [(match_dup 0)] UNSPEC_MEMORY_BARRIER)) (match_operand:SI 1 "const_int_operand" "")] ;; model "" - "dbar\t0") + { +enum memmodel model = memm

[PATCH] LoongArch: Use finer-grained DBAR hints

2023-11-13 Thread Xi Ruoyao
LA664 defines DBAR hints 0x1 - 0x1f (except 0xf and 0x1f) as follows [1-2]: - Bit 4: kind of constraint (0: completion, 1: ordering) - Bit 3: barrier for previous read (0: true, 1: false) - Bit 2: barrier for previous write (0: true, 1: false) - Bit 1: barrier for succeeding read (0: true, 1: fals