]> sourceware.org Git - cgen.git/log
cgen.git
15 years ago Clean up pass of mode handling.
Doug Evans [Sat, 12 Sep 2009 17:34:15 +0000 (17:34 +0000)]
Clean up pass of mode handling.
Make use of mode name vs <mode> object more consistent and clear.
* hardware.scm (/keyword-read): Default mode to the mode name,
not the <mode> object.
(/hw-parse-indices): Parse mode name and pass mode object to
<hw-asm> constructor.
(/hw-parse-values): Ditto.
(<hw-register> parse!): Pass mode name to /hw-parse-indices
and /hw-parse-values.
(<hw-memory> parse!): Ditto.
(<hw-address> parse!): Ditto.
* mode.scm (/mode-table): New global, replaces mode-list.
Modes stored in hashtable instead of list.
(/mode-class-table): New global.
(mode-list-non-alias-values): Update.
(mode:eq?, mode-compatible?, mode:add!): Update.
(mode:lookup): Restrict arg to the mode's name.  All callers updated.
(mode-maybe-lookup): New function.
(mode-real-name): Restrict arg to a <mode> object.  All callers updated.
(mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
(mode-find, mode-set-word-modes!): Update
(mode-ensure-word-sizes-defined): Update.
(/sort-mode-classes!): New function.
(mode-builtin!): Update.  Sort mode classes here.
(mode-finish!): Sort mode classes here too.
* rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
All callers updated.
(rtl-c-set-quiet): Allow mode to be name of object.
(rtl-c-set-trace): Ditto.
* rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
<mode> object.  All callers updated.
* rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
(rtx-lazy-sem-mode): Ditto.
(<rtx-temp> make!): Assert mode arg is a <mode> object.
(rtx-env-make): Allow var-list modes to be name or object.
* sem-frags.scm (/frag-expr-assq-locals): New function.
(/frag-compute-locals!): Call it.
(/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
All callers updated.
* semantics.scm (/build-mem-operand!): Handle mode aliases.

15 years agowhitespace fix
Doug Evans [Sat, 12 Sep 2009 17:32:56 +0000 (17:32 +0000)]
whitespace fix

15 years agowhitespace tweaks
Doug Evans [Sat, 12 Sep 2009 17:19:54 +0000 (17:19 +0000)]
whitespace tweaks

15 years ago * sim-test.scm (*): Symbols no longer can be passed to string-append.
Doug Evans [Sat, 12 Sep 2009 17:07:48 +0000 (17:07 +0000)]
* sim-test.scm (*): Symbols no longer can be passed to string-append.

15 years agoadd fixme
Doug Evans [Sat, 12 Sep 2009 16:51:15 +0000 (16:51 +0000)]
add fixme

15 years ago* insn.scm (/parse-insn-format): Improve error message for missing or
Doug Evans [Thu, 10 Sep 2009 08:07:04 +0000 (08:07 +0000)]
* insn.scm (/parse-insn-format): Improve error message for missing or
too many bits.

15 years ago * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
Doug Evans [Thu, 10 Sep 2009 07:23:29 +0000 (07:23 +0000)]
* insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
(/insn-parse): Don't verify iformat for virtual insns.

* sid-decode.scm (cgen-decode.cxx): Remove redundant call to
non-multi-insns.
* sid-model.scm (/gen-model-insn-fn-decls): Ditto.
(/gen-model-insn-fns, /gen-model-class-decls): Ditto.
* sid.scm (pbb-engine-insns): Ditto.
* sim-decode.scm (cgen-decode.c): Ditto.

15 years ago * rtl-traverse.scm: Comment tweaks.
Doug Evans [Thu, 10 Sep 2009 06:23:27 +0000 (06:23 +0000)]
* rtl-traverse.scm: Comment tweaks.
* rtl-xform.scm: Comment and reformatting tweaks.
* doc/rtl.texi: Add text to docs on ifield-assertions.

15 years agotweak ifield-assertion text
Doug Evans [Thu, 10 Sep 2009 00:10:58 +0000 (00:10 +0000)]
tweak ifield-assertion text

15 years agotweak ifield-assertion text
Doug Evans [Thu, 10 Sep 2009 00:00:50 +0000 (00:00 +0000)]
tweak ifield-assertion text

15 years ago * rtl.texi: Add text to docs on ifield-assertions.
Doug Evans [Wed, 9 Sep 2009 23:56:15 +0000 (23:56 +0000)]
* rtl.texi: Add text to docs on ifield-assertions.

15 years agoMove "Interactive development" up a level.
Doug Evans [Wed, 9 Sep 2009 23:07:38 +0000 (23:07 +0000)]
Move "Interactive development" up a level.
Expand on the .splice example.

15 years ago * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
Doug Evans [Wed, 9 Sep 2009 22:21:29 +0000 (22:21 +0000)]
* insn.scm (/insn-parse): Canonicalize the ifield-assertion before
saving.

15 years agotweak error message
Doug Evans [Wed, 9 Sep 2009 22:21:11 +0000 (22:21 +0000)]
tweak error message

15 years agotweak
Doug Evans [Wed, 9 Sep 2009 21:59:51 +0000 (21:59 +0000)]
tweak

15 years ago(/parse-insn-format): Tweak error message.
Doug Evans [Wed, 9 Sep 2009 21:01:39 +0000 (21:01 +0000)]
(/parse-insn-format): Tweak error message.

15 years ago * doc/porting.texi: Document #:trace, #:diag options to cload.
Doug Evans [Wed, 9 Sep 2009 20:49:50 +0000 (20:49 +0000)]
* doc/porting.texi: Document #:trace, #:diag options to cload.

15 years ago Add support for controlling warnings/errors.
Doug Evans [Wed, 9 Sep 2009 20:43:05 +0000 (20:43 +0000)]
Add support for controlling warnings/errors.
Add tests for iformat description errors.
* dev.scm (cload): New option #:diag.
* read.scm (<reader>): New member verify-iformat?.
(/parse-diagnostic, parse-warning): New functions.
(parse-error): Guts moved to /parse-diagnostic.
(/set-diagnostic-options!): New function.
(cpu-load): New arg diagnostic-options, all callers updated.
Recognize -w diagnostic-option-list.
* ifield.scm (ifields-base-ifields): Move here from iformat.scm.
(ifld-simple-ifields, ifields-simple-ifields): New function.
* insn.scm (/parse-insn-format-iflds): New function.
(/parse-insn-format): Guts moved to /parse-insn-format-iflds.
New arg isa, all callers updated.  Do some basic validation of the
ifield list if requested.
* mach.scm (/sanity-check-insns): Improve error message text.
* doc/running.text: Document -w option.

* ifield.scm (/multi-ifield-parse): Initialize bitrange.

15 years ago(<ifield> pretty-print): Fix typo.
Doug Evans [Wed, 9 Sep 2009 17:20:53 +0000 (17:20 +0000)]
(<ifield> pretty-print): Fix typo.

15 years ago * dev.scm (*): Change default verbosity level to 2.
Doug Evans [Wed, 9 Sep 2009 17:06:19 +0000 (17:06 +0000)]
* dev.scm (*): Change default verbosity level to 2.

* ifield.scm (<ifield> pretty-print): New method.
(ifld-pretty-print): New function.
(<multi-ifield> pretty-print): New method.

* ifield.scm (<ifield> field-start): Delete word-len arg.
All callers updated.
(ifld-start): Ditto.
(<multi-ifield> field-start): Ditto.
* operand.scm (<hw-index> field-start): Ditto.

15 years ago * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
Doug Evans [Wed, 9 Sep 2009 08:00:16 +0000 (08:00 +0000)]
* ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
total-bitsize.  All callers updated.
* insn.scm (<insn>): Rename member ifld-values to /insn-value.
New member /insn-base-value.
(insn-base-value): New function.
* mach.scm (/sanity-check-insns): New function.
(arch-analyze-insns!): Call it.

15 years ago * iformat.scm (ifields-base-ifields): Simplify.
Doug Evans [Wed, 9 Sep 2009 03:51:11 +0000 (03:51 +0000)]
* iformat.scm (ifields-base-ifields): Simplify.
(compute-insn-length): Simplify, call ifields-base-ifields.
(compute-insn-base-mask): Ditto.
* ifield.scm (ifld-known-values): Ditto.
(ifld-base-ifields): Ditto.
* insn.scm (insn-value): Ditto.
* pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.

15 years ago* cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
DJ Delorie [Tue, 8 Sep 2009 23:51:10 +0000 (23:51 +0000)]
* cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
preprocessor macro, not an enum.

15 years ago * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
Doug Evans [Tue, 8 Sep 2009 07:26:50 +0000 (07:26 +0000)]
* rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
to string-append.
(*): Remove trailing ":" from error messages passed to estate-error.

15 years ago * types.scm (<struct>): Delete.
Doug Evans [Tue, 8 Sep 2009 06:51:44 +0000 (06:51 +0000)]
* types.scm (<struct>): Delete.

* pmacros.scm (/pmacro-env-make): New argument `loc', all callers
updated.
(/pmacro-loc-error): New function.

* mach.scm (/isa-parse-decode-assist): New function.
(/isa-parse): Call it.

* decode.scm (/get-subopcode-value): New function.
(/opcode-slots): Call it.
(/fill-slot!): Add logging message.

15 years ago * cos.scm (/object-error): Convert symbols to strings before passing
Doug Evans [Tue, 8 Sep 2009 06:43:32 +0000 (06:43 +0000)]
* cos.scm (/object-error): Convert symbols to strings before passing
to string-append.

15 years agominor tweak
Doug Evans [Tue, 8 Sep 2009 06:41:16 +0000 (06:41 +0000)]
minor tweak

15 years ago * read.scm (rtl-version-equal?): New function.
Doug Evans [Mon, 7 Sep 2009 22:17:34 +0000 (22:17 +0000)]
* read.scm (rtl-version-equal?): New function.
(rtl-version-at-least?, rtl-version-older?): New functions.

* *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
* pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
rtl versions >= 0.9.
(pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.

15 years ago* rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx) is simple.
Doug Evans [Thu, 3 Sep 2009 17:13:02 +0000 (17:13 +0000)]
* rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx) is simple.

15 years ago[cgen]
DJ Delorie [Wed, 2 Sep 2009 02:10:36 +0000 (02:10 +0000)]
[cgen]
* cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
(parse_unsigned16_range): Likewise.
(mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
isa.

[opcodes]
* mep-asm.c: Regenerate.
* mep-desc.c: Regenerate.
* mep-opc.c: Regenerate.

15 years ago Pmacro .equals -> .equal?
Doug Evans [Tue, 1 Sep 2009 16:31:27 +0000 (16:31 +0000)]
Pmacro .equals -> .equal?
* pmacros.scm (-pmacro-builtin-equal?): Renamed from
-pmacro-builtin-equals.  All callers updated.
(pmacros-init!): Rename .equals to .equal?.
* doc/pmacros.texi: Update.
* testsuite/pmacros-1.test: Update.

15 years agotext2html <> inside double-quotes workaround, v3
Doug Evans [Tue, 1 Sep 2009 16:17:52 +0000 (16:17 +0000)]
text2html <> inside double-quotes workaround, v3

15 years agotexi2html <> workaround, v2
Doug Evans [Tue, 1 Sep 2009 16:13:25 +0000 (16:13 +0000)]
texi2html <> workaround, v2

15 years ago * doc/porting.texi: Work around texi2html bug where it doesn't
Doug Evans [Tue, 1 Sep 2009 16:02:18 +0000 (16:02 +0000)]
* doc/porting.texi: Work around texi2html bug where it doesn't
properly escape <> inside double-quotes inside @code.

15 years ago * doc/porting.texi (Doing an opcodes port): Add step to specify
Doug Evans [Tue, 1 Sep 2009 15:47:55 +0000 (15:47 +0000)]
* doc/porting.texi (Doing an opcodes port): Add step to specify
the .opc file.

15 years ago * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
Doug Evans [Sat, 29 Aug 2009 18:32:32 +0000 (18:32 +0000)]
* hardware.scm (-keyword-parse): Fix `enum-prefix' default for
rtl version 0.7.
* doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.

15 years agotweak `sequence' docs
Doug Evans [Fri, 28 Aug 2009 16:02:55 +0000 (16:02 +0000)]
tweak `sequence' docs

15 years agospiff up docs of sequence, parallel, do-count
Doug Evans [Fri, 28 Aug 2009 16:01:11 +0000 (16:01 +0000)]
spiff up docs of sequence, parallel, do-count

15 years agodo-count #iterations parameter can be an expression
Doug Evans [Fri, 28 Aug 2009 06:24:51 +0000 (06:24 +0000)]
do-count #iterations parameter can be an expression

15 years agoRework do-count to take an expression for the iteration count,
Doug Evans [Fri, 28 Aug 2009 06:20:29 +0000 (06:20 +0000)]
Rework do-count to take an expression for the iteration count,
and swap the iteration-variable/#iterations arguments.

15 years ago Add do-count rtl function.
Doug Evans [Thu, 27 Aug 2009 21:28:48 +0000 (21:28 +0000)]
Add do-count rtl function.
* rtl-c.scm (s-do-count): New function.
(do-count): New rtl handler.
* rtl-traverse.scm (-rtx-traverse-iteration): New function.
(-rtx-make-traverser-table): Add ITERATION.
* rtl.scm (rtx-env-make-iteration-locals): New function.
* rtx-funcs.scm (do-count): New rtl function.
* cpu/play.cpu: Add do-count-test insn.
* doc/rtl.texi: Add docs on do-count.

15 years ago* read.scm (parse-error): Really change error message output format
Doug Evans [Thu, 27 Aug 2009 06:09:02 +0000 (06:09 +0000)]
* read.scm (parse-error): Really change error message output format
to match context-owner-error.
* utils-cgen.scm (context-owner-error): Simplify.

15 years ago * read.scm (parse-error): Change error message output format
Doug Evans [Thu, 27 Aug 2009 05:47:12 +0000 (05:47 +0000)]
* read.scm (parse-error): Change error message output format
to match context-owner-error.
* rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
(rtl-c-set-quiet, rtl-c-set-trace): Ditto.
(s-if, s-cond, -gen-non-vm-case-test): Ditto.
(operand): Call estate-error instead of context-error.
(local, delay): Ditto.
(ref, attr): Call estate-error instead of error.
* rtl-traverse.scm (tstate-error): New function.
(-rtx-traverse-error): Call tstate-error instead of context-error.
(-rtx-traverse-operands, -rtx-traverse): Ditto.
(estate-error): New function.
* rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
instead of error.
(e-if): Call estate-error instead of error.
* rtx-funcs.scm (error): Call estate-error instead of context-error.
(member): Ditto.
* utils-cgen.scm (context-error): New arg `intro', all callers updated.
Rewrite to call context-owner-error.
(context-owner-error): New function.

15 years ago * ifield.scm (<ifield> constructor): New arg `location',
Doug Evans [Thu, 27 Aug 2009 04:22:56 +0000 (04:22 +0000)]
* ifield.scm (<ifield> constructor): New arg `location',
all callers updated.
* insn.scm (<insn> constructor): Ditto.
(<multi-insn> constructor): Ditto.
* minsn.scm (<macro-insn> constructor): Ditto.
* operand.scm (<operand> constructor): Ditto.
* utils-cgen.scm (builtin-location): New function.
(<source-ident>): Fix default value of member `location'.
(source-ident?): New function.

15 years agoremove cruft
Doug Evans [Thu, 27 Aug 2009 04:20:48 +0000 (04:20 +0000)]
remove cruft

15 years ago * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
Doug Evans [Thu, 27 Aug 2009 02:47:11 +0000 (02:47 +0000)]
* rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
(estate-push-env, estate-with-modifiers): Ditto.
(estate-deepen): New function.

15 years agoFix name in previous entry. Blech, sorry Dave.
Doug Evans [Thu, 27 Aug 2009 02:45:25 +0000 (02:45 +0000)]
Fix name in previous entry.  Blech, sorry Dave.

15 years ago * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
Doug Evans [Tue, 25 Aug 2009 16:30:06 +0000 (16:30 +0000)]
* sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
@CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
routines.

15 years agotweak previous change for consistency
Doug Evans [Tue, 25 Aug 2009 16:19:48 +0000 (16:19 +0000)]
tweak previous change for consistency

15 years ago * doc/pmacros.texi (pmacro default argument values): Add text.
Doug Evans [Tue, 25 Aug 2009 16:13:35 +0000 (16:13 +0000)]
* doc/pmacros.texi (pmacro default argument values): Add text.

15 years ago * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
Doug Evans [Mon, 24 Aug 2009 06:46:16 +0000 (06:46 +0000)]
* hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
Rename member prefix -> name-prefix.
(<keyword> getters): Update.
(-keyword-parse): Update.  Default enum-prefix to NAME-.
(-keyword-read): Update.  Don't compute default value for
enum-prefix here.
(define-keyword): Update.
(-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
* read.scm (cgen-rtl-version): New function.
(-supported-rtl-versions): Add (0 8).
* desc-cpu.scm (-gen-hw-decl): Remove cruft.
* desc.scm (<keyword> gen-defn): prefix -> name-prefix.
* gas-test.scm (<keyword> test-data): prefix -> name-prefix.
* cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
Update, print-name -> enum-prefix, make uppercase.
Remove unnecessary name-prefix spec.
* cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
* cpu/ip2k.cpu (register-names): Ditto.
* cpu/m68k.cpu (dr-names, ar-names): Ditto.
* cpu/sparc.cpu (gr-names): Ditto.
* cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
(grb-names, conditioncode-names, extconditioncode-names): Ditto.
(grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
(reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
* cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
prefix -> name-prefix.
* cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
Update, print-name -> enum-prefix, make uppercase.
(drc-names, xf-names): Ditto.
* cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
* doc/rtl.texi (Keywords): New section.
(hardware indices): Update text.
(rtl versions): Add 0.8.

15 years ago Add define-rtl-version.
Doug Evans [Sun, 23 Aug 2009 16:15:53 +0000 (16:15 +0000)]
Add define-rtl-version.
* read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
(cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
(cgen-lang-fixlevel): Delete.
(-supported-rtl-versions): New variable.
(-cmd-define-rtl-version): New function.
(init-reader!): New command define-rtl-version.
(-cgen): Add rtl version to --version output.
* doc/rtl.texi: Document rtl version support.
* cpu/play.cpu: Add define-rtl-version.

15 years agoremove old comment, ifields can specify the size of the word they live in
Doug Evans [Sat, 22 Aug 2009 23:56:48 +0000 (23:56 +0000)]
remove old comment, ifields can specify the size of the word they live in

15 years ago * Makefile.am (OPTIONS): Define.
Doug Evans [Sat, 22 Aug 2009 23:41:05 +0000 (23:41 +0000)]
* Makefile.am (OPTIONS): Define.
(desc): Just generate <arch>-desc.[ch] files.
* Makefile.in: Regenerate.
* desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
no .opc file.
(cgen-desc.c): Similarly.
* gen-all-desc: New file.
* opcodes.scm (opc-file-provided?): New function.

15 years ago * mach.scm (current-*-add!): Update calls to parse-error.
Doug Evans [Sat, 22 Aug 2009 23:16:01 +0000 (23:16 +0000)]
* mach.scm (current-*-add!): Update calls to parse-error.
* operand.scm (op:new-mode): Update call to parse-error.
* utils-cgen.scm (make-obj-context): New function.

15 years ago * NEWS: Copy over entries from 1.1 branch.
Doug Evans [Sat, 22 Aug 2009 16:15:46 +0000 (16:15 +0000)]
* NEWS: Copy over entries from 1.1 branch.

15 years ago * gas-test.scm (<keyword> test-data): Catch invalid requests,
Doug Evans [Thu, 20 Aug 2009 17:03:29 +0000 (17:03 +0000)]
* gas-test.scm (<keyword> test-data): Catch invalid requests,
flag a warning and compensate.
(<hw-address test-data): Tweak for readability.
(<hw-iaddress test-data): Ditto.
(cgen-build.sh): Convert symbols to strings before passing to
string-append.
(cgen-allinsn.exp): Ditto.

15 years ago * doc/pmacros.texi (.splice): Add more text.
Doug Evans [Thu, 20 Aug 2009 15:55:55 +0000 (15:55 +0000)]
* doc/pmacros.texi (.splice): Add more text.

15 years ago * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
Doug Evans [Thu, 20 Aug 2009 05:50:48 +0000 (05:50 +0000)]
* configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
distinguish from 1.1.
* configure: Regenerate.
* read.scm (-CGEN-VERSION): Update.
* doc/version.texi: Update.

15 years ago(.dump): fix typo
Doug Evans [Thu, 20 Aug 2009 05:38:29 +0000 (05:38 +0000)]
(.dump): fix typo

15 years ago New builtin .pmacro?.
Doug Evans [Thu, 20 Aug 2009 05:33:14 +0000 (05:33 +0000)]
New builtin .pmacro?.
* pmacros.scm (-pmacro-builtin-pmacro?): New function.
(pmacros-init!): Add .pmacro?.
* doc/pmacros.text: Document .pmacro?.
* testsuite/pmacros-1.test: Test .pmacro?.

15 years ago * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
Doug Evans [Thu, 20 Aug 2009 04:51:09 +0000 (04:51 +0000)]
* pmacros.scm (scan-list1): Reorganize tracing so that the tracing
of a pmacro begins before its arguments are evaluated, improves
readability.

15 years agoImprove operand docs on `foo' vs `o-foo'.
Doug Evans [Wed, 19 Aug 2009 17:17:24 +0000 (17:17 +0000)]
Improve operand docs on `foo' vs `o-foo'.

15 years ago * pmacros.scm (.sll, .srl, .sra): Fix thinko.
Doug Evans [Wed, 19 Aug 2009 17:04:28 +0000 (17:04 +0000)]
* pmacros.scm (.sll, .srl, .sra): Fix thinko.
* testsuite/pmacros-1.test: Ditto.  Add better tests.

15 years ago * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
Doug Evans [Wed, 19 Aug 2009 16:04:52 +0000 (16:04 +0000)]
* doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
in assembler syntax.

15 years agoadd some fixmes
Doug Evans [Wed, 19 Aug 2009 15:58:10 +0000 (15:58 +0000)]
add some fixmes

15 years ago * ifield.scm (ifld-encode-mode): Add FIXME.
Doug Evans [Wed, 19 Aug 2009 04:20:29 +0000 (04:20 +0000)]
* ifield.scm (ifld-encode-mode): Add FIXME.
* opcodes.scm (<ifield> 'gen-insert): Handle encode parameters with
modes.
(<ifield> 'gen-extract): Similarly.

* read.scm (parse-error): Handle #f for context-location.
* utils-cgen.scm (unspecified-location): Fix building of
single-location.

15 years agominor tweaks
Doug Evans [Wed, 19 Aug 2009 03:58:48 +0000 (03:58 +0000)]
minor tweaks

15 years ago * doc/rtl.texi: Document how to write hex and boolean values.
Doug Evans [Wed, 19 Aug 2009 02:47:13 +0000 (02:47 +0000)]
* doc/rtl.texi: Document how to write hex and boolean values.

15 years ago * gas-test.scm (<hw-asm>, test-data): Handle () values.
Doug Evans [Tue, 18 Aug 2009 16:34:41 +0000 (16:34 +0000)]
* gas-test.scm (<hw-asm>, test-data): Handle () values.
(<keyword>, test-data): Convert symbols to strings before passing
to string-append.
(<hw-index>, test-data): Enumerate all cases.  Emit correctly sized
result for scalars.

* operand.scm (hw-index-scalar): Set `name'.
(hw-index-anyof, hw-index-derived): Ditto.

15 years ago * pmacros.scm (-pmacro-builtin-internal-test): New function.
Doug Evans [Tue, 18 Aug 2009 01:40:57 +0000 (01:40 +0000)]
* pmacros.scm (-pmacro-builtin-internal-test): New function.
(pmacros-init!): Add .internal-test.
* testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
* testsuite/testsuite.cpu (internal-verify): New pmacro.
* doc/pmacros.text: Document .internal-test.

* utils-cgen.scm (parse-name): Handle (add 3) -> add3.
(parse-comment): Allow numbers.
* doc/porting.texi: Document that names and comments may be lists.

* insn.scm (-insn-parse): Fix typo.

15 years ago Rename .eval -> .exec. Add new .eval.
Doug Evans [Mon, 17 Aug 2009 15:27:56 +0000 (15:27 +0000)]
Rename .eval -> .exec.  Add new .eval.
* pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
(-pmacro-builtin-eval): New function.
(pmacros-init!): Add .exec.
* doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
* testsuite/location-1.test: Update.
* testsuite/pmacros-1.test: Add test for .eval.

15 years ago * doc/porting.texi: Remove support for Guile 1.4.
Doug Evans [Sun, 16 Aug 2009 17:46:46 +0000 (17:46 +0000)]
* doc/porting.texi: Remove support for Guile 1.4.

15 years ago * read.scm (current-reader-location): Return unspecified location
Doug Evans [Sun, 16 Aug 2009 17:44:22 +0000 (17:44 +0000)]
* read.scm (current-reader-location): Return unspecified location
if reader hasn't been initialized yet.

15 years ago * dev.scm: Document tracing options.
Doug Evans [Thu, 13 Aug 2009 19:51:13 +0000 (19:51 +0000)]
* dev.scm: Document tracing options.

15 years ago * pmacros.scm (pmacro-dump): New function.
Doug Evans [Thu, 13 Aug 2009 19:36:52 +0000 (19:36 +0000)]
* pmacros.scm (pmacro-dump): New function.
(check-pmacro): Tweak debugging output.
* doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
* doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.

15 years agotweak
Doug Evans [Thu, 13 Aug 2009 19:30:32 +0000 (19:30 +0000)]
tweak

15 years agoadd example usage of -t tracing option
Doug Evans [Thu, 13 Aug 2009 19:28:09 +0000 (19:28 +0000)]
add example usage of -t tracing option

15 years agoNew section for syntactic forms.
Doug Evans [Thu, 13 Aug 2009 19:10:01 +0000 (19:10 +0000)]
New section for syntactic forms.

15 years ago Add .let* pmacro builtin.
Doug Evans [Thu, 13 Aug 2009 17:57:51 +0000 (17:57 +0000)]
Add .let* pmacro builtin.
* pmacros.scm (-pmacro-builtin-let*): New function.
(pmacros-init!): Add .let*.
* doc/pmacros.texi: Document .let*.
* testsuite/pmacros-1.test: Test .let*.

15 years agosome minor tweaks
Doug Evans [Thu, 13 Aug 2009 16:23:17 +0000 (16:23 +0000)]
some minor tweaks

15 years ago Clean up cpu file parsing, pass context consistently instead of the
Doug Evans [Wed, 12 Aug 2009 22:33:37 +0000 (22:33 +0000)]
Clean up cpu file parsing, pass context consistently instead of the
old "errtxt" argument.
NOTE: ACU == "All Callers Updated".
* attr.scm (-parse-simple-attribute): Renamed from
parse-simple-attribute, ACU.
(-attr-parse): Change errtxt argument to context, ACU.
(-attr-read): Ditto.
(atlist-parse): Ditto.  Put context arg first.
(attr-parse): Use parse-error instead of context-error.
* enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
(-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
* hardware.scm (-keyword-parse): Renamed from keyword-parse.
`context' arg is now a <context> object.  ACU.
(-keyword-read): `context' arg is now a <context> object.  ACU.
(-hw-parse-indices): Change errtxt argument to context, ACU.
(-hw-parse-values, -hw-parse-handlers): Ditto.
(-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
(-hw-validate-layout, -hw-create-getter-from-layout,
-hw-create-setter-from-layout): Ditto.
(<hw-register>:parse!, <hw-pc>:parse!): Ditto.
(<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
(<hw-address>:parse!): Ditto.
* ifield.scm (-ifield-parse, ifield-read): Ditto.
(-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
(-ifld-parse-encode, -ifld-parse-decode): Ditto.
(-multi-ifield-parse, -multi-ifield-read): Ditto.
* insn.scm (-insn-parse, -insn-read): Ditto.
(parse-syntax): Ditto.  Put context arg first.
(-parse-insn-format-symbol): Change errtxt argument to context, ACU.
(-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
(-parse-insn-format): Ditto.
* mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
(-arch-parse-isas): Ditto.
(-isa-read): Add context arg, ACU.
(-cpu-parse, -cpu-read, -mach-read): Ditto.
* minsn.scm (-minsn-parse-expansion): Change errtxt argument to
context, ACU.
(-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
(minsn-make-alias): Ditto.
* mode.scm (-mode-parse): Ditto.
(parse-mode-name): Ditto.  Put context arg first.
* model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
errtxt argument to context, ACU.
(-unit-parse, -model-parse, -model-read): Ditto.
* operand.scm (-operand-parse-getter): Use parse-error instead of
context-error.
(-operand-parse-setter): Ditto.
(-operand-parse): Change errtxt argument to context, ACU.
(-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
(-anyof-operand-parse, -anyof-operand-read): Ditto.
* read.scm (reader-error): Delete.  Use parse-error instead.
(parse-error): Change errtxt argument to context, ACU.  Split args
argument into expr and maybe-help-text.
(-reader-process-expanded-1!): Reorganize.
* rtl.scm (-subr-read): Change errtxt argument to context, ACU.
* types.scm (parse-type): Ditto.
* utils-cgen.scm (single-location->simple-string): New function.
(<context>): Replace members file,lineno with location.
(make-prefix-context): Renamed from context-make-prefix, ACU.
(make-current-context): New function.
(context-append, context-append-name): New functions.
(context-make-reader): Delete.
(parse-name): Change errtxt argument to context, ACU.
Put context arg first.
(parse-comment): Ditto.
(parse-number): Change errtxt argument to context, ACU.
(arg-list-validate-name, arg-list-check-no-args,
arg-list-symbol-arg): Ditto.

* read.scm (-cmd-if): Don't assume test is a list.

* html.scm (get-insn-properties): Delete errtxt, unused.

15 years agofix typo in cload usage
Doug Evans [Tue, 11 Aug 2009 16:00:31 +0000 (16:00 +0000)]
fix typo in cload usage

15 years ago * doc/rtl.texi (hardware types): Add pc.
Doug Evans [Tue, 11 Aug 2009 15:56:00 +0000 (15:56 +0000)]
* doc/rtl.texi (hardware types): Add pc.

15 years ago Add -t option for tracing things like commands, pmacro expansion.
Doug Evans [Fri, 7 Aug 2009 21:29:20 +0000 (21:29 +0000)]
Add -t option for tracing things like commands, pmacro expansion.
* dev.scm (cload): New arg #:trace.
* pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
(pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
(pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
* read.scm (<reader>): New members trace-commands?, trace-pmacros?.
(-reader-process-expanded-1!): Trace commands if requested.
(-reader-process!): Call pmacro-trace of pmacro tracing requested.
(-set-trace-options!): New function.
(-init-reader!): New function.
(cpu-load): New arg trace-options, all callers updated.
Call -init-reader! and -set-trace-options!.
(cgen-usage): Improve output formatting.
(common-arguments): New option -t.
(-cgen): Process -t.
* utils-cgen.scm (single-location->string): Renamed from
pretty-print-single-location.  All callers updated.
(location->string): Renamed from pretty-print-location.
All callers updated.
(source-properties-location->string): New function.
* doc/running.texi: Document -t.

15 years ago * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
Doug Evans [Thu, 6 Aug 2009 21:52:08 +0000 (21:52 +0000)]
* read.scm (debug-env, debug-var-names, debug-var, debug-tty,
debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
* utils.scm: ... here.

15 years ago Track source location better, for better error messages.
Doug Evans [Thu, 6 Aug 2009 16:40:44 +0000 (16:40 +0000)]
Track source location better, for better error messages.
* pmacros.scm (-pmacro-eval): Delete, unused.
(pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
(-pmacro-expand-expr-list, -smacro-apply): Ditto.
(scan-list, scan): Ditto.
(-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
-pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
-pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
(scan-list1): New function.
(-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
* read.scm (<reader>): New member `location'.
(-reader-lookup-command): Renamed from reader-lookup-command,
all callers updated.
(reader-error): Rewrite to produce better source location info.
(current-reader-location): New function.
(-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
All callers updated.  Record source location of expression.
(reader-process-expanded!): Renamed from reader-process-expanded.
All callers updated.
(-reader-process!): Renamed from reader-process.  New arg `loc'.
All callers updated.  Record source location of define-pmacro.
* utils-cgen.scm (<location>): New class.
(single-location): New (pseudo) class.
(pretty-print-single-location, pretty-print-location): New functions.
(location-top, location-push-single, location-push): New functions.
(unspecified-location, current-input-location): New functions.
(location-property): New object property.
(location-property-set!): New function.
(<source-ident>): Renamed from <ordered-ident>.  New member `location'.
All uses updated.
* testsuite/location-1.test: New testcase.
* testsuite/run-tests.sh: Fix fail count handling.
* testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
to expect cgen to fail.

* pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.

* read.scm (-cmd-include): Renamed from include.  All callers updated.
(-cmd-if): Renamed from cmd-if.  All callers updated.
Use reader-process-expanded! on then/else clauses instead of eval1.

15 years ago(-attr-read): Add some fixmes.
Doug Evans [Wed, 5 Aug 2009 20:30:36 +0000 (20:30 +0000)]
(-attr-read): Add some fixmes.

15 years ago * modes.scm (TI,OI): New modes.
Doug Evans [Wed, 22 Jul 2009 18:30:59 +0000 (18:30 +0000)]
* modes.scm (TI,OI): New modes.
* types.scm (parse-type): Improve error checking.  Don't hardwire
mode names here.
* utils.scm (non-negative-integer?): New function.

15 years ago * pmacros.scm (-pmacro-builtin-find): New predicate.
Doug Evans [Wed, 22 Jul 2009 17:32:27 +0000 (17:32 +0000)]
* pmacros.scm (-pmacro-builtin-find): New predicate.
(pmacros-init!): Add .find.
* doc/pmacros.tex: Document .find.
* testsuite/pmacros-1.test: Test .find.

15 years ago * insn.scm (multi-insn-instantiate!): Use logging messages instead of
Doug Evans [Tue, 21 Jul 2009 05:44:41 +0000 (05:44 +0000)]
* insn.scm (multi-insn-instantiate!): Use logging messages instead of
commented out printfs.
* rtl.scm (rtl-finish!): Whitespace tweaks.

15 years ago * model.scm (parse-insn-timing): Tweak logging message.
Doug Evans [Tue, 21 Jul 2009 04:23:59 +0000 (04:23 +0000)]
* model.scm (parse-insn-timing): Tweak logging message.
* operand.scm: Comment and whitespace tweaks.
(op:type): Tweak error message.
(op-ifield): Tweak logging message.
(-derived-operand-parse, anyof-merge-semantics): Ditto.
* read.scm: Whitespace cleanup.
* utils.scm: Whitespace cleanup.

15 years agoAdd testcase for nested pmacros with bindings.
Doug Evans [Mon, 20 Jul 2009 01:06:06 +0000 (01:06 +0000)]
Add testcase for nested pmacros with bindings.

15 years ago Fix binding of nested pmacro parameters.
Doug Evans [Mon, 20 Jul 2009 00:57:03 +0000 (00:57 +0000)]
Fix binding of nested pmacro parameters.
* pmacros.scm (-pmacro-env-make): New arg prev-env.
All callers updated.
(-pmacro-bulid-lambda): Ditto.
* doc/pmacros.texi: Update.

15 years ago * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
Doug Evans [Mon, 20 Jul 2009 00:47:23 +0000 (00:47 +0000)]
* ifield.scm (-multi-ifield-make-default-insert): Fix shifts
calculation.
(-multi-ifield-make-default-extract): Ditto.

15 years ago * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
Doug Evans [Sun, 19 Jul 2009 19:19:44 +0000 (19:19 +0000)]
* rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
(add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
* rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
Define.
(add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
* doc/rtl.texi: Update.

15 years ago * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
Doug Evans [Sun, 19 Jul 2009 16:57:53 +0000 (16:57 +0000)]
* doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.

Rename builtin boolean pmacros, for consistency with rtl.
* pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
.bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
* doc/pmacros.texi: Update.
* testsuite/pmacros-1.test: Update.

15 years agofix typos in previous entry
Doug Evans [Sat, 18 Jul 2009 20:58:28 +0000 (20:58 +0000)]
fix typos in previous entry

15 years ago Use hash tables to record ifields, operands, insns, macro-insns.
Doug Evans [Sat, 18 Jul 2009 20:44:58 +0000 (20:44 +0000)]
Use hash tables to record ifields, operands, insns, macro-insns.
* attr.scm (attr-builtin!): Tweak some comments.
* hardware.scm (hardware-builtin!): Call all-isas-attr-value.
* ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
<ident>.
(<multi-ifield>): New constructor.
(ifield-builtin!): Add isa attr to f-nil, f-anyof.
* insn.scm (<insn>): Subclass from <ordered-ident> instead of
<ident>.
(-sub-insn-make!): Add hack to avoid differences in generated code.
(multi-insn-instantiate!): Add total number of multi-insns to
logging message.
* mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
minsn-list to foo-table.  New member next-ordinal.
Update getters/setters.
(arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
New functions.
(-get-next-ordinal!, -get-lowest-ordinal): New function.
(-make-ident-object-table, -ident-object-table->list,
-ident-object-table-add!, -ident-object-table-lookup): New functions.
(current-ifld-list, current-ifld-add! current-ifld-lookup,
-ifld-already-defined?): Rewrite.
(current-op-list, current-op-add! current-op-lookup,
-op-already-defined?): Rewrite.
(current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
(current-insn-list, current-insn-add! current-insn-lookup,
-insn-already-defined?): Rewrite.
(current-minsn-list, current-minsn-add! current-minsn-lookup,
-minsn-already-defined?): Rewrite.
(all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
(MAX-VIRTUAL-INSNS): Define.
(arch-analyze-insns!): Add hack to avoid differences in generated code.
Update use of arch-insn-list.
(mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
(arch-finish!): Delete references to ifld-table, op-table, insn-table,
minsn-table.
* minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
<ident>.  New constructor.
* operand.scm (<operand>): Subclass from <ordered-ident> instead of
<ident>.
* sid.scm (-virtual-insn-add!): New function.
(-create-virtual-insns!): Call it.
(-fill-sim-insn-list!): Rewrite.
* sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
(sim-finish!): Move contents to -create-virtual-insns!, and call it.
* utils-cgen.scm (<ordered-ident>): New class.
(obj-ordinal, obj-set-ordinal!): New functions.
(add-ident-methods!): Delete.

* model.scm (parse-insn-timing): Change logging message to level 3.

15 years ago * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
Doug Evans [Thu, 16 Jul 2009 18:50:53 +0000 (18:50 +0000)]
* doc/rtl.texi (Enumerated constants): Add example, fix a typo,
add a link to define-normal-insn-enum.

This page took 0.062877 seconds and 5 git commands to generate.