[PATCH]: Fix compare and shift problems for 68HC12

Stephane Carrez stcarrez@nerim.fr
Sun Mar 7 21:16:00 GMT 2004


Hi!

This patch fixes problems on 68HC12:

- 32-bit shift patterns ("*_const") fail to be reloaded with
   -O -fomit-frame-pointer because the Z register is disabled
   with -fomit-frame-pointer on 68HC12.  We must use the "*lshrsi3"
   pattern that temporarily save the Y register.

- comparing 2 regs is made by pushing one reg on the stack; comparison is then
   made with a pop; this creates side effects on operands and they are not
   detected correctly by final_scan_insn (because there are no side effect notes
   on them).  The compare must be implemented without splitting the insn (poping
   is not seen at all by final_scan_insn); also fixed notice_update_cc so that
   such side effects are found.

Committed on 3_4 and mainline.

	Stephane

2004-03-07  Stephane Carrez  <stcarrez@nerim.fr>

	* config/m68hc11/m68hc11.md ("*lshrsi3_const"): Disable for 68HC12.
	("*lshrsi3"): Also accept an immediate for 68HC12.
	("*ashrsi3_const"): Likewise.
	("*ashrsi3"): Likewise.
	("*ashlsi3_const"): Likewise.
	("*ashlsi3"): Likewise.
	("cmphi_1_hc12"): Compare two hard register by pushing them and
	comparing with a pop; don't use a split for that.
	("cmphi split"): Disable compare split for 68HC12.

	* config/m68hc11/m68hc11.c (m68hc11_notice_update_cc): Invalidate
	the status operands if they have side effects.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: m68hc11.diffs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040307/f9dffb63/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 253 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20040307/f9dffb63/attachment.sig>


More information about the Gcc-patches mailing list