qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/14] i386: convert gen_compute_eflags_c to TCG


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 11/14] i386: convert gen_compute_eflags_c to TCG
Date: Wed, 10 Oct 2012 08:47:02 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1

Il 09/10/2012 22:07, Richard Henderson ha scritto:
>> > +    case CC_OP_ADCB:
>> > +    case CC_OP_ADCW:
>> > +    case CC_OP_ADCL:
>> > +    case CC_OP_ADCQ:
>> > +        /* (DATA_TYPE)CC_DST <= (DATA_TYPE)CC_SRC */
>> > +        size = (s->cc_op - CC_OP_ADDB) & 3;
>> > +        t1 = gen_ext_tl(cpu_tmp0, cpu_cc_src, size, false);
>> > +        t0 = gen_ext_tl(reg, cpu_cc_dst, size, false);
>> > +    adc_sbb:
>> > +        tcg_gen_setcond_tl(inv ? TCG_COND_GTU : TCG_COND_LEU, reg, t0, 
>> > t1);
>> > +        return;
> There's no point in handling these, because you can never see them
> assigned to s->cc_op.  The ADC/SBB translators always set CC_OP_DYNAMIC
> after dynamically selecting CC_OP_ADD or CC_OP_ADC based on the carry-in.
> 

That's correct, but compared to

    case CC_OP_ADCB:
    case CC_OP_ADCW:
    case CC_OP_ADCL:
    case CC_OP_ADCQ:
    case CC_OP_SBBB:
    case CC_OP_SBBW:
    case CC_OP_SBBL:
    case CC_OP_SBBQ:
        /* There's no point in handling these, because you can never
         * see them assigned to s->cc_op.  The ADC/SBB translators
         * always set CC_OP_DYNAMIC after dynamically selecting
         * CC_OP_ADD or CC_OP_ADC based on the carry-in.
         */
         abort();

it's not a great saving and it's a bit less self-documenting...

Paolo



reply via email to

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