qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 3/3] target-m68k: add cas/cas2 ops


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH v2 3/3] target-m68k: add cas/cas2 ops
Date: Thu, 3 Nov 2016 19:03:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Le 03/11/2016 à 17:36, Richard Henderson a écrit :
> On 11/02/2016 03:15 PM, Laurent Vivier wrote:
>> +    if (c1 != l1) {
>> +        env->cc_n = l1;
>> +        env->cc_v = c1;
>> +    } else {
>> +        env->cc_n = l2;
>> +        env->cc_v = c2;
>> +    }
>> +    env->cc_op = CC_OP_CMPL;
>> +    env->dregs[Dc1] = deposit32(env->dregs[Dc1], 0, 16, l1);
>> +    env->dregs[Dc2] = deposit32(env->dregs[Dc2], 0, 16, l2);
> 
> CC_OP_CMPW for cas2w.

It was working because I have used helper_be_ldsw_mmu() to load values,
is it better to use helper_be_lduw_mmu with CC_OP_CMPW?

>> +DISAS_INSN(cas2l)
>> +{
> ...
>> +   regs = tcg_const_i32(REG(ext2, 6) |
>> +                        (REG(ext1, 6) << 3) |
>> +                        (REG(ext2, 0) << 6) |
>> +                        (REG(ext1, 0) << 9));
>> +   gen_helper_cas2w(cpu_env, regs, addr1, addr2);
> 
> cas2l.

I should not use values with the high word equal to the low word to test
this...

Many thanks,
Laurent



reply via email to

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