defining 2-operand version of 3-operand insns?
Greg McGary
greg@mcgary.org
Fri Dec 1 14:17:00 GMT 2000
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
More information about the Cgen
mailing list