qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructio


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 12/12 v9] target-tilegx: Generate tcg instructions to execute to 1st system call
Date: Tue, 21 Apr 2015 22:31:26 +0100

On 21 April 2015 at 22:23, Chen Gang <address@hidden> wrote:
> On 4/22/15 05:15, Peter Maydell wrote:
>> will work in place of both of the above (and does this CPU
>> really only have two kinds of compare-immediate? Some of the
>> case labels suggest not, so it would be better to just implement
>> all the compare-immediates together in one patch.)
>>
>> You can probably use a function to do the sub-opcode-to-TCGCond
>> lookup too.
>>
>> Having dozens of two line functions that all look incredibly
>> similar is a really strong sign that you haven't taken
>> advantage of the commonality between them. CPU instruction
>> sets are usually pretty regular if they're well designed and
>> the resulting translate.c should also look pretty regular.
>>
>
> I guess what you said is correct, but at present, I did not think of all
> gen_cmp* (but it should really be done at last).
>
> So for me, at present, we can leave it as current implementation (Add
> FIXME comment). And at last (when almost finish all opcode decoding), I
> shall rewrite it again.

If you rewrite it all at the end then we get twice the code
review work to do. Please just do it right the first time.

-- PMM



reply via email to

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