Hi Richard.

Thank you for finding a bug.
As for the testing
1. I have a small program that calculates fibonacci numbers. I use it to
test mainly stack operations for different CPU flavors (1, 2 or 3 bytes PC).
2. I manually verified that I can debug with gdb, that includes
    a. stepping
    b. running
    c. stopping
    d. breakpoints
    e. backtrace shows correct stack
3. I manually verified that I can save and load vm states
4. `make check` passes

If you please point me to a doc that explains how automatic unit tests can
be added to a QEMU target, I will happily add them.


Regards,
Michael


On Wed, Jul 5, 2017 at 1:38 AM, Richard Henderson <r...@twiddle.net> wrote:

> On 06/21/2017 09:15 PM, Michael Rolnik wrote:
>
>> Hi all,
>>
>> are there any action items for me?
>>
>
> What kind of testing are you doing for this?
>
> I just briefly browsed through the code again and happened to see that ROR
> has a critical typo.  Considering that ROR must be used for multi-byte
> shifts, I'm wondering how you wouldn't have found this via even cursory
> testing.
>
> +int avr_translate_ROR(CPUAVRState *env, DisasContext *ctx, uint32_t
>> opcode)
>> +{
>> +    TCGv Rd = cpu_r[ROR_Rd(opcode)];
>> +    TCGv t0 = tcg_temp_new_i32();
>> +
>> +    tcg_gen_shli_tl(t0, cpu_Cf, 7);
>> +    tcg_gen_andi_tl(cpu_Cf, Rd, 0);
>>
>
>
> r~
>



-- 
Best Regards,
Michael Rolnik

Reply via email to