qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v2 PATCH 02/13] tcg/i386: Add support for fence


From: Pranith Kumar
Subject: Re: [Qemu-devel] [RFC v2 PATCH 02/13] tcg/i386: Add support for fence
Date: Wed, 1 Jun 2016 14:49:51 -0400

On Tue, May 31, 2016 at 4:27 PM, Richard Henderson <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]