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
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
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 |
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