aboutsummaryrefslogtreecommitdiff
path: root/target-alpha
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-03-19 11:45:54 -0700
committerRichard Henderson <rth@twiddle.net>2014-04-17 11:47:42 -0700
commitb144be9e06de02e7c5cff2bed116fb867e6876c2 (patch)
tree3207a1a3e9dc26e9e283cc6b9e4e3cbae988273e /target-alpha
parent5e5863ecf1334cae944549dedbc43f2779599bfb (diff)
target-alpha: Convert gen_zap/not to source/sink
Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-alpha')
-rw-r--r--target-alpha/translate.c41
1 files changed, 11 insertions, 30 deletions
diff --git a/target-alpha/translate.c b/target-alpha/translate.c
index 5e52674497..cdece842f4 100644
--- a/target-alpha/translate.c
+++ b/target-alpha/translate.c
@@ -1169,38 +1169,11 @@ static void gen_zapnoti(TCGv dest, TCGv src, uint8_t lit)
tcg_gen_mov_i64(dest, src);
break;
default:
- tcg_gen_andi_i64 (dest, src, zapnot_mask (lit));
+ tcg_gen_andi_i64(dest, src, zapnot_mask(lit));
break;
}
}
-static inline void gen_zapnot(int ra, int rb, int rc, int islit, uint8_t lit)
-{
- if (unlikely(rc == 31)) {
- return;
- } else if (unlikely(ra == 31)) {
- tcg_gen_movi_i64(cpu_ir[rc], 0);
- } else if (islit) {
- gen_zapnoti(cpu_ir[rc], cpu_ir[ra], lit);
- } else {
- gen_helper_zapnot (cpu_ir[rc], cpu_ir[ra], cpu_ir[rb]);
- }
-}
-
-static inline void gen_zap(int ra, int rb, int rc, int islit, uint8_t lit)
-{
- if (unlikely(rc == 31)) {
- return;
- } else if (unlikely(ra == 31)) {
- tcg_gen_movi_i64(cpu_ir[rc], 0);
- } else if (islit) {
- gen_zapnoti(cpu_ir[rc], cpu_ir[ra], ~lit);
- } else {
- gen_helper_zap (cpu_ir[rc], cpu_ir[ra], cpu_ir[rb]);
- }
-}
-
-
/* EXTWH, EXTLH, EXTQH */
static void gen_ext_h(DisasContext *ctx, TCGv vc, TCGv va, int rb, bool islit,
uint8_t lit, uint8_t byte_mask)
@@ -2111,11 +2084,19 @@ static ExitStatus translate_one(DisasContext *ctx, uint32_t insn)
break;
case 0x30:
/* ZAP */
- gen_zap(ra, rb, rc, islit, lit);
+ if (islit) {
+ gen_zapnoti(vc, va, ~lit);
+ } else {
+ gen_helper_zap(vc, va, load_gpr(ctx, rb));
+ }
break;
case 0x31:
/* ZAPNOT */
- gen_zapnot(ra, rb, rc, islit, lit);
+ if (islit) {
+ gen_zapnoti(vc, va, lit);
+ } else {
+ gen_helper_zapnot(vc, va, load_gpr(ctx, rb));
+ }
break;
case 0x32:
/* MSKQL */