tcg-mips: implement nor

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Aurelien Jarno 2010-03-27 16:32:55 +01:00
parent 6adc05492f
commit 2b79487a56
2 changed files with 5 additions and 1 deletions

View File

@ -1239,6 +1239,9 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc,
tcg_out_opc_reg(s, OPC_OR, args[0], args[1], args[2]);
}
break;
case INDEX_op_nor_i32:
tcg_out_opc_reg(s, OPC_NOR, args[0], args[1], args[2]);
break;
case INDEX_op_not_i32:
tcg_out_opc_reg(s, OPC_NOR, args[0], args[1], args[1]);
break;
@ -1350,6 +1353,7 @@ static const TCGTargetOpDef mips_op_defs[] = {
{ INDEX_op_sub_i32, { "r", "rZ", "rJZ" } },
{ INDEX_op_and_i32, { "r", "rZ", "rIZ" } },
{ INDEX_op_nor_i32, { "r", "rZ", "rZ" } },
{ INDEX_op_not_i32, { "r", "rZ" } },
{ INDEX_op_or_i32, { "r", "rZ", "rIZ" } },
{ INDEX_op_xor_i32, { "r", "rZ", "rIZ" } },

View File

@ -80,6 +80,7 @@ enum {
/* optional instructions */
#define TCG_TARGET_HAS_div_i32
#define TCG_TARGET_HAS_not_i32
#define TCG_TARGET_HAS_nor_i32
#undef TCG_TARGET_HAS_rot_i32
#undef TCG_TARGET_HAS_ext8s_i32
#undef TCG_TARGET_HAS_ext16s_i32
@ -89,7 +90,6 @@ enum {
#undef TCG_TARGET_HAS_orc_i32
#undef TCG_TARGET_HAS_eqv_i32
#undef TCG_TARGET_HAS_nand_i32
#undef TCG_TARGET_HAS_nor_i32
/* optional instructions automatically implemented */
#undef TCG_TARGET_HAS_neg_i32 /* sub rd, zero, rt */