Re: [Qemu-devel] [PATCH 02/17] target-openrisc: Streamline arithmetic and OVE

2015-09-04 Thread Bastian Koppelmann
On 09/03/2015 04:44 PM, Richard Henderson wrote: That's patch 7/17. ;-) Woops , I just realized ;-) R0 is not an *architectural* zero. It's a software convention. The spec is fairly clear on this point. I agree that there ought to be some special-casing of the software convention, but

Re: [Qemu-devel] [PATCH 02/17] target-openrisc: Streamline arithmetic and OVE

2015-09-03 Thread Richard Henderson
On 09/03/2015 07:16 AM, Bastian Koppelmann wrote: On 09/03/2015 02:17 AM, Richard Henderson wrote: + +void HELPER(ove)(CPUOpenRISCState *env, target_ulong test) +{ +if (unlikely(test) && (env->sr & SR_OVE)) { +OpenRISCCPU *cpu = openrisc_env_get_cpu(env); +CPUState *cs = CP

Re: [Qemu-devel] [PATCH 02/17] target-openrisc: Streamline arithmetic and OVE

2015-09-03 Thread Bastian Koppelmann
On 09/03/2015 02:17 AM, Richard Henderson wrote: + +void HELPER(ove)(CPUOpenRISCState *env, target_ulong test) +{ +if (unlikely(test) && (env->sr & SR_OVE)) { +OpenRISCCPU *cpu = openrisc_env_get_cpu(env); +CPUState *cs = CPU(cpu); + +cs->exception_index = EXCP_RANGE

[Qemu-devel] [PATCH 02/17] target-openrisc: Streamline arithmetic and OVE

2015-09-02 Thread Richard Henderson
Simplify overflow calculation. Move overflow exception check to a helper function, to eliminate inline branches. Signed-off-by: Richard Henderson --- target-openrisc/exception_helper.c | 12 ++ target-openrisc/helper.h | 1 + target-openrisc/translate.c| 426 +++