aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorShujing Zhao <pearly.zhao@oracle.com>2009-05-21 14:01:02 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2009-05-21 14:01:02 +0000
commit52f84254b2efcba67568adeb63d7bff4e9c10ed1 (patch)
treea5a16ab1312d4ca4e5cd89b6178b712d8e70cee9 /gcc
parent93cac287cb05b729da30116dc621dc0dd0164bed (diff)
downloadgcc-52f84254b2efcba67568adeb63d7bff4e9c10ed1.zip
gcc-52f84254b2efcba67568adeb63d7bff4e9c10ed1.tar.gz
gcc-52f84254b2efcba67568adeb63d7bff4e9c10ed1.tar.bz2
i386.c: Use REG_P...
2009-05-21 Shujing Zhao <pearly.zhao@oracle.com> * config/i386/i386.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P and JUMP_TABLE_DATA_P predicates where applicable. * config/i386/predicates.md: Ditto. * config/i386/sse.md: Ditto. From-SVN: r147769
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/config/i386/predicates.md6
-rw-r--r--gcc/config/i386/sse.md6
4 files changed, 18 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3c4c882..6b0f89a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-21 Shujing Zhao <pearly.zhao@oracle.com>
+
+ * config/i386/i386.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P and
+ JUMP_TABLE_DATA_P predicates where applicable.
+ * config/i386/predicates.md: Ditto.
+ * config/i386/sse.md: Ditto.
+
2009-05-21 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (adddi_4_rex64, addsi_4, addhi_4): For
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index ad3481b..8be82f0 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -17213,7 +17213,7 @@ counter_mode (rtx count_exp)
{
if (GET_MODE (count_exp) != VOIDmode)
return GET_MODE (count_exp);
- if (GET_CODE (count_exp) != CONST_INT)
+ if (!CONST_INT_P (count_exp))
return Pmode;
if (TARGET_64BIT && (INTVAL (count_exp) & ~0xffffffff))
return DImode;
@@ -19125,7 +19125,7 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
}
if (ix86_cmodel == CM_LARGE_PIC
- && GET_CODE (fnaddr) == MEM
+ && MEM_P (fnaddr)
&& GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
&& !local_symbolic_operand (XEXP (fnaddr, 0), VOIDmode))
fnaddr = gen_rtx_MEM (QImode, construct_plt_address (XEXP (fnaddr, 0)));
@@ -24063,7 +24063,7 @@ ix86_expand_multi_arg_builtin (enum insn_code icode, tree exp, rtx target,
if (last_arg_constant && i == nargs-1)
{
- if (GET_CODE (op) != CONST_INT)
+ if (!CONST_INT_P (op))
{
error ("last argument must be an immediate");
return gen_reg_rtx (tmode);
@@ -27226,9 +27226,7 @@ min_insn_size (rtx insn)
if (GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
&& XINT (PATTERN (insn), 1) == UNSPECV_ALIGN)
return 0;
- if (JUMP_P (insn)
- && (GET_CODE (PATTERN (insn)) == ADDR_VEC
- || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC))
+ if (JUMP_TABLE_DATA_P(insn))
return 0;
/* Important case - calls are always 5 bytes.
@@ -27279,7 +27277,7 @@ ix86_avoid_jump_mispredicts (void)
{
int min_size;
- if (GET_CODE (insn) == CODE_LABEL)
+ if (LABEL_P (insn))
{
int align = label_to_alignment (insn);
int max_skip = label_to_max_skip (insn);
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index c9921d6..4feb861 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -87,13 +87,13 @@
;; Return true if op is not xmm0 register.
(define_predicate "reg_not_xmm0_operand"
(and (match_operand 0 "register_operand")
- (match_test "GET_CODE (op) != REG
+ (match_test "!REG_P (op)
|| REGNO (op) != FIRST_SSE_REG")))
;; As above, but allow nonimmediate operands.
(define_predicate "nonimm_not_xmm0_operand"
(and (match_operand 0 "nonimmediate_operand")
- (match_test "GET_CODE (op) != REG
+ (match_test "!REG_P (op)
|| REGNO (op) != FIRST_SSE_REG")))
;; Return 1 if VALUE can be stored in a sign extended immediate field.
@@ -829,7 +829,7 @@
int ok;
/* Registers and immediate operands are always "aligned". */
- if (GET_CODE (op) != MEM)
+ if (!MEM_P (op))
return 1;
/* All patterns using aligned_operand on memory operands ends up
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index ae23746..d705fa1 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -11201,7 +11201,7 @@
rtx par = gen_rtx_PARALLEL (V16QImode, vs);
rtx reg = gen_reg_rtx (V16QImode);
int i;
- rtx ele = ((GET_CODE (operands[2]) == CONST_INT)
+ rtx ele = ((CONST_INT_P (operands[2]))
? GEN_INT (- INTVAL (operands[2]))
: operands[2]);
@@ -11210,7 +11210,7 @@
emit_insn (gen_vec_initv16qi (reg, par));
- if (GET_CODE (operands[2]) != CONST_INT)
+ if (!CONST_INT_P (operands[2]))
{
rtx neg = gen_reg_rtx (V16QImode);
emit_insn (gen_negv16qi2 (neg, reg));
@@ -11233,7 +11233,7 @@
rtx reg = gen_reg_rtx (V2DImode);
rtx ele;
- if (GET_CODE (operands[2]) == CONST_INT)
+ if (CONST_INT_P (operands[2]))
ele = GEN_INT (- INTVAL (operands[2]));
else if (GET_MODE (operands[2]) != DImode)
{