]> sourceware.org Git - cgen.git/commit
Clean up pass of mode handling.
authorDoug Evans <xdje42@gmail.com>
Sat, 12 Sep 2009 17:34:15 +0000 (17:34 +0000)
committerDoug Evans <xdje42@gmail.com>
Sat, 12 Sep 2009 17:34:15 +0000 (17:34 +0000)
commit233cb8f81095185fad1481c9d1ebbcb6ce8f4eea
tree2cbb58f5f1bcb7d6f12098720522aa2ea3a49f3b
parent155aa399c83ce58f6a0e0369ceaf30de841ee7b8
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.
14 files changed:
ChangeLog
attr.scm
hardware.scm
html.scm
ifield.scm
mode.scm
operand.scm
rtl-c.scm
rtl-traverse.scm
rtl-xform.scm
rtl.scm
rtx-funcs.scm
sem-frags.scm
semantics.scm
This page took 0.025216 seconds and 5 git commands to generate.