qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] target-or32: Improve float exception


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] target-or32: Improve float exception
Date: Thu, 22 Nov 2012 19:06:13 +0000

On 22 November 2012 18:45, 陳韋任 (Wei-Ren Chen) <address@hidden> wrote:
>> > +void QEMU_NORETURN do_raise_exception_err(OpenRISCCPU *cpu,
>> > +                                          uint32_t exception,
>> > +                                          uintptr_t pc)
>> > +{
>> > +    TranslationBlock *tb;
>> > +#if 1
>> > +    if (exception < 0x100)
>> > +        qemu_log("%s: %d\n", __func__, exception);
>> > +#endif
>>
>> Stray debug tracing?
>
>   target-mips/op_helper.c also has such "#if 1 .. #endif".
> Should we remove it?

Well, qemu_log() only actually does anything if logging
is enabled [which I had forgotten], so that part is OK.
However I don't think we should have the #if 1..#endif.
Either we want the code or we don't; #if 1 or #if 0 is
rarely a good idea.

Also, (1) why are exceptions < 0x100 the only interesting
ones? (2) does this really apply equally to mips and openrisc,
or was it just an accidental code copying? (3) braces :-).

-- PMM



reply via email to

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