Commit 1a1f7dbcf18c674bafd4536a8d125ce2ff987bf7
1 parent
8579095b
target-alpha: remove amask helper
The direct use of helper_amask in translate.c was bogus (as env is not assigned). Directly code amask in tcg and remove the helper. Signed-off-by: Tristan Gingold <gingold@adacore.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7075 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
13 additions
and
18 deletions
target-alpha/helper.h
@@ -3,7 +3,6 @@ | @@ -3,7 +3,6 @@ | ||
3 | DEF_HELPER_0(tb_flush, void) | 3 | DEF_HELPER_0(tb_flush, void) |
4 | 4 | ||
5 | DEF_HELPER_2(excp, void, int, int) | 5 | DEF_HELPER_2(excp, void, int, int) |
6 | -DEF_HELPER_1(amask, i64, i64) | ||
7 | DEF_HELPER_0(load_pcc, i64) | 6 | DEF_HELPER_0(load_pcc, i64) |
8 | DEF_HELPER_0(rc, i64) | 7 | DEF_HELPER_0(rc, i64) |
9 | DEF_HELPER_0(rs, i64) | 8 | DEF_HELPER_0(rs, i64) |
target-alpha/op_helper.c
@@ -37,21 +37,6 @@ void helper_excp (int excp, int error) | @@ -37,21 +37,6 @@ void helper_excp (int excp, int error) | ||
37 | cpu_loop_exit(); | 37 | cpu_loop_exit(); |
38 | } | 38 | } |
39 | 39 | ||
40 | -uint64_t helper_amask (uint64_t arg) | ||
41 | -{ | ||
42 | - switch (env->implver) { | ||
43 | - case IMPLVER_2106x: | ||
44 | - /* EV4, EV45, LCA, LCA45 & EV5 */ | ||
45 | - break; | ||
46 | - case IMPLVER_21164: | ||
47 | - case IMPLVER_21264: | ||
48 | - case IMPLVER_21364: | ||
49 | - arg &= ~env->amask; | ||
50 | - break; | ||
51 | - } | ||
52 | - return arg; | ||
53 | -} | ||
54 | - | ||
55 | uint64_t helper_load_pcc (void) | 40 | uint64_t helper_load_pcc (void) |
56 | { | 41 | { |
57 | /* XXX: TODO */ | 42 | /* XXX: TODO */ |
target-alpha/translate.c
@@ -1160,9 +1160,20 @@ static always_inline int translate_one (DisasContext *ctx, uint32_t insn) | @@ -1160,9 +1160,20 @@ static always_inline int translate_one (DisasContext *ctx, uint32_t insn) | ||
1160 | /* AMASK */ | 1160 | /* AMASK */ |
1161 | if (likely(rc != 31)) { | 1161 | if (likely(rc != 31)) { |
1162 | if (islit) | 1162 | if (islit) |
1163 | - tcg_gen_movi_i64(cpu_ir[rc], helper_amask(lit)); | 1163 | + tcg_gen_movi_i64(cpu_ir[rc], lit); |
1164 | else | 1164 | else |
1165 | - gen_helper_amask(cpu_ir[rc], cpu_ir[rb]); | 1165 | + tcg_gen_mov_i64(cpu_ir[rc], cpu_ir[rb]); |
1166 | + switch (ctx->env->implver) { | ||
1167 | + case IMPLVER_2106x: | ||
1168 | + /* EV4, EV45, LCA, LCA45 & EV5 */ | ||
1169 | + break; | ||
1170 | + case IMPLVER_21164: | ||
1171 | + case IMPLVER_21264: | ||
1172 | + case IMPLVER_21364: | ||
1173 | + tcg_gen_andi_i64(cpu_ir[rc], cpu_ir[rc], | ||
1174 | + ~(uint64_t)ctx->amask); | ||
1175 | + break; | ||
1176 | + } | ||
1166 | } | 1177 | } |
1167 | break; | 1178 | break; |
1168 | case 0x64: | 1179 | case 0x64: |