qemu-e2k/target
Taylor Simpson e28b77a6b4 Hexagon (target/hexagon) Remove gen_log_predicated_reg_write[_pair]
We assign the instruction destination register to hex_new_value[num]
instead of a TCG temp that gets copied back to hex_new_value[num].

We introduce new functions get_result_gpr[_pair] to facilitate getting
the proper destination register.

Since we preload hex_new_value for predicated instructions, we don't
need the check for slot_cancelled.  So, we call gen_log_reg_write instead.

We update the helper function generation and gen_tcg.h to maintain the
disable-hexagon-idef-parser configuration.

Here is a simple example of the differences in the TCG code generated:

IN:
0x00400094:  0xf900c102 {       if (P0) R2 = and(R0,R1) }

BEFORE
 ---- 00400094
 mov_i32 slot_cancelled,$0x0
 mov_i32 new_r2,r2
 mov_i32 loc2,$0x0
 and_i32 tmp0,p0,$0x1
 brcond_i32 tmp0,$0x0,eq,$L1
 and_i32 tmp0,r0,r1
 mov_i32 loc2,tmp0
 br $L2
 set_label $L1
 or_i32 slot_cancelled,slot_cancelled,$0x8
 set_label $L2
 and_i32 tmp0,slot_cancelled,$0x8
 movcond_i32 new_r2,tmp0,$0x0,loc2,new_r2,eq
 mov_i32 r2,new_r2

AFTER
 ---- 00400094
 mov_i32 slot_cancelled,$0x0
 mov_i32 new_r2,r2
 and_i32 tmp0,p0,$0x1
 brcond_i32 tmp0,$0x0,eq,$L1
 and_i32 tmp0,r0,r1
 mov_i32 new_r2,tmp0
 br $L2
 set_label $L1
 or_i32 slot_cancelled,slot_cancelled,$0x8
 set_label $L2
 mov_i32 r2,new_r2

We'll remove the unnecessary manipulation of slot_cancelled in a
subsequent patch.

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20230307025828.1612809-13-tsimpson@quicinc.com>
2023-03-06 20:47:12 -08:00
..
alpha target/alpha: Drop tcg_temp_free 2023-03-05 13:44:07 -08:00
arm target/arm: Drop tcg_temp_free from translator.h 2023-03-05 13:44:07 -08:00
avr target/avr: Drop tcg_temp_free 2023-03-05 13:44:07 -08:00
cris target/cris: Drop tcg_temp_free 2023-03-05 13:44:07 -08:00
hexagon Hexagon (target/hexagon) Remove gen_log_predicated_reg_write[_pair] 2023-03-06 20:47:12 -08:00
hppa target/hppa: Drop tcg_temp_free 2023-03-05 13:44:07 -08:00
i386 target/i386: Simplify POPF 2023-03-05 13:45:31 -08:00
loongarch target/loongarch: Drop tcg_temp_free 2023-03-05 13:44:07 -08:00
m68k target/m68k: Drop tcg_temp_free 2023-03-05 13:44:07 -08:00
microblaze target/microblaze: Avoid tcg_const_* throughout 2023-03-05 13:45:44 -08:00
mips target/mips: Fix trans_mult_acc return 2023-03-05 13:44:08 -08:00
nios2 target/nios2: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
openrisc target/openrisc: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
ppc target/ppc: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
riscv target/riscv: Avoid tcg_const_* 2023-03-05 13:46:13 -08:00
rx target/rx: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
s390x target/s390x: Split out gen_ri2 2023-03-05 13:46:26 -08:00
sh4 target/sh4: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
sparc target/sparc: Avoid tcg_const_{tl,i32} 2023-03-05 13:46:39 -08:00
tricore target/tricore: Drop tcg_temp_free 2023-03-05 13:44:08 -08:00
xtensa target/xtensa: Avoid tcg_const_i32 2023-03-05 13:47:25 -08:00
Kconfig hw/loongarch: Add support loongson3 virt machine type. 2022-06-06 18:09:03 +00:00
meson.build target/loongarch: Add target build suport 2022-06-06 18:09:03 +00:00