qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr
Date: Fri, 19 Sep 2014 15:31:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Il 18/09/2014 23:38, Richard Henderson ha scritto:
> On 09/15/2014 08:03 AM, Paolo Bonzini wrote:
>> +static inline void gen_op_mfcr(TCGv_i32 dest, int first_cr, int shift)
>> +{
>> +    tcg_gen_shli_i32(dest, cpu_crf[first_cr >> 2], shift);
>> +}
>> +
>> +static inline void gen_op_mtcr(int first_cr, TCGv_i32 src, int shift)
>> +{
>> +    if (shift) {
>> +        tcg_gen_shri_i32(cpu_crf[first_cr >> 2], src, shift);
>> +        tcg_gen_andi_i32(cpu_crf[first_cr >> 2], cpu_crf[first_cr >> 2], 
>> 0x0F);
>> +    } else {
>> +        tcg_gen_andi_i32(cpu_crf[first_cr >> 2], src, 0x0F);
>> +    }
>> +}
> 
> Continuing on the name nit-picking, these *are* the mfocr and mtocr 
> operations.

Ok, will swap.

Paolo




reply via email to

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