From: brolley Date: Wed, 12 Feb 2003 22:31:31 +0000 (+0000) Subject: 2003-02-11 Dave Brolley X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=57c9a26465aaf44ab78d46bcb677606884bf56e0;p=pf3gnuchains%2Fpf3gnuchains3x.git 2003-02-11 Dave Brolley * desc-cpu.scm (gen-ifld-defns): Add all ifields to the @arch@_cgen-ifld_table. (gen-maybe-multi-ifld): Use the ifield enumerators to index the @arch@_cgen-ifld_table. --- diff --git a/cgen/ChangeLog b/cgen/ChangeLog index 971f619852..39569aed9f 100644 --- a/cgen/ChangeLog +++ b/cgen/ChangeLog @@ -1,3 +1,10 @@ +2003-02-11 Dave Brolley + + * desc-cpu.scm (gen-ifld-defns): Add all ifields to the + @arch@_cgen-ifld_table. + (gen-maybe-multi-ifld): Use the ifield enumerators to index the + @arch@_cgen-ifld_table. + 2003-02-03 Frank Ch. Eigler * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++. diff --git a/cgen/desc-cpu.scm b/cgen/desc-cpu.scm index a7b4275244..011765f4d6 100644 --- a/cgen/desc-cpu.scm +++ b/cgen/desc-cpu.scm @@ -128,8 +128,7 @@ static const CGEN_MACH @arch@_cgen_mach_table[] = { (define (gen-ifld-defns) (logit 2 "Generating ifield table ...\n") - (let* ((ifld-list (find (lambda (f) (not (has-attr? f 'VIRTUAL))) - (non-derived-ifields (current-ifld-list)))) + (let* ((ifld-list (current-ifld-list)) (all-attrs (current-ifld-attr-list)) (num-non-bools (attr-count-non-bools all-attrs))) (string-list @@ -149,12 +148,17 @@ const CGEN_IFLD @arch@_cgen_ifld_table[] = " { " (ifld-enum ifld) ", " "\"" (obj:name ifld) "\", " - (number->string (ifld-word-offset ifld)) ", " - (number->string (ifld-word-length ifld)) ", " - (number->string (ifld-start ifld #f)) ", " - (number->string (ifld-length ifld)) ", " + (if + (or (has-attr? ifld 'VIRTUAL) + (derived-ifield? ifld)) + "0, 0, 0, 0," + (string-append + (number->string (ifld-word-offset ifld)) ", " + (number->string (ifld-word-length ifld)) ", " + (number->string (ifld-start ifld #f)) ", " + (number->string (ifld-length ifld)) ", ")) (gen-obj-attr-defn 'ifld ifld all-attrs - num-non-bools gen-A-attr-mask) + num-non-bools gen-A-attr-mask) " },\n"))) ifld-list) "\ @@ -404,7 +408,7 @@ const CGEN_HW_ENTRY @arch@_cgen_hw_table[] = (set! field-ref (string-append "&" (ifld-enum fld) "_MULTI_IFIELD[0]")) (set! field-count (number->string (length (elm-get fld 'subfields))))) ; else - (set! field-ref (string-append "&@arch@_cgen_ifld_table[" (ifld-number fld) "]")))) + (set! field-ref (string-append "&@arch@_cgen_ifld_table[" (ifld-enum fld) "]")))) (string-append "{ " field-count ", { (const PTR) " field-ref " } }"))) (define (gen-multi-ifield-nodes)