This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
defining 2-operand version of 3-operand insns?
- To: cgen at sourceware dot cygnus dot com
- Subject: defining 2-operand version of 3-operand insns?
- From: Greg McGary <greg at mcgary dot org>
- Date: Fri, 1 Dec 2000 15:17:08 -0700
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