[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v19 00/13] QEMU AVR 8 bit cores
From: |
Michael Rolnik |
Subject: |
Re: [Qemu-devel] [PATCH RFC v19 00/13] QEMU AVR 8 bit cores |
Date: |
Wed, 5 Jul 2017 09:34:14 +0300 |
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 <address@hidden> 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