This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Update xstormy16's combinebnp() function for new insnsequences


Hi Geoff,

  Here is another xstormy16 patch for your consideration.  It updates
  the combinebnp() function in the xstormy16 backend so that it can
  catch some new sequences of insns that GCC might generate.
  Specifically GCC will now sometimes produce:

   (set (reg:HI) (zero_extend:HI (mem:QI (const_int))))
   (set (reg:HI) (lshiftrt:HI (reg:HI) (const_int)))
   (set (reg:HI) (and:HI (reg:HI) (const_int 1)))
   (set (pc)     (if_then_else (eq:HI (reg:HI) (const_int 0)) (label_ref 51) (pc)))

  ie with a zero-extend to convert the QI load into an HI value, and
  sometimes with an LSHIFTRT of the HI value before performing the
  AND.

  The patch also replaces a few uses of XEXP(....) in the function
  with either SET_DEST() or SET_SRC(), as appropriate.
  
  I have tested this patch with Sanyo's optimisation test suite and
  with the gcc testsuite and found no regressions.

  May I apply the patch please ?

Cheers
  Nick

gcc/ChangeLog
2004-11-17  Nick Clifton  <nickc@redhat.com>

	* config/stormy16/stormy16.c (combine_bnp): Add code to handle
	zero_extension and lshiftrt insns.
        Replace uses of XEXP(...) with either SET_DEST() or SET_SRC()
	where appropriate.
        * config/stormy16.stormy16.md (bclrx3, bsetx3): New patterns
	to handle bp and bn insn patterns with a zero_extend rtx
	inside them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]