This is the mail archive of the 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]

Re: [patch] Make h8300 port build again in mainline

  In message <>you write:
  > Hi,
  > Attached is a patch to make the h8300 port build again in the
  > mainline.
  > PUSH_ROUNDING in the h8300 port tells us to push a multiple of 2 bytes
  > on H8/300 and a multiple of 4 bytes on H8/300H and H8/S.  Originally,
  > movqi_push and movhi_push patterns had the predecrement constraint
  > '<', preventing the pre_modify stuff from being recognized.
  > The patch removes movqi_push and movhi_push because their names are
  > never used.  (emit_single_push_insn in expr.c builds a push operand
  > from ground up.)  Instead, the patch adds three new patterns that
  > explicitly accept the pre_modify stuff.  Two of them are in QImode,
  > the other in HImode.  Note that we do not need another pattern for a
  > HImode push on H8/300 because the regular movhi pattern takes care of
  > that case.  For the same reason, we do not need any special pattern
  > for a SImode push.
  > One more note.  I changed the attribute from set_znv to clobber
  > because, in case of a QImode push on H8/300, we are pushing two bytes
  > even though we are asked to push only one byte.  I did not see any
  > difference in the resulting code by this change, but I'd rather be
  > safe.
  > Thanks,
  > Kazu Hirata
  > 2001-07-11  Kazu Hirata  <>
  > 	* config/h8300/ (movqi_push): Remove and replace with two
  > 	unnamed patterns using pre_modify.
  > 	(movhi_push): Remove and replace with an unnamed patterns using
  > 	pre_modify.
We've generally avoided having these embedded side effect expressions
explicitly used in md files.  I don't recall the precise reasons, but
without some hard information as to why it's a good idea and should be
safe, I'd like to stick with the convention that we don't allow these

Instead if you need them, test for them in a foo_operand function, then
use foo_operand in the md file.

Better yet, merge them into the existing movqi/movhi patterns.


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