target-alpha: Fix FMOV.

Properly handle move from the zero register.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
master
Richard Henderson 2009-12-11 13:21:02 -08:00 committed by Aurelien Jarno
parent 50eb6e5c04
commit a06d48d91f
1 changed files with 7 additions and 3 deletions

View File

@ -1834,12 +1834,16 @@ static inline int translate_one(DisasContext *ctx, uint32_t insn)
break;
case 0x020:
if (likely(rc != 31)) {
if (ra == rb)
if (ra == rb) {
/* FMOV */
tcg_gen_mov_i64(cpu_fir[rc], cpu_fir[ra]);
else
if (ra == 31)
tcg_gen_movi_i64(cpu_fir[rc], 0);
else
tcg_gen_mov_i64(cpu_fir[rc], cpu_fir[ra]);
} else {
/* CPYS */
gen_fcpys(ra, rb, rc);
}
}
break;
case 0x021: