Re: [Qemu-devel] [PATCH v3 07/15] target-ppc: implement branch-less divw[o][.]

2016-07-25 Thread Nikunj A Dadhania
Richard Henderson writes: > On 07/25/2016 10:50 PM, Nikunj A Dadhania wrote: >> if (compute_ov) { >> -tcg_gen_movi_tl(cpu_ov, 1); >> -tcg_gen_movi_tl(cpu_so, 1); >> +tcg_gen_extu_i32_tl(cpu_ov, t2); >> +tcg_gen_extu_i32_tl(cpu_so, t2); >> } > > This shoul

Re: [Qemu-devel] [PATCH v3 07/15] target-ppc: implement branch-less divw[o][.]

2016-07-25 Thread Richard Henderson
On 07/25/2016 10:50 PM, Nikunj A Dadhania wrote: if (compute_ov) { -tcg_gen_movi_tl(cpu_ov, 1); -tcg_gen_movi_tl(cpu_so, 1); +tcg_gen_extu_i32_tl(cpu_ov, t2); +tcg_gen_extu_i32_tl(cpu_so, t2); } This should be tcg_gen_extu_i32_tl(cpu_ov, t2); tcg_g

[Qemu-devel] [PATCH v3 07/15] target-ppc: implement branch-less divw[o][.]

2016-07-25 Thread Nikunj A Dadhania
While implementing modulo instructions figured out that the implementation uses many branches. Change the logic to achieve the branch-less code. Undefined value is set to dividend in case of invalid input. Signed-off-by: Nikunj A Dadhania --- target-ppc/translate.c | 48 +++--