* problem with derived operands
@ 2000-10-03 12:39 Johan Rydberg
2000-10-04 1:02 ` Doug Evans
0 siblings, 1 reply; 2+ messages in thread
From: Johan Rydberg @ 2000-10-03 12:39 UTC (permalink / raw)
To: cgen
Hi!
I'm trying to implement (another) CPU description with CGEN.
I have ran into some problems with derived operands. I have
the following fields;
(dnf f-const-op1 "const op 1" () 7 8)
the following operands;
(define-operand
(name const-base)
(comment "base constant or something")
(mode QI)
(type h-uint)
(index f-const-op1)
)
(dndo const-8
QI
(const-base)
"${const-base}"
f-const-op1
(+ const-base)
()
const-base
() ; no setter
)
When I'm trying to use the ''const-8'' field within a insn,
I get the following error;
ERROR: Unbound variable: op-ifld
Here's the insn definition;
(dni bipush "bipush"
()
"bipush ${const-8}"
(+ OC_16 const-8)
(sequence()
(set (mem QI (reg h-gr 14)) const-8)
(set (reg h-gr 14) (sub (reg h-gr 14) (const 4)))
)
()
)
Can anyone tell me what I do wrong ?
--
Johan Rydberg johan.rydberg@netinsight.net
Net Insight AB, Sweden direct: +46-8-685 04 17
http://www.netinsight.net phone: +46-8-685 04 00
fax: +46-8-685 04 20
^ permalink raw reply [flat|nested] 2+ messages in thread
* problem with derived operands
2000-10-03 12:39 problem with derived operands Johan Rydberg
@ 2000-10-04 1:02 ` Doug Evans
0 siblings, 0 replies; 2+ messages in thread
From: Doug Evans @ 2000-10-04 1:02 UTC (permalink / raw)
To: Johan Rydberg; +Cc: cgen
Johan Rydberg writes:
> ERROR: Unbound variable: op-ifld
'tis definately a bug in cgen.
I'm guessing this is the right patch.
[Whether you'll have more problems I dunno.
derived-operand support is still pretty much work-in-progress.]
2000-10-04 Doug Evans <dje@casey.transmeta.com>
* insn.scm (-parse-insn-format-symbol): Fix spelling error,
op-ifld -> op-ifield.
*** insn.scm.~1~ Thu Jul 27 21:11:52 2000
--- insn.scm Wed Oct 4 00:58:55 2000
***************
*** 512,518 ****
(cond ((derived-operand? op)
; There is a one-to-one relationship b/w derived operands and
; the associated derived ifield.
! (let ((ifld (op-ifld op)))
(assert (derived-ifield? ifld))
ifld))
((anyof-operand? op)
--- 512,518 ----
(cond ((derived-operand? op)
; There is a one-to-one relationship b/w derived operands and
; the associated derived ifield.
! (let ((ifld (op-ifield op)))
(assert (derived-ifield? ifld))
ifld))
((anyof-operand? op)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-10-04 1:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-03 12:39 problem with derived operands Johan Rydberg
2000-10-04 1:02 ` Doug Evans
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).