[comp.sys.atari.st.tech] Sozobon hcc and add.w 'bug'

hans@wldrdg.UUCP (Johann Ruegg) (11/03/90)

Someone recently claimed that the code generated by hcc for the stack
is wrong.  I.E.
		add.w	#4,a6
should be
		add.l	#4,a6
because you might cross a 64k boundary.

This is NOT a bug.  There is no 64k boundary.
I quote from the M68000 programmer's reference manual (ADDA page):

	Op-Mode field -- Specifies the size of the operation:
		011 -- word operation.  The source operand is sign-extended to
			a long operand and the operation is performed on the 
			address register using all 32 bits.

Using 'add.l' instead will only make the instruction 2 bytes longer for no
reason.

	Johann Ruegg
	Sozobon Ltd.