[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-2.1 07/14] tcg-aarch64: Remove w constraint
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH for-2.1 07/14] tcg-aarch64: Remove w constraint |
Date: |
Wed, 16 Apr 2014 09:47:33 -0700 |
Now redundant with the type parameter to tcg_target_const_match.
Signed-off-by: Richard Henderson <address@hidden>
---
tcg/aarch64/tcg-target.c | 40 ++++++++++++++++++----------------------
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c
index e028dd6..88f58ff 100644
--- a/tcg/aarch64/tcg-target.c
+++ b/tcg/aarch64/tcg-target.c
@@ -110,11 +110,10 @@ static inline void patch_reloc(uint8_t *code_ptr, int
type,
}
}
-#define TCG_CT_CONST_IS32 0x100
-#define TCG_CT_CONST_AIMM 0x200
-#define TCG_CT_CONST_LIMM 0x400
-#define TCG_CT_CONST_ZERO 0x800
-#define TCG_CT_CONST_MONE 0x1000
+#define TCG_CT_CONST_AIMM 0x100
+#define TCG_CT_CONST_LIMM 0x200
+#define TCG_CT_CONST_ZERO 0x400
+#define TCG_CT_CONST_MONE 0x800
/* parse target specific constraints */
static int target_parse_constraint(TCGArgConstraint *ct,
@@ -139,9 +138,6 @@ static int target_parse_constraint(TCGArgConstraint *ct,
tcg_regset_reset_reg(ct->u.regs, TCG_REG_X3);
#endif
break;
- case 'w': /* The operand should be considered 32-bit. */
- ct->ct |= TCG_CT_CONST_IS32;
- break;
case 'A': /* Valid for arithmetic immediate (positive or negative). */
ct->ct |= TCG_CT_CONST_AIMM;
break;
@@ -196,7 +192,7 @@ static int tcg_target_const_match(tcg_target_long val,
TCGType type,
if (ct & TCG_CT_CONST) {
return 1;
}
- if (ct & TCG_CT_CONST_IS32) {
+ if (type == TCG_TYPE_I32) {
val = (int32_t)val;
}
if ((ct & TCG_CT_CONST_AIMM) && (is_aimm(val) || is_aimm(-val))) {
@@ -1650,9 +1646,9 @@ static const TCGTargetOpDef aarch64_op_defs[] = {
{ INDEX_op_st32_i64, { "r", "r" } },
{ INDEX_op_st_i64, { "r", "r" } },
- { INDEX_op_add_i32, { "r", "r", "rwA" } },
+ { INDEX_op_add_i32, { "r", "r", "rA" } },
{ INDEX_op_add_i64, { "r", "r", "rA" } },
- { INDEX_op_sub_i32, { "r", "r", "rwA" } },
+ { INDEX_op_sub_i32, { "r", "r", "rA" } },
{ INDEX_op_sub_i64, { "r", "r", "rA" } },
{ INDEX_op_mul_i32, { "r", "r", "r" } },
{ INDEX_op_mul_i64, { "r", "r", "r" } },
@@ -1664,17 +1660,17 @@ static const TCGTargetOpDef aarch64_op_defs[] = {
{ INDEX_op_rem_i64, { "r", "r", "r" } },
{ INDEX_op_remu_i32, { "r", "r", "r" } },
{ INDEX_op_remu_i64, { "r", "r", "r" } },
- { INDEX_op_and_i32, { "r", "r", "rwL" } },
+ { INDEX_op_and_i32, { "r", "r", "rL" } },
{ INDEX_op_and_i64, { "r", "r", "rL" } },
- { INDEX_op_or_i32, { "r", "r", "rwL" } },
+ { INDEX_op_or_i32, { "r", "r", "rL" } },
{ INDEX_op_or_i64, { "r", "r", "rL" } },
- { INDEX_op_xor_i32, { "r", "r", "rwL" } },
+ { INDEX_op_xor_i32, { "r", "r", "rL" } },
{ INDEX_op_xor_i64, { "r", "r", "rL" } },
- { INDEX_op_andc_i32, { "r", "r", "rwL" } },
+ { INDEX_op_andc_i32, { "r", "r", "rL" } },
{ INDEX_op_andc_i64, { "r", "r", "rL" } },
- { INDEX_op_orc_i32, { "r", "r", "rwL" } },
+ { INDEX_op_orc_i32, { "r", "r", "rL" } },
{ INDEX_op_orc_i64, { "r", "r", "rL" } },
- { INDEX_op_eqv_i32, { "r", "r", "rwL" } },
+ { INDEX_op_eqv_i32, { "r", "r", "rL" } },
{ INDEX_op_eqv_i64, { "r", "r", "rL" } },
{ INDEX_op_neg_i32, { "r", "r" } },
@@ -1693,11 +1689,11 @@ static const TCGTargetOpDef aarch64_op_defs[] = {
{ INDEX_op_rotl_i64, { "r", "r", "ri" } },
{ INDEX_op_rotr_i64, { "r", "r", "ri" } },
- { INDEX_op_brcond_i32, { "r", "rwA" } },
+ { INDEX_op_brcond_i32, { "r", "rA" } },
{ INDEX_op_brcond_i64, { "r", "rA" } },
- { INDEX_op_setcond_i32, { "r", "r", "rwA" } },
+ { INDEX_op_setcond_i32, { "r", "r", "rA" } },
{ INDEX_op_setcond_i64, { "r", "r", "rA" } },
- { INDEX_op_movcond_i32, { "r", "r", "rwA", "rZ", "rZ" } },
+ { INDEX_op_movcond_i32, { "r", "r", "rA", "rZ", "rZ" } },
{ INDEX_op_movcond_i64, { "r", "r", "rA", "rZ", "rZ" } },
{ INDEX_op_qemu_ld8u, { "r", "l" } },
@@ -1736,9 +1732,9 @@ static const TCGTargetOpDef aarch64_op_defs[] = {
{ INDEX_op_deposit_i32, { "r", "0", "rZ" } },
{ INDEX_op_deposit_i64, { "r", "0", "rZ" } },
- { INDEX_op_add2_i32, { "r", "r", "rZ", "rZ", "rwA", "rwMZ" } },
+ { INDEX_op_add2_i32, { "r", "r", "rZ", "rZ", "rA", "rMZ" } },
{ INDEX_op_add2_i64, { "r", "r", "rZ", "rZ", "rA", "rMZ" } },
- { INDEX_op_sub2_i32, { "r", "r", "rZ", "rZ", "rwA", "rwMZ" } },
+ { INDEX_op_sub2_i32, { "r", "r", "rZ", "rZ", "rA", "rMZ" } },
{ INDEX_op_sub2_i64, { "r", "r", "rZ", "rZ", "rA", "rMZ" } },
{ INDEX_op_muluh_i64, { "r", "r", "r" } },
--
1.9.0
- [Qemu-devel] [PATCH for-2.1 00/14] tcg: collection of patches, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 02/14] tcg: Use "unspecified behavior" for shifts, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 01/14] tcg: Fix warning (1 bit signed bitfield entry) and replace int by bool, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 03/14] tcg: Mask shift quantities while folding, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 04/14] tci: Mask shift counts to avoid undefined behavior, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 06/14] tcg: Add TCGType parameter to tcg_target_const_match, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 05/14] tcg: Fix out of range shift in deposit optimizations, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 07/14] tcg-aarch64: Remove w constraint,
Richard Henderson <=
- [Qemu-devel] [PATCH for-2.1 08/14] tcg-ppc64: Use the type parameter to tcg_target_const_match, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 09/14] tcg-sparc: Use the type parameter to tcg_target_const_match, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 10/14] tcg-s390: Remove W constraint, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 11/14] tcg: Relax requirement for mulu2_i32 on 32-bit hosts, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 13/14] tcg: Fix fallback from muls2_i64 to mulu2_i64, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 12/14] tcg: Use tcg_gen_mulu2_i32 in tcg_gen_muls2_i32, Richard Henderson, 2014/04/16
- [Qemu-devel] [PATCH for-2.1 14/14] tcg: Use HOST_WORDS_BIGENDIAN, Richard Henderson, 2014/04/16