This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
Re: defining 2-operand version of 3-operand insns?
- To: Greg McGary <greg at mcgary dot org>
- Subject: Re: defining 2-operand version of 3-operand insns?
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Fri, 1 Dec 2000 17:32:54 -0500
- Cc: cgen at sourceware dot cygnus dot com
- References: <200012012217.PAA04718@kayak.mcgary.org>
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