[PATCH]: Fix HC12 invalid code generation for movw, bclr and bset

Stephane Carrez stcarrez@nerim.fr
Sun May 8 19:36:00 GMT 2005


Hi!

This patch fixes an invalid code generation for 68HC12 with movw,
bset and bclr instructions.  The indirect addressing (MEM (MEM))
is not supported for these instructions.  Committed on 3_4 and 4_0.
(PR savannah/12297 and PR savannah/11813)

Stephane

2005-05-08  Stephane Carrez  <stcarrez@nerim.fr>

	* config/m68hc11/m68hc11.c (m68hc11_z_replacement): Use emit_insn_after
	when adding the save Z instruction so that it is part of the good BB.
	(reg_or_some_mem_operand): Do not allow the 68HC12 address indirect
	addressing mode as it is not supported by bset and bclr.
	(m68hc11_gen_movhi): Fix invalid generation of indexed indirect
	addressing with movw.
	(m68hc11_gen_movqi): Use pula and pulb instead of lda and ldb for
	68HC12.
	* config/m68hc11/m68hc11.md ("movhi_const0"): Use this pattern only
	for 68HC11.
	("*movhi_68hc12"): Handle movhi_const0.
	("*subhi3", "subqi3"): Use general_operand for operand 1.
	("*subhi3_zext"): Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: m68hc11-fixes.diffs
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050508/4646e3bd/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20050508/4646e3bd/attachment.sig>


More information about the Gcc-patches mailing list