[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Modified OpenRisc fpu exception
From: |
Wei-Ren Chen |
Subject: |
Re: [Qemu-devel] [PATCH] Modified OpenRisc fpu exception |
Date: |
Fri, 30 Nov 2012 22:59:37 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> -void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp)
> +void QEMU_NORETURN do_raise_exception_err(OpenRISCCPU *cpu,
> + uint32_t exception,
> + uintptr_t pc)
> {
> - cpu->env.exception_index = excp;
> + TranslationBlock *tb;
> +
> + /* openrisc cpu has fifteen exceptions */
> + if (exception < 0xe)
> + qemu_log("%s: %d\n", __func__, exception);
> +
> + cpu->env.exception_index = exception;
> +
> + if (pc) {
> + /* now we have a real cpu fault */
> + tb = tb_find_pc(pc);
> + if (tb) {
> + /* the PC is inside the translated code. It means that we have
> + a virtual CPU fault */
> + cpu_restore_state(tb, &cpu->env, pc);
> + }
> + }
> +
> cpu_loop_exit(&cpu->env);
> }
> +
> +void QEMU_NORETURN do_raise_exception(OpenRISCCPU *cpu,
> + uint32_t exception,
> + uintptr_t pc)
> +{
> + do_raise_exception_err(cpu, exception, pc);
> +}
Please change your subject into "[PATCH v2] ..." so that others will
notice this is a new version patch. See [1] for more detail. Also, you
still doesn't address v1's comment. Why you put both do_raise_exception_err
and do_raise_exception here? It's unnecessary to me.
Regards,
chenwj
[1] http://wiki.qemu.org/Contribute/SubmitAPatch
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj