From 4f5a5fe8f3fd099e2476314b4adc202e343c7281 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Tue, 10 Jun 2003 21:22:04 +0000 Subject: [PATCH] * mach.scm (current-*-add!): Disallow redefinition. Make result "unspecified". * insn.scm (insn-builtin!): Don't define relaxable here, now defined in operand.scm. * operand.scm (operand-builtin!): Define RELAXABLE for insns too. * cpu/m32r.cpu (disp8,disp24): RELAX renamed to RELAXABLE. * gen-all-doc: Split arm and frv docs up a bit. * cpu/arm.cpu: Add IDOC attribute. * cpu/frv.cpu: Ditto. * cpu/i960.cpu: Ditto. * cpu/openrisc.cpu: Ditto. * cpu/xstormy16.cpu: Ditto. * cpu/m32r.cpu: Ditto. (all insns): Explicitly specify IDOC attribute. * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars. (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS. (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately. * Makefile.in: Regenerate. * attr.scm (:parse-value-def): Implement. (-attr-read): Defer computing default value until we know the type. (attr-has-attr?): Delete, move contents to :has-attr?. (:attr-present?): New method. (atlist-attr-present?,obj-attr-present?): New fns. (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns. (attr-builtin!): New insn attr IDOC. * cgen-doc.scm (doc-arguments): New args -I,-N. * enum.scm (parse-enum-vals): New arg errtxt, all callers updated. Support comment as fourth element of enum value. (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns. * html.scm (gen-html-header): New arg kind, all callers updated. (gen-table-of-contents): New arg insn-file, all callers updated. (gen-list-entry,gen-doc-header): New fn. (get-operands): Delete. (gen-iformat-table): Rewrite. (gen-insn-doc-1): Print constant-folded and trimmed semantics. (gen-insn-doc-list): New args name, comment, insns. All callers updated. (get-insn-properties,guess-insn-idoc-attr!): New fn. (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns. (get-insns-for-category,gen-categories-insn-lists): New fns. (gen-insn-docs): Simplify each insn's semantics first. Print insn tables sorted by IDOC categories. (*insn-html-file-name*): New global. (cgen-insn.html): New fn. (cgen-all): Update. * insn.scm (): Create a setter for the `tmp' member. * semantics.scm (insn-build-known-values): Renamed from -build-known-values. All callers updated. * rtl.scm: Move traveral/evaluation support to ... * rtl-traverse.scm: New file. * read.scm: Maybe-load rtl-traverse.scm. * rtl.scm (-rtx-valid-types): Add SETRTX. * rtx-funcs.scm (nop,parallel): Fix mode. * utils.scm (eqv-lookup-index): New fn. (assq-lookup-index): Renamed from lookup-index. All callers updated. * dev.scm (load-doc): Set APPLICATION. --- ChangeLog | 66 +++ Makefile.am | 52 +- Makefile.in | 52 +- attr.scm | 128 ++++- cgen-doc.scm | 11 +- cpu/arm.cpu | 19 + cpu/frv.cpu | 18 + cpu/i960.cpu | 18 + cpu/m32r.cpu | 285 ++++++----- cpu/openrisc.cpu | 18 + cpu/xstormy16.cpu | 18 + dev.scm | 5 + doc/rtl.texi | 2 +- enum.scm | 60 ++- gen-all-doc | 22 +- html.scm | 378 ++++++++++++--- insn.scm | 7 +- mach.scm | 73 ++- opc-itab.scm | 8 +- operand.scm | 7 +- read.scm | 1 + rtl-traverse.scm | 1176 +++++++++++++++++++++++++++++++++++++++++++++ rtl.scm | 1075 ++--------------------------------------- rtx-funcs.scm | 4 +- sem-frags.scm | 4 +- semantics.scm | 12 +- utils.scm | 29 +- 27 files changed, 2186 insertions(+), 1362 deletions(-) create mode 100644 rtl-traverse.scm diff --git a/ChangeLog b/ChangeLog index 6c3ae08..5f028fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,69 @@ +2003-06-10 Doug Evans + + * mach.scm (current-*-add!): Disallow redefinition. Make result + "unspecified". + * insn.scm (insn-builtin!): Don't define relaxable here, now defined in + operand.scm. + * operand.scm (operand-builtin!): Define RELAXABLE for insns too. + * cpu/m32r.cpu (disp8,disp24): RELAX renamed to RELAXABLE. + + * gen-all-doc: Split arm and frv docs up a bit. + + * cpu/arm.cpu: Add IDOC attribute. + * cpu/frv.cpu: Ditto. + * cpu/i960.cpu: Ditto. + * cpu/openrisc.cpu: Ditto. + * cpu/xstormy16.cpu: Ditto. + * cpu/m32r.cpu: Ditto. + (all insns): Explicitly specify IDOC attribute. + + * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars. + (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS. + (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately. + * Makefile.in: Regenerate. + * attr.scm (:parse-value-def): Implement. + (-attr-read): Defer computing default value until we know the type. + (attr-has-attr?): Delete, move contents to :has-attr?. + (:attr-present?): New method. + (atlist-attr-present?,obj-attr-present?): New fns. + (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns. + (attr-builtin!): New insn attr IDOC. + * cgen-doc.scm (doc-arguments): New args -I,-N. + * enum.scm (parse-enum-vals): New arg errtxt, all callers updated. + Support comment as fourth element of enum value. + (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns. + * html.scm (gen-html-header): New arg kind, all callers updated. + (gen-table-of-contents): New arg insn-file, all callers updated. + (gen-list-entry,gen-doc-header): New fn. + (get-operands): Delete. + (gen-iformat-table): Rewrite. + (gen-insn-doc-1): Print constant-folded and trimmed semantics. + (gen-insn-doc-list): New args name, comment, insns. All callers updated. + (get-insn-properties,guess-insn-idoc-attr!): New fn. + (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns. + (get-insns-for-category,gen-categories-insn-lists): New fns. + (gen-insn-docs): Simplify each insn's semantics first. + Print insn tables sorted by IDOC categories. + (*insn-html-file-name*): New global. + (cgen-insn.html): New fn. + (cgen-all): Update. + * insn.scm (): Create a setter for the `tmp' member. + * semantics.scm (insn-build-known-values): Renamed from + -build-known-values. All callers updated. + + * rtl.scm: Move traveral/evaluation support to ... + * rtl-traverse.scm: New file. + * read.scm: Maybe-load rtl-traverse.scm. + + * rtl.scm (-rtx-valid-types): Add SETRTX. + + * rtx-funcs.scm (nop,parallel): Fix mode. + + * utils.scm (eqv-lookup-index): New fn. + (assq-lookup-index): Renamed from lookup-index. All callers updated. + + * dev.scm (load-doc): Set APPLICATION. + 2003-06-10 Dave Brolley * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx. diff --git a/Makefile.am b/Makefile.am index b7a94d9..cd680fc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,13 @@ GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; CGENFLAGS = -v ARCH = @arch@ +# for various utility rules +MACHS = all +ISAS = all + +# for the html rule +INSN_FILE_NAME = $(ARCH)-insn.html + srcroot = $(srcdir)/.. # Applications depend on stamp-cgen to tell them when .scm files have @@ -39,7 +46,9 @@ desc: desc.scm -s $(srcdir) \ $(CGENFLAGS) \ -f "$(OPTIONS)" \ - -m all -a $(ARCH) \ + -a $(ARCH) \ + -i "$(ISAS)" \ + -m "$(MACHS)" \ -H tmp-desc.h -C tmp-desc.c .PHONY: html @@ -49,9 +58,14 @@ html: desc.scm html.scm cgen-doc.scm -s $(srcdir) \ $(CGENFLAGS) \ -f "$(OPTIONS)" \ - -m all -a $(ARCH) \ - -H tmp-doc.html - $(SHELL) $(srcroot)/move-if-change tmp-doc.html $(ARCH)-doc.html + -a $(ARCH) \ + -i "$(ISAS)" \ + -m "$(MACHS)" \ + -N $(INSN_FILE_NAME) \ + -H tmp.html \ + -I tmp-insn.html + $(SHELL) $(srcroot)/move-if-change tmp.html $(ARCH).html + $(SHELL) $(srcroot)/move-if-change tmp-insn.html $(ARCH)-insn.html # Build the opcodes files. # We just stuff them in tmp-* files. @@ -66,7 +80,9 @@ opcodes: opcodes.scm -s $(srcdir) \ $(CGENFLAGS) \ -f "$(OPTIONS) opinst" \ - -m all -a $(ARCH) \ + -a $(ARCH) \ + -i "$(ISAS)" \ + -m "$(MACHS)" \ -O tmp-opc.h -P tmp-opc.c -Q tmp-opinst.c \ -B tmp-ibld.h -L tmp-ibld.in \ -A tmp-asm.in -D tmp-dis.in @@ -74,7 +90,7 @@ opcodes: opcodes.scm # Build the simulator files. # We just stuff them in tmp-* files. # Usage: make sim-arch ARCH= OPTIONS="