+2000-08-22 Frank Ch. Eigler <fche@redhat.com>
+
+ * Makefile.in (DIST_COMMON): Regenerated.
+ * ifield.scm (derived-ifield needed-iflds): New method.
+ * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
+ sfmts built from derived-ifields.
+ * operand.scm (-derived-parse-encoding): Give derived-ifield a fixed
+ type symbol 'derived-ifield, not an unparseable string.
+ * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
+ (-sfmt-contents): Add tracing.
+
+ From Doug Evans <dje@transmeta.com>:
+ * sim.scm (operand cxmake-get): Result is a <c-expr>, not a string of
+ C code.
+
2000-08-20 Doug Evans <dje@casey.transmeta.com>
* rtl-c.scm (rtl-c-expr-with-estate): New fn.
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_CLEAN_FILES =
-DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS aclocal.m4 configure configure.in
+DIST_COMMON = README AUTHORS ChangeLog INSTALL Makefile.am Makefile.in \
+NEWS aclocal.m4 configure configure.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
nil)
)
+
+(method-make!
+ <derived-ifield> 'needed-iflds
+ (lambda (self)
+ (find (lambda (ifld) (not (ifld-constant? ifld)))
+ (elm-get self 'subfields)))
+)
+
+
(method-make!
<derived-ifield> 'make!
(lambda (self name comment attrs owner subfields)
(-fmt-desc-cti? fmt-desc)
(-fmt-desc-in-ops fmt-desc)
(-fmt-desc-out-ops fmt-desc)
- (-fmt-desc-used-iflds fmt-desc))))
+ (ifields-base-ifields (-fmt-desc-used-iflds fmt-desc)))))
(logit 3 "Creating sformat " (number->string sfmt-index) ".\n")
(insn-set-sfmt! insn sfmt)
(append! sfmt-list (list sfmt))
(let ((iflds (-parse-insn-format "anyof encoding" encoding)))
(make <derived-ifield>
operand-name
- (string-append "<derived-ifield> for " operand-name)
+ 'derived-ifield ; (string-append "<derived-ifield> for " operand-name)
atlist-empty
#f ; owner
iflds ; subfields
(length args)))
)))
(elm-set! result 'hw-name (obj:name (hardware-for-mode mode-obj)))
+ ;(elm-set! result 'hw-name (obj:name parsed-encoding))
+ ;(elm-set! result 'hw-name base-ifield)
(elm-set! result 'index parsed-encoding)
; (elm-set! result 'index (hw-index-derived)) ; A temporary dummy
(logit 1 "new derived-operand; name=" name " hw-name= " (op:hw-name result)
((op:getter self)
(let ((args (car (op:getter self)))
(expr (cadr (op:getter self))))
- (rtl-c mode expr
- (if (= (length args) 0)
- nil
- (list (list (car args) 'UINT index)))
- #:rtl-cover-fns? #t)))
+ (rtl-c-expr mode expr
+ (if (= (length args) 0)
+ nil
+ (list (list (car args) 'UINT index)))
+ #:rtl-cover-fns? #t)))
(else
(send (op:type self) 'cxmake-get estate mode index selector)))))
)
(define (op-needed-iflds op sfmt)
(let ((indx (op:index op)))
- (if (and (eq? (hw-index:type indx) 'ifield)
- (not (= (ifld-length (hw-index:value indx)) 0)))
- (hw-needed-iflds (op:type op) op sfmt)
- nil))
-)
+ (logit 4 "op-needed-iflds op=" (obj:name op) " indx=" (obj:name indx)
+ " indx-type=" (hw-index:type indx) " sfmt=" (obj:name sfmt) "\n")
+ (cond
+ ((and
+ (eq? (hw-index:type indx) 'ifield)
+ (not (= (ifld-length (hw-index:value indx)) 0)))
+ (hw-needed-iflds (op:type op) op sfmt))
+ ((eq? (hw-index:type indx) 'derived-ifield)
+ (ifld-needed-iflds indx))
+ (else nil)))
+ ;;;; EUREKA ******
+ )
\f
; Operand extraction (ARGBUF) support code.
;
(else
#f))))
)
+ (logit 4
+ "-sfmt-contents sfmt=" (obj:name sfmt)
+ " needed-iflds=" (string-map obj:name needed-iflds)
+ " extracted-ops=" (string-map obj:name extracted-ops)
+ " in-ops=" (string-map obj:name in-ops)
+ " out-ops=" (string-map obj:name out-ops)
+ "\n")
(cons sfmt
(sort
; Compute list of all things we need to record at extraction time.