[patch] pa.md fix typos in prefetch_64 and prefetch_32 patterns

Graham Stott graham.stott@btinternet.com
Sun Oct 31 11:07:00 GMT 2004


All,

While building a x86 -> hppa cross I noticed a couple of  "cast from
pointer to integer of different size" warnings when compiling insn-recog.c

The problem here is in a couple of places in pa.md VAL_5_BITS_P is being
passed a CONST_INT rtx and not it's INTVAL value which results in the warning.

Fixed thus.

Tested only as far as building cc1 for hppa64-hp-hpux11.11.

OK for commit?

I'm leaving on vacation in a few hours  someone else would need to
commit the patch in my absence.

Graham

ChangeLog

	* config/pa/pa.md: (prefetch_64, prefetch_32): Fix typo pass INTVAL
	and not CONST_INT rtx to VAL_5_BITS_P

-----------------------------------------------------------------------
Index: pa.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.md,v
retrieving revision 1.154
diff -c -p -r1.154 pa.md
*** pa.md       19 Jul 2004 01:32:09 -0000      1.154
--- pa.md       31 Oct 2004 09:37:54 -0000
*************** add,l %2,%3,%3\;bv,n %%r0(%3)"
*** 9319,9325 ****
      && (operands[2] != const0_rtx
          || GET_CODE (XEXP (operands[0], 0)) != PLUS
          || GET_CODE (XEXP (XEXP (operands[0], 0), 1)) != CONST_INT
!        || VAL_5_BITS_P (XEXP (XEXP (operands[0], 0), 1)))"
   {
     /* The SL completor indicates good spatial locality but poor temporal
        locality.  The ldw instruction with a target of general register 0
--- 9319,9325 ----
      && (operands[2] != const0_rtx
          || GET_CODE (XEXP (operands[0], 0)) != PLUS
          || GET_CODE (XEXP (XEXP (operands[0], 0), 1)) != CONST_INT
!        || VAL_5_BITS_P (INTVAL (XEXP (XEXP (operands[0], 0), 1))))"
   {
     /* The SL completor indicates good spatial locality but poor temporal
        locality.  The ldw instruction with a target of general register 0
*************** add,l %2,%3,%3\;bv,n %%r0(%3)"
*** 9371,9377 ****
      && (operands[2] != const0_rtx
          || GET_CODE (XEXP (operands[0], 0)) != PLUS
          || GET_CODE (XEXP (XEXP (operands[0], 0), 1)) != CONST_INT
!        || VAL_5_BITS_P (XEXP (XEXP (operands[0], 0), 1)))"
   {
     /* The SL completor indicates good spatial locality but poor temporal
        locality.  The ldw instruction with a target of general register 0
--- 9371,9377 ----
      && (operands[2] != const0_rtx
          || GET_CODE (XEXP (operands[0], 0)) != PLUS
          || GET_CODE (XEXP (XEXP (operands[0], 0), 1)) != CONST_INT
!        || VAL_5_BITS_P (INTVAL (XEXP (XEXP (operands[0], 0), 1))))"
   {
     /* The SL completor indicates good spatial locality but poor temporal
        locality.  The ldw instruction with a target of general register 0
--------------------------------------------------------------------------



More information about the Gcc-patches mailing list