[net.unix-wizards] /lib/c2 optimizer for Berkeley 4.1

chris.umcp-cs@UDel-Relay (03/17/83)

From:     Chris Torek <chris.umcp-cs@UDel-Relay>
Date:     15 Jan 83 16:34:38 EST  (Sat)
Does anyone know of any reason not to change

	cvtl[bw]	$value,dest
to
	mov[bw]		$value,dest

via the optimizer?  Wouldn't the second be both faster and shorter?

lee%usc-cse@USC-ECL (03/23/83)

There is not reason not to replace cvtl[bw] with mov[bw] in the cases
where the source operand is a constant that is negative or larger than
64.  Zero of course can be moved with clr[bw].  There is no advantage
(or disadvantage) to the replacement if the constant is in the range
1-63 (or 64, I forget which) since the constant is stored in literal
form in a single byte operand descriptor in either instruction.
						-- Lee