On Tue, May 31, 2016 at 4:27 PM, Richard Henderson <r...@twiddle.net> wrote:
> On 05/31/2016 11:39 AM, Pranith Kumar wrote:
>>
>> +    case INDEX_op_mb:
>> +        tcg_out_mb(s);
>
>
> You need to look at the barrier type and DTRT.  In particular, the Linux
> smp_rmb and smp_wmb types need not emit any code.

These are converted to 'lfence' and 'sfence' instructions. Based on
the target backend, I think we still need to emit barrier
instructions. For example, if target backend is ARMv7 we need to emit
'dmb' instruction for both x86 fence instructions. I am not sure why
they do not emit any code?

>
>> +    { INDEX_op_mb, { "r" } },
>
>
> You certainly do *not* need the constant argument loaded into a register.
> This should remain { }.
>

OK, I will fix this.

Thanks,
-- 
Pranith

Reply via email to