qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 for-2.12 01/10] s390x/tcg: ASI/ASGI are atomi


From: David Hildenbrand
Subject: Re: [Qemu-devel] [PATCH v2 for-2.12 01/10] s390x/tcg: ASI/ASGI are atomic with interlocked-acccess facility 1
Date: Fri, 8 Dec 2017 13:51:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 08.12.2017 00:41, Richard Henderson wrote:
> On 12/07/2017 08:53 AM, David Hildenbrand wrote:
>> +static ExitStatus op_asi(DisasContext *s, DisasOps *o)
>> +{
>> +    o->in1 = tcg_temp_new_i64();
>> +    /* Perform the atomic addition in memory. */
>> +    tcg_gen_atomic_fetch_add_i64(o->in1, o->addr1, o->in2, get_mem_index(s),
>> +                                 s->insn->data);
>> +    /* However, we need to recompute the addition for setting CC.  */
>> +    tcg_gen_add_i64(o->out, o->in1, o->in2);
>> +    return NO_EXIT;
>> +}
> 
> Is it worth conditionalizing the atomic operation on having
> interlocked-access-facility-1 enabled?
> 

Should be easily doable with a few LOC. Will give it a shot.

> 
> r~
> 


-- 

Thanks,

David / dhildenb



reply via email to

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