diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2010-03-01 22:33:48 +0100 |
---|---|---|
committer | Andrzej Zaborowski <balrog@zabor.org> | 2010-03-02 22:17:43 +0100 |
commit | f72a6cd7c71d1220fb34e6d7325988429df5f267 (patch) | |
tree | 089e690bae1916a607a8c511e304cb180c32f320 | |
parent | 6b6586131b0af0106cd104bc8ce6a41c222c64bf (diff) |
tcg/arm: implement setcond
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
-rw-r--r-- | tcg/arm/tcg-target.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 7bdfda98ad..9a76ecb845 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -1531,6 +1531,14 @@ static inline void tcg_out_op(TCGContext *s, int opc, args[0], args[2], SHIFT_IMM_LSL(0)); tcg_out_goto_label(s, tcg_cond_to_arm_cond[args[4]], args[5]); break; + case INDEX_op_setcond_i32: + tcg_out_dat_reg(s, COND_AL, ARITH_CMP, 0, + args[1], args[2], SHIFT_IMM_LSL(0)); + tcg_out_dat_imm(s, tcg_cond_to_arm_cond[args[3]], + ARITH_MOV, args[0], 0, 1); + tcg_out_dat_imm(s, tcg_cond_to_arm_cond[tcg_invert_cond(args[3])], + ARITH_MOV, args[0], 0, 0); + break; case INDEX_op_qemu_ld8u: tcg_out_qemu_ld(s, COND_AL, args, 0); @@ -1629,6 +1637,7 @@ static const TCGTargetOpDef arm_op_defs[] = { { INDEX_op_sar_i32, { "r", "r", "ri" } }, { INDEX_op_brcond_i32, { "r", "r" } }, + { INDEX_op_setcond_i32, { "r", "r", "r" } }, /* TODO: "r", "r", "r", "r", "ri", "ri" */ { INDEX_op_add2_i32, { "r", "r", "r", "r", "r", "r" } }, |