tcg-sparc: Rename ADDX/SUBX insns
The pre-v9 ADDX/SUBX insns were renamed ADDC/SUBC for v9. Standardizing on the v9 name makes things less confusing. Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
parent
9d6a7a8542
commit
c470b663f7
@ -1175,15 +1175,11 @@ static const struct sparc_opcode sparc_opcodes[] = {
|
|||||||
{ "subcc", F3(2, 0x14, 0), F3(~2, ~0x14, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
{ "subcc", F3(2, 0x14, 0), F3(~2, ~0x14, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
||||||
{ "subcc", F3(2, 0x14, 1), F3(~2, ~0x14, ~1), "1,i,d", 0, v6 },
|
{ "subcc", F3(2, 0x14, 1), F3(~2, ~0x14, ~1), "1,i,d", 0, v6 },
|
||||||
|
|
||||||
{ "subx", F3(2, 0x0c, 0), F3(~2, ~0x0c, ~0)|ASI(~0), "1,2,d", 0, v6notv9 },
|
{ "subc", F3(2, 0x0c, 0), F3(~2, ~0x0c, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
||||||
{ "subx", F3(2, 0x0c, 1), F3(~2, ~0x0c, ~1), "1,i,d", 0, v6notv9 },
|
{ "subc", F3(2, 0x0c, 1), F3(~2, ~0x0c, ~1), "1,i,d", 0, v6 },
|
||||||
{ "subc", F3(2, 0x0c, 0), F3(~2, ~0x0c, ~0)|ASI(~0), "1,2,d", 0, v9 },
|
|
||||||
{ "subc", F3(2, 0x0c, 1), F3(~2, ~0x0c, ~1), "1,i,d", 0, v9 },
|
|
||||||
|
|
||||||
{ "subxcc", F3(2, 0x1c, 0), F3(~2, ~0x1c, ~0)|ASI(~0), "1,2,d", 0, v6notv9 },
|
{ "subccc", F3(2, 0x1c, 0), F3(~2, ~0x1c, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
||||||
{ "subxcc", F3(2, 0x1c, 1), F3(~2, ~0x1c, ~1), "1,i,d", 0, v6notv9 },
|
{ "subccc", F3(2, 0x1c, 1), F3(~2, ~0x1c, ~1), "1,i,d", 0, v6 },
|
||||||
{ "subccc", F3(2, 0x1c, 0), F3(~2, ~0x1c, ~0)|ASI(~0), "1,2,d", 0, v9 },
|
|
||||||
{ "subccc", F3(2, 0x1c, 1), F3(~2, ~0x1c, ~1), "1,i,d", 0, v9 },
|
|
||||||
|
|
||||||
{ "and", F3(2, 0x01, 0), F3(~2, ~0x01, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
{ "and", F3(2, 0x01, 0), F3(~2, ~0x01, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
||||||
{ "and", F3(2, 0x01, 1), F3(~2, ~0x01, ~1), "1,i,d", 0, v6 },
|
{ "and", F3(2, 0x01, 1), F3(~2, ~0x01, ~1), "1,i,d", 0, v6 },
|
||||||
@ -1215,19 +1211,13 @@ static const struct sparc_opcode sparc_opcodes[] = {
|
|||||||
{ "addcc", F3(2, 0x10, 1), F3(~2, ~0x10, ~1), "1,i,d", 0, v6 },
|
{ "addcc", F3(2, 0x10, 1), F3(~2, ~0x10, ~1), "1,i,d", 0, v6 },
|
||||||
{ "addcc", F3(2, 0x10, 1), F3(~2, ~0x10, ~1), "i,1,d", 0, v6 },
|
{ "addcc", F3(2, 0x10, 1), F3(~2, ~0x10, ~1), "i,1,d", 0, v6 },
|
||||||
|
|
||||||
{ "addx", F3(2, 0x08, 0), F3(~2, ~0x08, ~0)|ASI(~0), "1,2,d", 0, v6notv9 },
|
{ "addc", F3(2, 0x08, 0), F3(~2, ~0x08, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
||||||
{ "addx", F3(2, 0x08, 1), F3(~2, ~0x08, ~1), "1,i,d", 0, v6notv9 },
|
{ "addc", F3(2, 0x08, 1), F3(~2, ~0x08, ~1), "1,i,d", 0, v6 },
|
||||||
{ "addx", F3(2, 0x08, 1), F3(~2, ~0x08, ~1), "i,1,d", 0, v6notv9 },
|
{ "addc", F3(2, 0x08, 1), F3(~2, ~0x08, ~1), "i,1,d", 0, v6 },
|
||||||
{ "addc", F3(2, 0x08, 0), F3(~2, ~0x08, ~0)|ASI(~0), "1,2,d", 0, v9 },
|
|
||||||
{ "addc", F3(2, 0x08, 1), F3(~2, ~0x08, ~1), "1,i,d", 0, v9 },
|
|
||||||
{ "addc", F3(2, 0x08, 1), F3(~2, ~0x08, ~1), "i,1,d", 0, v9 },
|
|
||||||
|
|
||||||
{ "addxcc", F3(2, 0x18, 0), F3(~2, ~0x18, ~0)|ASI(~0), "1,2,d", 0, v6notv9 },
|
{ "addccc", F3(2, 0x18, 0), F3(~2, ~0x18, ~0)|ASI(~0), "1,2,d", 0, v6 },
|
||||||
{ "addxcc", F3(2, 0x18, 1), F3(~2, ~0x18, ~1), "1,i,d", 0, v6notv9 },
|
{ "addccc", F3(2, 0x18, 1), F3(~2, ~0x18, ~1), "1,i,d", 0, v6 },
|
||||||
{ "addxcc", F3(2, 0x18, 1), F3(~2, ~0x18, ~1), "i,1,d", 0, v6notv9 },
|
{ "addccc", F3(2, 0x18, 1), F3(~2, ~0x18, ~1), "i,1,d", 0, v6 },
|
||||||
{ "addccc", F3(2, 0x18, 0), F3(~2, ~0x18, ~0)|ASI(~0), "1,2,d", 0, v9 },
|
|
||||||
{ "addccc", F3(2, 0x18, 1), F3(~2, ~0x18, ~1), "1,i,d", 0, v9 },
|
|
||||||
{ "addccc", F3(2, 0x18, 1), F3(~2, ~0x18, ~1), "i,1,d", 0, v9 },
|
|
||||||
|
|
||||||
{ "smul", F3(2, 0x0b, 0), F3(~2, ~0x0b, ~0)|ASI(~0), "1,2,d", 0, v8 },
|
{ "smul", F3(2, 0x0b, 0), F3(~2, ~0x0b, ~0)|ASI(~0), "1,2,d", 0, v8 },
|
||||||
{ "smul", F3(2, 0x0b, 1), F3(~2, ~0x0b, ~1), "1,i,d", 0, v8 },
|
{ "smul", F3(2, 0x0b, 1), F3(~2, ~0x0b, ~1), "1,i,d", 0, v8 },
|
||||||
|
@ -197,8 +197,8 @@ static const int tcg_target_call_oarg_regs[] = {
|
|||||||
#define ARITH_XOR (INSN_OP(2) | INSN_OP3(0x03))
|
#define ARITH_XOR (INSN_OP(2) | INSN_OP3(0x03))
|
||||||
#define ARITH_SUB (INSN_OP(2) | INSN_OP3(0x04))
|
#define ARITH_SUB (INSN_OP(2) | INSN_OP3(0x04))
|
||||||
#define ARITH_SUBCC (INSN_OP(2) | INSN_OP3(0x14))
|
#define ARITH_SUBCC (INSN_OP(2) | INSN_OP3(0x14))
|
||||||
#define ARITH_ADDX (INSN_OP(2) | INSN_OP3(0x08))
|
#define ARITH_ADDC (INSN_OP(2) | INSN_OP3(0x08))
|
||||||
#define ARITH_SUBX (INSN_OP(2) | INSN_OP3(0x0c))
|
#define ARITH_SUBC (INSN_OP(2) | INSN_OP3(0x0c))
|
||||||
#define ARITH_UMUL (INSN_OP(2) | INSN_OP3(0x0a))
|
#define ARITH_UMUL (INSN_OP(2) | INSN_OP3(0x0a))
|
||||||
#define ARITH_SMUL (INSN_OP(2) | INSN_OP3(0x0b))
|
#define ARITH_SMUL (INSN_OP(2) | INSN_OP3(0x0b))
|
||||||
#define ARITH_UDIV (INSN_OP(2) | INSN_OP3(0x0e))
|
#define ARITH_UDIV (INSN_OP(2) | INSN_OP3(0x0e))
|
||||||
@ -663,7 +663,7 @@ static void tcg_out_movcond_i64(TCGContext *s, TCGCond cond, TCGReg ret,
|
|||||||
static void tcg_out_setcond_i32(TCGContext *s, TCGCond cond, TCGReg ret,
|
static void tcg_out_setcond_i32(TCGContext *s, TCGCond cond, TCGReg ret,
|
||||||
TCGReg c1, int32_t c2, int c2const)
|
TCGReg c1, int32_t c2, int c2const)
|
||||||
{
|
{
|
||||||
/* For 32-bit comparisons, we can play games with ADDX/SUBX. */
|
/* For 32-bit comparisons, we can play games with ADDC/SUBC. */
|
||||||
switch (cond) {
|
switch (cond) {
|
||||||
case TCG_COND_LTU:
|
case TCG_COND_LTU:
|
||||||
case TCG_COND_GEU:
|
case TCG_COND_GEU:
|
||||||
@ -707,9 +707,9 @@ static void tcg_out_setcond_i32(TCGContext *s, TCGCond cond, TCGReg ret,
|
|||||||
|
|
||||||
tcg_out_cmp(s, c1, c2, c2const);
|
tcg_out_cmp(s, c1, c2, c2const);
|
||||||
if (cond == TCG_COND_LTU) {
|
if (cond == TCG_COND_LTU) {
|
||||||
tcg_out_arithi(s, ret, TCG_REG_G0, 0, ARITH_ADDX);
|
tcg_out_arithi(s, ret, TCG_REG_G0, 0, ARITH_ADDC);
|
||||||
} else {
|
} else {
|
||||||
tcg_out_arithi(s, ret, TCG_REG_G0, -1, ARITH_SUBX);
|
tcg_out_arithi(s, ret, TCG_REG_G0, -1, ARITH_SUBC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1340,12 +1340,12 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc,
|
|||||||
case INDEX_op_add2_i32:
|
case INDEX_op_add2_i32:
|
||||||
tcg_out_addsub2_i32(s, args[0], args[1], args[2], args[3],
|
tcg_out_addsub2_i32(s, args[0], args[1], args[2], args[3],
|
||||||
args[4], const_args[4], args[5], const_args[5],
|
args[4], const_args[4], args[5], const_args[5],
|
||||||
ARITH_ADDCC, ARITH_ADDX);
|
ARITH_ADDCC, ARITH_ADDC);
|
||||||
break;
|
break;
|
||||||
case INDEX_op_sub2_i32:
|
case INDEX_op_sub2_i32:
|
||||||
tcg_out_addsub2_i32(s, args[0], args[1], args[2], args[3],
|
tcg_out_addsub2_i32(s, args[0], args[1], args[2], args[3],
|
||||||
args[4], const_args[4], args[5], const_args[5],
|
args[4], const_args[4], args[5], const_args[5],
|
||||||
ARITH_SUBCC, ARITH_SUBX);
|
ARITH_SUBCC, ARITH_SUBC);
|
||||||
break;
|
break;
|
||||||
case INDEX_op_mulu2_i32:
|
case INDEX_op_mulu2_i32:
|
||||||
c = ARITH_UMUL;
|
c = ARITH_UMUL;
|
||||||
|
Loading…
Reference in New Issue
Block a user