On 22 November 2012 18:45, 陳韋任 (Wei-Ren Chen) <che...@iis.sinica.edu.tw> 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