Re: [PATCH v3 15/38] target/s390x: Improve general case of disas_jcc

2024-01-19 Thread Philippe Mathieu-Daudé
On 17/1/24 04:19, Richard Henderson wrote: On 1/17/24 09:19, Philippe Mathieu-Daudé wrote: +    case 0x4 | 0x1: /* cc == 1 || cc == 3 => (cc & 1) != 0 */ +    cond = TCG_COND_TSTNE; +    c->u.s32.b = tcg_constant_i32(1); Don't we need to AND?    c->u.s32.a = tc

Re: [PATCH v3 15/38] target/s390x: Improve general case of disas_jcc

2024-01-16 Thread Richard Henderson
On 1/17/24 09:19, Philippe Mathieu-Daudé wrote: +    case 0x4 | 0x1: /* cc == 1 || cc == 3 => (cc & 1) != 0 */ +    cond = TCG_COND_TSTNE; +    c->u.s32.b = tcg_constant_i32(1); Don't we need to AND?   c->u.s32.a = tcg_temp_new_i32();   tcg_gen_and

Re: [PATCH v3 15/38] target/s390x: Improve general case of disas_jcc

2024-01-16 Thread Philippe Mathieu-Daudé
Hi Richard, On 10/1/24 23:43, Richard Henderson wrote: Avoid code duplication by handling 7 of the 14 cases by inverting the test for the other 7 cases. Use TCG_COND_TSTNE for cc in {1,3}. Use (cc - 1) <= 1 for cc in {1,2}. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c |

[PATCH v3 15/38] target/s390x: Improve general case of disas_jcc

2024-01-10 Thread Richard Henderson
Avoid code duplication by handling 7 of the 14 cases by inverting the test for the other 7 cases. Use TCG_COND_TSTNE for cc in {1,3}. Use (cc - 1) <= 1 for cc in {1,2}. Signed-off-by: Richard Henderson --- target/s390x/tcg/translate.c | 82 +--- 1 file changed, 3