* emiting insn with changed value
@ 2001-01-08 22:14 Johan Rydberg
2001-01-08 22:33 ` Johan Rydberg
2001-01-08 23:58 ` Greg McGary
0 siblings, 2 replies; 3+ messages in thread
From: Johan Rydberg @ 2001-01-08 22:14 UTC (permalink / raw)
To: cgen
Hi!
Is is possible to change a value in a macro insn? See the example
below:
(dni addi "addi" ()
"addi $rd,$ra,$simm"
(+ OP_1 rd rr simm)
(set rd (add ra simm))
()
)
(dnmi subi "subi" ()
"subi $rd,$ra,$simm"
(emit addi rd ra (simm -simm))
) ^^^^^
Note: I have "tested" this and CGEN doesn't complain about it, but
I have not yet hade the chans to try to assemble such an insn.
Looking at the generated code I see nothing that indicates
that "simm" will switch sign.
(maybe it's more suitable to use the "minus" RTX instead of "-simm")
Regards,
Johan.
--
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00
$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
THEN EXCUSE/OBJECT=ME
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emiting insn with changed value
2001-01-08 22:14 emiting insn with changed value Johan Rydberg
@ 2001-01-08 22:33 ` Johan Rydberg
2001-01-08 23:58 ` Greg McGary
1 sibling, 0 replies; 3+ messages in thread
From: Johan Rydberg @ 2001-01-08 22:33 UTC (permalink / raw)
To: cgen
Johan Rydberg wrote:
> (dnmi subi "subi" ()
> "subi $rd,$ra,$simm"
> (emit addi rd ra (simm -simm))
> ) ^^^^^
Another thing: Right now macro insn is not included in the generated
testcase ("allinsn") for GAS. Will they be that in the future?
(If I were a Scheme hacker I could add it myself, but that's not the
case :-( )
--
Johan Rydberg, Net Insight AB, Sweden, +46-8-685 04 00
$ ON F$ERROR("LANGUAGE","ENGLISH","IN_MESSAGE").GT.F$ERROR("NORMAL") -
THEN EXCUSE/OBJECT=ME
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emiting insn with changed value
2001-01-08 22:14 emiting insn with changed value Johan Rydberg
2001-01-08 22:33 ` Johan Rydberg
@ 2001-01-08 23:58 ` Greg McGary
1 sibling, 0 replies; 3+ messages in thread
From: Greg McGary @ 2001-01-08 23:58 UTC (permalink / raw)
To: Johan Rydberg; +Cc: cgen
Johan Rydberg <johan.rydberg@netinsight.se> writes:
> Is is possible to change a value in a macro insn?
As currently implemented, no. The emit form does nothing with the
arguments other than check that they are consistent with the syntax
string. The order in which the args appear has no influence, nor does
any effort to set values. About the only mildly interesting thing you
can do with macro insns today is omit some of the operands, which
causes them to be implicitly zeroed, and/or to change the order of
operands in the syntax string.
Doug had much grander plans for macro insns, but didn't implement yet.
I have been working on the problem at a snail's pace. I had some time
today to think about it, and will have some time tomorrow, so I might
make some progress.
Greg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-01-08 23:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-08 22:14 emiting insn with changed value Johan Rydberg
2001-01-08 22:33 ` Johan Rydberg
2001-01-08 23:58 ` Greg McGary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).