aboutsummaryrefslogtreecommitdiff
path: root/target-tilegx/translate.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-08-22 00:15:07 -0700
committerRichard Henderson <rth@twiddle.net>2015-09-15 07:45:33 -0700
commitf090f9f7ce6bc112710a693e176341b5031eafd8 (patch)
treec7504419fa68fc5f2d30b51d0efe53a0f7e9ff7c /target-tilegx/translate.c
parent2369976deb9fa03bb32be690025a6f51de4cd377 (diff)
downloadqemu-f090f9f7ce6bc112710a693e176341b5031eafd8.zip
qemu-f090f9f7ce6bc112710a693e176341b5031eafd8.tar.gz
qemu-f090f9f7ce6bc112710a693e176341b5031eafd8.tar.bz2
target-tilegx: Handle conditional move instructions
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-tilegx/translate.c')
-rw-r--r--target-tilegx/translate.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c
index f15d0d0..31b6a6c 100644
--- a/target-tilegx/translate.c
+++ b/target-tilegx/translate.c
@@ -503,9 +503,16 @@ static TileExcp gen_rrr_opcode(DisasContext *dc, unsigned opext,
break;
case OE_RRR(CMOVEQZ, 0, X0):
case OE_RRR(CMOVEQZ, 4, Y0):
+ tcg_gen_movcond_tl(TCG_COND_EQ, tdest, tsrca, load_zero(dc),
+ tsrcb, load_gr(dc, dest));
+ mnemonic = "cmoveqz";
+ break;
case OE_RRR(CMOVNEZ, 0, X0):
case OE_RRR(CMOVNEZ, 4, Y0):
- return TILEGX_EXCP_OPCODE_UNIMPLEMENTED;
+ tcg_gen_movcond_tl(TCG_COND_NE, tdest, tsrca, load_zero(dc),
+ tsrcb, load_gr(dc, dest));
+ mnemonic = "cmovnez";
+ break;
case OE_RRR(CMPEQ, 0, X0):
case OE_RRR(CMPEQ, 0, X1):
case OE_RRR(CMPEQ, 3, Y0):