aboutsummaryrefslogtreecommitdiff
path: root/target-alpha
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-03-19 12:38:42 -0700
committerRichard Henderson <rth@twiddle.net>2014-04-17 11:47:42 -0700
commit76bff4f82f262dfb6eb0bbd800511d322e64817a (patch)
treeb6f2008abed5ce47eb1ff1b517fca99f508571f3 /target-alpha
parente20b8c04a3fde9deec9d9460d8ece769ef9484b7 (diff)
target-alpha: Convert gen_bcond to source/sink
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha')
-rw-r--r--target-alpha/translate.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index ec5b523ccf..31136f9931 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);
}