[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 31/40] target-alpha: Convert gen_bcond to source/sin
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 31/40] target-alpha: Convert gen_bcond to source/sink |
Date: |
Thu, 17 Apr 2014 12:33:06 -0700 |
Signed-off-by: Richard Henderson <address@hidden>
---
target-alpha/translate.c | 24 ++++++------------------
1 file changed, 6 insertions(+), 18 deletions(-)
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index ec5b523..31136f9 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -497,15 +497,11 @@ static ExitStatus gen_bcond(DisasContext *ctx, TCGCond
cond, int ra,
{
TCGv cmp_tmp;
- if (unlikely(ra == 31)) {
- cmp_tmp = tcg_const_i64(0);
- } else {
+ if (mask) {
cmp_tmp = tcg_temp_new();
- if (mask) {
- tcg_gen_andi_i64(cmp_tmp, cpu_ir[ra], 1);
- } else {
- tcg_gen_mov_i64(cmp_tmp, cpu_ir[ra]);
- }
+ tcg_gen_andi_i64(cmp_tmp, load_gpr(ctx, ra), 1);
+ } else {
+ cmp_tmp = load_gpr(ctx, ra);
}
return gen_bcond_internal(ctx, cond, cmp_tmp, disp);
@@ -546,16 +542,8 @@ static void gen_fold_mzero(TCGCond cond, TCGv dest, TCGv
src)
static ExitStatus gen_fbcond(DisasContext *ctx, TCGCond cond, int ra,
int32_t disp)
{
- TCGv cmp_tmp;
-
- if (unlikely(ra == 31)) {
- /* Very uncommon case, but easier to optimize it to an integer
- comparison than continuing with the floating point comparison. */
- return gen_bcond(ctx, cond, ra, disp, 0);
- }
-
- cmp_tmp = tcg_temp_new();
- gen_fold_mzero(cond, cmp_tmp, cpu_fir[ra]);
+ TCGv cmp_tmp = tcg_temp_new();
+ gen_fold_mzero(cond, cmp_tmp, load_fpr(ctx, ra));
return gen_bcond_internal(ctx, cond, cmp_tmp, disp);
}
--
1.9.0
- [Qemu-devel] [PATCH 20/40] target-alpha: Convert gen_cmov to source/sink, (continued)
- [Qemu-devel] [PATCH 20/40] target-alpha: Convert gen_cmov to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 22/40] target-alpha: Convert gen_ext_h/l to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 21/40] target-alpha: Convert gen_msk_h/l to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 23/40] target-alpha: Convert gen_ins_h/l to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 24/40] target-alpha: Convert gen_zap/not to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 25/40] target-alpha: Convert FARITH2 to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 26/40] target-alpha: Convert FARITH3 to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 27/40] target-alpha: Convert ARITH3 to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 29/40] target-alpha: Convert gen_ieee_input to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 28/40] target-alpha: Convert MVIOP2 to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 31/40] target-alpha: Convert gen_bcond to source/sink,
Richard Henderson <=
- [Qemu-devel] [PATCH 30/40] target-alpha: Convert most ieee insns to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 32/40] target-alpha: Convert gen_fcmov to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 33/40] target-alpha: Convert gen_fcvtlq/ql to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 34/40] target-alpha: Convert gen_cpys et al to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 38/40] target-alpha: Don't issue goto_tb under singlestep, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 39/40] target-alpha: Tidy alpha_translate_init, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 40/40] target-alpha: Remove cpu_unique, cpu_sysval, cpu_usp, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 35/40] target-alpha: Convert mfpr/mtpr to source/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 37/40] target-alpha: Use non-local temps for zero/sink, Richard Henderson, 2014/04/17
- [Qemu-devel] [PATCH 36/40] target-alpha: Use extract to get insn fields, Richard Henderson, 2014/04/17