defining 2-operand version of 3-operand insns?

Frank Ch. Eigler fche@redhat.com
Fri Dec 1 14:33:00 GMT 2000


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
-- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE6KCcWVZbdDOm/ZT0RApilAJ93n48c4Y+0RzWlojP6PE7dUZ6LIACfRAY7
K/NtK7dsSEhPgZWiJd4t/+s=
=z6wm
-----END PGP SIGNATURE-----


More information about the Cgen mailing list