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]

Re: defining 2-operand version of 3-operand insns?


Hi -

On Fri, Dec 01, 2000 at 03:17:08PM -0700, Greg McGary wrote:
: 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

You can define these outside the alias mechanism, by the way.
Just provide two different insn objects.  If the parsing backtracking
code works correctly, then the right alternative should be chosen
automatically.


: [...]
: I tried dnmi, and it accepted this:
: 	(emit addr dest (f-src1 dest) src2)
: [...]

Have you tried
	(emit addr dest (f-src1 f-dest) src2)
instead?  OTOH, I've only seen (f-FIELD VALUE) construct used with
literal VALUE arguments.

- FChE

PGP signature


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