This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


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

defining 2-operand version of 3-operand insns?


I want to define 2-operand versions of 3-operand ALU insns, like so:

	add	$s1, $s2	   ; 2-operand

which aliases:

	add	$s1, $s1, $s2

I can't find a way to copy $dest into $src1.
dni didn't like this encoding:
	(+ OP_ADDr dest (f-src1 dest) src2)

I tried dnmi, and it accepted this:
	(emit addr dest (f-src1 dest) src2)
and this:
	(emit addr dest (src1 dest) src2),
but not this:
	(emit addr dest dest src2),
but for the accepted cases, the src1 field assembled as 0, not as a copy of dest.

Clues?

Greg

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