OSDN Git Service

* doc/intro.texi: Mention SID.
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-09-30  Doug Evans  <dje@sebabeach.org>
2
3         * doc/intro.texi: Mention SID.
4         * doc/sim.texi: Ditto.
5         * doc/porting.text (Doing a simulator port): Add some text.
6
7 2009-09-27  Doug Evans  <dje@sebabeach.org>
8
9         * cos.scm (/class-table): New global.
10         (/class-uid, /class-set-uid!): New functions.
11         (/class-parent-name): Renamed from /class-parents.
12         (/class-make!): Change parents arg to parent-name, all callers updated.
13         Assign uid to class.
14         (/class-lookup-uid): New function.
15         (/class-parent-classes): Rewrite.
16         (/class-mi?): Delete.
17         (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
18         Delete.
19         (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
20         (/class-compute-class-desc, class-desc-dump): Update.
21         (/object-make!): Update.
22         (/object-make-with-values!): Delete arg class-desc, all callers
23         updated.
24         (/object-copy): Delete arg top?, all callers updated.
25         (/object-specialize): Delete.
26         (/object-elements, /object-top-class): Delete.
27         (/object-class-name, /object-class-desc): Update.
28         (/object-class-uid): New function.
29         (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
30         class-make, /class-subclass? /class-lookup-element,
31         Update.
32         (/elm-delta, elm-list): Delete.
33         (/elm-make-method-getter, elm-get, elm-xget): Update.
34         (/elm-make-method-setter, elm-set!, elm-xset!): Update.
35         (elm-make-getter, elm-make-setter): Update.
36         (/method-lookup-next): Update.
37         (send): Don't specialize class passed to method.
38         (send-next): New arg class-name, all callers updated.
39         (/class-parent, /class-parent-via-path, object-parent): Delete.
40         (class-cons-parent!, class-append-parent!): Delete.
41         (object-reset!): Init /class-table.
42
43         * cos.scm (/object-debug-classes): Delete.
44         (/object-debug-elements, /object-debug-methods): Delete.
45
46         * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
47         (method-proc): Delete.
48         (method-make-virtual!, method-make-virtual-forward!): Delete.
49         * ifield.scm (<ifield> field-start): Update.
50         (<ifield> field-length, pretty-print): Update.
51         (<multi-ifield> field-length, field-start, pretty-print): Update.
52         * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
53         * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
54         (<array> gen-sym-defn): Ditto.
55         (<hardware-base> gen-defn): Renamed from gen-defn.
56         (<hw-register> gen-type): Update.
57         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
58         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
59         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
60         (<hw-immediate> gen-type): Update.
61         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
62         * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
63         * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
64         (<array> gen-sym-defn): Ditto.
65         (<hardware-base> gen-defn): Renamed from gen-defn.
66         (<hw-register> gen-type): Update.
67         (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
68         (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
69         (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
70         (<hw-immediate> gen-type): Update.
71         (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
72
73 2009-09-25  Doug Evans  <dje@sebabeach.org>
74
75         * operand.scm (/anyof-merge-setter): Handle set-quiet.
76         * rtl.scm (rtx-single-set?): Handle set-quiet.
77
78         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
79         rtl-cover-fns?, macro?.  All callers updated.
80         (estate-make-for-normal-rtl-c): Delete, have all callers call
81         estate-make-for-rtl-c directly.
82         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
83         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
84
85         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
86         replaces /par-replace-set-dests.
87         (/par-replace-set-src-expr-fn): New function, replaces
88         /par-replace-set-srcs.
89         (s-parallel): Rewrite.
90
91         * rtl.scm (rtx-pretty-strdump): New function.
92         * rtl-traverse.scm (/rtx-canon-error): Use it.
93         (<eval-state>): New member outer-expr.
94         (estate-error): Include outer expression in error message if present.
95
96 2009-09-23  Doug Evans  <dje@sebabeach.org>
97
98         * xc16x.cpu (h-cr): New hardware.
99         (muls): Comment out parts that won't compile, add fixme.
100         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
101         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
102         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
103
104         Rewrite rtl processing to require it to be "canonicalized" first,
105         and write a full canonicalizer / expression checker.
106         Remove all appearances of DFLT in canonical rtl.
107         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
108         then rtx-simplify.
109         * iformat.scm (ifmt-analyze) Use canonical semantics.
110         * insn (<insn>): New member canonical-semantics.
111         * mach.scm (<arch>): New member multi-insns-instantiated?.
112         (/instantiate-multi-insns!): New function.
113         (/canonicalize-insns!): New function.
114         (arch-analyze-insns!): Canonicalize insn semantics before processing
115         them.
116         * mode.scm (/mode-set-word-params!): New function.
117         (mode-void?): New function.
118         (mode-compatible?): VOID is compatible with VOID.
119         (/mode-word-sizes-defined?): New global.
120         (mode-set-word-modes!): Use/set it.
121         (mode-ensure-word-sizes-defined): Update.
122         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
123         Redo WI/UWI/AI/IAI handling.
124         (op:new-mode): No longer accept DFLT.
125         (<derived-operand> constructor): Ensure all fields are initialized.
126         (<anyof-operand> constructor): Ditto.
127         (/derived-parse-ifield-assertion): Delete arg `args'.
128         All callers updated.
129         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
130         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
131         (rtl-c-expr, rtl-c++): Ditto.
132         (/rtl-c-get): Use mode of operand, not containing expression.
133         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
134         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
135         estate-for-insn? instead.
136         (s-unop): Use mode of expression, not first operand.
137         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
138         (s-sequence): Remove DFLT support.
139         (ifield): Use mode of expression, not UINT.
140         (pc): Comment out, unused.
141         (int-attr): New rtx kind.
142         (attr): Deprecate.
143         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
144         * rtl-traverse.scm (/rtx-canon-debug?): New global.
145         (/make-cstate): New function.
146         (/cstate-context, /cstate-outer-expr): New functions.
147         (/rtx-canon-error): New function.
148         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
149         /rtx-get-last-cond-case-rtx): New functions.
150         (/rtx-canon-*): New functions.
151         (/rtx-canner-table, /rtx-operand-canoners): New globals.
152         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
153         (/rtx-option, /rtx-option-list?): Rewrite.
154         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
155         Rewritten, all callers updated.
156         (/rtx-canon-expr, /rtx-canon): New functions.
157         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
158         (rtx-canonicalize-stmt): New function.
159         (tstate-make): Remove arg `set?'.  All callers updated.
160         (tstate-new-set?): Delete.
161         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
162         moved to /rtx-canon-*.
163         (/rtx-traverse-normal-operand): New function.
164         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
165         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
166         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
167         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
168         Ditto.
169         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
170         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
171         (/rtx-make-traverser-table): Update.
172         (/rtx-traverse-operands): Remove mode processing, now done during
173         canonicalization.
174         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
175         (/rtx-traverse): Ditto.
176         (rtx-init-traverser-tables!): New function.
177         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
178         (rtx-verify-no-dflt-modes): New function.
179         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
180         (rtx-simplify-insn): Use insn-canonical-semantics.
181         (rtx-canonicalize): Moved to rtl-traverse.scm.
182         (/compile-expr-fn, rtx-compile): Delete.
183         (/rtx-trim-rtx-list): New function.
184         (/rtx-trim-for-doc): Handle set, if.
185         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
186         (/rtx-valid-mode-types): Update.
187         (/rtx-valid-matches): Update.
188         (/rtx-find-matchexpr-index): New function.
189         (rtx-lookup): Require rtx-kind to be the rtx name.
190         (def-rtx-node): New arg result-mode, all callers updated.
191         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
192         (rtx-lazy-sem-mode): Delete.
193         (/rtx-closure-make): New arg `mode', all callers updated.
194         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
195         (rtx-operand-obj): Rewrite.
196         (rtx-make-xop): New functions.
197         (/hw): Renamed from `hw', all callers updated.
198         Use the correct mode instead of DFLT for the index.
199         (rtl-builtin!): Call rtx-init-traversal-tables!.
200         (rtl-finish!): Update.
201         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
202         Update mode arg-type.
203         (pc): Comment out.
204         (int-attr): New rtx kind.
205         (attr): Deprecate.
206         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
207         (/frag-cost-compute!): Ditto.
208         * semantics.scm (/build-operand!): Delete args op-name, op.
209         New arg op-expr.  All callers updated.
210         (/build-mem-operand!): Remove DFLT support.
211         (semantic-compile): Update process-expr!, mode arg deleted.
212         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
213         rtl-c++ calls.
214         (/gen-sem-case, /gen-sfrag-code): Ditto.
215         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
216         (/op-gen-set-trace): New function.  If not doing profiling, or using
217         the pbb engine, call /op-gen-set-quiet.
218         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
219         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
220         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
221         * utils.scm (find-first-index): New function.
222         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
223
224         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
225         to COMPARE.
226         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
227
228 2009-09-21  Doug Evans  <dje@sebabeach.org>
229
230         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
231         All callers updated.  Add FIXME.
232         (all rtx functions): Rename local estate to *estate*.  It's an
233         artificial argument added to the rtx, so make it stand out.
234
235         * openrisc.cpu (or32 isa): Fix setup-semantics.
236
237         * rtl.scm (rtx-class-*?): Delete, unused.
238         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
239
240         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
241         (init-reader!): Set /CGEN-RTL-VERSION to default.
242
243         * read.scm (cpu-load): Print load parameters.
244
245         * dev.scm (load-doc): Set verbose-level to 2.
246
247 2009-09-20  Doug Evans  <dje@sebabeach.org>
248
249         * rtl.scm (rtx-strdump): Use write instead of display.
250
251 2009-09-17  Doug Evans  <dje@sebabeach.org>
252
253         * utils-cgen.scm (obj-csv-names): New function.
254         * utils-sim.scm (/sfmt-contents): Use it in logging message.
255
256 2009-09-12  Doug Evans  <dje@sebabeach.org>
257
258         Clean up pass of mode handling.
259         Make use of mode name vs <mode> object more consistent and clear.
260         * hardware.scm (/keyword-read): Default mode to the mode name,
261         not the <mode> object.
262         (/hw-parse-indices): Parse mode name and pass mode object to
263         <hw-asm> constructor.
264         (/hw-parse-values): Ditto.
265         (<hw-register> parse!): Pass mode name to /hw-parse-indices
266         and /hw-parse-values.
267         (<hw-memory> parse!): Ditto.
268         (<hw-address> parse!): Ditto.
269         * mode.scm (/mode-table): New global, replaces mode-list.
270         Modes stored in hashtable instead of list.
271         (/mode-class-table): New global.
272         (mode-list-non-alias-values): Update.
273         (mode:eq?, mode-compatible?, mode:add!): Update.
274         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
275         (mode-maybe-lookup): New function.
276         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
277         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
278         (mode-find, mode-set-word-modes!): Update
279         (mode-ensure-word-sizes-defined): Update.
280         (/sort-mode-classes!): New function.
281         (mode-builtin!): Update.  Sort mode classes here.
282         (mode-finish!): Sort mode classes here too.
283         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
284         All callers updated.
285         (rtl-c-set-quiet): Allow mode to be name of object.
286         (rtl-c-set-trace): Ditto.
287         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
288         <mode> object.  All callers updated.
289         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
290         (rtx-lazy-sem-mode): Ditto.
291         (<rtx-temp> make!): Assert mode arg is a <mode> object.
292         (rtx-env-make): Allow var-list modes to be name or object.
293         * sem-frags.scm (/frag-expr-assq-locals): New function.
294         (/frag-compute-locals!): Call it.
295         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
296         All callers updated.
297         * semantics.scm (/build-mem-operand!): Handle mode aliases.
298
299         * sim-test.scm (*): Symbols no longer can be passed to string-append.
300
301 2009-09-10  Doug Evans  <dje@sebabeach.org>
302
303         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
304         Improve error message for missing or too many bits.
305         (/insn-parse): Don't verify iformat for virtual insns.
306         
307         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
308         non-multi-insns.
309         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
310         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
311         * sid.scm (pbb-engine-insns): Ditto.
312         * sim-decode.scm (cgen-decode.c): Ditto.
313
314 2009-09-09  Doug Evans  <dje@sebabeach.org>
315
316         * rtl-traverse.scm: Comment tweaks.
317         * rtl-xform.scm: Comment and reformatting tweaks.
318         * doc/rtl.texi: Add text to docs on ifield-assertions.
319
320         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
321         saving.
322
323         Add support for controlling warnings/errors.
324         Add tests for iformat description errors.
325         * dev.scm (cload): New option #:diag.
326         * read.scm (<reader>): New member verify-iformat?.
327         (/parse-diagnostic, parse-warning): New functions.
328         (parse-error): Guts moved to /parse-diagnostic.
329         (/set-diagnostic-options!): New function.
330         (cpu-load): New arg diagnostic-options, all callers updated.
331         Recognize -w diagnostic-option-list.
332         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
333         (ifld-simple-ifields, ifields-simple-ifields): New function.
334         * insn.scm (/parse-insn-format-iflds): New function.
335         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
336         New arg isa, all callers updated.  Do some basic validation of the
337         ifield list if requested.
338         * mach.scm (/sanity-check-insns): Improve error message text.
339         * doc/running.texi: Document -w option.
340         * doc/porting.texi: Document #:trace, #:diag options to cload.
341
342         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
343
344         * dev.scm (*): Change default verbosity level to 2.
345
346         * ifield.scm (<ifield> pretty-print): New method.
347         (ifld-pretty-print): New function.
348         (<multi-ifield> pretty-print): New method.
349
350         * ifield.scm (<ifield> field-start): Delete word-len arg.
351         All callers updated.
352         (ifld-start): Ditto.
353         (<multi-ifield> field-start): Ditto.
354         * operand.scm (<hw-index> field-start): Ditto.
355
356         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
357         total-bitsize.  All callers updated.
358         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
359         New member /insn-base-value.
360         (insn-base-value): New function.
361         * mach.scm (/sanity-check-insns): New function.
362         (arch-analyze-insns!): Call it.
363
364 2009-09-08  Doug Evans  <dje@sebabeach.org>
365
366         * iformat.scm (ifields-base-ifields): Simplify.
367         (compute-insn-length): Simplify, call ifields-base-ifields.
368         (compute-insn-base-mask): Ditto.
369         * ifield.scm (ifld-known-values): Ditto.
370         (ifld-base-ifields): Ditto.
371         * insn.scm (insn-value): Ditto.
372         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
373
374 2009-09-08  DJ Delorie  <dj@redhat.com>
375
376         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
377         preprocessor macro, not an enum.
378
379 2009-09-08  Doug Evans  <dje@sebabeach.org>
380
381         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
382         to string-append.
383         (*): Remove trailing ":" from error messages passed to estate-error.
384
385 2009-09-07  Doug Evans  <dje@sebabeach.org>
386
387         * types.scm (<struct>): Delete.
388
389         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
390         updated.
391         (/pmacro-loc-error): New function.
392
393         * mach.scm (/isa-parse-decode-assist): New function.
394         (/isa-parse): Call it.
395
396         * decode.scm (/get-subopcode-value): New function.
397         (/opcode-slots): Call it.
398         (/fill-slot!): Add logging message.
399
400         * cos.scm (/object-error): Convert symbols to strings before passing
401         to string-append.
402
403         * read.scm (rtl-version-equal?): New function.
404         (rtl-version-at-least?, rtl-version-older?): New functions.
405
406         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
407         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
408         rtl versions >= 0.9.
409         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
410
411 2009-09-03  Doug Evans  <dje@sebabeach.org>
412
413         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
414         is simple.
415
416 2009-09-01  DJ Delorie  <dj@redhat.com>
417
418         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
419         (parse_unsigned16_range): Likewise.
420         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
421         isa.
422
423 2009-09-01  Doug Evans  <dje@sebabeach.org>
424
425         Pmacro .equals -> .equal?
426         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
427         -pmacro-builtin-equals.  All callers updated.
428         (pmacros-init!): Rename .equals to .equal?.
429         * doc/pmacros.texi: Update.
430         * testsuite/pmacros-1.test: Update.
431
432         * doc/porting.texi: Work around texi2html bug where it doesn't
433         properly escape <> inside double-quotes inside @code.
434
435         * doc/porting.texi (Doing an opcodes port): Add step to specify
436         the .opc file.
437
438 2009-08-29  Doug Evans  <dje@sebabeach.org>
439
440         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
441         rtl version 0.7.
442         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
443
444 2009-08-27  Doug Evans  <dje@sebabeach.org>
445
446         Add do-count rtl function.
447         * rtl-c.scm (s-do-count): New function.
448         (do-count): New rtl handler.
449         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
450         (-rtx-make-traverser-table): Add ITERATION.
451         * rtl.scm (rtx-make-iteration-limit-var): New function.
452         (rtx-env-make-iteration-locals): New function.
453         * rtx-funcs.scm (do-count): New rtl function.
454         * cpu/play.cpu: Add do-count-test insn.
455         * doc/rtl.texi: Add docs on do-count.
456
457 2009-08-26  Doug Evans  <dje@sebabeach.org>
458
459         * read.scm (parse-error): Change error message output format
460         to match context-owner-error.
461         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
462         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
463         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
464         (operand): Call estate-error instead of context-error.
465         (local, delay): Ditto.
466         (ref, attr): Call estate-error instead of error.
467         * rtl-traverse.scm (tstate-error): New function.
468         (-rtx-traverse-error): Call tstate-error instead of context-error.
469         (-rtx-traverse-operands, -rtx-traverse): Ditto.
470         (estate-error): New function.
471         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
472         instead of error.
473         (e-if): Call estate-error instead of error.
474         * rtx-funcs.scm (error): Call estate-error instead of context-error.
475         (member): Ditto.
476         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
477         Rewrite to call context-owner-error.
478         (context-owner-error): New function.
479
480         * ifield.scm (<ifield> constructor): New arg `location',
481         all callers updated.
482         * insn.scm (<insn> constructor): Ditto.
483         (<multi-insn> constructor): Ditto.
484         * minsn.scm (<macro-insn> constructor): Ditto.
485         * operand.scm (<operand> constructor): Ditto.
486         * utils-cgen.scm (builtin-location): New function.
487         (<source-ident>): Fix default value of member `location'.
488         (source-ident?): New function.
489
490         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
491         (estate-push-env, estate-with-modifiers): Ditto.
492         (estate-deepen): New function.
493
494 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
495
496         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
497         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
498         routines.
499
500 2009-08-25  Doug Evans  <dje@sebabeach.org>
501
502         * doc/pmacros.texi (pmacro default argument values): Add text.
503
504 2009-08-23  Doug Evans  <dje@sebabeach.org>
505
506         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
507         Rename member prefix -> name-prefix.
508         (<keyword> getters): Update.
509         (-keyword-parse): Update.  Default enum-prefix to NAME-.
510         (-keyword-read): Update.  Don't compute default value for
511         enum-prefix here.
512         (define-keyword): Update.
513         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
514         * read.scm (cgen-rtl-version): New function.
515         (-supported-rtl-versions): Add (0 8).
516         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
517         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
518         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
519         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
520         Update, print-name -> enum-prefix, make uppercase.
521         Remove unnecessary name-prefix spec.
522         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
523         * cpu/ip2k.cpu (register-names): Ditto.
524         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
525         * cpu/sparc.cpu (gr-names): Ditto.
526         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
527         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
528         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
529         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
530         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
531         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
532         prefix -> name-prefix.
533         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
534         Update, print-name -> enum-prefix, make uppercase.
535         (drc-names, xf-names): Ditto.
536         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
537         * doc/rtl.texi (Keywords): New section.
538         (hardware indices): Update text.
539         (rtl versions): Add 0.8.
540
541         Add define-rtl-version.
542         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
543         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
544         (cgen-lang-fixlevel): Delete.
545         (-supported-rtl-versions): New variable.
546         (-cmd-define-rtl-version): New function.
547         (init-reader!): New command define-rtl-version.
548         (-cgen): Add rtl version to --version output.
549         * doc/rtl.texi: Document rtl version support.
550         * cpu/play.cpu: Add define-rtl-version.
551
552 2009-08-22  Doug Evans  <dje@sebabeach.org>
553
554         * Makefile.am (OPTIONS): Define.
555         (desc): Just generate <arch>-desc.[ch] files.
556         * Makefile.in: Regenerate.
557         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
558         no .opc file.
559         (cgen-desc.c): Similarly.
560         * gen-all-desc: New file.
561         * opcodes.scm (opc-file-provided?): New function.
562
563         * mach.scm (current-*-add!): Update calls to parse-error.
564         * operand.scm (op:new-mode): Update call to parse-error.
565         * utils-cgen.scm (make-obj-context): New function.
566
567         * NEWS: Copy over entries from 1.1 branch.
568
569 2009-08-20  Doug Evans  <dje@sebabeach.org>
570
571         * gas-test.scm (<keyword> test-data): Catch invalid requests,
572         flag a warning and compensate.
573         (<hw-address test-data): Tweak for readability.
574         (<hw-iaddress test-data): Ditto.
575         (cgen-build.sh): Convert symbols to strings before passing to
576         string-append.
577         (cgen-allinsn.exp): Ditto.
578
579         * doc/pmacros.texi (.splice): Add more text.
580
581 2009-08-19  Doug Evans  <dje@sebabeach.org>
582
583         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
584         distinguish from 1.1.
585         * configure: Regenerate.
586         * read.scm (-CGEN-VERSION): Update.
587         * doc/version.texi: Update.
588
589         New builtin .pmacro?.
590         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
591         (pmacros-init!): Add .pmacro?.
592         * doc/pmacros.text: Document .pmacro?.
593         * testsuite/pmacros-1.test: Test .pmacro?.
594
595         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
596         of a pmacro begins before its arguments are evaluated, improves
597         readability.
598
599         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
600         * testsuite/pmacros-1.test: Ditto.  Add better tests.
601
602         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
603         in assembler syntax.
604         (Operands): Similarly.
605
606 2009-08-18  Doug Evans  <dje@sebabeach.org>
607
608         * ifield.scm (ifld-encode-mode): Add FIXME.
609         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
610         modes.
611         (<ifield> gen-extract): Similarly.
612
613         * read.scm (parse-error): Handle #f for context-location.
614         * utils-cgen.scm (unspecified-location): Fix building of
615         single-location.
616
617         * doc/rtl.texi: Document how to write hex and boolean values.
618
619         * gas-test.scm (<hw-asm> test-data): Handle () values.
620         (<keyword> test-data): Convert symbols to strings before passing
621         to string-append.
622         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
623         result for scalars.
624
625         * operand.scm (hw-index-scalar): Set `name'.
626         (hw-index-anyof, hw-index-derived): Ditto.
627
628 2009-08-17  Doug Evans  <dje@sebabeach.org>
629
630         * pmacros.scm (-pmacro-builtin-internal-test): New function.
631         (pmacros-init!): Add .internal-test.
632         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
633         * testsuite/testsuite.cpu (internal-verify): New pmacro.
634         * doc/pmacros.text: Document .internal-test.
635
636         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
637         (parse-comment): Allow numbers.
638         * doc/porting.texi: Document that names and comments may be lists.
639
640         * insn.scm (-insn-parse): Fix typo.
641
642         Rename .eval -> .exec.  Add new .eval.
643         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
644         (-pmacro-builtin-eval): New function.
645         (pmacros-init!): Add .exec.
646         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
647         * testsuite/location-1.test: Update.
648         * testsuite/pmacros-1.test: Add test for .eval.
649
650 2009-08-16  Doug Evans  <dje@sebabeach.org>
651
652         * doc/porting.texi: Remove support for Guile 1.4.
653
654         * read.scm (current-reader-location): Return unspecified location
655         if reader hasn't been initialized yet.
656
657 2009-08-13  Doug Evans  <dje@sebabeach.org>
658
659         * dev.scm: Document tracing options.
660
661         * pmacros.scm (pmacro-dump): New function.
662         (check-pmacro): Tweak debugging output.
663         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
664         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
665
666         Add .let* pmacro builtin.
667         * pmacros.scm (-pmacro-builtin-let*): New function.
668         (pmacros-init!): Add .let*.
669         * doc/pmacros.texi: Document .let*.
670         * testsuite/pmacros-1.test: Test .let*.
671
672 2009-08-12  Doug Evans  <dje@sebabeach.org>
673
674         Clean up cpu file parsing, pass context consistently instead of the
675         old "errtxt" argument.
676         NOTE: ACU == "All Callers Updated".
677         * attr.scm (-parse-simple-attribute): Renamed from
678         parse-simple-attribute, ACU.
679         (-attr-parse): Change errtxt argument to context, ACU.
680         (-attr-read): Ditto.
681         (atlist-parse): Ditto.  Put context arg first.
682         (attr-parse): Use parse-error instead of context-error.
683         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
684         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
685         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
686         `context' arg is now a <context> object.  ACU.
687         (-keyword-read): `context' arg is now a <context> object.  ACU.
688         (-hw-parse-indices): Change errtxt argument to context, ACU.
689         (-hw-parse-values, -hw-parse-handlers): Ditto.
690         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
691         (-hw-validate-layout, -hw-create-getter-from-layout,
692         -hw-create-setter-from-layout): Ditto.
693         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
694         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
695         (<hw-address>:parse!): Ditto.
696         * ifield.scm (-ifield-parse, ifield-read): Ditto.
697         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
698         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
699         (-multi-ifield-parse, -multi-ifield-read): Ditto.
700         * insn.scm (-insn-parse, -insn-read): Ditto.
701         (parse-syntax): Ditto.  Put context arg first.
702         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
703         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
704         (-parse-insn-format): Ditto.
705         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
706         (-arch-parse-isas): Ditto.
707         (-isa-read): Add context arg, ACU.
708         (-cpu-parse, -cpu-read, -mach-read): Ditto.
709         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
710         context, ACU.
711         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
712         (minsn-make-alias): Ditto.
713         * mode.scm (-mode-parse): Ditto.
714         (parse-mode-name): Ditto.  Put context arg first.
715         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
716         errtxt argument to context, ACU.
717         (-unit-parse, -model-parse, -model-read): Ditto.
718         * operand.scm (-operand-parse-getter): Use parse-error instead of
719         context-error.
720         (-operand-parse-setter): Ditto.
721         (-operand-parse): Change errtxt argument to context, ACU.
722         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
723         (-anyof-operand-parse, -anyof-operand-read): Ditto.
724         * read.scm (reader-error): Delete.  Use parse-error instead.
725         (parse-error): Change errtxt argument to context, ACU.  Split args
726         argument into expr and maybe-help-text.
727         (-reader-process-expanded-1!): Reorganize.
728         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
729         * types.scm (parse-type): Ditto.
730         * utils-cgen.scm (single-location->simple-string): New function.
731         (<context>): Replace members file,lineno with location.
732         (make-prefix-context): Renamed from context-make-prefix, ACU.
733         (make-current-context): New function.
734         (context-append, context-append-name): New functions.
735         (context-make-reader): Delete.
736         (parse-name): Change errtxt argument to context, ACU.
737         Put context arg first.
738         (parse-comment): Ditto.
739         (parse-number): Change errtxt argument to context, ACU.
740         (arg-list-validate-name, arg-list-check-no-args,
741         arg-list-symbol-arg): Ditto.
742
743         * read.scm (-cmd-if): Don't assume test is a list.
744
745         * html.scm (get-insn-properties): Delete errtxt, unused.
746
747 2009-08-11  Doug Evans  <dje@sebabeach.org>
748
749         * doc/rtl.texi (hardware types): Add pc.
750
751 2009-08-07  Doug Evans  <dje@sebabeach.org>
752
753         Add -t option for tracing things like commands, pmacro expansion.
754         * dev.scm (cload): New arg #:trace.
755         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
756         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
757         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
758         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
759         (-reader-process-expanded-1!): Trace commands if requested.
760         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
761         (-set-trace-options!): New function.
762         (-init-reader!): New function.
763         (cpu-load): New arg trace-options, all callers updated.
764         Call -init-reader! and -set-trace-options!.
765         (cgen-usage): Improve output formatting.
766         (common-arguments): New option -t.
767         (-cgen): Process -t.
768         * utils-cgen.scm (single-location->string): Renamed from
769         pretty-print-single-location.  All callers updated.
770         (location->string): Renamed from pretty-print-location.
771         All callers updated.
772         (source-properties-location->string): New function.
773         * doc/running.texi: Document -t.
774
775 2009-08-06  Doug Evans  <dje@sebabeach.org>
776
777         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
778         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
779         * utils.scm: ... here.
780
781 2009-08-05  Doug Evans  <dje@sebabeach.org>
782
783         Track source location better, for better error messages.
784         * pmacros.scm (-pmacro-eval): Delete, unused.
785         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
786         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
787         (scan-list, scan): Ditto.
788         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
789         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
790         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
791         (scan-list1): New function.
792         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
793         * read.scm (<reader>): New member `location'.
794         (-reader-lookup-command): Renamed from reader-lookup-command,
795         all callers updated.
796         (reader-error): Rewrite to produce better source location info.
797         (current-reader-location): New function.
798         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
799         All callers updated.  Record source location of expression.
800         (reader-process-expanded!): Renamed from reader-process-expanded.
801         All callers updated.
802         (-reader-process!): Renamed from reader-process.  New arg `loc'.
803         All callers updated.  Record source location of define-pmacro.
804         * utils-cgen.scm (<location>): New class.
805         (single-location): New (pseudo) class.
806         (pretty-print-single-location, pretty-print-location): New functions.
807         (location-top, location-push-single, location-push): New functions.
808         (unspecified-location, current-input-location): New functions.
809         (location-property): New object property.
810         (location-property-set!): New function.
811         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
812         All uses updated.
813         * testsuite/location-1.test: New testcase.
814         * testsuite/run-tests.sh: Fix fail count handling.
815         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
816         to expect cgen to fail.
817
818         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
819
820         * read.scm (-cmd-include): Renamed from include.  All callers updated.
821         (-cmd-if): Renamed from cmd-if.  All callers updated.
822         Use reader-process-expanded! on then/else clauses instead of eval1.
823
824 2009-07-22  Doug Evans  <dje@sebabeach.org>
825
826         * modes.scm (TI,OI): New modes.
827         * types.scm (parse-type): Improve error checking.  Don't hardwire
828         mode names here.
829         * utils.scm (non-negative-integer?): New function.
830
831         * pmacros.scm (-pmacro-builtin-find): New predicate.
832         (pmacros-init!): Add .find.
833         * doc/pmacros.tex: Document .find.
834         * testsuite/pmacros-1.test: Test .find.
835
836 2009-07-20  Doug Evans  <dje@sebabeach.org>
837
838         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
839         commented out printfs.
840         * rtl.scm (rtl-finish!): Whitespace tweaks.
841         * model.scm (parse-insn-timing): Tweak logging message.
842         * operand.scm: Comment and whitespace tweaks.
843         (op:type): Tweak error message.
844         (op-ifield): Tweak logging message.
845         (-derived-operand-parse, anyof-merge-semantics): Ditto.
846         * read.scm: Whitespace cleanup.
847         * utils.scm: Whitespace cleanup.
848
849 2009-07-19  Doug Evans  <dje@sebabeach.org>
850
851         Fix binding of nested pmacro parameters.
852         * pmacros.scm (-pmacro-env-make): New arg prev-env.
853         All callers updated.
854         (-pmacro-bulid-lambda): Ditto.
855         * doc/pmacros.texi: Update.
856         * testsuite/pmacros-1.test: Add testcase.
857
858         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
859         calculation.
860         (-multi-ifield-make-default-extract): Ditto.
861
862         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
863         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
864         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
865         Define.
866         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
867         * doc/rtl.texi: Update.
868
869         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
870
871         Rename builtin boolean pmacros, for consistency with rtl.
872         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
873         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
874         * doc/pmacros.texi: Update.
875         * testsuite/pmacros-1.test: Update.
876
877 2009-07-17  Doug Evans  <dje@sebabeach.org>
878
879         Use hash tables to record ifields, operands, insns, macro-insns.
880         * attr.scm (attr-builtin!): Tweak some comments.
881         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
882         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
883         <ident>.
884         (<multi-ifield>): New constructor.
885         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
886         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
887         <ident>.
888         (-sub-insn-make!): Add hack to avoid differences in generated code.
889         (multi-insn-instantiate!): Add total number of multi-insns to
890         logging message.
891         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
892         minsn-list to foo-table.  New member next-ordinal.
893         Update getters/setters.
894         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
895         New functions.
896         (-get-next-ordinal!, -get-lowest-ordinal): New function.
897         (-make-ident-object-table, -ident-object-table->list,
898         -ident-object-table-add!, -ident-object-table-lookup): New functions.
899         (current-ifld-list, current-ifld-add! current-ifld-lookup,
900         -ifld-already-defined?): Rewrite.
901         (current-op-list, current-op-add! current-op-lookup,
902         -op-already-defined?): Rewrite.
903         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
904         (current-insn-list, current-insn-add! current-insn-lookup,
905         -insn-already-defined?): Rewrite.
906         (current-minsn-list, current-minsn-add! current-minsn-lookup,
907         -minsn-already-defined?): Rewrite.
908         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
909         (MAX-VIRTUAL-INSNS): Define.
910         (arch-analyze-insns!): Add hack to avoid differences in generated code.
911         Update use of arch-insn-list.
912         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
913         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
914         minsn-list.
915         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
916         <ident>.  New constructor.
917         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
918         <ident>.
919         * sid.scm (-virtual-insn-add!): New function.
920         (-create-virtual-insns!): Call it.
921         (-fill-sim-insn-list!): Rewrite.
922         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
923         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
924         * utils-cgen.scm (<ordered-ident>): New class.
925         (obj-ordinal, obj-set-ordinal!): New functions.
926         (add-ident-methods!): Delete.
927
928         * model.scm (parse-insn-timing): Change logging message to level 3.
929
930 2009-07-16  Doug Evans  <dje@sebabeach.org>
931
932         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
933         add a link to define-normal-insn-enum.
934
935         * doc/porting.texi (Conventions): Add docs on writing integers.
936
937         * cpu/simplify.inc (*): One line doc strings don't need \n.
938         (df): Invoke define-full-ifield instead of claiming it's an alias.
939         (dno): Define.
940         (dnop): Mark as deprecated.
941
942         * cpu/play.cpu: Add example of hardware `layout'.
943         * doc/porting.tex: Add docs on simplify.inc.
944         * doc/rtl.texi: Cleanup pass over "Simplification macros",
945         and other things.
946
947         * ifield.scm: Whitespace/formatting cleanup.
948
949         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
950
951         * read.scm (parse-error): Don't print single entry args as a list.
952         (-reader-process-expanded-1): Convert symbol to string for
953         string-append.
954
955         * insn.scm (multi-insn-instantiate!): Tweak logging message.
956
957 2009-07-15  Doug Evans  <dje@sebabeach.org>
958
959         * cpu/simplify.inc (dno): New pmacro.
960         * doc/porting.texi: Add section on simplify.inc.
961         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
962
963 2009-07-15  Doug Evans  <devans@sourceware.org>
964
965         * gen-all-doc: Generate index.html.
966
967 2009-07-13  Doug Evans  <dje@sebabeach.org>
968
969         Extend pmacro language, add testsuite.
970         * Makefile.am (SUBDIRS): Add testsuite.
971         * Makefile.in: Regenerate.
972         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
973         testsuite/test-utils.sh.
974         * configure: Regenerate.
975         * dev.scm (cload): Handle testsuite app.
976         (load-testsuite): New function.
977         * pmacros.scm: (-pmacro-debug?): New global.
978         (-smacro-table): New global.
979         (-smacro-lookup, -smacro-set!): New functions.
980         (-pmacro-make): New argument `syntactic-form?', all callers updated.
981         (-pmacro-syntactic-form?): New function.
982         (-pmacro-expected-number, -pmacro-verify-number): New functions.
983         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
984         (-pmacro-expected-non-negative-integer): New function.
985         (-pmacro-verify-non-negative-integer): New function.
986         (-pmacro-expand-expr-list): New function.
987         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
988         (-pmacro-process-args): Renamed from -pmacro-invoke.
989         (-pmacro-apply, -smacro-apply): New functions.
990         (-pmacro-expand): Rewrite syntactic form processing.
991         (-pmacro-build-lambda): Reformat.
992         (define-pmacro): Watch for more errors in definition.
993         (pmacro-debug): New function.
994         (pmacro-trace): Set/reset -pmacro-debug?.
995         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
996         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
997         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
998         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
999         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1000         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1001         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1002         (pmacros-init!): Initialize -smacro-table.
1003         Rewrite pmacro initialization.
1004         * read.scm (reader-process-expanded): Renamed from
1005         -reader-process-expanded.  All callers updated.
1006         Recognize () as a no-op.
1007         (cpu-load): Tweak logging messages.
1008         * utils.scm (message): Add comment.
1009         * cpu/play.cpu: Add some instructions to play with .let.
1010         * doc/cgenint.texi: Move some debugging related docs to here from
1011         cgen.texi.
1012         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
1013         * testsuite/Makefile.am: New file.
1014         * testsuite/Makefile.in: New file.
1015         * testsuite/test-utils.sh.in: New file.
1016         * testsuite/run-tests.sh: New file.
1017         * testsuite/testsuite.cpu: New file.
1018         * testsuite/pmacros-1.test: New file.
1019
1020         * decode.scm: Comment and formatting tweaks.
1021         (-build-decode-table-guts): Add more data to logging message.
1022
1023 2009-07-12  Doug Evans  <dje@sebabeach.org>
1024
1025         Delete files that now live in ../cpu.
1026         * cpu/iq10.cpu: Delete.
1027         * cpu/iq2000.cpu: Delete.
1028         * cpu/iq2000.opc: Delete.
1029         * cpu/iq2000m.cpu: Delete.
1030         * cpu/m32r.cpu: Delete.
1031         * cpu/m32r.opc: Delete.
1032
1033 2009-07-09  Doug Evans  <dje@sebabeach.org>
1034
1035         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1036         All callers updated.  Work around -ve shifts by referencing the
1037         entire value.
1038
1039         * utils.scm (message): Handle pairs.
1040
1041 2009-07-08  DJ Delorie  <dj@redhat.com>
1042
1043         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1044         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1045         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
1046         written to.
1047
1048 2009-07-07  Doug Evans  <dje@sebabeach.org>
1049
1050         * cpu/play.cpu (add): Use (ifield enum) for one format element.
1051         * cpu/play.opc: New file.
1052
1053         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1054         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1055         * doc/rtl.texi (Instructions): Update.
1056
1057         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1058         (opc-arguments, -OPC): Call set-opc-file-path!.
1059         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1060         (set-opc-file-path!): New function.
1061         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
1062
1063         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1064         before passing to gen-c-args.
1065
1066 2009-07-06  DJ Delorie  <dj@redhat.com>
1067
1068         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1069         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1070         unspecified accesses to control registers.
1071
1072 2009-07-01  DJ Delorie  <dj@redhat.com>
1073
1074         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1075         unspecified accesses to control registers.
1076
1077         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1078         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1079
1080 2009-06-27  Doug Evans  <dje@sebabeach.org>
1081
1082         * gen-all-intrinsics: New file.
1083
1084 2009-06-24  Doug Evans  <dje@sebabeach.org>
1085
1086         * All *.scm files: Update copyright year.
1087         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1088
1089 2009-06-23  DJ Delorie  <dj@redhat.com>
1090
1091         * intrinsics.scm: Updates to support IVC2.
1092         (belongs-to-group?): Check IVC2 slots.
1093         (-slots-attribute): New.
1094         (targets::attributes): Add SLOTS.
1095         (target:add-well-known-intrinsics): Add CPMOV.
1096         (md-insn): Add CPTYPE and CRET?.
1097         (add-md-insn): Likewise.
1098         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1099         duplicate insns with different bit patterns.
1100         (write-cgen-insn?): Add cret? support.
1101         (intrinsics.h): Add vector types.
1102         (runtime-op): Add vector support.
1103         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1104
1105         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1106         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1107         (h-cr-ivc2): Default to typeless.
1108         (h-ccr-ivc2): Fix register width.
1109         (SLOTS): Fix values and default.
1110         (ivc2_*): Add control register names.
1111         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1112
1113         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1114         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1115
1116 2009-06-22  Doug Evans  <dje@sebabeach.org>
1117
1118         * semantics.scm (insn-build-known-values): Fix typo in comment.
1119
1120 2009-06-21  Doug Evans  <dje@sebabeach.org>
1121
1122         * rtl-xform.scm (rtx-simplify-insn): New function.
1123         * html.scm (gen-insn-docs): Call it.
1124         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1125         * iformat.scm (ifmt-analyze): Minor simplification.
1126
1127         * semantics.scm (semantic-compile): Change arg sem-code-list to
1128         sem-code.
1129         (semantic-attrs): Ditto.
1130         * iformat.scm (ifmt-analyze): Update.
1131         (ifmt-compute!): Update.
1132         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1133         rtl-xform.scm.
1134         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1135         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1136         * semantics.scm (rtx-simplify): Ditto.
1137         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1138         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1139         (-simplify-expr-fn): Move to rtl-xform.scm.
1140         (-solve-expr-fn, rtx-solve): Ditto.
1141         * rtl-xform.c: New file.
1142         * read.scm: Load it.
1143
1144         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1145         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1146         (-rtx-traverse, rtx-traverse): Ditto.
1147
1148 2009-06-20  Doug Evans  <dje@sebabeach.org>
1149
1150         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1151
1152         * configure.in: Update version to 1.1.
1153         * configure: Regenerate.
1154         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1155
1156 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1157             Doug Evans  <dje@sebabeach.org>
1158
1159         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1160         (cgen-desc.c): Ditto.
1161         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1162         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1163         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1164         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1165         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1166         (cgen-cpuall.h, cgen-ops.c): Ditto.
1167         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1168         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1169         (cgen-sem-switch.c): Ditto.
1170         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1171         * sim-model.c (cgen-model.c): Ditto.
1172
1173 2009-06-18  Doug Evans  <dje@sebabeach.org>
1174
1175         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1176
1177         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1178
1179         * dev.scm (cload): Change #:arch argument to take the path to the
1180         .cpu file instead of just the name of the architecture.
1181         * read.scm (arch-path): Remove trailing '/'.
1182         (cpu-load): Set `arch-path' to directory of .cpu file.
1183         (-cgen): Don't set `arch-path' here.
1184         (include): Update.
1185         * doc/porting.texi: Update.
1186
1187 2009-06-14  Doug Evans  <dje@sebabeach.org>
1188
1189         * gen-all-doc: Use files in ../cpu where possible.
1190
1191         * Makefile.am (ARCHFILE): Fix path.
1192         * Makefile.in: Regenerate.
1193         * html.scm: Use "pre" instead of "plaintext".
1194
1195         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1196         * doc/app.texi: Cleanup pass.
1197         * doc/cgen.texi: Cleanup pass.
1198         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1199         * doc/intro.texi: Cleanup pass.
1200         * doc/mdate-sh: New file.
1201         * doc/opcodes.texi: Cleanup pass.
1202         * doc/pmacros.texi: Cleanup pass.
1203         * doc/porting.texi: Cleanup pass.
1204         * doc/rtl.texi: Cleanup pass.
1205         * doc/running.texi: Cleanup pass.  Document more runtime options.
1206         * doc/stamp-vti: Update.
1207         * doc/version.texi: Update.
1208
1209         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1210         (GUILE): Fix definition.
1211         * Makefile.in: Regenerate with automake 1.9.6.
1212         * aclocal.m4: Regenerate with aclocal 1.9.6.
1213         * configure.in (AC_PREREQ): Set to 2.59.
1214         (GENINSRC_NEVER): Define.
1215         * configure: Regenerate with autoconf 2.59.
1216         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1217         (cgen.info,cgen.dvi): Delete.
1218         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1219         (noinst_TEXINFOS): Add cgenint.texi.
1220         (DOCFILES): Add missing files.
1221         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1222         * doc/Makefile.in: Regenerate with automake 1.9.6.
1223
1224         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1225
1226         * attr.scm: Removing trailing whitespace.
1227         * cgen-intrinsics.scm: Ditto.
1228         * cgen-sim.scm: Ditto.
1229         * cos.scm: Ditto.
1230         * enum.scm: Ditto.
1231         * guile.scm: Ditto.
1232         * sim.scm: Ditto.
1233
1234 2009-05-28  DJ Delorie  <dj@redhat.com>
1235
1236         * cpu/mep.opc (parse_signed16_range): New.
1237         (parse_unsigned16_range): New.
1238         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1239
1240 2009-05-26  DJ Delorie  <dj@redhat.com>
1241
1242         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1243         accumulator names.
1244         (f-ivc2-ccrn-c3hi): New.
1245         (f-ivc2-ccrn-c3lo): New.
1246         (f-ivc2-ccrn-c3): New.
1247         (ivc2c3ccrn): Use it.
1248
1249 2009-05-22  DJ Delorie  <dj@redhat.com>
1250
1251         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1252         (mep_config_map): Regenerate.
1253
1254         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1255         ivc2-specific names.
1256         (simm8p20): New.
1257         (cmovc): move to after field definitions, use ivc2-specific
1258         register names.
1259         (cpmovi_b_P0S_P1): New.
1260         
1261 2009-05-19  DJ Delorie  <dj@redhat.com>
1262
1263         * cpu/mep.opc: Regenerate configuration.
1264         (parse_cdisp10): Only check CPU flags, not COP flags.
1265         (check_configured_mach): Likewise.
1266
1267 2009-05-13  DJ Delorie  <dj@redhat.com>
1268
1269         * intrinsics.scm (insns.md): Add RTL predicates.
1270         (intrinsics.h): Remove old C intrinsics.
1271
1272 2009-04-29  DJ Delorie  <dj@redhat.com>
1273
1274         * mep-ivc2.cpu: New.
1275         * mep-core.cpu: Regenerated.  Add support for deferred register
1276         writes.
1277         (SLOT): Add IVC2 slot types.
1278         (sim-syscall): Rename to something more appropriate.
1279         * mep-ext-cop.cpu: Regenerate.
1280         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1281         (print_slot_insn): New.
1282         (mep_examine_ivc2_insns): New.
1283         (mep_print_insn_set_ivc2_mode): New.
1284         (mep_print_insn): Support IVC2 slotting.
1285         
1286 2009-04-20  DJ Delorie  <dj@redhat.com>
1287
1288         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1289         (guess-mode): Drop COP* syntax.
1290         (need-insn): Add "--syscall--" to the list.
1291         (enum-type): Drop COP* syntax.
1292         (intrinsics.h): Likewise.
1293         (intrinsic-protos.h): Change file header to allow it to be
1294         included.
1295
1296 2009-04-17  DJ Delorie  <dj@redhat.com>
1297
1298         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1299         (lhucpm1): Limit to C5 mach.
1300         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1301         * cpu/mep-core.cpu (extend-cdisp10): New.
1302         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1303         
1304 2009-04-08  DJ Delorie  <dj@redhat.com>
1305
1306         * cpu/mep-c5.cpu: New.
1307         * cpu/mep-core.cpu: Add C5 support.
1308         * cpu/mep.opc: Likewise.
1309
1310 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1311
1312         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1313         about calling memset with a zero length.
1314
1315 2009-02-03  DJ Delorie  <dj@redhat.com>
1316
1317         * cpu/mep-core.cpu: Update to new MeP configuration.
1318         * cpu/mep-ext-cop.cpu: Likewise.
1319         * cpu/mep.opc: Likewise.
1320
1321 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1322
1323         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1324
1325 2008-06-17  Dave Brolley  <brolley@redhat.com>
1326
1327         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1328         (h-gr): Likewise.
1329
1330 2007-11-13  Dave Brolley  <brolley@redhat.com>
1331
1332         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1333
1334 2007-11-05  Dave Brolley  <brolley@redhat.com>
1335
1336         * intrinsics.scm,cgen-intrinsics.scm: New application which
1337         generates code to support intrinsic functions for insns in the
1338         mep architecture in gcc.
1339
1340 2007-09-21  Dave Brolley  <brolley@redhat.com>
1341
1342         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1343         (rn3us): CDATA attribute now LONG.
1344         
1345 2007-08-21  Dave Brolley  <brolley@redhat.com>
1346
1347         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1348         than 32 bits.
1349
1350 2007-07-05  Nick Clifton  <nickc@redhat.com>
1351
1352         * utils.scm (copyright-fsf): Update copyright notice to refer to
1353         the GPL version 3.
1354
1355 2007-05-22  Nick Clifton  <nickc@redhat.com>
1356
1357         * doc/cgen.texi: Use @copying around the copyright notice.
1358         * doc/internals.texi: Likewise.
1359
1360 2007-02-05  Dave Brolley  <brolley@redhat.com>
1361
1362         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1363
1364 2007-02-05  Dave Brolley  <brolley@redhat.com>
1365
1366         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1367         in the generated code for @arch@_cgen_init_asm if it is defined.
1368
1369         * Contribute the following changes:
1370         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1371
1372         * attr.scm (<string-attribute>): New attribute class.
1373         (attr-kind): Handle <string-attribute>.
1374         (parse-simple-attribute): New function.
1375         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1376         (<bitset-attribute> 'parse-value): Likewise.
1377         (<boolean-attribute> 'parse-value): Likewise.
1378         (<enum-attribute> 'parse-value): Likewise.
1379         (<string-attribute> 'parse-value): New function.
1380         (-attr-parse): Handle <string-attribute>.
1381         (-attr-read): Likewise.
1382         (<string-attribute> 'gen-value-for-defn-raw): New function.
1383         (<string-attribute> 'gen-value-for-defn): New function.
1384
1385 2006-11-07  Dave Brolley  <brolley@redhat.com>
1386
1387         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1388         necessary.
1389
1390 2006-10-18  Dave Brolley  <brolley@redhat.com>
1391
1392         * Contribute the following changes:
1393
1394         2006-07-11  Dave Brolley  <brolley@redhat.com>
1395
1396         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1397         (movcol): New insn.
1398         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1399         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1400         hardware or memory mode which was used.
1401         * sid-cpu.scm (hw-need-write-stack?): New function.
1402         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1403         identify hardware which uses write stacks.
1404         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1405         Initialized to an empty list.
1406         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1407         hw-need-write-stack?.
1408         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1409         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1410         (used-in-delay-rtl?): New method of <hardware-base>.
1411         (hw-used-in-delay-rtl?): New function.
1412
1413         2006-06-20  Dave Brolley  <brolley@redhat.com>
1414
1415         * sid.scm (gen-attr-type): Removed.
1416         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1417         (SH2a-MACH): Add sh5.
1418         (sh2a-nofpu-models): Add units for sh5.
1419         (sh2a-fpu-models): Likewise.
1420
1421         2006-06-15  Dave Brolley  <brolley@redhat.com>
1422
1423         * cpu/sh-sim.cpu: New file.
1424         * cpu/sh-sid.cpu: New file.
1425         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1426         (All fields): Remap for (insn-lsb0? #f)
1427         (All insns): Add timing specs.
1428         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1429         'xattrs' and .splice it in.
1430         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1431         (h-frc,h-drc): Add PROFILE attribute.
1432         (h-fpccr): Removed.
1433         (h-vbr): New hardware.
1434         (All fields): Remap for (insn-lsb0? #f)
1435         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1436         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1437         (fpscr): Use h-fpscr.
1438         (fsdm,fsdn): Use h-fsd.
1439         (dshci): Add xtiming argument and splice it in.
1440         (dr,xd): pmacros removed.
1441         (All insns): Add timing specs, *-MACH attribibutes,
1442         SH4{A}-GROUP attributes.
1443         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1444         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1445         we're being processed for sim or sid.
1446         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1447         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1448         (define-isa compact): Add (isa-parallel-insns 2).
1449         (define-isa media): Add (isa-parallel-insns 2). Add
1450         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1451         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1452         sh4a, sh4al
1453         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1454         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1455         (SH4al-MACH, SH5-MACH): New pmacros.
1456         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1457         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1458         (sh5-media-fp-units, common-model, common-model-with-fp) 
1459         (sh3-model, sh3e-model): New pmacros.
1460         (define-model sh2): New model.
1461         (define-model sh2e): New model.
1462         (define-model sh3): New model.
1463         (define-model sh3e): New model.
1464         (define-model sh2a-nofpu): New model.
1465         (define-model sh2a-fpu): New model.
1466         (define-model sh4-nofpu): New model.
1467         (define-model sh4): New model.
1468         (define-model sh4a-nofpu): New model.
1469         (define-model sh4a): New model.
1470         (define-model sh4al): New model.
1471         (define-model sh5-media): New model.
1472         (define-model sh5): Add all units.
1473         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1474         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1475         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1476         (h-pc): Add PROFILE attribute.
1477         (h-fr): Likewise.
1478         (h-tr): Likewise.
1479         (h-gr,h-grc): Likewise.
1480         (h-cr): Set h-sr in setter.
1481         (h-frbit): Get/Set h-fpscr.
1482         (h-szbit,h-prbit): Likewise.
1483         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1484         Add getter and setter.
1485         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1486         Adjust getter and setter.
1487         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1488         Adjust getter and setter.
1489         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1490         (h-fsd,h-fmov): New hardware.
1491
1492 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1493
1494         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1495         doc/notes.texi, doc/porting.texi, doc/running.texi,
1496         doc/sim.texi: Fix some typos.
1497
1498 2006-07-14  Dave Brolley  <brolley@redhat.com>
1499
1500         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1501         hardware or memory mode which was used.
1502         * sid-cpu.scm (hw-need-write-stack?): New function.
1503         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1504         identify hardware which uses write stacks.
1505         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1506         Initialized to an empty list.
1507         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1508         hw-need-write-stack?.
1509         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1510         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1511         (used-in-delay-rtl?): New method of <hardware-base>.
1512         (hw-used-in-delay-rtl?): New function.
1513
1514 2006-06-20  Dave Brolley  <brolley@redhat.com>
1515
1516         * sid.scm (gen-attr-type): Removed.
1517
1518 2006-05-10  Dave Brolley  <brolley@redhat.com>
1519
1520         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1521         support for (if (application-is? <appname>) (...) (...)).
1522         (-cgen): Add trailing "/" to arch-path.
1523         * utils.scm (dirname): Removed. dirname is a primitive function.
1524
1525 2006-05-09  Dave Brolley  <brolley@redhat.com>
1526
1527         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1528         'entire_insn' not 'base_insn'.
1529         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1530         is null.
1531         * sim.scm (-gen-arch-model-decls): Likewise.
1532         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1533         abuf->written if profiling.
1534         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1535         object->string om the mode.
1536         (-hw-gen-write-stack-decl): Likewise.
1537         * read.scm (include): Use arch-path as file location.
1538         (arch-path): Define it with a default setting.
1539         (-cgen): Update arch-path when "-a" option is specified.
1540         * utils.scm (dirname): New function.
1541
1542 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1543
1544         * configure.in: Remove AC_ARG_PROGRAM.
1545         * configure: Regenerate with autoconf 2.59.
1546
1547 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1548
1549         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1550         SIMULATOR.
1551
1552 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1553
1554         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1555         or an error message otherwise.
1556         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1557         Fix up comments to correctly describe the functions.
1558
1559 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1560             Anil Paranjape   <anilp1@kpitcummins.com>
1561             Shilin Shakti    <shilins@kpitcummins.com>
1562
1563         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1564         CPU description.
1565         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1566
1567 2006-02-10  Nick Clifton  <nickc@redhat.com>
1568
1569         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1570
1571 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1572
1573         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1574         for concatenation.
1575         (-hw-gen-write-stack-decl): Likewise.
1576
1577 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1578
1579         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1580         non-(adata-integral-insn? CURRENT-ARCH) case.
1581
1582 2005-10-28  Dave Brolley  <brolley@redhat.com>
1583
1584         Contribute the following changes:
1585         2005-09-19  Dave Brolley  <brolley@redhat.com>
1586
1587         * attr.scm (gen-value-for-defn-raw): New methods.
1588         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1589         gen-value-for-defn-raw.
1590         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1591
1592         2002-12-13  Dave Brolley  <brolley@redhat.com>
1593
1594         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1595         (-gen-attr-accessors): New function.
1596         (gen-obj-attr-defn): Update terminating initializer.
1597         (gen-obj-attr-end-defn): New function.
1598         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1599         * sid-cpu.scm (cgen-desc.h): Generate code to include
1600         "opcode/cgen-bitset.h"
1601         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1602         name.
1603         * desc.scm ('gen-defn): Update terminating initializer.
1604         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1605         terminatinig initializer.
1606         (gen-hw-decls): Ditto.
1607         (gen-operand-decls): Ditto.
1608         (gen-insn-decls): Ditto.
1609         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1610         (gen-insn-table): Update terminating initializer.
1611         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1612         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1613         * attr.scm (charmask-bytes): New function.
1614         (bitset-attr->charmask): New function.
1615         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1616         differences for SID-SIMULATOR.
1617         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1618         (<enum-attribute>): Ditto.
1619
1620 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1621
1622         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1623
1624 2005-10-24  DJ Delorie  <dj@redhat.com>
1625
1626         * operand.scm (-anyof-merge-syntax): Print a more useful error
1627         message.
1628
1629 2005-10-19  Nick Clifton  <nickc@redhat.com>
1630
1631         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1632         patch.
1633
1634 2005-10-18  Andreas Schwab  <schwab@suse.de>
1635
1636         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1637
1638 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1639
1640         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1641         size.
1642
1643 2005-08-02  Dave Brolley  <brolley@redhat.com>
1644
1645         * rtl-c.scm (s-unop): Don't dereference
1646         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1647         (s-binop, s-convop, s-cmpop): Likewise.
1648
1649 2005-07-29  Dave Brolley  <brolley@redhat.com>
1650
1651         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1652         if with-profile or with-parallel-write.
1653         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1654         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1655         string-append.
1656
1657 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1658
1659         * cpu/fr30.opc (print_register_list): Correct format strings.
1660         * cpu/ip2k.opc: Likewise.
1661
1662 2005-07-05  Nick Clifton  <nickc@redhat.com>
1663
1664         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1665         unsigned in order to avoid compile time warnings about sign
1666         conflicts.
1667
1668 2005-07-01  Nick Clifton  <nickc@redhat.com>
1669
1670         * desc-cpu.scm: Update to ISO C90 function declaration style.
1671         * opc-asmdis.scm: Likewise.
1672         * opc-ibld.scm: Likewise.
1673         * opc-itab.scm: Likewise.
1674         * cpu/fr30.opc: Likewise.
1675         * cpu/i960.opc: Likewise.
1676         * cpu/ip2k.opc: Likewise.
1677         * cpu/iq2000.opc: Likewise.
1678         * cpu/m32r.opc: Likewise.
1679         * cpu/openrisc.opc: Likewise.
1680         * cpu/sh.opc: Likewise.
1681         * cpu/sparc.opc: Likewise.
1682         * cpu/xstormy16.opc: Likewise.
1683
1684 2005-06-15  Dave Brolley  <brolley@redhat.com>
1685
1686         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1687         (cgen-cpu.h): Call it.
1688
1689         Contributed on behalf of Graydon Hoare
1690         2001-06-05  graydon hoare  <graydon@redhat.com>
1691
1692         * utils.scm (foldl): Define.
1693         (foldr): Define.
1694         (filter): Define.
1695         (union): Define.
1696         (intersection): Simplify.
1697         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1698         (-op-gen-delayed-set-maybe-trace): Define.
1699         (<operand> 'gen-set-{quiet,trace}): Delegate to
1700         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1701         up and needs cleaning.
1702         (-with-parallel?): Hardwire with-parallel to #t.
1703         (<operand> 'cxmake-get): Replace with lookahead-aware code
1704         * sid-decode.scm: Remove per-insn writeback fns.
1705         (-gen-idesc-decls): Redefine sem_fn type.
1706         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1707         with write stack stuff.
1708         (cgen-write.cxx): Replace per-insn writebacks with single write
1709         stack writeback. Add write stack reset function.
1710         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1711         stack stuff.
1712         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1713         estate attribute set.
1714         (delay): Set #:delayed attribute to calculated delay, update
1715         maximum delay of cpu, check (delay ...) usage.
1716         * operand.scm (<operand>): Add delayed slot to <operand>.
1717         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1718         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1719         * doc/rtl.texi (Expressions): Add section on (delay ...).
1720
1721 2005-06-13  Jim Blandy  <jimb@redhat.com>
1722
1723         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1724         as well as strings.
1725
1726 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1727
1728         * doc/porting.texi: Change all mention of md_apply_fix3 and
1729         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1730         respectively.
1731
1732 2005-05-18  Dave Brolley  <brolley@redhat.com>
1733
1734         * utils-sim.scm (-gen-decode-default-entry): New function.
1735         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1736         code to check that all opcodes bits match.
1737         (-gen-decoder-switch): Use -gen-decode-default-entry.
1738
1739 2005-05-16  Jim Blandy  <jimb@redhat.com>
1740
1741         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1742         fetched by one of our GETIMEM* methods.
1743         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1744         base-insn-sized chunks.
1745
1746 2005-05-10  Nick Clifton  <nickc@redhat.com>
1747
1748         * Update the address and phone number of the FSF organization in
1749         the GPL notices in the following files:
1750         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1751         cpu/powerpc.cpu, slib/random.scm
1752
1753 2005-05-06  Jim Blandy  <jimb@redhat.com>
1754
1755         * pprint.scm, cos-pprint.scm: Add documentation.
1756
1757         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1758
1759         * pprint.scm, cos-pprint.scm: New files.
1760
1761 2005-04-04  Nick Clifton  <nickc@redhat.com>
1762
1763         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1764         avoid a compile time warning.
1765
1766 2005-03-18  Nick Clifton  <nickc@redhat.com>
1767
1768         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1769         "percent-operand" from "%operand" as the latter confuses xgettext
1770         into thinking that it is a C printf formating directive, which
1771         prevents proper translation.
1772
1773 2005-02-23  Nick Clifton  <nickc@redhat.com>
1774
1775         * opcodes.scm (gen-parse-number): Add a cast to the desired
1776         pointer signed'ness in order to prevent compile time warnings.
1777         * cpu/ip2k.opc: Fixed compile time warnings about differing
1778         signed'ness of pointers passed to functions.
1779         * cpu/iq2000.opc: Likewise.
1780         * cpu/m32r.opc: Likewise.
1781         * cpu/openrisc.opc: Likewise.
1782         * cpu/xstormy16.opc: Likewise.
1783
1784 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1785
1786         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1787         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1788
1789 2005-02-16  Dave Brolley  <brolley@redhat.com>
1790
1791         * utils.scm: Update copyright years.
1792         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1793         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1794         * operand.scm (-derived-operand-parse): Move logit message from level 1
1795         to level 2.
1796
1797 2005-02-15  Nick Clifton  <nickc@redhat.com>
1798
1799         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1800         prevent compile time warning messages.
1801         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1802         * utils-gen.scm (attr-int-gen-defn): Likewise.
1803         (attr-gen-defn): Likewise.
1804         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1805         (print_dollarhex16): Remove unused function.
1806
1807 2005-02-15  Jim Blandy  <jimb@redhat.com>
1808
1809         * guile.scm (cgen-call-with-debugging): Doc fix.
1810
1811         Make backtraces work more reliably.
1812         * guile.scm: Set up debugging parameters, and enable debugging and
1813         source positions while loading.
1814         (cgen-call-with-debugging, cgen-debugging-stack-start): New
1815         functions.
1816         * read.scm: Don't set debugging parameters here.
1817         (catch-with-backtrace): Function deleted.
1818         (-cgen): Simply note the presence or absence of the -b option.
1819         Pass the flag to cgen-call-with-debugging, so debugging is turned
1820         off here if the user didn't request it, for faster computation.
1821         (cgen): Call cgen-debugging-stack-start here, instead of
1822         catch-with-backtrace.
1823
1824         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1825         trailing -s.
1826         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1827         Don't write out the trailing -s here.
1828         * Makefile.in: Regenerated.
1829         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1830         fixup.scm here; let the caller decide which Scheme's customization
1831         file to preload.
1832         * dev.scm: Load guile.scm, not fixup.scm.
1833         * fixup.scm: Deleted; contents have all moved to guile.scm.
1834         * README: Doc fix.
1835
1836         * guile.scm (debug-write): New function.
1837
1838 2005-02-14  Jim Blandy  <jimb@redhat.com>
1839
1840         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1841         transformer procedure, not eval.  Transformer procedures take one
1842         argument.
1843
1844 2005-02-11  Nick Clifton  <nickc@redhat.com>
1845
1846         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1847         to 'bfd_vma *' in order avoid compile time warning message.
1848
1849 2005-02-09  Jim Blandy  <jimb@redhat.com>
1850
1851         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
1852         corresponding change in the sim/common directory.)
1853
1854 2005-02-07  Jim Blandy  <jimb@redhat.com>
1855
1856         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
1857         changes in the opcodes directory.)
1858
1859         * guile.scm: New file, containing Guile-specific definitions and
1860         adaptations.  This is loaded by the app-specific shell scripts.
1861         Initially identical to fixup.scm.
1862         * cgen-sid.scm: Don't load fixup.scm here.
1863
1864         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1865         latter is a macro.
1866
1867 2005-01-27  Jim Blandy  <jimb@redhat.com>
1868
1869         * utils.scm (string/symbol->append): Renamed from 'concat'.
1870         * opcodes.scm (gen-switch): Use new name.
1871         * insn.scm (-sub-insn-make!): Same.
1872         * rtl.scm (rtx-dump): Same.
1873         * semantics.scm (semantic-compile): Same.
1874
1875 2005-01-20  Jim Blandy  <jimb@redhat.com>
1876
1877         * opcodes.scm (gen-switch): Use concat instead of string-map.
1878
1879         * utils.scm (concat): New function.
1880         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1881         * rtl.scm (rtx-dump): Same.
1882         * semantics.scm (semantic-compile): Same.
1883
1884 2004-12-16  Jim Blandy  <jimb@redhat.com>
1885
1886         * utils-cgen.scm (parse-name): Don't assume that string-map can be
1887         applied to symbols.  Process everything as strings, and then
1888         convert to a symbol at the end.
1889
1890         * read.scm (debug-repl): Temporarily redirect input and output to
1891         /dev/tty while we debug, so we don't interfere with whatever CGEN
1892         is reading or writing.
1893         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1894         New functions.
1895
1896 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
1897
1898         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1899         will work with newer versions of guile.
1900
1901 2004-10-27  Nick Clifton  <nickc@redhat.com>
1902
1903         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1904         * cpu/iq2000.cpu: Likewise.
1905
1906 2004-07-21  DJ Delorie  <dj@redhat.com>
1907
1908         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1909
1910 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
1911
1912         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1913         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1914
1915 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1916
1917         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1918
1919 2004-03-22  Dave Brolley  <brolley@redhat.com>
1920
1921         * utils.scm (copyright-fsf): Update copyright years.
1922         (copyright-red-hat): Ditto.
1923         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1924         code.
1925         (-op-gen-set-trace-parallel): Ditto.
1926
1927 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
1928
1929         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1930         disassembling codes for 0x*2 addresses.
1931
1932 2004-01-29  Dave Brolley  <brolley@redhat.com>
1933
1934         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1935         zeroes in the extra bit positions and generate 'opcode-mask' with ones
1936         in the extra bit positions.
1937
1938 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1939
1940         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1941
1942 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
1943
1944         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1945         "short" being 16 bit.
1946         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
1947         internationalize error message.
1948         (parse_lo16): Likewise.  Remove useless code.
1949
1950 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1951
1952         * cpu/m32r.cpu : Add new model m32r2.
1953         Add new instructions.
1954         Replace occurrances of 'Mitsubishi' with 'Renesas'.
1955         Changed PIPE attr of push from O to OS.
1956         Care for Little-endian of M32R.
1957         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1958         Care for Little-endian of M32R.
1959         (parse_slo16): signed extension for value.
1960
1961 2003-10-26  Dave Brolley  <brolley@redhat.com>
1962
1963         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1964         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1965         (-gen-extract-fn): Call -gen-record-profile-args.
1966
1967 2003-10-21  Dave Brolley  <brolley@redhat.com>
1968
1969         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1970         a static const int.
1971         * decode.scm (-opcode-slots): Correct typo in logit call.
1972
1973 2003-10-09  Jim Blandy  <jimb@redhat.com>
1974
1975         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1976         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
1977
1978         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1979
1980 2003-10-06  Dave Brolley  <brolley@redhat.com>
1981
1982         * gen-all-doc: Add fr550.
1983
1984 2003-09-11  Doug Evans  <dje@sebabeach.org>
1985
1986         * Makefile.am (ARCHFILE): New var.
1987         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1988         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1989         * Makefile.in: Regenerate.
1990
1991 2003-09-08  Dave Brolley  <brolley@redhat.com>
1992
1993         On behalf of Doug Evans <dje@sebabeach.org>
1994         Pass in paths to input files, instead of assuming they live in
1995         $srcdir/cpu.  Plus misc. option processing cleanup.
1996         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1997         Add pre-process pass to all options.
1998         * cgen-gas.scm (gas-arguments): Ditto.
1999         * cgen-sid.scm (sim-arguments): Ditto.
2000         * cgen-sim.scm (sim-arguments): Ditto.
2001         * cgen-stest.scm (stest-arguments): Ditto.
2002         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
2003         (-opc-file-path): New global.
2004         (opc-file-path): New fn.
2005         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2006         All callers updated.
2007         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2008         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2009         Replace srcdir arg with opc-file.  All callers updated.
2010         * read.scm (-opt-spec-update): Delete.
2011         (opt-get-first-pass,opt-get-second-pass): New fns.
2012         (-cgen): Process application-specific arguments in two passes.
2013
2014 2003-08-29  Dave Brolley  <brolley@redhat.com>
2015
2016         * cpu/frv.cpu: Removed.
2017         * cpu/frv.opc: Removed.
2018
2019 2003-08-21  Nick Clifton  <nickc@redhat.com>
2020
2021         * cpu/frv.cpu (mbtoh): Replace input parameter to
2022         u-media-dual-expand and u-media-dual-btoh with output parameter.
2023         (cmbtoh): Add profiling hack.
2024
2025 2003-08-19  Michael Snyder  <msnyder@redhat.com>
2026
2027         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2028
2029 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
2030
2031         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2032         the elements for the END record of CGEN_OPINST, silencing warnings.
2033
2034 2003-07-15  Doug Evans  <dje@sebabeach.org>
2035
2036         Add guile 1.6.4 support.
2037         - empty list must be quoted
2038         - string functions have stricter type checking
2039         - eval now takes a second argument
2040         - symbol-bound? is deprecated
2041         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2042         (bitset-attr->list): Ensure arg to string-cut is a string.
2043         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2044         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2045         * cos.scm (-class-list): Must quote empty list.
2046         (-class-parent-classes,-class-compute-class-desc): Ditto.
2047         (class-make,make,object-reset!): Ditto.
2048         (method-make-make!): Call eval1 instead of eval.
2049         (method-make-forward!,method-make-virtual-forward!): Ditto.
2050         * decode.scm (subdtable-add): Use stringsym-append instead of
2051         string-append.
2052         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2053         (-build-decode-table-entry): Fetch string name of insn.
2054         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2055         (-gen-mach-table-defns): Ditto for mach.
2056         (gen-ifld-defns): Ditto for ifld.
2057         (gen-hw-table-defns): Ditto for hw.
2058         (gen-operand-table): Ditto for op.
2059         (gen-insn-table-entry): Ditto for insn.
2060         * desc.scm (gen-attr-table-defn): Ditto for attr.
2061         (<keyword>,gen-defn): Don't pass symbols to string-append.
2062         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2063         symbol-append.
2064         (enum-vals-upcase): Use symbol-upcase to build result.
2065         (-enum-parse): Use stringsym-append to build errtxt.
2066         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2067         (eval1): New function.
2068         (symbol-bound?): Provide own version if >= guile 1.6.
2069         * hardware.scm (define-keyword): Use string-append instead of
2070         symbol-append.
2071         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2072         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2073         before using.
2074         (gen-list-entry): Handle either symbol or string `name' arg.
2075         (gen-obj-doc-header): Fetch string name of `o' arg.
2076         (define-cpu-intro): Ditto for cpu.
2077         (gen-mach-intro): Ditto for mach.
2078         (gen-model-intro): Ditto for model.
2079         (gen-isa-intro): Ditto for isa.
2080         (gen-machine-doc-1): Ditto for isa.
2081         (gen-reg-doc-1): Convert mach to string first.
2082         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2083         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2084         to string first.
2085         (gen-insn-categories): Fetch string name of mach.  Convert
2086         enum-val-name to string first.
2087         (gen-insn-docs): Fetch string name of mach.
2088         * ifield.scm (ifld-ilk): Result is a string.
2089         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2090         Fetch string name of ifld.
2091         (-sfmt-search-key): Similarily for ifld and op.
2092         * insn.scm (syntax-make): Fetch string name of syntax element.
2093         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2094         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2095         * mode.scm (mode:c-type): Result is a string.
2096         (mode:enum): Fetch string name of mode.
2097         (-mode-parse): Use stringsym-append to build errtxt.
2098         * model.scm (model:enum): Fetch string name of model.
2099         (-model-parse): Use stringsym-append to build errtxt.
2100         (parse-insn-timing): Must quote empty list.
2101         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2102         (-gen-minsn-opcode-entry): Ditto.
2103         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2104         convert to string.
2105         (read-cpu.opc): Convert current-arch-name to a string before using.
2106         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2107         (<derived-operand>): Must quote empty list.
2108         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2109         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2110         of ifld.
2111         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2112         (-pmacro-sym): Must convert symbols to strings before passing to
2113         string-append.
2114         (-pmacro-str): Ditto.
2115         (pmacros-init!): Use eval1 instead of eval.
2116         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2117         (keep-isa-atlist?): Ditto.
2118         (cmd-if): Use eval1 instead of eval.
2119         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2120         (-rtl-c-get): Fetch string name of src.
2121         (s-unop): Ditto for mode.
2122         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2123         (-gen-par-temp-defns,subword): Ditto.
2124         (join): Use stringsym-append instead of string-append.
2125         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2126         (rtx-traverse-debug): Fetch string name of rtx-obj.
2127         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2128         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2129         (rtx-pretty-name): Result is a string.
2130         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2131         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2132         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2133         before using.
2134         (-gen-sfrag-case): Fetch string name of user.
2135         * sid-model.scm (unit:enum): Fetch string name of unit.
2136         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2137         (<hw-memory>,gen-set-quiet): Ditto.
2138         (gen-mode-defs): Ditto.
2139         (sim-finish!): Convert current-arch-name to a string before using.
2140         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2141         (-gen-no-scache-semantic-fn): Ditto.
2142         (cgen-defs.h): Fetch string name of isa.
2143         (cgen-read.c): Convert current-arch-name to a string before using.
2144         (cgen-write.c): Ditto.
2145         * sim-model.scm (unit:enum): Fetch string name of unit.
2146         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2147         (-gen-model-timing-table): Fetch string name of model.
2148         (-gen-mach-model-table): Ditto.
2149         (-gen-mach-defns): Fetch string name of mach.
2150         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2151         (<hw-memory>,cxmake-get): Fetch string name of mode.
2152         (<hw-memory>,gen-set-quiet): Ditto.
2153         (gen-mode-defs): Ditto.
2154         (sim-finish!): Must quote empty list.
2155         * utils-cgen.scm (<ident>): Must quote empty list.
2156         (obj:str-name): New fn.
2157         (parse-comment): Result is a string.
2158         (parse-symbol): Result is a symbol.
2159         (parse-string): Result is a string.
2160         (keyword-list?): Convert arg to string before calling string-ref.
2161         (keyword-list->arg-list): Ditto.
2162         (gen-attr-name): Convert attr-name to string first.
2163         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2164         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2165         (gen-define-ifmt-ifields): Ditto for fld.
2166         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2167         map-over-string.
2168         (gen-file-name): Ditto.
2169         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2170         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2171         (reduce): Call eval1 instead of eval.
2172         * cpu/m32r.cpu (addi): Don't use `#.'.
2173
2174         * gen-all-sim: Fix some typos.
2175
2176 2003-07-08  Doug Evans  <dje@sebabeach.org>
2177
2178         * gen-all-doc: Ensure run from cgen src dir.
2179         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2180         * gen-all-sid: Similarily, in ./tmp-sid.
2181         * gen-all-sim: Similarily, in ./tmp-sim.
2182
2183 2003-06-20  Doug Evans  <dje@sebabeach.org>
2184
2185         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2186
2187 2003-06-19  Doug Evans  <dje@sebabeach.org>
2188
2189         * mach.scm (-ifld-already-defined?): New proc.
2190         (current-ifld-add!): Use it.
2191         (-op-already-defined?): New proc.
2192         (current-op-add!): Use it.
2193         (-insn-already-defined?): New proc.
2194         (current-insn-add!): Use it.
2195         (-minsn-already-defined?): New proc.
2196         (current-minsn-add!): Use it.
2197         (obj-isa-list): New proc.
2198         (isa-supports?): Use it.
2199
2200 2003-06-10  Doug Evans  <dje@sebabeach.org>
2201
2202         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2203         * cpu/m32r.cpu (all insns): Ditto.
2204
2205         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2206         "unspecified".
2207
2208         * gen-all-doc: Split arm and frv docs up a bit.
2209
2210         * cpu/arm.cpu: Add IDOC attribute.
2211         * cpu/frv.cpu: Ditto.
2212         * cpu/i960.cpu: Ditto.
2213         * cpu/openrisc.cpu: Ditto.
2214         * cpu/xstormy16.cpu: Ditto.
2215         * cpu/m32r.cpu: Ditto.
2216         (all insns): Explicitly specify IDOC attribute.
2217
2218         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2219         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2220         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2221         * Makefile.in: Regenerate.
2222         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2223         (-attr-read): Defer computing default value until we know the type.
2224         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2225         (<attr-list>:attr-present?): New method.
2226         (atlist-attr-present?,obj-attr-present?): New fns.
2227         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2228         (attr-builtin!): New insn attr IDOC.
2229         * cgen-doc.scm (doc-arguments): New args -I,-N.
2230         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2231         Support comment as fourth element of enum value.
2232         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2233         * html.scm (gen-html-header): New arg kind, all callers updated.
2234         (gen-table-of-contents): New arg insn-file, all callers updated.
2235         (gen-list-entry,gen-doc-header): New fn.
2236         (get-operands): Delete.
2237         (gen-iformat-table): Rewrite.
2238         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2239         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2240         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2241         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2242         (get-insns-for-category,gen-categories-insn-lists): New fns.
2243         (gen-insn-docs): Simplify each insn's semantics first.
2244         Print insn tables sorted by IDOC categories.
2245         (*insn-html-file-name*): New global.
2246         (cgen-insn.html): New fn.
2247         (cgen-all): Update.
2248         * insn.scm (<insn>): Create a setter for the `tmp' member.
2249         * semantics.scm (insn-build-known-values): Renamed from
2250         -build-known-values.  All callers updated.
2251
2252         * rtl.scm: Move traveral/evaluation support to ...
2253         * rtl-traverse.scm: New file.
2254         * read.scm: Maybe-load rtl-traverse.scm.
2255
2256         * rtl.scm (-rtx-valid-types): Add SETRTX.
2257
2258         * rtx-funcs.scm (nop,parallel): Fix mode.
2259
2260         * utils.scm (eqv-lookup-index): New fn.
2261         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2262
2263         * dev.scm (load-doc): Set APPLICATION.
2264
2265 2003-06-10  Dave Brolley  <brolley@redhat.com>
2266
2267         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2268         * sid-decode.scm: Generate #include of config.h into
2269         @prefix@-decode.cxx.
2270         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2271
2272 2003-06-07  Doug Evans  <dje@sebabeach.org>
2273
2274         * gen-all-sid: New file.
2275         * gen-all-opcodes: New file.
2276
2277 2003-06-05  Nick Clifton  <nickc@redhat.com>
2278
2279         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2280         version of the FRinti operand.
2281         (FRintjeven): Likewise for FRintj.
2282         (FRintkeven): Likewise for FRintk.
2283         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2284         media-quad-arith-sat-semantics, media-quad-arith-sat,
2285         conditional-media-quad-arith-sat, mdunpackh,
2286         media-quad-multiply-semantics, media-quad-multiply,
2287         conditional-media-quad-multiply, media-quad-complex-i,
2288         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2289         conditional-media-quad-multiply-acc, munpackh,
2290         media-quad-multiply-cross-acc-semantics, mdpackh,
2291         media-quad-multiply-cross-acc, mbtoh-semantics,
2292         media-quad-cross-multiply-cross-acc-semantics,
2293         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2294         media-quad-cross-multiply-acc-semantics, cmbtoh,
2295         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2296         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2297         cmhtob): Use new operands.
2298         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2299         (parse_even_register): New function.
2300
2301 2003-06-04  Doug Evans  <dje@sebabeach.org>
2302
2303         Better handling of 64 bit and mixed 32/64 bit architectures.
2304         * hardware.scm (hw-update-word-modes!): New fn.
2305         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2306         hw-update-word-modes!.
2307         (state-word-bitsize): Replace FIXME with requested check.
2308         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2309         * mode.scm (mode-find): Ignore INT,UINT.
2310         (-mode-word-sizes-kind): New global.
2311         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2312         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2313         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2314         of mode-list to ...
2315         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2316         unusable, correct values set later.
2317         (mode-finish!): Remove cruft.
2318         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2319         * opcodes.scm (opcodes-init!): Ditto.
2320         * rtx-funcs.scm (annul): Fix mode of pc.
2321         * cpu/ia64.cpu: Remove cruft that sets word modes.
2322         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2323
2324 2003-06-03  Nick Clifton  <nickc@redhat.com>
2325
2326         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2327         immediate value not unsigned.
2328
2329 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2330
2331         * cpu/sh.cpu: Amend comments to refer to SuperH.
2332         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2333         * cpu/sh64-media.cpu: Likewise.
2334         (Saturation): Update manual reference.
2335
2336 2003-05-15  Doug Evans  <dje@sebabeach.org>
2337
2338         * Makefile.am (srcroot): New var.
2339         (html): New rule.
2340         * Makefile.in: Regenerate.
2341         * cgen-doc.scm: New file.
2342         * html.scm: New file.
2343         * gen-all-doc: New file.
2344         * dev.scm (cload): Handle DOC application.
2345         (load-doc): New fn.
2346         * machs.scm (machs-for-cpu): New fn.
2347         * model.scm (models-for-cpu): New fn.
2348         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2349         All uses updated.
2350         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2351         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2352
2353         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2354         (-gen-decode-bits): Instead put in better fix here.
2355
2356         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2357
2358 2003-05-01  DJ Delorie  <dj@redhat.com>
2359
2360         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2361         word accesses.
2362         (set-alignfix-mem): Likewise.
2363
2364 2003-04-16  Dave Brolley  <brolley@redhat.com>
2365
2366         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2367         * utils.scm (copyright-fsf): Update generate copyright years.
2368         (copyright-cygnus): Ditto.
2369         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2370         operands.
2371         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2372         here.
2373         (<operand>'gen-profile-code): New parameter 'when'.
2374         (<iunit>'gen-profile-code): Ditto.
2375         (<insn>'gen-profile-code): Ditto.
2376         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2377         'insn_reference' for the 'after' function.
2378         * model.scm (unit:enum): Moved to sim-model.scm.
2379         * sim-model.scm (unit:enum): Moved from model.scm.
2380         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2381         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2382         * sid-model.scm (unit:enum): New version for sid.
2383         (gen-model-class-name): New function.
2384         (gen-model-unit-fn-decl): New function.
2385         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2386         (gen-model-unit-fn-name): New parameter 'when'.
2387         (-gen-model-insn-fn-name): Ditto.
2388         (-gen-model-insn-qualified-fn-name): New function.
2389         (-gen-model-insn-fn-decl): New function.
2390         (-gen-model-insn-fn-decls): New function.
2391         (-gen-model-insn-fn): New parameter 'when'. Call
2392         -gen-model-insn-qualified-fn-name.
2393         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2394         functions for modelling insn before and after execution.
2395         (-gen-model-class-decls): New function.
2396         (" (gen-model-class-name model) "): New function.
2397         (gen-model-classes): New function.
2398         (-gen-insn-timing): Generate functions for modelling insn before and after
2399         execution.
2400         (-gen-insn-unit-timing): Generate class-qualified names.
2401         (-gen-model-timing-table): Ditto.
2402         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2403         not needed (yet) by sid.
2404         (cgen-model.h): New function.
2405
2406 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2407
2408         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2409         * cpu/sh64-compact.cpu: Likewise.
2410         * cpu/sh64-media.cpu: Likewise.
2411
2412 2003-03-21  DJ Delorie  <dj@redhat.com>
2413
2414         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2415         which indicates if the sign flag is set from bit 15 or 7.
2416         Adjust all callers.
2417         (set-psw): New argument ws, propogate it.
2418         (set-psw-nowrite): Likewise.
2419         (set-mem-psw): Likewise.
2420         (set-psw-carry): Likewise.  Use temporaries to prevent
2421         prematurely overwriting needed inputs.
2422         (set-psw-rrotate17): Fix logic.
2423         (shrgrgr): Preserve carry for zero-bit shifts.
2424         (shrgrimm): Likewise.
2425         (shlgrgr): Likewise.
2426         (shlgrimm): Likewise.
2427         (asrgrgr): Likewise.
2428         (asrgrimm): Likewise.
2429         (reset): New.
2430
2431 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2432
2433         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2434
2435 2002-03-05  DJ Delorie  <dj@redhat.com>
2436
2437         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2438         prematurely overwriting needed inputs.
2439         (set-psw-sub): Likewise.
2440
2441 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2442
2443         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2444
2445 2003-02-18  DJ Delorie  <dj@redhat.com>
2446
2447         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2448         (movlmemimm): Just mask the address.
2449         (movhmemimm): Likewise.
2450         (movlmemgr): Likewise.
2451         (movhmemgr): Likewise.
2452         (set-psw): Always set the psw last.
2453         (set-psw-carry): Likewise.
2454         (set-psw-add): Likewise.
2455         (set-psw-sub): Likewise.
2456
2457         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2458         of 16 patterns from the set-psw-rotate17 function.
2459         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2460         movgriipostincgr, movgriipredecgr): Set psw correctly.
2461         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2462         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2463         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2464
2465 2003-02-11  Dave Brolley  <brolley@redhat.com>
2466
2467         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2468         @arch@_cgen-ifld_table.
2469         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2470         @arch@_cgen-ifld_table.
2471
2472 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2473
2474         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2475
2476 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2477
2478         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2479         empty ISAs.
2480
2481 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2482
2483         * utils-gen.scm (attr-int-gen-defn): Define.
2484
2485 2002-12-21  Doug Evans  <dje@sebabeach.org>
2486
2487         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2488         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2489
2490         * dev.scm (cload): Update location of .cpu files.
2491
2492 2002-12-19  Doug Evans  <dje@sebabeach.org>
2493
2494         * utils-sim.scm (gen-profile-sym): New fn.
2495         (<operand>,sbuf-profile-sym): New method.
2496         (<operand>,sbuf-profile-elm): Use it.
2497         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2498         of hardcoding symbol name.
2499         (<operand>,gen-profile-code): Ditto.
2500         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2501         symbol name.
2502
2503         * mode.scm (mode-sem-mode): New fn.
2504         * operand.scm (op:new-mode): Update. mode-name.
2505         (op-natural-mode?) New fn.
2506         * rtl.scm (hw): Set hw-name,mode-name.
2507
2508         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2509         Instead do:
2510         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2511         as size of IDESC-TABLE-VAR.
2512         (@prefix@_init_idesc_table): Ditto.
2513         * sim-model.scm (-gen-mach-defns): Ditto.
2514         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2515
2516         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2517
2518         * insn.scm (-parse-insn-format-symbol): Improve error message.
2519         (-parse-insn-format): Ditto.
2520
2521         * gen-all-sim: New script.
2522
2523 2002-12-16  DJ Delorie  <dj@delorie.com>
2524
2525         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2526
2527 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2528
2529         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2530         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2531         (parse_immediate16): Handle immediate16 values, which now include
2532         @hi(label) and @lo(label)
2533
2534 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2535
2536         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2537         Add braces and cast for union field.
2538         (gen-multi-ifield-nodes): Add braces and cast for union field.
2539         (cgen_operand_table): Similarly fix sentinel.
2540         (cgen_cpu_close): Constify "insns".  Formatting.
2541         (cgen-desc.c): Include xregex.h.
2542         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2543         Prototype.
2544         <opc.c>: Include safe-ctype.h.
2545         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2546         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2547         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2548         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2549         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2550         (parse_addr16): Correct type of "value".  Formatting.
2551         (parse_addr16_p): Likewise.
2552         (parse_addr16_cjp): Likewise.
2553         (parse_lit8): Likewise.
2554         (parse_bit3): Formatting.
2555         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2556         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2557         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2558         print_decimal.
2559         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2560         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2561         (print_dollarhex8): Likewise.
2562         (print_dollarhex16): Likewise.
2563         (print_dollarhex_addr16h): Likewise.
2564         (print_dollarhex_addr16l): Likewise.
2565         (print_dollarhex_p): Likewise.
2566         (print_dollarhex_cj): Likewise.
2567         (print_decimal): Likewise.
2568         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2569
2570 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2571
2572         * doc/rtl.texi (Model variants): Mention current limitations for
2573         unit inputs and outputs.
2574         (Hardware elements) <attribute PROFILE>: Be slightly more
2575         verbose.
2576         (Instructions) <timing>: input/output overrides have a direction
2577         operand.
2578
2579 2002-11-25  DJ Delorie  <dj@redhat.com>
2580
2581         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2582
2583 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2584
2585         * cpu/iq10.cpu: New file.
2586         * cpu/iq2000.cpu: Likewise.
2587         * cpu/iq2000.opc: Likewise.
2588         * cpu/iq2000m.cpu: Likewise.
2589
2590 2002-11-19  DJ Delorie  <dj@redhat.com>
2591
2592         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2593
2594 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2595
2596         * dev.scm: Call getenv with a string, not a symbol.
2597
2598 2002-10-08  Doug Evans  <dje@transmeta.com>
2599             Hans-Peter Nilsson  <hp@axis.com>
2600
2601         * types.scm (bitrange-overlap?): Handle lsb0?.
2602
2603 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2604
2605         From Robert Cragie <rcc@jennic.com>:
2606         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2607
2608 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2609             Ben Elliston  <bje@redhat.com>
2610             John Healy  <jhealy@redhat.com>
2611             Jeff Johnston  <jjohnstn@redhat.com>
2612             Alan Lehotsky  <alehotsky@redhat.com>
2613             Ubicom Inc. <SupportDesk@ubicom.com>
2614
2615         * cpu/ip2k.cpu: New file.
2616         * cpu/ip2k.opc: Likewise.
2617
2618 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2619
2620         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2621
2622 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2623
2624         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2625         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2626         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2627         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2628         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2629         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2630         (-sthi-byte): If there is a single byte to store, store it at
2631         proper address.
2632         (sthil, sthiq): Fix big-endian behaviour.
2633         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2634         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2635         (saturate): Use Dimode to check if saturation operation is required.
2636         (usaturate): Likewise.
2637         (mpermw): Fix mask.
2638         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2639         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2640         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2641         (msadubq): Fix subword index in second operand of first subtraction.
2642
2643 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2644
2645         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2646         code.
2647
2648 2002-06-18  Dave Brolley  <brolley@redhat.com>
2649
2650         * cpu/frv.cpu: New cpu description.
2651         * cpu/frv.opc: New cpu support code.
2652
2653 2002-05-21  Dave Brolley  <brolley@redhat.com>
2654
2655         * decode.scm (-opcode-slots): Don't consider bits beyond the
2656         length of the insn.
2657
2658 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2659
2660         * cpu/powerpc.cpu: New file.
2661
2662 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2663
2664         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2665
2666 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2667
2668         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2669         results are expanded recursively.
2670
2671 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2672
2673         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2674         call scan-symbol on it, to enable recursive macro-expansion.
2675
2676 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2677
2678         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2679         for multiple-isa configurations.
2680         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2681
2682 2002-02-04  Ben Elliston  <bje@redhat.com>
2683
2684         * cpu/sh.cpu, cpu/sh.opc: New files.
2685         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2686
2687 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2688
2689         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2690         (Enumerated constants): Mention that an ifield must not specify a
2691         multi-ifield.
2692         (Instruction operands): Ditto for index.
2693         (Expressions) <parallel>: Remove misplaced mention of local
2694         variables.
2695         <if>: Mention that mode must be specified and non-VOID when the
2696         result is used.
2697
2698 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2699
2700         * doc/porting.texi: When referring to *.opc, mention they are in
2701         the cpu subdir.  Call top-level directory toplevel, not devo.
2702         Close string in define-normal-insn example.
2703
2704         * doc/pmacros.texi: Fix .substr typo to .substring.
2705         Mention that .sym expansions are not further expanded.
2706
2707 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2708
2709         * desc-cpu.scm (ifld-number-cache): Add.
2710         (ifld-number): Add.
2711         (gen-maybe-multi-ifld-of-op): Add.
2712         (gen-maybe-multi-ifld): Add.
2713         (gen-multi-ifield-nodes): Add.
2714         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2715
2716 2002-01-10  matthew green  <mrg@redhat.com>
2717
2718         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2719         (gr-Rb-names): ... to this.
2720         (h-Rb): New hardware piece.
2721         (h-Rbj): Use gr-Rb-names.
2722         (Rb): Use h-Rb.
2723         (holdx): New instruction.
2724
2725 2002-01-07  Ben Elliston  <bje@redhat.com>
2726
2727         * utils.scm (package-cygnus-simulators): Rename from this ..
2728         (package-red-hat-simulators): .. to this.
2729         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2730         * sid-cpu.scm (cgen-desc.h): Likewise.
2731         (cgen-cpu.h): Likewise.
2732         (cgen-defs.h): Likewise.
2733         (cgen-write.cxx): Likewise.
2734         (cgen-semantics.cxx): Likewise.
2735         (cgen-sem-switch.cxx): Likewise.
2736         * sid-decode.scm (cgen-decode.h): Likewise.
2737         (cgen-decode.cxx): Likewise.
2738         * sid-model.scm (cgen-model.cxx): Likewise.
2739         * sid.scm (option-set!): Likewise.
2740         * sim.scm (option-set!): Likewise.
2741
2742 2002-01-07  Ben Elliston  <bje@redhat.com>
2743
2744         * utils.scm (copyright-fsf): Add 2002.
2745         (copyright-cygnus): Rename to copyright-red-hat.
2746         (copyright-red-hat): Add 2002.
2747         (CURRENT-COPYRIGHT): Update comment.
2748         * opcodes.scm (option-set!): Update callers.
2749         * sid-model.scm (cgen-model.cxx): Likewise.
2750         * sid-cpu.scm: Likewise.
2751         * sid-decode.scm: Likewise.
2752         * sid.scm (option-set!): Handle "redhat" as an option for
2753         "copyright"; use copyright-red-hat.
2754         * sim.scm (option-set!): Likewise.
2755
2756 2002-01-03  Dave Brolley  <brolley@redhat.com>
2757
2758         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2759         number of insns in the list.  Update the population count function to
2760         identify and prioritize 3 catgories of useful bits.
2761         (-population-top-few): Don't consider bits with a population count of
2762         zero.
2763         (-build-decode-table-entry): Don't call
2764         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2765         identical insns at the next tree level.
2766         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2767         this function is no longer used.
2768         (filter-non-specialized-ambiguous-insns): New function.
2769         (filter-identical-ambiguous-insns): New function.
2770         (find-identical-insn): New function.
2771         (filter-harmlessly-ambiguous-insns): Removed.
2772
2773 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2774             matthew green  <mrg@redhat.com>
2775             Frank Ch. Eigler  <fche@redhat.com>
2776             Nick Clifton  <nickc@cambridge.redhat.com>
2777
2778         * cpu/xstormy16.cpu: New file.
2779         * cpu/xstormy16.opc: New file.
2780
2781 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2782
2783         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2784
2785 2001-11-14  Dave Brolley  <brolley@redhat.com>
2786
2787         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2788         of the field being extracted.
2789
2790 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2791
2792         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2793         (cos ...) and (sin ..) rtx.
2794
2795 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2796
2797         * desc-cpu.scm: Do not include ctype.h in generated desc
2798         files.  They will inherit safe-ctype.h instead.
2799
2800 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2801
2802         * desc-cpu.scm: Add missing function prototypes (for generated
2803         C files).  Fix compile time warning messages about unused
2804         parameters (for generated C files).
2805         * opc-asmdis.scm: The same.
2806         * opc-ibld.c: The same.
2807         * opc-itab.scm: The same.
2808         * cpu/fr30.opc: The same.
2809         * cpu/m32r.opc: The same.
2810         * cpu/openrisc.opc: The same.
2811
2812 2001-09-17  graydon hoare  <graydon@redhat.com>
2813
2814         * insn.scm (syntax-break-out): Correct logic in handling escaped
2815         syntax characters.
2816
2817 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
2818
2819         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2820         call @arch@_cgen_build_insn_regex now that regex support is in
2821         libiberty.
2822
2823 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
2824
2825         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2826         (mask-superset?): Look for strict supersets to allow rejection of
2827         duplicate insns.
2828
2829 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2830
2831         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2832         (cgen-desc.h): Call it.
2833         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2834         decode-size.
2835         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2836         entire_insn for extraction, if it's shorter than base-insn-bitsize.
2837
2838 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2839
2840         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2841         mach->cpu insn-chunk-bitsize.
2842         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2843         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2844         * mach.scm (<cpu>): New field insn-chunk-bitsize.
2845         (-cpu-parse, -cpu-read): Parse/initialize it.
2846         * doc/rtl.texi (define-cpu): Document it.
2847
2848 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
2849
2850         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2851
2852 2001-07-06  Ben Elliston  <bje@redhat.com>
2853
2854         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2855
2856 2001-07-05  Ben Elliston  <bje@redhat.com>
2857
2858         * README: Update.
2859
2860         * read.scm (include): Include files from srcdir/cpu.
2861         (-cgen): Likewise for loading .cpu files.
2862         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2863         * *.cpu: Move all cpu descriptions into cpu subdirectory.
2864         * *.opc: Likewise.
2865         * simplify.inc: Likewise.
2866
2867 2001-07-04  Ben Elliston  <bje@redhat.com>
2868
2869         * read.scm (include): Log "Including file" message at level 1,
2870         rather than outputting it with (display).
2871         (cpu-load): Log "Loading cpu description" and "Processing cpu
2872         description" messages at levels 1 and 2, respectively, rather than
2873         using (display).
2874
2875 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
2876
2877         * desc.scm (<keyword> 'gen-defn): Add extra zero into
2878         CGEN_KEYWORD_ENTRY initializers.
2879
2880         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2881         (<operand> 'test-data): Involve both the index and the hardware
2882         in testcase generation.
2883         (<hw-indx> 'test-data): Generate test data from the underlying
2884         object.
2885         (<ifield> 'test-data): Generate test data by computing bit
2886         patterns for the field, then decoding them.
2887         (<hw-address> 'test-data): Allow for new calling convention.
2888         (<hw-iaddress> 'test-data): Likewise.
2889         (<keyword> 'test-data): Convert index values into keywords.
2890         (<hw-asm> 'test-data): Convert index values into integer strings.
2891
2892         * gas-test.scm (cgen-build.sh): Escape '.' as well.
2893
2894 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
2895
2896         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2897         is required for multi-mode hw types (memory).
2898
2899 2001-05-11  Ben Elliston  <bje@redhat.com>
2900
2901         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2902         when generating allinsn.d from objdump output. Without it, the
2903         testsuite will treat $ as the regular expression for end of line.
2904
2905 2001-05-09  Ben Elliston  <bje@redhat.com>
2906
2907         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2908         with `cgen_cpu_open'; documentation had become out of date.
2909         * doc/rtl.texi (Instruction operands): Likewise.
2910
2911 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
2912
2913         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2914         various-base-length instruction sets.
2915
2916 2001-04-02  Ben Elliston  <bje@redhat.com>
2917
2918         * sid-cpu.scm (-last-insn): New function.
2919         (-gen-sem-switch-engine): Loop through idesc while less than or
2920         equal to the last instruction enum, not less than the MAX enum.
2921         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2922         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2923         table's size to be the last instruction enum plus one, not
2924         @PREFIX@_INSN_MAX.
2925         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2926         instruction onto the instruction list.
2927
2928         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2929         using the size of the table and its elements.
2930         (-gen-decode-insn-globals): Define the idesc table's size to be
2931         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2932         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2933         last instruction enum plus one, not @CPU@_INSN_MAX.
2934
2935 2001-03-28  Ben Elliston  <bje@redhat.com>
2936
2937         * doc/version.texi (UPDATED, EDITION): Update.
2938         * doc/stamp-vti: Likewise.
2939
2940 2001-03-26  Ben Elliston  <bje@redhat.com>
2941
2942         * doc/credits.texi (Credits): Update.
2943
2944         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2945         specified prefix and, if necessary, escape `$' in gas-build.sh to
2946         prevent unwanted shell variable expansion.
2947
2948 2001-03-24  Ben Elliston  <bje@redhat.com>
2949
2950         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2951         (<keyword>,test-data): Likewise.
2952         (<hw-address>,test-data): Likewise.
2953         (<hw-iaddress>,test-data): Likewise.
2954         (-collate-test-set): New function.
2955         (build-test-set): Use it.
2956         (gen-gas-test): Generate five test cases per instruction.
2957         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2958
2959         * read.scm: Load "slib/random" if random is not defined.
2960         * slib/random.scm: New file.
2961
2962         * utils.scm: Remove comments about the Hobbit compiler.
2963         (copyright-cygnus): Add 2001.
2964         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2965         (package-gnu-simulators): Tidy.
2966
2967 2001-03-23  Ben Elliston  <bje@redhat.com>
2968
2969         * cgen-gas.scm: Inline documentation improvements.
2970
2971 2001-03-21  Ben Elliston  <bje@redhat.com>
2972
2973         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2974         given in a syntax string is undefined.
2975
2976         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2977         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2978
2979 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
2980
2981         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2982         for arg_type CGEN_CPU_OPEN_BFDMACH.
2983
2984 2001-03-20  Ben Elliston  <bje@redhat.com>
2985
2986         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2987         instruction onto the instruction list. Define MAX_INSNS to be the
2988         value of the last instruction enum plus one.
2989
2990 2001-03-14  Nick Clifton  <nickc@redhat.com>
2991
2992         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
2993
2994 2001-03-05  Dave Brolley  <brolley@redhat.com>
2995
2996         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2997         if the number of ifields is greater than zero.
2998
2999 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
3000
3001         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3002         Emit LIKELY/UNLIKELY branch probability hints.
3003         * sid-decode.cpu (-gen-record-args): Ditto.
3004
3005 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
3006
3007         * desc-cpu.scm (-gen-hash-defines): Rename
3008         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3009
3010 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
3011
3012         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3013         writeback tracking.
3014         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3015         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3016         if unnecessary.
3017         * sid.scm (<operand> gen-write): Use unsigned long long expression
3018         for writeback.
3019         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3020         (<unit> gen-profile-code): Ditto.
3021
3022 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
3023
3024         * doc/rtl.texi (Expressions): Document the (index-of ...) and
3025         (regno ...) rtx.
3026
3027 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3028
3029         * operand.scm (<operand> pretty-sem-name): New field.
3030         (<operand> make): Initialize it from hw-name.
3031         (op:set-pretty-sem-name!): New function.
3032         (<operand> gen-pretty-name): Default to fetching new field.
3033         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
3034         sem-name setting from -rtx-hw-name.
3035
3036 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3037
3038         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3039         its subsequent gen-pretty-name.
3040
3041         * read.scm: Increase thread working stack limit and backtrace
3042         depth limits.
3043
3044 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
3045
3046         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3047
3048 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
3049
3050         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3051         current insn plus 4.
3052         (h-delay-insn): New hardware register.
3053         (l-jal): Uses h-delay-insn instead of pc when setting link register.
3054         (l-jalr): Likewise.
3055         (l-bal): Likewise.
3056
3057         * openrisc.opc (parse_hi16): Sign extend value.
3058         (parse_lo16): Likewise.
3059
3060 2001-01-06  Ben Elliston  <bje@redhat.com>
3061
3062         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3063         instead of @cpu@ and @CPU@ to generically prefix symbol names.
3064         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3065         (-gen-semantic-fn-table): Likewise.
3066         (-gen-scache-semantic-fn): Likewise.
3067         (-gen-no-scache-semantic-fn): Likewise.
3068         (cgen-read.c): Likewise.
3069         (cgen-sem-switch.c): Likewise.
3070         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3071         is a filename prefix.
3072         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3073         (-gen-decode-insn-globals): Likewise.
3074         (-gen-idesc-decls): Likewise.
3075         (cgen-decode.h): Likewise.
3076         (cgen-decode.c): Likewise.
3077         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3078         (gen-cpu-insn-enum): Likewise.
3079         (sim-finish!): Likewise.
3080
3081 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3082
3083         * openrisc.cpu: New file.
3084         * openrisc.opc: Likewise.
3085
3086 2000-12-12  Ben Elliston  <bje@redhat.com>
3087
3088         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3089
3090 2000-12-07  Ben Elliston  <bje@redhat.com>
3091
3092         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3093         "insn" when there are zero ifields to extract.
3094
3095 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3096
3097         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3098         used by simple/non-scache simulators.
3099         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3100         regardless of with-scache?.
3101         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3102
3103 2000-12-03  Ben Elliston  <bje@redhat.com>
3104
3105         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3106         (cgen-desc.c): Likewise.
3107
3108 2000-12-01  Greg McGary  <greg@mcgary.org>
3109
3110         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3111
3112 2000-12-01  Ben Elliston  <bje@redhat.com>
3113
3114         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3115         definitions if run without with-multipla-isa?.
3116         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3117         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3118
3119 2000-11-24  Ben Elliston  <bje@redhat.com>
3120
3121         * sim-cpu.scm (-gen-hardware-struct): New function.
3122         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3123         hardware elements wich have share one or more ISAs with the ISAs
3124         being kept.
3125
3126         * sim.scm (-with-multiple-isa?): New symbol.
3127         (with-multiple-isa?): New function.
3128         (option-init!): Initialise -with-multiple-isa?.
3129         (option-set!): Handle with-multiple-isa option.
3130
3131 2000-11-21  Ben Elliston  <bje@redhat.com>
3132
3133         * utils.scm (copyright-fsf): Add the year 2000.
3134
3135 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3136
3137         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3138         unneeded "\n\n" from F() macro definition.
3139
3140 2000-11-15  Greg McGary  <greg@mcgary.org>
3141
3142         * utils-cgen.scm (gen-define-with-symcat): New function.
3143         * desc-cpu.scm (gen-ifld-defns): Use it.
3144         (gen-hw-table-defns): Use it.
3145         (-gen-hash-defines): Use it.
3146         (gen-operand-table): Use it.
3147         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3148         * opc-itab.scm (-gen-ifmt-table): Use it.
3149         (-gen-insn-opcode-table): Use it.
3150         (-gen-macro-insn-table): Use it.
3151         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3152         * sim-cpu.scm (cgen-semantics.c): Use it.
3153         (cgen-sem-switch.c): Use it.
3154
3155 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3156
3157         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3158         request to emit calls to insn extractors as functions rather than
3159         branches to inline blocks.
3160         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3161         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3162
3163         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3164         to extractor clauses.
3165
3166 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3167
3168         * decode.scm (-distinguishing-bit-population): Significantly
3169         improve popularity heuristic.  Renamed from
3170         (-mask-bit-population): Gone.
3171         (-population-above-threshold): Sort new bit numbers in order of
3172         popularity.
3173         (-population-top-few): Allow up to three more bits to be selected
3174         than requested.  Correct selection order to prefer better bits.
3175         Correct bug in fewer-than-requested case.  Keep threshold as
3176         floating-point.
3177         (decode-best-get-bits): Pass also the insn-values.
3178
3179         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3180         future optimization.
3181
3182         * utils.scm (message): Format nested lists better.
3183
3184 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3185
3186         * dev.scm: Add srcdir to %load-path.
3187
3188         * rtx-funcs.scm (subword): Mode of argument can be different
3189         than mode of result, so don't use OP0 to specify argument's mode.
3190
3191 2000-11-02  Ben Elliston  <bje@redhat.com>
3192
3193         * doc/porting.texi (Building a GAS test suite): Document my change
3194         to gas-build.sh.
3195
3196 2000-11-01  Ben Elliston  <bje@redhat.com>
3197
3198         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3199
3200 2000-10-31  Ben Elliston  <bje@redhat.com>
3201
3202         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3203         with no command line arguments if the gas build directory can be
3204         determined.
3205
3206 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3207
3208         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3209         op-ifld -> op-ifield.
3210
3211 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3212
3213         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3214
3215 2000-10-13  matthew green  <mrg@cygnus.com>
3216
3217         * utils-cgen.scm (get-ifetch): Move from here ...
3218         * sim.scm (get-ifetch): ... to here.
3219         * sid.scm (get-ifetch): Copy and port to c++.
3220
3221 2000-10-06  Dave Brolley  <brolley@redhat.com>
3222
3223         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3224         ifld-start + ifld-word-offset.
3225         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3226         the field is beyond the base number of bits.
3227         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3228         (gen-extract-ifields): Ditto.
3229         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3230         characters in the regular expression.
3231
3232 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3233
3234         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3235         preprocessor constant.
3236
3237 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3238
3239         * slib/logical.scm: New file from slib.  Provides robust bitwise
3240         logical operations for large integers.
3241         * read.scm: maybe-load it.
3242
3243 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3244
3245         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3246         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3247         single-isa predicate, but support keep-isa filtering.
3248
3249 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3250
3251         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3252         statement-expression and comma-expression contexts.
3253         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3254
3255 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3256
3257         * decode.scm (-population-top-few): Signal error gracefully if
3258         decoding is about to become ambiguous.
3259
3260 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3261
3262         * doc/rtl.texi (decode-assist): Describe this field as optional.
3263
3264 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3265
3266         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3267         with decode proc.
3268
3269 2000-09-05  Dave Brolley  <brolley@redhat.com>
3270
3271         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3272         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3273
3274 2000-08-29  Dave Brolley  <brolley@redhat.com>
3275
3276         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3277         adata-integral-insn is true for this architecture.
3278
3279 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3280
3281         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3282         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3283         * rtl-c.scm (-c-rtl-get): Improve an error message.
3284         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3285
3286 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3287
3288         * Makefile.in (DIST_COMMON): Regenerated.
3289         * ifield.scm (<derived-ifield> needed-iflds): New method.
3290         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3291         sfmts built from <derived-ifield>s.
3292         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3293         type symbol 'derived-ifield, not an unparseable string.
3294         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3295         (-sfmt-contents): Add tracing.
3296
3297         From Doug Evans <dje@transmeta.com>:
3298         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3299         C code.
3300
3301 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3302
3303         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3304         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3305         (-rtl-c-get): Rename from rtl-c-get.
3306         (rtl-c-get): New fn for getter logging.
3307
3308 2000-07-28  Ben Elliston  <bje@redhat.com>
3309
3310         * NEWS: Update.
3311
3312 2000-07-25  Ben Elliston  <bje@redhat.com>
3313
3314         * doc/credits.texi (Credits): Add Frank Eigler.
3315
3316 2000-07-24  Dave Brolley  <brolley@redhat.com>
3317
3318         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3319         fully.
3320         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3321         (<keyword>): Initialize all elements fully.
3322         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3323         fully.
3324         (-gen-mach-table-defns): Ditto.
3325         (-gen-ifld-defns): Ditto.
3326         (-gen-operand-table): Ditto.
3327         (-gen-insn-table): Ditto.
3328         (-gen-cpu-open): Nothing to do for the mach table.
3329
3330 2000-07-13  Ben Elliston  <bje@redhat.com>
3331
3332         * doc/version.texi (UPDATED): Update.
3333
3334 2000-07-05  Ben Elliston  <bje@redhat.com>
3335
3336         * configure.in (AC_PATH_PROG): Remove.
3337         * configure: Regenerate.
3338         * Makefile.am (GUILE): Locate guile dynamically.
3339         * Makefile.in: Regenerate.
3340         * doc/Makefile.in: Likewise.
3341
3342 2000-07-03  Ben Elliston  <bje@redhat.com>
3343
3344         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3345         * opc-itab.scm (cgen-opc.c): Likewise.
3346
3347 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3348
3349         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3350         guile 1.4 compatibility.
3351         (rtx-env-dump): Comment out buggy display calls.
3352
3353 2000-06-15  matthew green  <mrg@redhat.com>
3354
3355         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3356
3357 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3358
3359         * Makefile.in: Regenerated.
3360
3361         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3362         (gen-ifld-defns): Ditto.
3363         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3364         * rtl.c (rtl-finish!): Ditto.
3365         * opc-itab.scm (-gen-ifield-decls): Ditto.
3366         * opcodes.scm (gen-switch): Exclude derived operands.
3367         * operand.scm (op-iflds-used): Expand derived operands.
3368         (hw-index-derived): New dummy function to create dummy object.
3369         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3370         constructor.  Set object's hw-name and index fields.
3371         (-anyof-merge-subchoices): Set instance object's index also.
3372         (-anyof-name): New helper function.
3373         (anyof-merge-semantics): Correct replacement of operand names in
3374         anyof instance.
3375         (op-ifield): Tolerate derived-operands and their funny indices better.
3376         * ifield.scm (ifld-known-values): Expand derived ifields.
3377         (non-multi-ifields, non-derived-ifields): New utility functions.
3378         (ifld-decode-mode): Tolerate objects with unbound decode field.
3379         * iformat.scm (compute-insn-length): Expand derived ifields.
3380         (compute-insn-base-mask): Ditto.
3381         * insn.scm (insn-base-ifields): Remove.
3382         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3383         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3384         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3385         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3386         (-frag-test-data): Ditto.
3387         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3388         (-gen-sem-switch-engine); Ditto.
3389         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3390         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3391         (-gen-record-args): Tolerate unbound op-ifield.
3392         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3393         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3394         Exclude multi-insns.
3395         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3396         * utils-sim.scm (op-extract?): Handle derived operands.
3397
3398         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3399         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3400         * hardware.scm (hardware-for-mode): New function.
3401
3402         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3403         cleaning up decode tables.
3404         (mask-superset?): Little helper function for above.
3405         * decode.scm (-build-decode-table-entry): Call it.
3406         (-opcode-slots): Add some more tracing.
3407         * arm.cpu: Disable decode-splits construct due to implementation
3408         conflict with `filter-harmlessly-ambiguous-insns'
3409
3410         * decode.scm (-population-top-few): New function for better decode
3411         bit generation.  Includes minor helper functions.
3412         (decode-get-best-bits): Call it instead.
3413         (OLDdecode-get-best-bits): Renamed previous version of above.
3414
3415
3416 2000-06-13  Ben Elliston  <bje@redhat.com>
3417
3418         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3419         for the Guile library directory.
3420         * configure: Regenerate.
3421         * Makefile.in, doc/Makefile.in: Regenerate.
3422
3423         * Makefile.in, doc/Makefile.in: Regenerate.
3424         * configure.in: Remove unnecessary tests. Move to version 1.0.
3425         * acconfig.h, config.in: Remove.
3426         * configure, aclocal.m4: Regenerate.
3427         * doc/stamp-vti, doc/version.texi: Likewise.
3428         * AUTHORS: New file.
3429
3430 2000-06-07 Ben Elliston  <bje@redhat.com>
3431
3432         * fixup.scm (symbol-bound?): Reduce debugging output.
3433
3434 2000-06-02  matthew green  <mrg@redhat.com>
3435
3436         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3437         a given instruction, replacing derived fields with their subfields.
3438         (insn-value): Use `insn-base-ifields' to find all constant values.
3439         (multi-insn-instantiate!): Comment some debug messages.
3440
3441 2000-06-01  Ben Elliston  <bje@redhat.com>
3442
3443         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3444         symbol names used in a (c-call ..) rtx.
3445
3446         * sim-test.scm (build-test-set): Return (()) for an instruction
3447         with no operands, so it too is included in the generated test set.
3448
3449 2000-05-31  Ben Elliston  <bje@redhat.com>
3450
3451         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3452         (sim-test): Likewise.
3453         * Makefile.in: Regenerate.
3454
3455 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3456
3457         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3458         stack traceback, in an order that resembles gdb's `bt'.
3459
3460 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3461
3462         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3463         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3464         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3465         multi insns.
3466         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3467         virtual functions.
3468         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3469         * iformat.scm (ifmt-expanded-ifields): Gone.
3470         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3471         work.
3472         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3473         ifmt entries.
3474
3475         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3476         code.
3477
3478 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3479
3480         * sid.scm (with-any-profile?): New function clone.
3481
3482 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3483
3484         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3485
3486 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3487
3488         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3489         (-multi-ifield-read): Parse them.
3490         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3491         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3492         (multi-ifield gen-extract): Add decode hook.
3493         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3494
3495         * insn.scm (syntax-break-out): More correctly handle \-escaped
3496         syntax characters.
3497         (syntax-make-elements): Ditto.
3498         * opc-itab.scm (compute-syntax): Ditto.
3499
3500 2000-05-17  Ben Elliston  <bje@redhat.com>
3501
3502         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3503
3504 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3505
3506         * gas-test.scm (build-test-set): Return (()) for an instruction
3507         with no operands, so it too is included in the generated test set.
3508
3509 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3510
3511         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3512         IFMT_OPERANDS and SYNTAX_BYTES.
3513
3514 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3515
3516         * sim.scm (with-any-profile?): New function.
3517         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3518         to decide whether or not to include profiling counters.
3519
3520 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3521
3522         Fuller derived-operand support for opcodes.
3523         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3524         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3525         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3526         (gen-operand-table): Omit derived- and anyof- operands from table.
3527         (gen-insn-table): Omit multi-insns from table.
3528         * iformat.scm (ifmt-expanded-fields): New function to expand
3529         subfields of derived-ifields.
3530         (ifmt-compute!): Ignore remaining multi-insns.
3531         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3532         multi-insns.
3533         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3534         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3535         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3536         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3537         (gen-switch): Omit anyof-operands.
3538         * operand.scm (-anyof-syntax): New function.
3539         (-anyof-merge-syntax): Call it.
3540         * utils.scm (collect): New idiomatic function.
3541
3542 2000-05-10  Ben Elliston  <bje@redhat.com>
3543
3544         * m68k.cpu: New file (work in progress).
3545
3546 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3547
3548         * Makefile.am (all-local): New target.  Create stamp-cgen.
3549         * Makefile.in: Regenerated.
3550         * doc/Makefile.in: Regenerated.
3551
3552 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3553
3554         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3555         (-operand-parse-setter): Ditto.
3556         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3557         for CACHE-ADDR operands.
3558         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3559         trace entries.  Widen byte-wide values for printing.
3560         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3561         Widen byte-wide values for printing.  Hexify memory addresses.
3562
3563 2000-04-23  matthew green  <mrg@redhat.com>
3564
3565         * m32r.cpu: Fix a typo.
3566
3567 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3568
3569         * ia64.cpu (define-model): Change merced to Itanium.
3570         (f-qp): Change quilifying to qualifying.
3571         (movbr_ph, movbr_pvec): Delete.
3572         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3573
3574 2000-04-07  Ben Elliston  <bje@redhat.com>
3575
3576         * doc/porting.texi (Building a simulator test suite): Clarify
3577         where generated test cases are placed.
3578
3579 2000-04-07  Ben Elliston  <bje@redhat.com>
3580
3581         * Makefile.am (gas-test): Remove dependency on `cgen'.
3582         (sim-test): Ditto.
3583         * Makefile.in: Regenerate.
3584
3585 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3586
3587         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3588         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3589         type reconfiguration.
3590         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3591         with-profile?.
3592
3593 2000-03-30  Ben Elliston  <bje@redhat.com>
3594
3595         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3596
3597 2000-03-24  Ben Elliston  <bje@redhat.com>
3598
3599         * Makefile.am (stamp-cgen): Reinstate target.
3600         * Makefile.in: Regenerate.
3601
3602 2000-03-22  Ben Elliston  <bje@redhat.com>
3603
3604         * slib/ppfile.scm: Remove; unused.
3605         * slib/defmacex.scm: Likewise.
3606
3607 2000-03-21  Ben Elliston  <bje@redhat.com>
3608
3609         * doc/internals.texi (Source file overview): Document.
3610
3611         * Makefile.am (GUILEDIR): Remove.
3612         (CGEN): Ditto. Callers use $(GUILE) instead.
3613         (GUILEFLAGS): Ditto.
3614         (CGENFILES): Ditto.
3615         (APPDESCFILES): Ditto.
3616         (OPCODESFILES): Ditto.
3617         (SIMFILES): Ditto.
3618         (pkgdata_SCRIPTS): Ditto.
3619         (stamp-cgen): Remove target.
3620         * Makefile.in: Regenerate.
3621
3622         * configure.in: Remove header and library tests.
3623         * configure: Regenerate.
3624         * config.in: Likewise.
3625
3626 2000-03-20  Ben Elliston  <bje@redhat.com>
3627
3628         * read.scm: Cease loading "hob-sup.scm".
3629         * utils.scm: Inherit the fastcall family of procedures (for now).
3630         * hob-sup.scm: Remove.
3631
3632 2000-03-20  Ben Elliston  <bje@redhat.com>
3633
3634         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3635         * configure: Regenerate.
3636         * gdbinit.in: Remove.
3637
3638 2000-03-17  Ben Elliston  <bje@redhat.com>
3639
3640         * Makefile.am (CGEN): Use guile, not cgen.
3641         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3642         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3643         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3644         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3645         (HOB_OBJS): Likewise.
3646         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3647         (CGENOBJS): Likewise.
3648         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3649         (hobbit, hobbit.o, hobbit.c): Remove targets.
3650         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3651         (CLEANFILES): Update.
3652         * acconfig.h (WITH_HOBBIT): Remove.
3653         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3654         option --with-cgen-hobbit.
3655         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3656         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3657         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3658         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3659         * Makefile.in: Regenerate.
3660         * config.in: Likewise.
3661         * aclocal.m4: Likewise.
3662         * configure: Likewise.
3663         * README (Hobbit support): Remove.
3664         * doc/internals.texi (Conventions): Do not mention Hobbit.
3665         * doc/porting.texi (Supported Guile versions): Likewise.
3666
3667 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3668
3669         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3670         callback convention to new sid sidutil::basic_cpu code.
3671         (-gen-sfrag-engine-fn): Ditto.
3672         * sid.scm (-create-virtual-insns!): Ditto.
3673         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3674         mode.
3675         (cxmake-skip): Implement properly for pbb mode.
3676
3677 2000-03-03  Ben Elliston  <bje@redhat.com>
3678
3679         * doc/internals.texi: New file.
3680
3681 2000-02-29  Ben Elliston  <bje@redhat.com>
3682
3683         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3684         * doc/porting.texi: Formatting tweaks.
3685
3686 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3687
3688         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3689         field.
3690
3691 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3692
3693         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3694         mode.
3695
3696 2000-02-23  Andrew Haley  <aph@cygnus.com>
3697
3698         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3699         instruction.
3700
3701 2000-02-24  Ben Elliston  <bje@redhat.com>
3702
3703         * doc/rtl.texi (Derived operands): Add some cindex entries.
3704
3705 2000-02-23  Ben Elliston  <bje@redhat.com>
3706
3707         * ia32.cpu (dndo): Move general purpose macro from here ..
3708         * simplify.inc (dndo): .. to here.
3709
3710 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3711
3712         * arm.cpu (h-tbit): Add c-call setter function.
3713         (h-mbits): Ditto.
3714
3715 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3716
3717         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3718         (-frag-cost-compute!): Ditto.
3719         * utils.scm (copyright-cygnus): Add Y2K.
3720         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3721
3722 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3723
3724         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3725         flags field of the CGEN_CPU_TABLE structure.
3726
3727 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3728
3729         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3730         All references updated.
3731
3732 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3733
3734         * ia32.cpu: Rewrite addressing mode support.
3735
3736         * ifield.scm (<ifield>): New member `follows'.
3737         (ifld-known-values): New proc.
3738         (<ifield>): New method set-word-offset!.
3739         (ifld-set-word-offset!): New proc.
3740         (ifld-new-word-offset): New proc.
3741         (<ifield>): New method next-word.
3742         (<multi-ifield>): New method next-word.
3743         (ifld-next-word): New proc.
3744         (ifld-precedes?): New proc.
3745         (-ifield-parse): New args word-offset,word-length,follows.
3746         All callers updated.  Handle CISC-style vs RISC-style ifields.
3747         (-ifield-read): Recognize word-offset,word-length,follows specs.
3748         (-ifld-parse-follows): New proc.
3749         (-multi-ifield-make-default-insert): New proc.
3750         (-multi-ifield-make-default-extract): New proc.
3751         (-multi-ifield-parse): Provide default values for insert,extract
3752         handlers if not specified.
3753         (<derived-ifield>): New class.
3754         (derived-ifield?): New predicate.
3755         (ifld-derived-operand?): New predicate.
3756         (f-anyof): New global.
3757         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3758         (f-derived,ifld-derived?): Delete.
3759         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3760         * insn.scm (-sub-insn-ifields): New proc.
3761         (-sub-insn-make!): New proc.
3762         (multi-insn-instantiate!): Provide initial implementation.
3763         (-insn-parse): If insn contains "anyof" operands, create a
3764         <multi-insn> object instead of a plain <insn>.
3765         (-parse-insn-format-symbol): Rewrite derived operand handling.
3766         Add anyof operand handling.
3767         (-parse-insn-format-ifield-spec): Rewrite.
3768         (-parse-insn-format-operand-spec): Delete.
3769         (-parse-insn-format-list): Delete support for `(operand value)'.
3770         (anyof-operand-format?): Replaces derived-operand-format?.
3771         * operand.scm (-operand-parse-getter): Improve error messages.
3772         (-operand-parse-setter): Ditto.
3773         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3774         ifield-assertion.
3775         (<anyof-operand>): Change baseclass from <derived-operand> to
3776         <operand>.  Delete member values.  New members base-ifield,choices.
3777         (anyof-operand?): New predicate.
3778         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3779         (-derived-operand-parse): Rewrite.
3780         (-derived-operand-read): Rewrite.
3781         (-anyof-parse-choice): New proc.
3782         (-anyof-operand-parse): Rewrite.
3783         (-anyof-operand-read,define-anyof-operand): New procs.
3784         (<anyof-value>): Rewrite.
3785         (-anyof-initial-known): New proc.
3786         (anyof-satisfies-assertions?): New proc.
3787         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3788         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3789         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3790         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3791         (-anyof-value-from-derived): New proc.
3792         (-anyof-all-choices-1,anyof-all-choices): New procs.
3793         (operand-init!): Create define-anyof-operand reader command.
3794
3795         * insn (syntax-break-out): Take syntax as argument instead of insn.
3796         All callers updated.
3797         (syntax-make): Move here, from ???.
3798
3799         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3800         bitrange-foo. All uses updated.
3801         (bitrange-next-word): New proc.
3802
3803         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3804
3805         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3806         (rtx-make-const,rtx-make-enum): New procs.
3807         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3808         (rtx-mem-addr,rtx-mem-sel): New procs.
3809         (rtx-change-address): New proc.
3810         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3811         (rtx-make-set,rtx-single-set?): New procs.
3812         (rtx-combine): New proc.
3813
3814         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
3815         (rtx-traverse-with-locals): Ditto.
3816         (-rtx-traverse,-rtx-traverse-*): Ditto.
3817
3818         * rtl.scm (define-subr): New proc.
3819         (rtl-init!): Create reader command `define-subr'.
3820
3821         * cos.c (_object_mi_p): Ensure argument is an object.
3822         (indent): New function.
3823         (_object_print_elms): Add pretty-printing support.
3824         (_object_print): Ditto.
3825
3826         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3827         (*floats-s->c-fun-table*): Ditto.
3828         * hobbit.c,hobbit.h: Rebuild.
3829         * hob-sup.c (fastcall7): New proc.
3830         * hob-sup.h (fastcall7): Declare.
3831         * hob-sup.scm (fastcall7): New macro.
3832
3833         * mach.scm (<arch>): New member subr-list.
3834         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3835         (arch-finish!): Reverse recorded subr list.
3836
3837         * read.scm (debug-env): New global.
3838         (debug-var-names,debug-var,debug-repl-env): New procs.
3839         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
3840         (debug-quit): Renamed from `continue'.
3841
3842         * simplify.inc (dsmf): New pmacro.
3843
3844         * utils.scm (plus-scan): New proc.
3845         (split-bits): Rewrite.
3846         (split-value): New proc.
3847
3848 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
3849
3850         * doc/Makefile.am (DOCFILES): Add notes.texi.
3851         * doc/Makefile.in: Rebuild.
3852
3853 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
3854
3855         * ifield.scm (ifld-derived?): New proc.
3856         (f-derived): New global.
3857         (ifield-builtin!): Create ifield f-derived.
3858         (<multi-insn>): New class.
3859         (multi-insn?): New predicate.
3860         (multi-insn-instantiate!): New proc.
3861         (-insn-parse): Create <multi-insn> objects for insns with derived
3862         ifields.
3863         (-parse-insn-format-symbol): Handle derived ifields.
3864         (-parse-insn-format-ifield-spec): New proc.
3865         (-parse-insn-format-operand-spec): New proc.
3866         (-parse-insn-format-list): Simplify.
3867         (-parse-insn-format): No longer allow (ifield-object value) spec.
3868         (derived-operand-format?): New proc.
3869         (insn-alias?): New proc.
3870         (non-alias-insns): Rewrite.
3871         (insn-real?): Renamed from real-insn?, all callers updated.
3872         (virutal-insns): Rewrite.
3873         (multi-insns): New proc.
3874         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3875         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3876         Return #f if operand doesn't have an index or if index is not an
3877         ifield.
3878         (hw-index-anyof): New proc.
3879         (-operand-parse): Allow integer indices.
3880         (<derived-operand>): New class.
3881         (derived-operand?): New predicate.
3882         (<anyof-operand>): New class.
3883         (<anyof-value>): New class.
3884         (-anyof-parse-value,-anyof-operand-parse): New procs.
3885         (-derived-operand-parse,-derived-operand-read): New procs.
3886         (define-derived-operand,define-full-derived-operand): New procs.
3887         (operand-init!): New reader command define-derived-operand.
3888
3889         * utils.scm (list-take): Handle negative amount.
3890         (element?): Rewrite.
3891
3892 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
3893
3894         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3895
3896 1999-10-04  Richard Henderson  <rth@cygnus.com>
3897
3898         * ia64.cpu: Checkpoint.
3899
3900 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
3901
3902         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3903
3904         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
3905         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
3906
3907 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
3908
3909         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3910         PC returned by sim_engine_invalid_insn.
3911
3912 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
3913
3914         * ia32.cpu: New file.
3915
3916 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
3917
3918         * utils.scm (bit-set?): Fix off by one error.
3919
3920         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3921
3922         * rtl.scm (hw): Check for valid hardware element before trying to
3923         get its mode.
3924
3925         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
3926         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3927         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3928         * thumb.cpu (*): arm_compute_operand2_foo renamed to
3929         compute_operand2_foo.
3930
3931         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3932         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3933         Call delayed_branch/branch methods instead of assigning to `vpc'.
3934         (<hw-pc>,cxmake-skip): Call skip method.
3935         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3936         (<pc>,cxmake-skip): Ditto.
3937         (-create-virtual-insns!): Ditto.
3938         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3939         (op:write): Ditto.
3940         (op:record-profile): Specify #:output-language "c++".
3941         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3942         @arch@_insn_attr.
3943         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3944         Define enums here.
3945         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3946         (gen-semantic-code): Ditto.
3947         (-gen-sem-case,-gen-sfrag-code): Ditto.
3948         (-gen-hardware-types): Delete class @cpu@_cpu_base.
3949         (cgen-cpu.h): File is now #included by main cpu class, rather than
3950         subclassing.
3951         (cgen-defs.h): New proc.
3952         (-gen-scache-semantic-fn): Change result type to sem_status.
3953         New local `status'.  Call done_cti_insn/done_insn method at end.
3954         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3955         cgen-ops.h.
3956         (cgen-sem-switch.cxx): Ditto.
3957         * sid-decode.scm (-gen-idesc-decls): Update return type of
3958         @prefix@_sem_fn.
3959         (cgen-decode.h): Add using namespace @arch@.
3960         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3961
3962         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3963         (estate-output-language-c?,estate-output-language-c++?): New procs.
3964         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3965         (estate-make-for-normal-rtl-c++): New proc.
3966         (rtl-c++-parsed,rtl-c++): New proc.
3967         (s-c-call): Invoke cpu class method if c++.
3968         (join): Use s-c-raw-call.
3969
3970         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3971         (nop): Rewrite.
3972
3973         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3974         * rtl.scm (<eval-state>): New member `modifiers'.
3975         (<eval-state>,vmake!): Handle #:modifiers.
3976         (estate-with-modifiers): New proc.
3977
3978         * rtl.scm (rtx-side-effects?): New proc.
3979         (rtx-canonical-bool): Don't change expr if it has side effects.
3980         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3981         better.
3982
3983 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
3984
3985         * sim.scm (gen-scache-type): Fix typo in last patch.
3986
3987 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
3988
3989         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3990
3991 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
3992
3993         * sid.scm (<hw-pc>,cxmake-skip): New method.
3994         (<pc>,cxmake-skip): New method.
3995
3996         * decode.scm (decode-build-table): Delete args startbit,index-list.
3997         All callers updated.
3998         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3999         All callers updated.
4000         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4001         to decode-get-best-bits.
4002         * sid-decode.scm (-gen-decode-fn): Ditto.
4003
4004         * hardware.scm (hw-bits): New proc.
4005         (-hw-parse): New arg layout.  All callers updated.
4006         (define-full-hardware): New arg layout.  All callers updated.
4007         (-hw-validate-layout): New proc.
4008         (-hw-create-[gs]etter-from-layout): New procs.
4009         (<hw-register>,parse!): Handle layout spec.
4010         * types.scm (type-bits): New proc.
4011
4012         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4013         UNARY, BINARY, TRINARY rtxs.
4014
4015         * attr.scm (<enum-attribute>,parse-value): Allow strings.
4016         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4017         Support '- as "unused spot" indicator.
4018
4019 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
4020
4021         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4022
4023 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
4024
4025         * rtx-funcs.scm (subword): Fix mode spec of `value'.
4026
4027         * rtl.scm (-rtx-traverse-operands): Fix debugging message
4028         construction.
4029         (tstate-make): New arg `depth'.  All callers updated.
4030         (tstate-depth,tstate-set-depth!): New procs.
4031         (tstate-incr-depth!,tstate-decr-depth!): New procs.
4032         (-rtx-traverse-operands): Indent debugging output by traversal depth.
4033         (-rtx-traverse): Ditto.  Keep track of traversal depth.
4034
4035 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
4036
4037         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4038         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4039         * utils-sim.scm: Decoder generator support moved here.
4040         (-decode-equiv-entries?,-decode-sort-entries): New procs.
4041         (-gen-decoder-switch): Sort entries for more fall-throughs.
4042
4043         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4044         * Makefile.in: Rebuild.
4045         * sim-test.scm (build-sim-testcase): Add logging message.
4046         * dev.scm (cload): Recognize SIM-TEST application.
4047         (load-stest): Set APPLICATION to SIM-TEST.
4048
4049         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4050
4051         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4052         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4053         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4054
4055         * insn.scm (syntax-break-out): Handle ${foo}.
4056
4057 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
4058
4059         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4060         (bin_PROGRAMS): Define.
4061         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4062         (cgen-hob.c): Prepend $(srcdir)/ here.
4063         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4064         (libcpu_a_SOURCES): Delete.
4065         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4066         (CGEN_HOB_OBJ,CGENOBJS): New variables.
4067         * configure.in (LIBS): Replace -Wl,-rpath with -R.
4068         Add AC_CHECK_LIB(guile,main).
4069         * Makefile.in: Rebuild.
4070         * doc/Makefile.in: Rebuild.
4071         * aclocal.m4: Rebuild.
4072         * config.in: Rebuild.
4073         * configure: Rebuild.
4074
4075 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4076
4077         Rename rtx functions from name: to name, accept optional leading
4078         modifier and mode.
4079         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4080         * attr.scm (-attr-eval): Update.
4081         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4082         (<hw-register>,mode-ok?): Disallow VOID.
4083         (<hw-immediate>,mode-ok?): Disallow VOID.
4084         (<hw-address>,mode-ok?): Disallow VOID.
4085         * mode.scm (mode-name?): New proc.
4086         (VOID): Renamed from VM.
4087         (DFLT): Renamed from DM.
4088         (mode-builtin!): Update.
4089         * opcodes.scm (<ifield>,gen-insert): Update.
4090         (<ifield>,gen-extract): Update.
4091         (<multi-ifield>,gen-insert,gen-extract): Update.
4092         * operand.scm (op:mode): Update.
4093         (<pc>,make!): Update.
4094         (op:new-mode): Update.
4095         (-operand-read): Update.
4096         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4097         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4098         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4099         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4100         (rtx-make): Call -rtx-munge-mode&options.
4101         (rtx accessors): Rewrite.
4102         (rtx-pretty-name): Update.
4103         (-rtx-traverse-*): Update.
4104         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4105         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4106         (-rtx-make-traverse-table): Update.
4107         (-rtx-traverse-operands): Update.
4108         (-rtx-option?,-rtx-option-list?): New procs.
4109         (-rtx-munge-mode&options): New proc.
4110         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4111         (-rtx-traverse): Update.
4112         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4113         (rtx-compile-time-constant?): Update.
4114         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4115         (rtx-value): Update.
4116         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4117         * rtx-funcs.scm (*): Update.
4118         * rtl-c.scm (rtl-c-get): Update.
4119         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4120         (s-c-call,s-c-raw-call): Update.
4121         (s-boolifop,s-convop,s-if,s-cond): Update.
4122         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4123         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4124         (s-parallel,s-sequence): Update.
4125         (rtl-c-build-table): Update.
4126         * sem-frags.scm (-frag-hash-compute!): Update.
4127         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4128         for temporary bug compatibility with previous version.
4129         (-frag-expr-locals,-frag-expr-stmts): Update.
4130         (-frag-compute-desired-frags,-frag-pick-best): Update.
4131         * semantics.scm (-simplify-expr-fn): Update.
4132         (rtx-simplify): Update.
4133         (-rtx-ref-type): Update.  Account for modifiers.
4134         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4135         (-build-ifield-operand!): Update.
4136         (-build-known-values): Update.
4137         (semantic-compile): Update.
4138         (-gen-reg-access-defns): Update.
4139         (gen-semantic-code,-gen-sem-case): Update.
4140         (-gen-sfrag-code,-gen-sfrag-case): Update.
4141         * sim-cpu (gen-semantic-code): Update.
4142         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4143         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4144         (-hw-cxmake-get): Update.
4145         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4146         (<hw-index>,cxmake-get): Update.
4147         (<operand>,gen-type,gen-read,cxmake-get): Update.
4148         (<operand>,gen-set-quiet,gen-set-trace): Update.
4149         (<pc>,cxmake-get): Update.
4150         (sim-finish!): Update.
4151         * utils-gen.scm (-gen-ifld-extract-base): Update.
4152         (-gen-ifld-extract-beyond): Update.
4153         (gen-multi-ifld-extract): Update.
4154         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4155         * sid.scm (<hw-pc>,gen-write): Update.
4156         (-gen-decode-insn-globals): Update.
4157         (-hw-cxmake-get): Update.
4158         (<hw-register>,cxmake-get-raw): Update.
4159         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4160         (<hw-index>,cxmake-get): Update.
4161         (<operand>,gen-type,gen-read,cxmake-get): Update.
4162         (<operand>,gen-set-quiet,gen-set-trace): Update.
4163         (<pc>,cxmake-get): Update.
4164         (-create-virtual-insns!): Update.
4165         (-decode-split-build-assertion): Update.
4166         * *.cpu: Update.
4167         * simplify.inc: Update.
4168
4169 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4170
4171         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4172         Prefix queue function name with sim_ instead of @cpu@_.
4173
4174         * sim.scm (-with-parallel-only?): New global.
4175         (option-init!): Initialize it.
4176         (option-set!): Set it.
4177         (with-parallel-only?): New proc.
4178         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4179         and writeback markers if with-parallel-only.
4180         (-gen-idesc-init-fn): Update.
4181         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4182         with-generic-write.
4183
4184 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4185
4186         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4187         with the invalid insn handler.
4188
4189         * utils.scm (list-maybe-ref): New proc.
4190
4191         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4192         define-arch.
4193         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4194
4195         * i960.cpu (test*-*): Delete `expr' arg.
4196         (test-op,branch-op): Update.
4197
4198 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4199
4200         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4201         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4202         updated.
4203         (gen-reg-access-defn): Ditto.
4204         (-gen-hw-addr): Rewrite.
4205         (-op-gen-queued-write): Rewrite.
4206         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4207         (-gen-scache-semantic-fn): Handle with-generic-write.
4208         (-gen-no-scache-semantic-fn): Ditto.
4209
4210 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4211
4212         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4213
4214         * sim.scm (-with-generic-write?): New global.
4215         (option-init!): Initialize it.
4216         (option-set!): Set it.
4217         (with-generic-write?): New proc.
4218         (-gen-hw-addr): New proc.
4219         (-op-gen-queued-write): New proc.
4220         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4221
4222         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4223         turned off.
4224         (-gen-sem-switch): Preserve existing with-parallel? value.
4225         (-gen-sem-parallel-switch): Ditto.
4226         (-gen-write-case): Add /indent support.
4227         (cgen-write.c): Rewrite.
4228
4229         * utils.scm (-current-print-state): New global.
4230         (make-print-state): New proc.
4231         (pstate-indent,pstate-set-indent!): New procs.
4232         (pstate-cmd?,pstate-cmd-do): New procs.
4233         (/indent): New global.
4234         (/indent-set,/indent-add): New procs.
4235         (string-write): Set -current-print-state.
4236         (-string-write): New arg pstate, all callers updated.
4237         Handle print-state commands.
4238         (-string-list-flatten): New proc.
4239         (string-list->string): Use it.
4240
4241         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4242         (-gen-sem-fn-table-entry): New proc.
4243         (-gen-semantic-fn-table): New proc.
4244         (-gen-scache-semantic-fn): Make fn static.
4245         (-gen-no-scache-semantic-fn): Ditto.
4246         (cgen-semantics.c): Define macro SEM_FN_NAME.
4247         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4248         FAST,FULL.  Update @cpu@_insn_sem contents.
4249         (-gen-semf-fn-name): Delete.
4250         (-gen-sem-fn-decls): Delete.
4251         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4252         @cpu@_semf_init_idesc_table.
4253         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4254         handlers here.
4255         (cgen-decode.h): Print sfmt enum.
4256         * sid-decode.scm (-gen-semf-fn-name): Delete.
4257         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4258
4259         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4260         (ifmt-compute!): Ditto.
4261         * sim-decode.scm (-gen-decoder-switch): Ditto.
4262         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4263         (-gen-decoder-switch): Ditto.
4264
4265         * insn.scm (insn-virtual?): New proc.
4266
4267         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4268         convert to string.
4269         * mach.scm (<arch>): attr-list is now a pair of lists.
4270         (current-attr-list): Rewrite.
4271         (current-attr-add!,current-attr-lookup): Rewrite.
4272         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4273
4274 1999-08-06  Richard Henderson  <rth@cygnus.com>
4275
4276         * ia64.cpu: Initial checkpoint.
4277
4278 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4279
4280         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4281         (pmacros-init!): Update .apply help string.
4282
4283 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4284
4285         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4286         (<hw-pc>,cxmake-skip): New method.
4287         (<pc>,cxmake-skip): New method.
4288         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4289         (gen-argbuf-type): New member `skip_count'.
4290         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4291         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4292
4293         * utils-sim.scm: New file.
4294         * dev.scm (load-sim): Load it.
4295         (load-sid): Load it.
4296         * cgen-sid.scm: Load it.
4297         * cgen-sim.scm: Load it.
4298         * iformat.scm (<sformat>): New member sbuf, not initialized by
4299         default make.
4300         * rtx-funcs.scm (skip): Rewrite.
4301         * rtl-c.scm (skip): Rewrite.
4302         * m32r.cpu (sc,snc): Update `skip' usage.
4303         * mode.scm (mode-real-mode): New proc.
4304         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4305         Distinguish fragments by the <sformat-abuf> they use.
4306         * sim.scm (gen-profile-index-type): Delete.
4307         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4308         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4309         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4310         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4311         (-gen-argbuf-elm): Rewrite.
4312         (-gen-argbuf-hw-elm): Delete.
4313         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4314         of each sfmt.
4315         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4316         (sim-init!): Initialize them.
4317         (sim-analyze-insns!): Set them.
4318         (current-sbuf-list): New proc.
4319         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4320         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4321         * sim-model.scm (-gen-model-insn-fn): Ditto.
4322         * sim-decode.scm (-gen-extract-decls): Delete.
4323         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4324         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4325         sim.scm.
4326         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4327         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4328         (-gen-op-extract,-gen-op-trace-extract): New procs.
4329         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4330         gen-sfmt-argvars-foo and rewrite.
4331         (-gen-record-args): Rewrite.
4332         (-gen-extract-case): Tweak.
4333         * sid.scm (gen-profile-index-type): Delete.
4334         (ifield argbuf support): Move to utils-sim.scm.
4335         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4336         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4337         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4338         (-sim-sformat-argbuf-list): New global.
4339         (sim-init!): Initialize it.
4340         (sim-analyze-insns!): Set it.
4341         (current-sbuf-list): New proc.
4342         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4343         (-gen-argbuf-hw-elm): Delete.
4344         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4345         of each sfmt.
4346         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4347         (-gen-extract-decls): Delete.
4348         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4349         sid.scm.
4350         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4351         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4352         (-gen-op-extract,-gen-op-trace-extract): New procs.
4353         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4354         gen-sfmt-argvars-foo and rewrite.
4355         (-gen-record-args): Rewrite.
4356         (-gen-extract-case): Tweak.
4357
4358         * cgen-gh.c (gh_putc,gh_puts): New functions.
4359         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4360         * cos.c (_object_print_elms,_object_print): Use them.
4361         * hob-sup.c (fastcall_print): Use them.
4362         * configure.in: Check for scm_gen_puts, scm_puts.
4363         * config.in: Rebuild.
4364         * configure: Rebuild.
4365         * aclocal.m4: Rebuild.
4366         * Makefile.in: Rebuild.
4367
4368         * dev.scm (load-opc): Use load instead of maybe-load.
4369         (load-gtest,load-sim,load-stest): Ditto.
4370         (load-sid): Ditto.
4371
4372 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4373
4374         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4375         up to avoid g++ 'goto crosses initialization' warning.
4376         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4377         (-gen-sfrag-case): Update use of NEXT_FRAG.
4378
4379 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4380
4381         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4382
4383         * read.scm: Load sem-frags.scm.
4384         * sem-frags.scm (*): Lots rewritten.
4385         * sid.scm (-with-sem-frags?): New global
4386         (with-sem-frags?): New proc.
4387         (option-init!): Initialize -with-sem-frags?.
4388         (option-set!): Recognize with-sem-frags.
4389         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4390         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4391         if asked to.
4392         (-gen-sfrag-engine-decls): New proc.
4393         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4394         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4395         (-gen-sfrag-engine): New proc.
4396         (-gen-sem-case): Emit setup-semantics if specified.
4397         (-gen-sem-switch-engine): Update init/use of computed goto label.
4398         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4399         from local vars.
4400         (-gen-idesc-decls): Replace sem_address with cgoto.
4401         (-gen-scache-decls): Rewrite definition of `execute' member.
4402         * arm.cpu (arm isa): Enable decode-splits.
4403         * arm7.cpu (multiply insns): Rename result to mul-result.
4404
4405         Rename decode-specialize to decode-split.
4406         * decode.scm (*): Update.
4407         * insn.scm (*): Update.
4408         * mach.scm (*): Update.
4409         * sid.scm (*): Update.
4410
4411 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4412
4413         Record objects as a smob.
4414         * cos.c (scm_tc16_object): New static global.
4415         (cos_init): Initialize it.
4416         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4417         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4418         (_object_tag): Delete.
4419         (_object_make_smob): New function.
4420         (_object_make_x,_object_make_with_values_x): Rewrite.
4421         (_object_elements,_object_class_desc): Rewrite.
4422         (_object_copy,object_p): Rewrite.
4423         (_object_specialize): Rewrite.
4424         (_object_print_elms,_object_print): New functions.
4425         (object_smob): New static global.
4426         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4427
4428         * cos.c (_make_x_symbol): New static global.
4429         (object_make): Use it.
4430         (cos_init): Initialize it.
4431
4432 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4433
4434         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4435         instead to determine whether to use FLD macro.
4436         (<rtl-c-eval-state>): New member ifield-var?.
4437         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4438         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4439         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4440
4441         * rtl.scm (rtx-sequence-assq-locals): New proc.
4442
4443         * cos.scm (-object-error): Don't crash on non-objects.
4444
4445         * Makefile.am (CLEANFILES): Add hobbit.
4446         * Makefile.in: Rebuild.
4447
4448         * rtl-c.scm (s-c-call): Delete unnecessary code.
4449
4450 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4451
4452         * rtl-c.scm (ifield): Always reference value via `FLD'.
4453
4454         * cos.c (elm_bound_p): Return problem SCM boolean values.
4455
4456         * utils-cgen.scm (display-argv): New proc.
4457         * cgen-opc.scm (cgen): Call it.
4458         * cgen-sim.scm (cgen): Ditto.
4459         * cgen-gas.scm (cgen): Ditto.
4460         * cgen-stest.scm (cgen): Ditto.
4461         * cgen-sid.scm (cgen): Ditto.
4462
4463 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4464
4465         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4466         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4467         (-gen-extract-switch): Initialize result to 1.
4468         * opcodes.scm (gen-ifield-default-type): New proc.
4469         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4470         updated.
4471         (<hw-index>,gen-insert): Handle non-ifield indices.
4472         (<hw-index>,gen-extract): Ditto.
4473         (<hw-asm>,gen-parse): Ditto.
4474         (<hw-asm>,gen-print): Ditto.
4475         (<keyword>,gen-parse): Ditto.
4476         (<keyword>,gen-print): Ditto.
4477         (<operand>,gen-fget): Ditto.
4478         (<operand>,gen-fset): Ditto.
4479
4480         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4481         (-gen-hw-index): Ditto.
4482         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4483         (-gen-hw-index): Ditto.
4484
4485         * sem-frags.scm: New file.
4486
4487         * attr.scm (attr-parse): Add better checking of input.
4488
4489         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4490         All uses updated.
4491         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4492
4493         * ifield.scm (ifld-nil?): New proc.
4494
4495         * operand.scm (<operand>): New members getter,setter.
4496         (<operand>,make!): New args getter,setter.  All uses updated.
4497         (op:getter,op:setter): New procs.
4498         (<hw-index>,field-start): Return 0 for non-ifield indices.
4499         (<hw-index>,field-length): Return 0 for non-ifield indices.
4500         (-operand-parse-getter,-operand-parse-setter): New procs.
4501         (-operand-parse): New args getter,setter.  All callers updated.
4502         Always use hw-index-scalar for scalar operands.
4503         (-operand-read): Handle getter,setter.
4504         (define-full-operand): New args getter,setter.  All uses updated.
4505         * semantics.scm (-build-ifield-operand!): Update.
4506         (-build-index-of-operand!): Update.
4507         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4508         * simplify.inc (define-normal-operand): Update.
4509
4510         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4511         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4512         (s-binop,s-cmpop,s-convop): Ditto.
4513         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4514         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4515         (fcc-tests): New insn-enum.
4516         (fcc-value): Rename from fcc-type.
4517         * sparcfpu.cpu: New file.  All fp support moved here.
4518
4519         * rtl.scm (<rtx-func>): New member class.
4520         (rtx-class-*?): New procs.
4521         (def-rtx-node): New arg class.  All callers updated.
4522         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4523         * rtx-funcs.scm (*): Specify class.
4524
4525         * utils-cgen.scm (context-make-reader): New proc.
4526
4527         * utils.scm (assert-fail-msg): New variable.
4528         (assert): Use it.
4529         (list-drop,list-tail-drop): New procs.
4530
4531 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4532
4533         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4534         CGEN_MIN_INSN_SIZE deleted on March 22.
4535
4536         * ifield.scm (<ifield>,needed-iflds): New method.
4537         (<multi-ifield>,needed-iflds): New method.
4538         (ifld-needed-iflds): New proc.
4539         (multi-ifield?): New proc.
4540         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4541         (-sfmt-search-key): Include insn length in key.
4542         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4543         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4544         (-ifmt-lookup-ifmt!): Compute key here.
4545         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4546         All callers updated.
4547         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4548         All callers updated.
4549         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4550         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4551         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4552         to ifmt-build.
4553         * operand.scm (op-iflds-used): New proc.
4554         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4555         and sim-cpu.scm.
4556         And from sid.scm,sid-cpu.scm as well.
4557         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4558         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4559         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4560         (gen-extracted-ifld-value): Ditto.
4561         (-extract-chunk-specs): Ditto.
4562         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4563         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4564         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4565         (-extract-insert-subfields): New function.
4566         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4567         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4568         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4569         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4570         gen-extract-foo.
4571         (-gen-no-scache-semantic-fn): Ditto.
4572         (-gen-sem-case): Ditto.
4573         (-gen-read-case): Update calls to gen-define-ifields,
4574         gen-extract-ifields.
4575         * sim-decode.scm (-gen-record-args): Update.
4576         (-gen-sfmt-argvars-assigns): Update.
4577         (-gen-extract-case): Update.
4578         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4579         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4580         gen-extract-foo.
4581         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4582         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4583         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4584         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4585         gen-define-ifields, gen-extract-ifields.
4586         (-gen-record-args): Update.
4587         (gen-sfmt-argvars-assigns): Update.
4588         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4589         with gen-define-ifields.  Ditto for gen-extract-foo.
4590         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4591         procs rather than method calls.
4592
4593 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4594
4595         * sid.scm (-create-virtual-insns!): New local `context', pass it
4596         to insn-read.
4597
4598         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4599         (operand name) not (operand object), (local name) not (local object).
4600         (rtx-traverse-with-locals): New proc.
4601         (-compile-expr-fn): New proc.
4602         (rtx-compile): Rewrite.
4603         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4604         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4605         (rtl-c-set-trace): Ditto.
4606         (operand define-fn): Recognize operand name argument.
4607         (local define-fn): Recognize sequence temp name argument.
4608         * rtx-funcs.scm (operand): Argument is operand name, not object,
4609         so call current-op-lookup.
4610         (local): Similarily, so call rtx-temp-lookup.
4611
4612         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4613         (rtx-operand?): Ditto.
4614         (rtx-pretty-name): Ditto.
4615         (rtx-local-obj): Flag symbol argument as an error.
4616         (rtx-local-name): New proc.
4617         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4618
4619         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4620
4621         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4622         updated.
4623
4624         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4625         (and: QI rd #xff).
4626
4627         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4628         (*floats-s->c-fun-table*): Ditto.
4629         * hobbit.c,hobbit.h: Rebuild.
4630         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4631         * semantics.scm (rtx-simplify): Use /fastcall-make.
4632
4633         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4634
4635         * insn.scm (<insn>): Delete members condition, compiled-condition.
4636         (<insn>,make!): Update
4637         (<insn> getters,setters): Update.
4638         (-insn-parse,insn-read,define-full-insn): Update.
4639         * minsn.scm (minsn-make-alias): Update.
4640         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4641         (ifmt-compute!): Ditto.
4642         * sim.scm (sim-finish!): Update.
4643         * simplify.inc: (define-normal-insn): Update.
4644         * sid-cpu.scm (gen-semantic-code): Update.
4645
4646         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4647         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4648         (ifmt-compute!): Ditto.
4649
4650 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4651
4652         * minsn.scm (minsn-compute-iflds): Print better error message for
4653         missing ifields.
4654
4655 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4656
4657         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4658
4659         * Makefile.am (HOBFLAGS): New variable.
4660         (cgen-hob.c): Use it.
4661         (hobbit.c): Use it.
4662         (libcpu_a_SOURCES): Add hob-sup.c.
4663         (hob-sup.o): New rule.
4664         * Makefile.in: Rebuild.
4665         * cgen.c: #include hob-sup.h.
4666         (cgen_init_c): Call hobbit_init_support.
4667         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4668         (*special-scm->c-functions*): Add them.
4669         (display-c-expression): Handle *c-symbol*.
4670         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4671         (*floats-s->c-fun-table*): Ditto.
4672         (normalize): Recognize /fastcall-make.
4673         (normalize-fastcall-make): New proc.
4674         * hobbit.c,hobbit.h: Rebuild.
4675         * hob-sup.scm: New file.
4676         * hob-sup.c: New file.
4677         * hob-sup.h: New file.
4678         * read.scm: Load hob-sup.scm.
4679         * rtl.scm (-rtx-name-list): New variable.
4680         (rtx-name-list): New proc.
4681         (rtx-lookup): Try symbol first.
4682         (def-rtx-node): Add name to -rtx-name-list.
4683         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4684         (-rtx-traverse-anymode): New proc.
4685         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4686         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4687         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4688         (-rtx-traverse-{symornum,object}): New procs.
4689         (-rtx-make-traverse-table): Rewrite.
4690         (-rtx-traverse-operands): Rewrite arg-types handling.
4691         Handle #f result of traverser.
4692         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4693         Move debug handling here.
4694         (-rtx-traverse-debug): Delete.
4695         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4696         for each rtx.
4697         * semantics.scm (semantic-compile:process-expr!): Fix call to
4698         -rtx-traverse.
4699         * utils.scm (map1-improper): New proc.
4700
4701 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4702
4703         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4704         (h-mbits): Ditto.
4705         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4706         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4707         (<operand>,cxmake-get): Tweak.
4708         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4709
4710 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4711
4712         * thumb.cpu (dnti): Delete timing spec.
4713         (all insn): Update.
4714
4715         * arm.cpu (arm isa): New fields condition, setup-semantics.
4716         (thumb isa): New field setup-semantics.
4717         (h-gr): Add attribute CACHE-ADDR.
4718         * arm7.cpu (dnai): Delete condition.
4719         (eval-cond): Delete.
4720
4721         * mach.scm (<isa>): New member setup-semantics.
4722         (-isa-parse-setup-semantics): New proc.
4723         (-isa-parse): New arg setup-semantics.
4724         (-isa-read): Recognize setup-semantics.
4725
4726         * sid-cpu.scm (gen-extract-fields): Split into two:
4727         gen-extract-ifields, gen-extract-ifmt-ifields.
4728         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4729         tracing begin/end messages (done by caller now).
4730         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4731         tracing begin/end messages (done by x-before,x-after virtual insns).
4732         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4733         end so don't have to look it up again next time.
4734         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4735         (-decode-expr-ifield-tracking-key): New proc.
4736         (-decode-expr-ifield-tracking): New proc.
4737         (-decode-expr-ifield-values-used): New proc.
4738         (-decode-expr-ifield-mark-used!): New proc.
4739         (-gen-decode-expr-set-itype): New proc.
4740         (-gen-decode-expr-entry): Rewrite.
4741         (-gen-decode-table-entry): New proc.
4742         (-gen-decoder-switch): Use it.
4743         (-gen-virtual-insn-finder): New proc.
4744         (-gen-argbuf-elm): Move here from sid.scm.
4745         (-gen-argbuf-hw-elm): Ditto.
4746         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4747         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4748         conditional-execution isas.
4749         (-gen-decode-fn): Record conditional-exec ifield.
4750         * sid.scm (-current-pbb-engine?): New global.
4751         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4752         (<ifield>,gen-ifld-extract): New arg `indent'.
4753         (<multi-ifield>,gen-ifld-extract): Ditto.
4754         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4755         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4756         (-gen-arch-model-decls): Only scan real insns.
4757         (scache-engine-insns,pbb-engine-insns): New procs.
4758         (-create-virtual-insns!): New proc.
4759         (sim-finish!): Call it.
4760         (-decode-specialize-insn?): New proc.
4761         (-decode-specialize-build-assertion): New proc.
4762         (-decode-specialize-insn-1): New proc.
4763         (-decode-specialize-insn): New proc.
4764         (-fill-sim-insn-list!): New proc.
4765         (sim-analyze!): Create copies of insns to be specialized.
4766         * utils-cgen.scm (obj-set-name!): New proc.
4767
4768         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4769         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4770         semantic-attrs.
4771         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4772         sformats.
4773         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4774         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4775         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4776         (attr): Rewrite test for insn owner.
4777         (member): New rtx function.
4778         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4779         as separate function.
4780         (rtx-ifield?,rtx-ifield-name): New procs.
4781         (rtx-operand-obj): Rewrite.
4782         (rtx-operand-name): New proc.
4783         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4784         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4785         (tstate-make): New args owner, known.  All callers updated.
4786         (tstate-known-lookup): New proc.
4787         (rtx-traverse): New arg owner.  All callers updated.
4788         (rtx-make-bool): New proc.
4789         (rtl-find-ifields): Rewrite.
4790         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4791         * semantics.scm: ... here.
4792         (rtx-const-equal,rtx-const-list-equal): New procs.
4793         (-build-known-values): New proc.
4794         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4795         (semantic-attrs): Ditto.
4796         * rtx-funcs.scm (member,number-list): New rtx functions.
4797
4798         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4799         Rewrite.  Delete arg `all-attrs'. All callers updated.
4800         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4801         updated.
4802         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4803
4804         * decode.scm (subdtable-add): Handle `expr' entries.
4805         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4806         (exprtable-entry-*): Update.
4807         (exprtable-entry-iflds): New proc.
4808         (exprentry-cost): New proc.
4809         (exprtable-sort,-gen-exprtable-name): New procs.
4810         (exprtable-make): New arg `name'.  All callers updated.  use vector.
4811         (exprtable-*): Update.
4812         (-build-decode-table-entry): Don't issue collision warning if all are
4813         specialized insns.  Sort exprtable entries before building table.
4814
4815         * read.scm (-reader-process-expanded-1): Move pretty printing of
4816         input to logging level 4.
4817
4818         * utils.scm (string-list->string): New proc.
4819
4820         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4821         semantics.
4822         (insn-read): Delete leading '-' in name.  All callers updated.
4823         (real-insn?): New proc.
4824         (real-insns): Rewrite.
4825         (insn-has-ifield?): New proc.
4826         (insn-builtin!): Create insn attribute SPECIALIZED.
4827
4828         * mach.scm (<arch>): Delete member app-data.
4829         (current-raw-insn-list): New proc.
4830         (insn-list-car,insn-list-splice!): New procs.
4831         (<decode-specialize>): New class.
4832         (-isa-parse-decode-specialize): New proc.
4833         (-isa-parse-decode-specializes): New proc.
4834         (<isa>): New members `condition', `decode-specializes'.
4835         (-isa-parse-condition): New proc.
4836         (-isa-parse): New args condition, decode-specializes.
4837         (-isa-read): Recognize condition, decode-specializes.
4838         (-isa-add-decode-specialize!): New proc.
4839         (modify-isa): New proc.
4840         (isa-conditional-exec?,state-conditional-exec?): New procs.
4841         (arch-init!): New reader command `modify-isa'.
4842
4843         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4844         (mode-signed,mode-unsigned?): New procs.
4845
4846 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
4847
4848         * types.scm (<array>): New method get-shape.
4849         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4850         onto type.
4851         (hw-shape,hw-num-elms): New procs.
4852         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4853         if there's more than 255 registers.
4854         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4855
4856         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4857         with get/set specs.
4858
4859 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
4860
4861         * cgen-sid.scm (sim-arguments): Add -X.
4862         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4863         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4864         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
4865         Simplify by supporting pbb engine only.
4866         (-gen-sem-switch-init): New proc.
4867         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4868         (cgen-sem-switch.cxx): New proc.
4869         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4870         with with-pbb?.  Support dual scache/pbb engines.
4871         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4872         Support dual scache/pbb engines.
4873         (cgen-decode.h): Generate semantic fn decls if with-scache?.
4874         * sid.scm (*) with-pbb? replaces with-sem-switch?.
4875         (sim-finish!): Create pbb support virtual insns if with-pbb?.
4876
4877 1999-05-10  Ben Elliston  <bje@cygnus.com>
4878
4879         * arm7.cpu: Remove coprocessor related fields, operands and insn
4880         definitions for now. Take the undefined instruction trap instead.
4881         (ldmda-wb): New instruction.
4882         (ldmib-wb): Likewise.
4883         (ldmdb-wb): Likewise.
4884         (stmdb-wb): Likewise.
4885         (stmib-wb): Likewise.
4886         (stmda-wb): Likewise.
4887
4888 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
4889
4890         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4891         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4892
4893         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4894         hobbit can't handle optional third arg.
4895
4896 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
4897
4898         * arm.cpu (h-tbit): Delete set spec.
4899         (h-mbits): Don't call arm_mbits_set in set spec.
4900         * arm.sim: New file.
4901         * hardware.scm (modify-hardware): New proc.
4902         (hardware-init!): Add modify-hardware command.
4903         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4904         (-hw-gen-set-quiet): Ditto.
4905         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
4906         hardware attribute.  Load $arch.sim file if present.
4907         * utils-cgen.scm (keyword-list?): New proc.
4908         (keyword-list->arg-list,arg-list-validate-name): New procs.
4909         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4910
4911         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4912
4913         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4914         @cpu@_cpu_cgen.
4915
4916         * attr.scm (obj-prepend-atlist!): New proc.
4917
4918         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4919
4920         * sid.scm (<operand>,profilable?): Use op:type.
4921         * sim.scm (<operand>,profilable?): Use op:type.
4922
4923 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
4924
4925         * utils.scm (find-index,find): Be more stack friendly.
4926
4927         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4928         (bic-imm): Ditto.
4929
4930 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
4931
4932         * arm.cpu (h-gr-usr): New hardware element.
4933         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4934         (arm-mode): New keyword.
4935         (h-mbits): Add set spec.
4936         (h-spsr): Implement get/set specs.
4937
4938         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4939         (-reader-process-expanded-1): Pretty print logging output.
4940
4941         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4942         (cgen-cpu.h): Print enums before hardware elements.
4943         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4944         * sid-decode.scm (cgen-decode.cxx): Ditto.
4945         * sid-model.scm (cgen-model.cxx): Ditto.
4946
4947         * utils-cgen.scm (context-error): Accept variable number of
4948         trailing args.
4949
4950         * rtx-funcs.scm (error:): New rtx function.
4951         * rtl-c.scm (s-case-vm): New proc.
4952         (-gen-non-vm-case-get,s-case-non-vm): New procs.
4953         (s-case): Simplify, handle non-VM result.
4954         (error:): New rtx function.
4955
4956 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
4957
4958         * arm.cpu (h-pc): Add set spec to zero bottom bits.
4959         (test-hi,test-ls): Fix cbit handling.
4960         (shift-type,h-operand2-shifttype): Move here ...
4961         * arm7.cpu: ... from here.
4962         (set-cond,set-cond-maybe,dnix): Delete, unused.
4963         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4964         * arm.cpu: ... to here.
4965         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4966         (alu-cmn): Use set-add-flags.
4967         (alu-tst): Use set-zn-flags.
4968         (alu-cmp): Use set-sub-flags.
4969         (lsl,lsr,asr): Set condition codes.
4970         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4971         (alu-op): Split into three: alu-logical-op,alu-arith-op,
4972         alu-shift-op.
4973         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4974         All callers updated.
4975         (sub-sp): Rename from add-sp-neg.
4976         (f-lbwl-offset): Delete.
4977         (f-lbwl-hi,f-lbwl-lo): New ifields.
4978         (lbwl-hi,lbwl-lo): Update.
4979         (bl-hi): Add 4 to pc.
4980         (push-reg,pop-reg): Simplify.
4981         (push,push-lr): Push registers in correct order.
4982         (pop,pop-pc): Pop registers in correct order.
4983         (save-reg-inc,load-reg-inc): Simplify.
4984         (ldmia): Save registers in correct order.
4985
4986 1999-04-30  Ben Elliston  <bje@cygnus.com>
4987
4988         * arm7.cpu (f-op-hdt): Remove; unused.
4989         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4990         (f-ror-imm8): New multi-ifield.
4991         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4992         callers updated.
4993         (f-uimm12): New field.
4994         (ror-imm8): New operand.
4995         (uimm12): Likewise.
4996         (hdt-offset8): Reinstate operand.
4997         (offset4-hi,offset4-lo): Remove.
4998         (set-cond): Remove macro; unused.
4999         (set-cond-maybe): Likewise.
5000         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5001         (store-word/byte): Likewise.
5002         (load-halfword): Use hdt-offset8 multifield operand instead of two
5003         4-bit operands that are explicitly combined by semantic code.
5004         (do-halfword-store): Bug fix. Set address when not preindexing.
5005         (store-halfword): Also use hdt-offset8 operand.
5006         (arith-op): Avoid clobbering source registers when one of them is
5007         the destination register.
5008         (arith-imm-op): Likewise.
5009         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5010         (teq-imm): Likewise.
5011         (ldm-p): Rename to ldmdb.
5012         (stm-pw): Rename to stmdb-wb.
5013         (multi-action): New macro; test reg-list bits and execute a
5014         semantic fn if the bit is set.
5015         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5016         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5017         (all insns): Use dnai entries for simplicity rather than dni.
5018         (*): Use short-form of (const ..).
5019
5020 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
5021
5022         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
5023         member eval to evaluator.
5024         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
5025         (tstate-make): Delete arg op-fn.  All callers updated.
5026         (tstate-op-fn,tstate-set-op-fn!): Delete.
5027         (rtx-traverse): Delete op-fn arg.  All callers updated.
5028         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5029         split out of -simplify-for-compilation.
5030
5031         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5032         (cgen_DEPENDENCIES): Add stamp-cgen.
5033         (stamp-cgen): New rule.
5034         * Makefile.in: Rebuild.
5035
5036         * rtl-c.scm (enum:): Define emitter for.
5037         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5038         enums as well.
5039         (rtx-constant-value,rtx-enum-value): New procs.
5040         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5041         (rtx-compile-time-constant?): Return #t for enums.
5042         (rtx-true?,rtx-false?): Handle enums.
5043         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5044         building result by hand.
5045         (rtx-simplify-eq-attr-insn): Ditto.
5046         * rtx-funcs.scm (enum:,enum): New rtx functions.
5047
5048         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5049         aliases-analyzed?.
5050         (arch-analyze-insns!): New proc.
5051         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5052         of calling ifmt-compute! directly.
5053         * sid.scm (-sim-insns-analyzed?): Delete.
5054         (sim-analyze!): Call arch-analyze-insns! instead of calling
5055         ifmt-compute! directly.
5056         * sim.scm (-sim-insns-analyzed?): Delete.
5057         (sim-analyze!): Call arch-analyze-insns! instead of calling
5058         ifmt-compute! directly.
5059
5060         * utils.scm (string-take-with-filler): New proc.
5061         (string-take): Use it.
5062
5063         * pgmr-tools.scm: New file.
5064         * read.scm: Load it.
5065         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5066
5067         * insn.scm (insn-base-mask): Renamed from insn:mask.
5068         All callers updated.
5069         (insn-base-mask-length): Renamed from insn:mask-length.
5070         All callers updated.
5071         (insn-foo): Renamed from insn:foo.  All callers updated.
5072         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5073         * iformat.scm (compute-insn-base-mask-length): Renamed from
5074         compute-insn-mask-length.  All callers updated.
5075         (compute-insn-base-mask): Renamed from compute-insn-mask.
5076         All callers updated.
5077
5078         * enum.scm (-enum-parse-prefix): New proc.
5079         (<enum>,make!): Don't parse enum values here.
5080         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5081         (define-full-insn-enum): Ditto.
5082         (enum-vals-upcase): New proc.
5083         * hardware.scm (define-keyword): Make enum prefix uppercase.
5084         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5085
5086         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5087         (<ifield>,field-extract): New method.
5088         (<multi-ifield>,field-extract): New method.
5089         (ifld-extract): New proc.
5090         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5091         (ifld-extract-fn-name): Renamed from ifld-extract.
5092
5093         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5094         All callers updated.
5095
5096         * ifield.scm (ifld-lsb0?): New proc.
5097         (sort-ifield-list): New arg up?.  All callers updated.
5098         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5099         rather than global state.
5100
5101 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5102
5103         * insn.scm (pretty-print-insn-format): New proc.
5104
5105         * Makefile.in: Rebuild.
5106         * aclocal.m4: Rebuild
5107         * configure: Rebuild.
5108
5109 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5110
5111         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5112         * configure: Rebuild.
5113         * aclocal.m4: Rebuild.
5114         * Makefile.in: Rebuild.
5115         * doc/Makefile.in: Rebuild.
5116         * doc/version.texi: Rebuild.
5117
5118 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5119
5120         * utils.scm (bits->bools): New proc.
5121
5122 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5123
5124         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5125         subfield's gen-ifld-extract-decl method.
5126
5127 1999-04-23  Ben Elliston  <bje@cygnus.com>
5128
5129         * arm7.cpu (ldrsh-pu): Remove.
5130         (do-halfword-load): New pmacro.
5131         (load-halfword): Likewise.
5132         (do-halfword-store): Likewise.
5133         (store-halfword): Likewise.
5134         (strh-*): New instructions.
5135         (ldrsb-*): Likewise.
5136         (ldrh-*): Likewise.
5137         (ldrsh-*): Likewise.
5138
5139 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5140
5141         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5142         fields.
5143
5144         * arm7.cpu (do-word/byte-store): Fix typo.
5145
5146 1999-04-22  Ben Elliston  <bje@cygnus.com>
5147
5148         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5149         register is the program counter (R15).
5150
5151         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5152         (str-*): Implement using store-word-byte. Remove older versions.
5153         (bic): Use the `inv' rtx for obtaining bitwise complements.
5154         (bic-imm): Likewise.
5155         (mvn): Likewise.
5156         (mvn-imm): Likewise.
5157         (store-indev-reg): Remove crufty pmacro.
5158         (load-indiv-reg): Likewise.
5159         (ldm-p): Reverse the order of register processing for decrement.
5160         (stm-p): Likewise.
5161         (stbi): Remove; handled by the str-* insns.
5162
5163 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5164
5165         * thumb.cpu (cmp): Fix carry bit computation.
5166         (alu-cmp): Ditto.
5167
5168 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5169
5170         * arm.cpu (h-tbit): Specify set spec.
5171         (h-cpsr): Ditto.
5172         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5173         (set-sub-flags): Interpret "carry bit" as a borrow.
5174         (all sub/cmp insns): Carry bit is actually a borrow bit.
5175         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5176         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5177         .pmacro instead.
5178         (hireg-add,hireg-cmp,hireg-move): Ditto.
5179
5180         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5181         (-CGEN-LANG-VERSION): Ditto.
5182
5183 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5184
5185         * pmacros.scm (-pmacro-make): New arg `default-values',
5186         all callers updated.
5187         (-pmacro-default-values): New proc.
5188         (-pmacro-process-keyworded-args): New proc.
5189         (-pmacro-process-args): New proc.
5190         (-pmacro-invoke): Process arguments before expanding macro.
5191         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5192         (define-pmacro): Handle default values specified in arg list.
5193         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5194         (rtx-boolif-op-arg[01]): New procs.
5195         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5196         (rtx-simplify): Handle not,orif,andif.
5197         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5198         * utils.scm (alist-copy): New proc.
5199         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5200         (ldr*): Rewrite.
5201         (swi): Explicitly set pc.
5202
5203         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5204
5205 1999-04-17  Ben Elliston  <bje@cygnus.com>
5206
5207         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5208         correctly adjusts the program counter now.
5209
5210         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5211         (f-signed?): Rename from `f-hdt-signed?'.
5212         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5213         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5214         (f-hdt-offset8): Use new field names.
5215         (ldr): Use `imm12' field, not `offset12', since we do our own
5216         address arithmetic.
5217         (str, str-*): Likewise.
5218         (ldu-*): Remove most; better not implemented than broken.
5219         (ldrh*): Likewise.
5220         (ldrsh-pu): New insn.
5221         (stri): Likewise.
5222         (stri-p): Likewise.
5223         (stbi): Likewise.
5224         (ldm-p): Likewise; replace (load-indiv-reg) version.
5225
5226 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5227
5228         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5229         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5230         (*): Explicitly specify mode in c-call.
5231         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5232         (arith-op): Ditto.
5233         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5234         (arith-imm-op): New pmacro.
5235         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5236         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5237
5238 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5239
5240         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5241
5242         * rtl.scm (rtl-find-ifields): Implement.
5243
5244         * utils-gen.scm: New file.
5245         * read.scm: Load it.
5246         * desc.scm: Move generic attribute code to utils-gen.scm.
5247         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5248         * Makefile.in: Rebuild.
5249
5250         * arm7.cpu (R15-OFFSET): New attribute.
5251         (dnai): New pmacro.
5252         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5253         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5254         for reg-shift version.
5255         (arith-op): Ditto.
5256         (data processing insns): Reorganize.  Use dnai.
5257
5258         * attr.scm (attr-kind): New proc.
5259         (attr-list-enum-list): Rewrite.
5260         (-attr-sort): Split result into two lists, bools and non-bools.
5261         (current-attr-list-for): Update.
5262
5263         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5264         * sid-cpu.scm (-gen-attr-decls): New proc.
5265         (-gen-insn-attr-decls): New proc.
5266         (cgen-desc.h): New proc.
5267         (cgen-cpu.h): Put everything in @cpu@ namespace.
5268         (gen-parallel-exec-type): Change prefix of parexec struct from
5269         @cpu@ to @prefix@.
5270         (-gen-trace-record-type): Ditto for trace_record struct.
5271         (-gen-write-case): Update.
5272         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5273         @prefix@.  Update scache struct references.
5274         (-gen-sem-case): Update scache struct references.
5275         (-gen-sem-switch-fn): Update idesc struct reference.
5276         Update insn_type enum reference.
5277         (cgen-write.cxx): Update scache,argbuf references.
5278         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5279         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5280         from @cpu@ to @prefix@.
5281         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5282         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5283         from @CPU@ to @PREFIX@.
5284         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5285         from @CPU@ to @PREFIX@.
5286         (-gen-decode-insn-globals): Generate insn attributes.
5287         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5288         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5289         semantic fn typedef.
5290         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5291         Change prefix of scache struct from @cpu@ to @prefix@.
5292         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5293         Change prefix of idesc struct from @cpu@ to @prefix@.
5294         Change prefix of insn_type enum from @cpu@ to @prefix@.
5295         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5296         from @cpu@ to @prefix@.
5297         (-gen-scache-decls): Change prefix of scache struct from
5298         @cpu@ to @prefix@.  Update idesc struct name.
5299         Update decode,execute methods.
5300         (-gen-extract-case): Update to type name changes.
5301         (-gen-decode-fn): Ditto.
5302         (cgen-decode.h): Put everything in @cpu@ namespace (except
5303         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5304         (cgen-decode.cxx): Add using namespace @cpu@.
5305         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5306         model_mark_get/set from @cpu@ to @prefix@.
5307         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5308         @prefix@.
5309         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5310         of model_insn_before/after from @cpu@ to @prefix@.
5311         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5312         Update insn_word type name.
5313         (-gen-model-timing-table): Update INSN_TIMING struct name.
5314         (-gen-model-init-fn): Update MODEL_DATA struct name.
5315         (-gen-mach-defns): Update name of init_idesc_table fn.
5316         (cgen-model.cxx): Add using namespace @cpu@.
5317         * sid.scm (gen-cpu-class): Delete.
5318         (gen-attr-type): New proc.
5319         (gen-obj-attr-sid-defn): New proc.
5320         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5321         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5322         @CPU@ to @PREFIX@.
5323         (gen-cpu-insn-enum): Update name of insn enum.
5324         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5325         (bx-hs): Ditto.
5326         (swi): Rename @cpu@_swi to @prefix@_swi.
5327
5328         * decode.scm (-build-decode-table-entry): Remove heuristic for
5329         distinguishing insns, and use insn ifield-assertion specs.
5330
5331         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5332         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5333         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5334         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5335         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5336         all callers updated.
5337         (gen-attr-name): New proc
5338         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5339         (gen-obj-attr-defn): Delete num_nonbools count.
5340
5341         * iformat.scm (ifmt-analyze): Handle insn-condition.
5342         (ifmt-compute!): Ditto.
5343         * insn.scm (<insn>): Specify default value for condition,
5344         post-cond-trap,compiled-condition,compiled-semantics.
5345         (<insn>,make!): New arg condition.
5346         (<insn>): Add getters for condition,compiled-condition.
5347         (-insn-parse): New arg condition, all callers updated.
5348         (-insn-read): Recognize condition spec.
5349         (define-full-insn): New arg condition.
5350         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5351         * semantics.scm (semantic-compile): Change arg sem-code to
5352         sem-code-list.
5353         (semantic-attrs): Ditto.
5354         * sim.scm (sim-finish!): Update calls to define-full-insn.
5355         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5356         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5357         * sid.scm (sim-finish!): Update call to define-full-insn.
5358
5359 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5360
5361         * Makefile.am (sim-cpu): Allow specification of ISA.
5362         * Makefile.in: Rebuild.
5363
5364 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5365
5366         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5367
5368 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5369
5370         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5371
5372         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5373
5374         * attr.scm (atlist?): New proc.
5375         (-attr-eval): Rewrite.
5376         (attr-parse): New proc.
5377         (atlist-parse): Use it.
5378
5379         * decode.scm (exprtable-entry-make): New proc.
5380         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5381         (exprtable-make,exprtable-insns): New procs.
5382
5383         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5384         All uses updated.
5385         (hardware-builtin!): Make h-memory a vector.
5386
5387         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5388         All callers updated.
5389         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5390
5391         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5392         All uses updated.
5393         (-insn-parse): Set semantics to #f if not specified.
5394         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5395         if simulator.
5396         (-parse-insn-format): Recognize `=' iformat spec.
5397
5398         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5399         (isa-max-insn-bitsize): Ditto.
5400
5401         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5402         rtl-c-with-alist.
5403         (<ifield>,gen-extract): Ditto.
5404         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5405         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5406         (gen-define-ifmt-ifields): New proc.
5407         (gen-semantic-code): Rewrite.
5408         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5409         (-gen-decoder-switch): Handle expression tables.
5410         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5411         gen-define-fields.
5412         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5413         instead of gen-define-fields.
5414         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5415         callers updated.
5416         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5417         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5418         (-gen-ifld-extract-beyond): Ditto.
5419         (<multi-ifield>,gen-ifld-extract): Ditto.
5420         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5421         rtl evaluation code.
5422         (op:read): Build an <eval-state> to pass to gen-read.
5423         (op:write): Build an <eval-state> to pass to gen-write.
5424         (op:record-profile): Build an <eval-state> to pass to
5425         gen-record-profile.
5426         * sim-cpu.scm (gen-semantic-code): Rewrite.
5427         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5428         rtl-c-with-alist.
5429         (-gen-ifld-extract-beyond): Ditto.
5430         (<multi-ifield>,gen-ifld-extract): Ditto.
5431         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5432         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5433         rtl evaluation code.
5434         (op:read): Build an <eval-state> to pass to gen-read.
5435         (op:write): Build an <eval-state> to pass to gen-write.
5436         (op:record-profile): Build an <eval-state> to pass to
5437         gen-record-profile.
5438
5439         * operand.scm (<operand>): Give `selector' default value of #f.
5440         Give `num' default value of -1.  Give `cond?' default value of #f.
5441         (op:new-mode): Delete arg `set?', all uses updated.
5442
5443         * read.scm (reader-error): Handle #f return from port-filename.
5444         (-init-parse-cpu!): Call rtl-c-init!.
5445         (reader-install-builtin!): Call rtl-builtin!.
5446
5447         * rtl-c.scm: New file.
5448         * semantics.scm: New file.
5449         * read.scm: Load them.
5450         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5451         to semantics.scm.
5452         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5453         type,eval,num.
5454         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5455         (-rtx-num-text,-rtx-max-num): New globals.
5456         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5457         (-rtx-macro-lookup): New proc.
5458         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5459         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5460         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5461         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5462         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5463         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5464         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5465         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5466         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5467         (rtx-pretty-name): New proc.
5468         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5469         (rtx-traverse-*): Rewrite rtx traversing.
5470         (rtx-eval-*): Rewrite rtx evaluation.
5471         (rtx-compile): New proc.
5472         (rtx-simplify): New proc.
5473         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5474         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5475         (ifield,index-of): Rewrite.
5476         (name): Renamed from `operand:'.
5477         (operand,xop,local): New rtx's.
5478         (current-insn): Rewrite.
5479         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5480         (cgen-hob.h): Remove rule for.
5481         (cgen-hob.o): Depend on cgen-hob.c only.
5482         * Makefile.in: Rebuild.
5483
5484         * utils-cgen.scm (vmake): New proc.
5485         (<context>): New class.
5486         (context-make-prefix,context-error): New procs.
5487
5488 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5489
5490         * i960.cpu: Add some ??? comments.
5491         (xnor, ornot): New instructions.
5492         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5493
5494 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5495
5496         * cos.scm (-object-error): Print better error message.
5497
5498         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5499         (-pmacro-env-ref): Renamed from -env-ref.
5500
5501 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5502
5503         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5504         (h-pc): Delete.
5505         (hardware-builtin!): Delete h-pc builtin.
5506         * arm.cpu (h-pc): Define.
5507         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5508         * arm7.cpu (set-logical-cc-maybe): Delete.
5509         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5510         (data processing insns): Rewrite.
5511         * m32r.cpu (h-pc): Define.
5512         * fr30.cpu (h-pc): Define.
5513         * i960.cpu (h-pc): Define.
5514         * sparc.cpu (h-pc): Define.
5515
5516         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5517         (s-parallel): Replace do {...} while (0) with {...}.
5518         (s-sequence): Ditto.
5519
5520         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5521         consistent.
5522         (-gen-write-case,-gen-sem-case): Ditto.
5523         (-gen-sem-case): Only specify `written' if profiling or
5524         parallel-write-back.
5525         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5526         (-gen-sem-switch-fn): New proc.
5527         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5528         based on with-sem-switch option.
5529         * sid-decode.scm (-gen-decode-insn-globals): Only define
5530         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5531         addresses in idesc_table if !with-sem-switch.
5532         (-gen-sem-fn-decls): Rewrite.
5533         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5534         member based on with-sem-switch.  Only define
5535         `idesc_table_initialized_p' member if with-sem-switch.
5536         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5537         * sid.scm (-with-sem-switch?): New variable.
5538         (option-init!): Initialize it.
5539         (option-set!): Set it.
5540         (with-sem-switch?): New proc.
5541         (-op-gen-set-trace): Only emit `written' reference if profiling.
5542         (sim-finish!): Use h_pc_set to set pc.
5543
5544 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5545
5546         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5547         All callers updated.
5548         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5549
5550         * sid.scm (gen-argbuf-type): Delete.
5551         (-gen-argbuf-fields-union): Move to ...
5552         * sid-decode.scm: ... here.
5553
5554         * read.scm (-reader-process-expanded-1): New proc.
5555         (-reader-process-expanded): Call it to catch nested begin's.
5556         (reader-process): Move `begin' handling to -reader-process-expanded.
5557
5558         * insn.scm (-insn-read): Fix name of `format' spec.
5559
5560         * pmacros.scm (.pmacro): New builtin.
5561         (scan-symbol): If procedure macro, return macro rather than its symbol.
5562         (check-macro): Don't do lookup, instead check if (car expr) is
5563         macro object.
5564         (scan-list): Handle .pmacro.
5565         (scan): No longer re-examine text for another macro invocation.
5566         (-pmacro-build-lambda): New proc.
5567         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5568         another, fetch the other's value (rather than doing it during
5569         expansion).
5570
5571 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5572
5573         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5574         * Makefile.in: Rebuild.
5575
5576         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5577         (-fill-slot!): Simplify.
5578         (-build-slots): Simplify.
5579
5580         * dev.scm (load-sid): Don't load sid-arch.scm.
5581
5582         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5583         switch's.
5584         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5585         switch's.
5586
5587 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5588
5589         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5590         * decode.scm: ... here.  New file.
5591         * sid-decode.scm: Use decoder computation code in decode.scm.
5592         * read.scm: Load decode.scm.
5593
5594         * arm.cpu (arm710 model): Add u-exec function unit.
5595         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5596         Add get/set specs to redirect reg 15 to h-pc.
5597         (h-*): Indicate for both ARM and THUMB isas.
5598         (cbit,nbit,vbit,zbit): Ditto.
5599         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5600         (h-cpsr): Make virtual.  Add get/set specs.
5601         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5602         (h-spsr): New virtual reg.
5603         * arm7.cpu (shift-type): New explicitly defined keyword.
5604         (h-operand2-shifttype): Use it.
5605         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5606         All callers updated.  Don't set cbit.
5607         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5608         shift-type enum as case choices.  Set cbit.
5609         (and,orr,eor,add-imm): Uncomment out.
5610         (undefined): Temporarily comment out.
5611         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5612         (lda-pc,lda-sp): Ditto.
5613         (ldr-pc): Rename from ldr.
5614         (cbranch): Mark insns as being thumb insns.
5615
5616         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5617
5618         * cgen-sid.scm: Don't load sid-arch.scm.
5619         (sim-arguments): Delete unused entries.
5620         * sid-arch.scm: Delete.
5621
5622         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5623         (<insn>,ifld-assertions): New member.
5624         (<insn>,make!): New arg ifld-assertions, all callers updated.
5625         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5626         (insn:fields): Delete.
5627         (-insn-parse): New arg ifld-assertions.  All callers updated.
5628         (-insn-read,define-insn): New procs.
5629         (define-full-insn): New arg ifld-assertions.  All callers updated.
5630         (insn-init!): New comment define-insn.
5631
5632         * model.scm (-model-parse): Ensure at least one unit specified.
5633
5634         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5635         (<c-expr-temp>,get-name): New method.
5636         (-rtx-make-current-closure,s-closure): New proc.
5637         (hw:): Wrap rtx indices in a closure.
5638         (-gen-case-prefix): New proc.
5639         (s-case): Simplify.
5640         * rtx-funcs.scm (case:): Fix call to s-case.
5641         (closure): New rtx func.
5642
5643         * hardware.scm (<hardware-base>): New member isas-cache.
5644         (<hardware-base>,get-isas): New method.
5645         (hardware-builtin): Indicate for all isas.
5646         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5647         * mach.scm (current-arch-mach-name-list): Return list of names.
5648         (current-isa-mach-name-list): Ditto.
5649         (define-arch): Install builtin objects here.
5650         * read.scm (keep-atlist?): Only keep if both mach and isa are
5651         being kept.
5652         (keep-mach-atlist?): New proc.
5653         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5654         (reader-install-builtin!): Renamed from -install-builtin!.
5655         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5656         -gen-cpu-reg-access-defns.  Rewrite.
5657         (gen-reg-access-defn): Delete.
5658         (-gen-hardware-struct): New proc.
5659         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5660         (gen-semantic-fn,-gen-all-semantics): Delete.
5661         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5662         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5663         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5664         Call sem-analyze-insns!.
5665         (cgen-semantics.cxx): Add multiple-isa support.
5666         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5667         (-gen-scache-decls,-gen-decode-fn): Ditto.
5668         (cgen-decode.h): Call sem-analyze-insns!.
5669         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5670         * sid.scm (-with-multiple-isa?): New variable.
5671         (option-init!): Initialize it.
5672         (option-set!): Set it.
5673         (with-multiple-isa?): New proc.
5674         (gen-cpu-ref): New arg isas.  All callers updated.
5675         (gen-cpu-class): New proc.
5676         (*-get-macro,*-set-macro): Delete.
5677         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5678         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5679         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5680         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5681         (-sim-insns-analyzed): New global variable.
5682         (sim-init!): Reset it.
5683         (sim-analyze-insns!): New proc.
5684         (sim-analyze!): Don't do instruction analysis here.
5685         (sim-finish!): Specify isa of x-invalid insn.
5686         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5687
5688 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5689
5690         * thumb.cpu (cpu,mach,model): Delete.
5691         (dntf): New pmacro.  Use it for all field definitions.
5692         (dntop): New pmacro.  Use it for all operand definitions.
5693         (asr): Correct field list.
5694         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5695
5696         * utils-cgen.scm (define-getters): New macro to simplify
5697         writing class accessors.
5698         (define-setters): Ditto.
5699         (sanitize): Recognize isa elements.
5700
5701         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5702         state-parallel-exec?.
5703         * sid-model.scm (*): Ditto.
5704         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5705         state-decode-assist.
5706
5707         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5708         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5709         * sim-decode.scm (-gen-decode-switch): Ditto.
5710
5711         * sim-arch.scm (-regs-for-access-fns): Delete.
5712         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5713         (-gen-arch-reg-access-defns): Delete.
5714
5715         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5716         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5717         with state-parallel=exec?.
5718         (cgen-*): Call sim-analyze-insns! here.
5719         * sim-decode.scm (cgen-*): Ditto.
5720         * sim-model.scm (cgen-*): Ditto.
5721         * sim.scm (-sim-insns-analyzed): New global variable.
5722         (sim-init!): Reset it.
5723         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5724         already done the analysis.
5725
5726         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5727         MACH struct.
5728
5729         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5730         (arm arch): Update isa spec.
5731         (arm,thumb isas): Define.
5732         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5733         (arm7tdmi mach): Add isa spec.
5734         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5735         `const' on word number.
5736         * fr30.cpu (fr30 arch): Update isa spec.
5737         (fr30 isa): Define.
5738         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5739         moved to isa spec.
5740         * i960.cpu (i960 arch): Update isa spec.
5741         (i960 isa): Define.
5742         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5743         liw-insns,parallel-insns moved to isas spec.
5744         * m32r.cpu (m32r arch): Update isas spec.
5745         (m32r isa): Define.
5746         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5747         liw-insns,parallel-insns moved to isa spec.
5748         * sparc.cpu (sparc arch): Update isas spec.
5749         (sparc isa): Define.
5750         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5751         decode-assist moved to isa spec.
5752         * sparc64.cpu (sparc64 cpu): Ditto.
5753         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5754         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5755         (-gen-mach-table-defns): Output mach table.
5756         (-gen-hash-defines): Delete insn size macros, except for
5757         CGEN_MAX_INSN_SIZE.
5758         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5759         (cgen-desc.h): Define MAX_ISAS.
5760         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5761         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5762         (arch-* accessors): Renamed from arch:*.  All callers updated.
5763         (current-arch-isa-name-list): New proc.
5764         (-arch-parse-isas): Renamed from -arch-parse-isa.
5765         (def-isa-attr!): Rewrite.
5766         (<iframe>): New class.
5767         (<itype>): New class.
5768         (<isa>): Rewrite.
5769         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5770         (isa-integral-insn?,isa-parallel-exec?): New procs.
5771         (-isa-parse,-isa-read,define-isa): New proc.
5772         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5773         liw-insns moved to <isa>.
5774         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5775         (-cpu-parse,-cpu-read): Update.
5776         (state-*): Renamed from state:*.  All callers updated.
5777         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5778         not cpu.
5779         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5780         (state-decode-assist): New proc.
5781         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5782         (-adata-set-derived!): Rewrite.
5783         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5784         callers updated.
5785         (arch-init!): Add define-isa command.
5786         * read.scm (<reader>): Default keep-isa member to (all).
5787         (reader-* accessors): Renamed from reader:*.  All callers updated.
5788         (-keep-isa-set!): Call string->symbol on isa name list.
5789         (keep-isa-validate!): Rewrite.
5790         (current-isa): New proc.
5791         (keep-isa?): Recognize "all".
5792         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5793         Call -keep-isa-set!.
5794         (cmd-if): Recognize keep-isa?.
5795         (cpu-load): New arg keep-isa.  All callers updated.
5796         (-opt-spec-update): New proc.
5797         (common-arguments): First arg is string, not symbol.
5798         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5799
5800         * rtl.scm (rtx-get): Default mode of string arg is INT.
5801
5802         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5803
5804         * rtx-funcs.scm (join:): Pass cpu to handler.
5805
5806         * configure.in (guile_include_dir): Delete.
5807         * configure: Rebuild.
5808         * Makefile.in: Rebuild.
5809         * doc/Makefile.in: Rebuild.
5810
5811         * sid-cpu.scm (-extract-chunk-specs): New proc.
5812         (gen-define-fields): Use it.
5813         (-extract-chunk): New proc.
5814         (-gen-extract-beyond-var-list): Use it.
5815         (gen-extract-fields): Simplify.
5816
5817 1999-03-22  Ben Elliston  <bje@cygnus.com>
5818
5819         * arm7.cpu (ldri-p): New instruction.
5820         (swi): Do not vector through 0x8 yet--there is nothing there.
5821         (addi): Reinstate.
5822         (movi): Likewise.
5823         (all): Use (const x) in subreg expressions.
5824
5825 1999-03-19  Ben Elliston  <bje@cygnus.com>
5826
5827         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5828         (smlal): Likewise.
5829
5830 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
5831
5832         * fr30.cpu (define-arch): Specify "forced" default-alignment.
5833         * mach.scm (-parse-alignment): Recognize "forced" alignment.
5834         * sim-cpu.scm (-extract-chunk-specs): New proc.
5835         (gen-define-fields): Use it.
5836         (-extract-chunk): New proc.
5837         (-gen-extract-beyond-var-list): Use it.
5838         (gen-extract-fields): Simplify.
5839
5840         Port to guile 1.3.1.
5841         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5842         (LIBIBERTY): New var.
5843         (HOB_OBJS): Add cgen-gh.o.
5844         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5845         * Makefile.in: Rebuild.
5846         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5847         * config.in: Rebuild.
5848         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5849         libncurses, libtermcap.
5850         Add checks for needed functions in guile 1.2 not in guile 1.3,
5851         and vice versa.  Add test for 3 argument scm_make_vector.
5852         * configure: Rebuild.
5853         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5854         definitions if guile doesn't have them.
5855         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5856         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
5857         with gh_vector_set_x.
5858         (cgh_qsort): Replace gh_list_length with gh_length.
5859         * cgen-gh.h: Add decls for added functions.
5860         (cgh_qsort): Don't declare if IN_HOBBIT.
5861         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
5862         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5863         scm_make_vector with gh_make_vector.
5864         * cos.scm: Use vector-length instead of length on vectors.
5865         * dev.scm (cload): Make varargs proc with keyword/value args.
5866         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
5867         provide version that works with guile 1.2 or 1.3.
5868         Include private copy of scmhob.h.
5869         * scmhob.h: New file.  Keep our own copy for now.
5870
5871 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
5872
5873         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5874         plain text.
5875         (-rtx-traverse-operands): Dump cx temp stack if debugging.
5876         (-cx-temp-dump-stack): Pretty up output.
5877
5878         * arm.cpu: comment out thumb.cpu until isa support ready.
5879         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5880         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5881         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5882
5883         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5884
5885 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5886
5887         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5888         (<hw-address>,mode-ok?): unsigned/signed are compatible.
5889
5890         * operand (op:new-mode): Improve error message.
5891
5892         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
5893         * arm7.cpu: New file.
5894
5895 1999-03-12  Ben Elliston  <bje@cygnus.com>
5896
5897         * arm.cpu: Lots of minor fixes after desk checking.
5898
5899 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5900
5901         * thumb.cpu: snapshot of current work
5902
5903         * rtl.scm (rtx-get): Tweak error message.
5904
5905 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
5906
5907         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5908         * Makefile.in: Rebuild.
5909
5910         * cos.c (cos_vector_copy): New function.
5911         (_object_copy): Use it.
5912
5913         * mode.scm (mode:eq?): Clean up.
5914         * rtl.scm (cx-new-mode): Copy attributes.
5915         (rtx-get): Don't make copy if <c-expr> with identical mode.
5916
5917         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5918         add new isas spec.
5919         (gr-names): h-gr register names moved here.
5920         (h-gr): Update.
5921         (cr-names): h-cr register names moved here.
5922         (h-cr): update.
5923         (dr-names): h-dr register names moved here.
5924         (h-dr): update.
5925         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5926         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5927         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5928         add new isas spec.
5929         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5930         add new isas spec.
5931         (gr-names): h-gr register names moved here.
5932         (h-gr): Update.
5933         (cr-names): h-cr register names moved here.
5934         (h-cr): update.
5935         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5936         (h-accums,h-psw): Ditto.
5937         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5938         add new isas spec.
5939         (gr-names): h-gr register names moved here.
5940         (h-gr-indices): Delete.
5941         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
5942         (sparc64 h-gr): Ditto.
5943         (h-y): Add get/set specs.
5944         (fp regs): Rewrite.
5945         (fp operands): Rewrite.
5946         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5947         (h-tbr,h-cwp,h-wim): Ditto.
5948         * sparc64.cpu (h-fpsr): Add get/set specs.
5949         * sparccom.cpu (ldd-reg+reg): Load value all at once.
5950         (fp-ld-op): New arg `dest', all callers updated.
5951         (*): Replace `make-di' with `join'.
5952
5953         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5954         present.
5955         (gen-semantic-code): Save/restore rtl generator state.
5956         (cgen-cpu.h): Call rtl-gen-init!.
5957         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5958         (-gen-ifld-extract-beyond): Ditto.
5959         (<multi-ifield>,gen-ifld-extract): Ditto.
5960         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5961         `gstate'.
5962         (-hw-gen-set-quiet-pc): Ditto.
5963         (<hw-pc>,gen-write): Ditto.
5964         (-hw-cxmake-get): Ditto.  Call getter function if present.
5965         (<hw-register>,cxmake-get-raw): New method.
5966         (<hw-register>,gen-set-quiet-raw): New method.
5967         (-hw-gen-set-quiet): New arg `gstate'.
5968         (hw-fun-access?): Delete.
5969         (gen-reg-access-defn): Output function contents.
5970         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5971         invocation.
5972         (-gen-hw-index): Ditto.
5973         (op:read): Update gen-read invocation.
5974         (op:write): Update gen-write invocation.
5975         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5976         operands.
5977         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5978         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5979         (<unit>,gen-profile-code): Update to sim.scm version.
5980
5981         * sim-arch.scm (-regs-for-access-fns): New proc.
5982         (-biggest-reg-mode): New proc.
5983         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5984         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5985         virtual regs separately.
5986         (-gen-cpu-reg-access-defns): Replace fun-access? with new
5987         get/set specs.
5988         (gen-semantic-code): Save/restore rtl generator state.
5989         (cgen-cpu.h): Call rtl-gen-init!.
5990         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
5991         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
5992         renamed to mach-bfd-name.
5993         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5994         (-gen-ifld-extract-beyond): Ditto.
5995         (<multi-ifield>,gen-ifld-extract): Ditto.
5996         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5997         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5998         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5999         `gstate'.
6000         (hw-fun-access?): Delete.
6001         (-hw-gen-set-quiet-pc): New arg `gstate'.
6002         (<hw-register>,gen-get-macro): Rewrite.
6003         (<hw-register>,gen-set-macro): Rewrite.
6004         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6005         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
6006         (<hw-register>,cxmake-get-raw): New method.
6007         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
6008         (<hw-register>,gen-set-quiet-raw): New method.
6009         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
6010         invocation.
6011         (-gen-hw-index): Ditto.
6012         (<hw-index>): New arg `gstate'.
6013         (-gen-hw-selector): Update call to rtx-c.
6014         (<pc>): New arg `gstate'.
6015         (op:read): Update gen-read invocation.
6016         (op:write): Update gen-write invocation.
6017         (<operand>,cxmake-get): Handle raw-reg.
6018         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6019         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6020         (<operand>,gen-set-quiet): Handle raw-reg.
6021         (<operand>,gen-set-trace): Handle raw-reg.
6022         (-gen-mach-data): mach:cpu renamed to mach-cpu.
6023
6024         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6025         cgen_operand_type enum.
6026         (gen-operand-table): Add operand type enum.  Replace pointer to
6027         hardware element with its enum.  Null terminate table.
6028         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6029         Build operand table.
6030         * ifield.scm (-ifield-parse): Recognize ISA attribute.
6031         * mach.scm (<arch-data>): New member `isas'.
6032         (adata-isas): New accessor.
6033         (<isa>): New class.
6034         (isa-default-insn-word-bitsize): New accessor.
6035         (isa-enum): New proc.
6036         (current-arch-default-insn-word-bitsize): Delete.
6037         (current-isa-list,current-isa-lookup): New procs.
6038         (-arch-parse-isa): New proc.
6039         (-arch-parse): Rewrite.
6040         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
6041         (define-arch): Define ISA attribute.
6042         (def-isa-attr!,isa-supports?): New procs.
6043         (<mach>): New member `isas'.
6044         (mach-isas): New accessor.
6045         (-mach-parse): New arg `isas', all callers updated.
6046         (-mach-read): Recognize `isas'.
6047         (arch-finish!): Rewrite.
6048         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6049         @arch@_cgen_get_{int,vma}_operand.
6050         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6051         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6052         of pointer to table entry.
6053         * opcodes.scm (gen-switch): Handle multiply defined operands.
6054         * operand.scm (op-sort): New proc.
6055
6056         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6057         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6058         (hw-enum): Accept symbol argument.
6059         (hardware-builtin!): Delete attribute FUN-ACCESS.
6060         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6061
6062         * attr.scm (atlist-source-form): New proc.
6063         (attr-builtin!): New attr `PRIVATE'.
6064         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6065         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6066         if they have `PRIVATE' attribute.
6067         (gen-hw-table-defns): Output definitions of explicitly defined
6068         keyword tables.
6069         * hardware.scm (<keyword>): New member print-name.  Rename member
6070         `value' to `values', all uses updated.
6071         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6072         (keyword-parse): Rewrite.
6073         (-keyword-read): New proc.
6074         (define-keyword): New proc.
6075         (-hw-parse-keyword): New proc.
6076         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6077         `extern-keyword'.
6078         (-hw-parse-values): Ditto.
6079         (-hw-parse-get,-hw-parse-set): Rewrite.
6080         (hardware-init!): Add new comment define-keyword.
6081         * mach.scm (<arch>): New member `kw-list'.
6082         (arch:kw-list,arch_set-kw-list!): New accessors.
6083         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6084
6085         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6086         * mode.scm (mode-class-integral?): New proc.
6087         (mode-class-float?,mode-class-numeric?): New procs.
6088         (mode-integral?,mode-float?,mode-numeric?): New procs.
6089         (mode-compatible?): New proc.
6090         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6091         rtx-c-with-alist.
6092         (<ifield>,gen-extract): Ditto.
6093         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6094         (<gstate>): New class.
6095         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6096         (gstate-context,gstate-set-context!): New accessors.
6097         (gstate-macro?,gstate-set-macro?!): New accessors.
6098         (gstate-make,gstate-copy): New procs.
6099         (-rtl-current-gstate): New global.
6100         (current-gstate-simulator?): New proc.
6101         (current-gstate-context,current-gstate-macro?): New procs.
6102         (current-gstate,current-gstate-set!): New procs.
6103         (rtl-gen-init!): Rewrite.
6104         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6105         (tstate-make): New arg `gstate', all callers updated.
6106         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6107         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6108         (tstate-gstate,tstate-set-gstate!): New accessors.
6109         (tstate-copy): New proc.
6110         (tstate-new-cond?,tstate-new-set?): Rewrite.
6111         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6112         (rtx-traverse): New arg `gstate', all callers updated.
6113         (rtx-strdump): New proc.
6114         (-simplify-for-compilation): New arg `gstate', all callers updated.
6115         (semantic-in-out-operands): Ditto.
6116         (semantic-attrs): Ditto.
6117         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6118         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6119         (rtx-value): Rewrite.
6120         (<c-expr>,gen-name): New method.
6121         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6122         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6123         (cx-new-mode): New proc.
6124         (-rtx-c-with-tstate): New proc.
6125         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6126         callers updated.
6127         (-rtx-mode): Rewrite.
6128         (-rtx-mode-compatible?): New proc.
6129         (<c-expr-temp>): New member `value'.
6130         (cx-temp:value): New accessor.
6131         (<c-expr-temp>,make!): Override default method.
6132         (<c-expr-temp>,cxmake-get): Rewrite.
6133         (<c-expr-temp>,gen-set-quiet): Rewrite.
6134         (<c-expr-temp>,gen-set-trace): Rewrite.
6135         (gen-temp-defs): Use cx-temp:value.
6136         (record-temp!): New arg value, all callers updated.
6137         (cx-temp:cx:make): Delete.
6138         (-cx-temp-dump-stack): New proc.
6139         (rtx-get): New arg `gstate', all callers updated.  Do mode
6140         compatibility checks.  Ensure result has specified mode.
6141         (rtx-set-quiet): New arg `gstate', all callers updated.
6142         (rtx-set-trace): Ditto.
6143         (s-c-call): New arg `tstate', all callers updated.
6144         (s-c-raw-call): Ditto.
6145         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6146         (s-cmpop,s-if,e-if): Ditto.
6147         (s-subreg): New proc.
6148         (-par-new-temp!): New proc.
6149         (-par-next-temp!): Rewrite.
6150         (-par-replace-set-dests): Use -par-new-temp!.
6151         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6152         (s-sequence): Use -rtx-c-with-state.
6153         * rtx-funcs.scm (*): Update.
6154         (raw-reg:): New rtx function.
6155         (make-di): Delete.
6156         (join:,subreg:): New rtx functions.
6157
6158         * insn.scm (<insn>): New members pre-cond-trap, condition,
6159         post-cond-trap, compiled-condition.
6160
6161         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6162
6163         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6164
6165         * utils-cgen.scm (parse-symbol): New proc.
6166         (parse-string): New proc.
6167         (gen-get-macro,gen-set-macro): New arg `index-args'.
6168         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6169         Prepend \ to newlines.
6170
6171         * utils.scm (alist-remove-duplicates): Delete.
6172
6173         * sid.scm (sim-init!): Delete private debugging code.
6174
6175 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6176
6177         * cgen-sid.scm: New file for C++ simulator application.
6178         * sid-arch.scm: Ditto.
6179         * sid-cpu.scm: Ditto.
6180         * sid-decode.scm: Ditto.
6181         * sid-model.scm: Ditto.
6182         * sid.scm: Ditto.
6183         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6184
6185 1999-03-05  Ben Elliston  <bje@cygnus.com>
6186
6187         * arm.cpu: New file.
6188
6189 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6190
6191         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6192         * Makefile.in: Rebuild.
6193
6194         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6195         (-attr-parse): Validate default value.
6196
6197         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6198         (-CGEN-LANG-VERSION): Ditto.
6199         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6200         (<reader>): New member keep-isa plus accessors.
6201         (-keep-isa-set!,keep-isa-validate!): New procs.
6202         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6203         (common-arguments): New variable.
6204         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6205         (-debug-repl,continue): New procs.
6206         (-cgen,cgen): New procs.
6207         * cgen-gas.scm: Rewrite.
6208         * cgen-opc.scm: Rewrite.
6209         * cgen-sim.scm: Rewrite.
6210         * cgen-stest.scm: Rewrite.
6211
6212         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6213         (gas-test-finish!): Call opcodes-finish!.
6214         (gas-test-analyze!): Call opcodes-analyze!.
6215         (<hw-asm>): New method test-data.
6216         (<operand>,testdata): Rewrite.
6217         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6218         (sim-test-finish!): Call opcodes-finish!.
6219         (sim-test-analyze!): Call opcodes-analyze!.
6220         (<hw-asm>): New method test-data.
6221         (<operand>,testdata): Rewrite.
6222
6223 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6224
6225         * fixup.scm (reverse!): Define if missing.
6226         * *.scm: Use reverse! instead of list-reverse!.
6227
6228         * utils.scm (leading-id-char?): New proc.
6229         (id-char?): Rewrite.
6230         (chars-until-delimiter): New proc.
6231         * opc-itab.scm (extract-syntax-operands): Rewrite.
6232         (strip-mnemonic): Rewrite.
6233         (compute-syntax): Rewrite.
6234
6235         * pmacros.scm (-pmacro-substr): New proc.
6236         (pmacros-init!): Add builtin .substr.
6237
6238 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6239
6240         * thumb.cpu: New file.
6241
6242 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6243
6244         * Makefile.am (CGENCFLAGS): New variable.
6245         (WITH_HOBBIT): Use automake conditional.
6246         (CGEN_HOB_SRC): New variable.
6247         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6248         (*.o): Compile with CGENCFLAGS.
6249         (cgen-hob.c): Simplify.
6250         (cgen-nohob.c): New rule.
6251         (hobbit): Renamed from hob.x.
6252         (CLEANFILES): Add cgen-nohob.c.
6253         * Makefile.in: Rebuild.
6254         * doc/Makefile.in: Rebuild.
6255         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6256         (WITH_HOBBIT): Use AM_CONDITIONAL.
6257         * configure: Rebuild.
6258         * aclocal.m4: Rebuild.
6259
6260         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6261         with string-write-map.
6262
6263         * sim-cpu.scm (hw-need-storage?): New proc.
6264         (-gen-hardware-types): Use it.
6265         (gen-parallel-exec-elm): Call op-save-index?.
6266
6267         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6268
6269         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6270         UNSIGNED attribute.
6271         (-gen-ifld-extract-beyond): Ditto.
6272         (<integer>): Delete all references.
6273         (<sim-hardware>): Delete.
6274         (hw-profilable?): New proc.
6275         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6276         (<hw-register>): Rename method get-index-mode to save-index?.
6277         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6278         (<hw-register>,gen-sym-decl): Make virtual.
6279         (<hw-memory>,gen-sym-decl): Make virtual.
6280         (<hw-memory>): Rename method get-index-mode to save-index?.
6281         (<hw-address>,gen-sym-decl): Make virtual.
6282         (<operand>): New method save-index?.
6283         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6284
6285         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6286         prefix added.  All uses updated.
6287
6288         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6289         rather than pointer to table entry.
6290
6291         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6292         Remove all hw-asm,op-asm support.
6293         (-gen-parse-number,-gen-parse-address): New procs.
6294         (<keyword>,gen-parse): Redo function name computation.
6295         (<keyword>,gen-print): Ditto.
6296         (<operand>,gen-function-name): Rewrite.
6297         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6298         (opcodes-init!): Delete call to add-parser!.
6299
6300         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6301         Define enum using hardware semantic name.
6302         (-gen-hw-decl,-gen-hw-defn): New procs.
6303         (gen-hw-table-decls): Use -gen-hw-decl.
6304         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6305         CGEN_HW_ENTRY structs.
6306         (gen-operand-table): Output hw's enum, not pointer to table entry.
6307         (-gen-cpu-open): Build table of selected hardware elements.
6308
6309         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6310         (<hardware> support): Delete.
6311         (<hw-asm>): Delete, moved to hardware.scm.
6312         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6313         (<hw-asm>,gen-table-entry): New method.
6314         (<hw-asm>,parse!): Delete.
6315         (<keyword>,gen-table-entry): New method.
6316         (<keyword>,parse!): Delete.
6317         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6318         for gen-decl,gen-defn,gen-ref,gen-init.
6319         (desc-init!): Don't create parser for operand asm specs.
6320
6321         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6322         * ifield.scm (<ifield>): New member `mode'.
6323         (<ifield>,make!): New arg `mode'.
6324         (ifld-mode): Rewrite.
6325         (ifld-hw-type): Rewrite.
6326         (<ifield>,min-value): Rewrite.
6327         (<ifield>,max-value): Rewrite.
6328         (-ifield-parse): New arg `mode'.
6329         (-ifield-read): Update.
6330         (define-full-ifield): New arg `mode'.
6331         (define-full-multi-ifield): Ditto.
6332         (-multi-ifield-parse): Ditto.
6333         (-multi-ifield-read): Update.
6334         (define-full-multi-ifield): New arg `mode'.
6335         (ifield-builtin!): Update definition of f-nil.
6336         * simplify.inc (define-normal-ifield): Update call to
6337         define-full-ifield.
6338         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6339         (define-normal-hardware): Delete arg asm.  New args indices, values,
6340         handlers.  Update call to define-full-hardware.
6341         (define-simple-hardware,dsh): New pmacros.
6342         (define-normal-operand): Update call to define-full-operand.
6343         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6344         Specify INT/UINT mode instead.
6345         (h-gr,h-cr): Use "indices" instead of "asm".
6346         (h-dr,h-ps): Update keyword syntax.
6347         (h-r13,h-r14,h-r15): Ditto.
6348         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6349         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6350         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6351         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6352         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6353         Specify INT/UINT mode instead.
6354         (h-gr): Use "indices" instead of "asm".
6355         (h-cc): Update keyword syntax.
6356         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6357         Specify INT/UINT mode instead.
6358         (h-hi16,h-slo16,h-ulo16): Update.
6359         (h-gr,h-cr): Use "indices" instead of "asm".
6360         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6361         (h-accums): Update keyword syntax.
6362         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6363         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6364         Specify INT/UINT mode instead.
6365         (h-gr-indices): New pmacro.
6366         (h-gr32,h-gr64): Split up from h-gr.
6367         (h-a): Update type spec.  Use values instead of asm spec.
6368         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6369         (h-y,h-annul-p): Ditto.
6370         (h-asr): Update keyword spec.
6371         (h-lo10,h-lo13,h-hi22): Update.
6372         (get-freg-spec,set-freg-spec): New pmacros.
6373         (h-fr32,h-fr64): Split up from h-fr.
6374         (rdd): Comment out get/set specs.
6375         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6376         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6377         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6378         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6379         UNSIGNED.  Specify INT/UINT mode instead.
6380         (h-*): Use dsh instead of dnh where appropriate.
6381         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6382         (h-p,h-membarmask): Ditto.
6383         (membarmask): Use "handlers" instead of "asm".
6384
6385         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6386         values,handlers,getters,setters plus accessors.
6387         (hw-mode-ok?,hw-default-mode): New procs.
6388         (<hardware-base>): Rename method new-mode to mode-ok?
6389         (<hardware-base>): New method get-index-mode.
6390         (hw-index-mode): New proc.
6391         (pc?): Delete, moved to operand.scm.
6392         (address?): New proc.
6393         (<hardware>): Delete.
6394         (<hw-asm>): Definition moved here from desc.scm.
6395         (keyword-parse): New proc.
6396         (hardware-parsers): Delete.
6397         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6398         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6399         (-hw-parse-get,-hw-parse-set): New procs.
6400         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6401         indices,values,handlers,get,set.  Rewrite.
6402         (-hw-read-extra): Delete.
6403         (-hw-read): Update.
6404         (define-hardware): Don't add object if not selected.
6405         (define-full-hardware): Ditto.
6406         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6407         (<hw-register>): Member `type' moved to baseclass.  Delete member
6408         hw-asm.
6409         (<hw-register>,parse!): Rewrite.
6410         (<hw-register>): Delete methods get-rank,get-mode.
6411         (<hw-register>): Method new-mode renamed to mode-ok?
6412         (<hw-register>): New method get-index-mode.
6413         (<hw-pc>,parse!): Rewrite.
6414         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6415         (<hw-memory>,parse!): Rewrite.
6416         (<hw-memory>): Delete methods get-rank,get-mode.
6417         (<hw-memory>): Method new-mode renamed to mode-ok?
6418         (<hw-memory>): New method get-index-mode.
6419         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6420         hw-asm.
6421         (<hw-immediate>,parse!): Rewrite.
6422         (<hw-immediate>): Delete methods get-rank,get-mode.
6423         (<hw-immediate>): Method new-mode renamed to mode-ok?
6424         (<hw-address>): Delete member hw-asm.
6425         (<hw-address>,parse!): Rewrite.
6426         (<hw-address>): Delete methods get-rank,get-mode.
6427         (<hw-address>): Method new-mode renamed to mode-ok?
6428         (hw-profilable?): Delete.
6429         (hardware-init!): Delete hardware-parsers reference.
6430         Update argument specs of command define-full-hardware.
6431         (hardware-builtin!): Update definitions of hardware builtins.
6432         * operand.scm (<operand>): New members hw-name,mode-name.
6433         Delete member op-asm.  New member handlers.
6434         (<operand>,make!): Update.
6435         (op:hw-name,op:mode-name,op:handlers): New procs.
6436         (op:type): Rewrite.
6437         (op:mode): Rewrite.
6438         (<operand>): New method get-index-mode.
6439         (<pc>,make!): Update.
6440         (op:new-mode): Rewrite.
6441         (operand-parsers): Delete.
6442         (-operand-parse): Rewrite.  Return #f if insn not selected.
6443         (-op-read-extra): Delete.
6444         (-operand-read): Update.
6445         (define-operand,define-full-operand): Update.
6446         (operand-init!): Delete operand-parsers reference.
6447         Update syntax of define-full-operand command.
6448
6449         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6450         (define-full-insn): Update.
6451         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6452         (define-full-minsn): Update.
6453
6454         * mode.scm (<mode>): New member class.
6455         (mode:class): New proc.
6456         (mode?): Rewrite.
6457         (-mode-parse): New arg class.
6458         (define-full-mode): Update.
6459         (mode-find): Rewrite.
6460         (mode-make-int,mode-make-uint): New procs.
6461         (mode-init!): Update syntax of define-full-mode command.
6462         (mode-builtin!): Update definitions of builtin modes.
6463
6464         * model.scm (<profile>): Delete.
6465
6466         * read.scm (keep-atlist?): New proc.
6467         (keep-multiple?): New proc.
6468         (<parser-list>): Delete.
6469         (add-parser!,parse-spec!): Delete.
6470
6471         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6472         (def-rtx-syntax-node): Ditto.
6473         (-rtx-traverse-debug?): New variable.
6474         (tstate-make): New proc.
6475         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6476         (tstate-new-cond?,tstate-new-set?): New procs.
6477         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6478         tstate.  All callers updated.
6479         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6480         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6481         (-build-operand!): Replace arg cond? with tstate.
6482         (-build-reg-operand!,-build-mem-operand!): Ditto.
6483         (-build-index-of-operand!): Update making of <operand> object.
6484         (s-ifield): New arg tstate.  All callers updated.
6485         (hw:): New arg tstate.  All callers updated.  Replace call to
6486         current-hw-lookup with current-hw-sem-lookup-1.
6487         (s-index-of): New arg tstate.  All callers updated.
6488         (reg:,mem:): Ditto.
6489         (-rtx-use-sem-fn?): New proc.
6490         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6491         semantic cover fns.
6492         (s-convop): Only use semantic mode when using semantic cover fns.
6493         (s-cmpop): Call -rtx-use-sem-fn?.
6494         (s-cond,s-case): New arg tstate.  All callers updated.
6495         (s-parallel,s-sequence): Ditto.
6496
6497         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6498
6499         * types.scm (<scalar>): Rewrite implementation.
6500         (<integer>): Delete.
6501         (parse-type): Rewrite.
6502
6503         * utils-cgen.scm (parse-handlers): New proc.
6504
6505         * utils.scm (!=): New proc.
6506
6507 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6508
6509         * pmacros.scm (-pmacro-expand): Fix typo.
6510
6511 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6512
6513         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6514         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6515         * i960.cpu (build-hex2): New pmacro.
6516         (insn-opcode): Simplify.
6517         (insn-opcode2): Ditto.
6518
6519         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6520         * cgen-stest.scm (catch-with-backtrace): Ditto.
6521
6522 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6523
6524         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6525         All callers updated.
6526         (-pmacro-invoke): New proc.
6527         (-pmacro-sym,-pmacro-str): New procs.
6528         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6529         (pmacros-init!): Install builtins .iota, .map, .apply.
6530         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6531         (h-fr): Simplify register name spec.
6532         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6533         * utils.scm (num-args-ok?): New proc.
6534
6535 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6536
6537         * pmacros.scm (-pmacro-error): New proc.
6538         (-pmacro-expand): Use it.
6539         (-pmacro-splice): New proc.
6540         (pmacros-init!): Install new builtin .splice.
6541
6542         * sparc.cpu: Include sparc64.cpu when appropriate.
6543         (f-mmask,f-simm11): Moved to sparc64.cpu.
6544         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6545         (ANNUL attribute): Delete.
6546         (test-* pmacros): New arg cc, all callers updated.
6547         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6548         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6549         atomic-opc.
6550         (ldstub,swap): Moved to sparccom.cpu.
6551         * sparc64.cpu: Add more insns.
6552
6553 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6554
6555         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6556         CGEN_ATTR_VALUE.
6557         (cgen-sem-switch.c): Ditto.
6558         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6559         moved to cgen-engine.h.
6560         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6561         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6562         global.  Cache attributes and insn length in IDESC.
6563         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6564         @cpu@_opcode renamed to @cpu@_get_idata.
6565         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6566         done later underneath sim_resume.
6567         (@mach@_mach): Record @cpu@_prepare_run.
6568         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6569         updated.
6570         (-hw-gen-set-quiet-pc): Ditto.
6571         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6572         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6573         (<hw-addr>,cxmake-get): Ditto.
6574         (<hw-iaddr>,cxmake-get): Ditto.
6575         (<pc>,cxmake-get): Ditto.
6576         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6577         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6578         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6579         (<hw-pc>,gen-write): Use hw-selector-default.
6580         (<hw-register>,gen-write): Ditto.
6581         (<hw-memory>,gen-write): Ditto.
6582         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6583         (-gen-hw-selector): New proc.
6584
6585         * desc.scm: New file.
6586         * desc-cpu.scm: New file.
6587         * opcodes.scm: Split up into several smaller files.
6588         * opc-asmdis.scm: New file.
6589         * opc-ibld.scm: New file.
6590         * opc-itab.scm: New file.
6591         * opc-opinst.scm: New file.
6592         * Makefile.am (desc): New target.
6593         (opcodes): Update args to cgen-opc.scm.
6594         * Makefile.in: Rebuild.
6595         * aclocal.m4: Rebuild.
6596         * config.in: Rebuild.
6597         * configure.in: Update arg to AC_INIT.
6598         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6599         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6600         AC_PROG_INSTALL.
6601         * configure: Rebuild.
6602         * cgen-gas.scm: Update files to load.
6603         * cgen-opc.scm: Ditto.  Reorganize option letters.
6604         * cgen-sim.scm: Update files to load.
6605         * cgen-stest.scm: Ditto.
6606         * dev.scm (cload): New app "DESC".
6607         (load-opc): Update files to load.
6608         (load-gtest,load-sim,load-stest): Ditto.
6609
6610         * attr.scm (bool-attr?): New proc.
6611         (attr-list-enum-list): New proc.
6612         (-attr-sort): Rewrite.
6613         (attr-builtin!): Give ALIAS attribute a fixed index.
6614         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6615         calculate attribute enum list.
6616         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6617
6618         * insn.scm (-insn-parse): Renamed from parse-insn.
6619
6620         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6621         (-hw-read): Ditto.
6622
6623         * mode.scm (-mode-parse): Renamed from parse-mode.
6624
6625         * operand.scm (<operand>): New member `selector'.
6626         (<operand>,make!): Use default selector.
6627         (hw-selector-default): New variable.
6628         (hw-selector-default?): New proc.
6629
6630         * pmacros.scm (pmacros-init!): New proc.
6631         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6632         (-env-set!): Delete.
6633         (-pmacro-expand): New proc apply-macro.
6634         Use it in scan-list,scan.  Scan list first, then see if macro
6635         invocation.
6636         (define-pmacro): Rewrite.
6637         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6638
6639         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6640         selected if (current-mach) seen.
6641         (rtx?): Renamed from rtx-uneval?, all callers updated.
6642         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6643         updated.
6644         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6645         selector, all callers updated.
6646         (hw:): New arg selector, all callers updated.  Delete old comments
6647         and code.
6648         (reg:,mem:): Handle selectors
6649         * rtx-funcs.scm (reg:): Handle selectors.
6650
6651         * read.scm: Renamed from cpu.scm.
6652         (<command>): New class.
6653         (<reader>): New member commands.
6654         (reader-add-command!): New proc.
6655         (reader-lookup-command): New proc.
6656         (reader-error,-reader-process-expanded,reader-process): New procs.
6657         (reader-read-file!): New proc.
6658         (include): Call reader-read-file!.
6659         (cmd-if): New proc.
6660         (cpu-load): Call reader-read-file!.
6661         * utils.scm (num-args): New proc.
6662         * simplify.inc: New file.
6663         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6664         procs.  Move define-normal-foo procs (and abbreviated forms) to
6665         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6666         routines.
6667         * fr30.cpu: Include simplify.inc.
6668         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6669         * i960.cpu: Include simplify.inc.
6670         * m32r.cpu: Include simplify.inc.
6671         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6672         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6673         * sparc.cpu: Include simplify.inc.
6674         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6675         * utils-cgen.scm (parse-error): Moved to read.scm.
6676         (sanitize): Rewrite.
6677         (utils-init!): New proc.
6678
6679 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6680
6681         * sparc.cpu: New file.
6682         * sparc32.cpu: New file.
6683         * sparc64.cpu: New file.
6684         * sparccom.cpu: New file.
6685         * sparc.opc: New file.
6686
6687 1999-01-27  Frank Eigler  <fche@cygnus.com>
6688
6689         * utils.scm (gen-copyright): New proc.
6690
6691 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6692
6693         Parameterize rtl parsing, rather than having lots of little handlers.
6694         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6695         Delete member traverse.
6696         (rtx:set-traverse!): Delete.
6697         (-rtx-valid-types,-rtx-valid-matches): New variables.
6698         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6699         instead of expression.  All callers updated.
6700         (def-rtx-node): New args arg-types,arg-modes.
6701         (def-rtx-syntax-node): Ditto.
6702         (def-rtx-dual-mode): Ditto.
6703         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6704         All callers updated.
6705         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6706         All callers updated.
6707         (rtx-macro-expand): New proc.
6708         (-rtx-traverse-check-args): Delete.
6709         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6710         an rtx specific traverser.
6711         (-rtx-any-mode?,-rtx-symornum?): New procs.
6712         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6713         (-rtx-traverse-no-mode): Delete.
6714         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6715         (-rtx-traverse-operands): Rewrite.
6716         (-rtx-traverse-expr): Rewrite.
6717         (rtx-traverse): Don't expand macros here, leave for caller to do.
6718         (rtx-simplify): Delete.
6719         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6720         attributes.
6721         (rtx-true?,rtx-false?): Ditto.
6722         (-rtx-ref-type): Set dest is operand 1 now.
6723         (-simplify-for-compilation): New proc.
6724         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6725         Expand macros before calling rtx-traverse.  Sort operands by name
6726         to avoid unnecessary semantic formats.
6727         (semantic-attrs): New proc.
6728         (rtx-uneval?): Handle (<rtx-func> ...).
6729         (s-boolifop): Delete arg mode.  All callers updated.
6730         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6731         (eq-attr): New arg obj.
6732         (eq-attr:): Delete.
6733         * m32r.cpu (rach): Update calls to andif.
6734
6735         * minsn.scm (-minsn-parse-expansion): Renamed from
6736         parse-minsn-expansion.
6737         (-minsn-parse): Renamed from parse-minsn.
6738         (-minsn-read): Renamed from read-minsn.
6739         (def-minsn): Don't check APPLICATION here.
6740         (def-full-minsn): New proc.
6741         (define-macro-insn): Check APPLICATION here.  Expand macros.
6742         (define-normal-macro-insn): Ditto.
6743
6744         * utils.scm (word-value): New arg start-lsb?.
6745         (word-mask,word-extract): Ditto.
6746         (split-bits,powers-of-2): Use integer-expt instead of expt.
6747         (bit-set?): Handle 32 bit values (which are bignums).
6748         (cg-logand,cg-logxor): New functions.
6749         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6750         (<ifield>,field-value): Update call to word-value.
6751         (<ifield>,min-value): Use integer-expt instead of expt.
6752         (<ifield>,max-value): Ditto.
6753
6754         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6755
6756         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6757
6758         Compute raw instruction format in addition to semantic based format.
6759         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6760         (<iformat> accessors): Rename accessors to ifmt-*.
6761         (<sformat>): New class.
6762         (fmt-enum): Renamed from fmt:enum.
6763         (-ifmt-search-key): Rewrite.
6764         (-sfmt-search-key): New proc.
6765         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6766         Compute iformat and sformat search keys.
6767         (ifmt-build): Update.
6768         (sfmt-build): New proc.
6769         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6770         (ifmt-compute!): Compute instruction format <iformat> based on
6771         instruction fields alone.  Compute new semantic format <sformat>
6772         based on instruction fields and semantic information.
6773         (ifmt:lookup): Delete.
6774         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6775         (current-sfmt-list): New proc.
6776         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6777         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6778         (insn-length,insn-length-bytes): Update.
6779         (insn:mask-length,insn:mask): Update.
6780         (insn-lookup-op): Update.
6781         * gas-test.scm (gas-test-analyze!): Update.
6782         (gen-gas-test): Ditto.
6783         * sim-test.scm (sim-test-analyze!): Update.
6784         (gen-sim-test): Ditto.
6785         * opcodes.scm (gen-operand-instance-table): Update.
6786         (gen-operand-instance-ref): Ditto.
6787         (max-operand-instances): Use heuristic if semantics not parsed.
6788         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6789         (opcodes-analyze!): Only scan semantics of building operand instance
6790         tables.
6791         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6792         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6793         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6794         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6795         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6796         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6797         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6798
6799         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6800         New arg lsb0?  All callers updated.
6801         (decode-bits): New arg lsb0?.  All callers updated.
6802         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6803         of expt.
6804         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6805         (build-slots): Call integer-expt instead of expt.
6806         (build-decode-table-entry): Handle crossing word boundaries better.
6807         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6808         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6809
6810         * enum.scm (define-enum): Rewrite.
6811         (define-normal-enum): Ditto.
6812         (def-full-insn-enum): New proc.
6813         (define-normal-insn-enum): Rewrite.
6814
6815         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6816         valid C.
6817         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6818
6819         * dev.scm: Add sid support.
6820
6821         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6822         (CLEANFILES): Add tmp-*.
6823         * Makefile.in: Rebuild.
6824
6825         * doc/Makefile.am: New file.
6826         * doc/Makefile.in: New file.
6827         * doc/cgen.texi: New file.
6828         * Makefile.am (SUBDIRS): Define.
6829         * Makefile.in: Rebuild.
6830         * configure.in: Create doc/Makefile.
6831         * configure: Rebuild.
6832
6833 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
6834
6835         * insn.scm (insn:syn): Delete.
6836
6837 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
6838
6839         * fr30.cpu (model fr30-1): Add state variables load-regs,
6840         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
6841         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6842         (model m32rx): Ditto.
6843         (addi): Simplify function unit usage spec.
6844         (ld-plus): Rewrite operand names in function unit usage spec.
6845         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6846         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6847         overridden.  Allow operand to appear in input and output spec.
6848         (<insn>,gen-profile-code): string-append -> string-list.
6849
6850         * ifield.scm (define-ifield): Call pmacro-expand.
6851         (define-full-ifield,define-normal-ifield): Ditto.
6852         (define-multi-ifield,define-normal-multi-ifield): Ditto.
6853
6854         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6855         with-scache and without-scache cases.
6856
6857 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
6858
6859         * fr30.cpu (fr30-1): Add state variable h-gr.
6860         Add units u-cti, u-load, u-store, u-ldm, u-stm.
6861         (all insns): First pass at providing cycle counts.
6862         * sim.scm (<unit>,gen-profile-code): Only check for output operands
6863         when initializing unit output operands, ditto for input operands.
6864
6865         * insn.scm (insn-length,insn-length-bytes): New procs.
6866         * mach.scm (-adata-set-derived!): Use them.
6867         * sim-cpu.scm (-gen-sem-case): Ditto.
6868
6869         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6870         (-gen-write-case): Ditto.
6871         (gen-semantic-fn): Ditto.  Split into two:
6872         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
6873         in non-scache case.
6874         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
6875         scache/no-scache appropriately.  All callers updated.
6876         (-gen-sem-case): PCADDR->IADDR.
6877         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6878
6879         * sim-decode.scm (*): Replace string-append,string-map with
6880         string-list,string-list-map where the result is sufficiently large.
6881         (-gen-decode-insn-table): Go back to simple version for non-scache
6882         case: just record IDESC in decoder tables and leave field extraction
6883         to the caller.
6884         (-gen-decode-switch): Ditto.
6885         (-gen-decode-fn): Ditto.
6886         (-gen-extract-decls): Only emit format enum if with-scache?.
6887         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6888         non-scache case.
6889         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6890         (-gen-insn-timing): Ditto.
6891         * sim.scm (gen-argbuf-type): Only output sem_fields union in
6892         with-scache case.
6893
6894         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6895         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6896
6897 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
6898
6899         * cpu.scm (keep-mach-validate!): New proc.
6900         (include): New proc.
6901
6902         * mach.scm (current-arch-mach-name-list): New proc.
6903         (-parse-arch-machs): Always return canonical form.
6904         (def-arch): Validate user specified machs to be kept.
6905         (def-mach-attr!): Simplify.
6906
6907         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6908         (option-init!): Initialize it.
6909         (option-set!): Set it.
6910         (gen-insn-table-entry): Emit 0 for operand instance ref if not
6911         output operand instance tables.
6912         (cgen-opc.in): Only output operand instance tables if asked to.
6913
6914         * sim.scm (option-init!,option-set!): Clarify returned value.
6915
6916         * sim.scm (gen-mach-bfd-name): Move from here.
6917         * utils-cgen.scm: To here.
6918
6919 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
6920
6921         * fr30.cpu (ilm): Fix comment field.
6922         (cond-branch): Remove explicit setting of COND-CTI, let cgen
6923         compute it.
6924
6925         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6926         (rtx-true?, rtx-false?): New procs.
6927         * rtx-funcs.scm (annul): Rename vpc to pc.
6928         (-rtx-traverse-if): Improve determination of whether then/else parts
6929         are conditionally executed.
6930
6931         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6932         outer level.
6933         (gen-argbuf-type): Simplify generated definition (big sem_fields
6934         union moved outside).
6935
6936 1999-01-11  Ben Elliston  <bje@cygnus.com>
6937
6938         * doc/porting.texi: New file.
6939
6940         * doc/intro.texi: New file.
6941         (Layout): Use @example to insert preformatted ASCII text (such as
6942         diagrams). @code is inappropriate here.
6943
6944 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
6945
6946         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6947
6948         * m32r.opc (print_hash): Cast dis_info.
6949
6950         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6951         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6952         get/set macros.
6953
6954 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
6955
6956         * i960.cpu (f-br-disp): Remove RELOC attribute.
6957         (f-ctrl-disp): Ditto.
6958         (callx-disp): set-quiet -> set for (reg h-gr 2).
6959         (callx-indirect,callx-indirect-offset): Ditto.
6960
6961         * Makefile.am (gas-test): Fix dependencies.
6962         * Makefile.in: Rebuild.
6963         * cgen-gas.asm: File creation args are -<uppercase-letter>.
6964         * gas-test.scm (break-out-syntax,make-file-name): Delete.
6965         (gas-test-analyze!): Use syntax-break-out.
6966         * sim-test.scm (break-out-syntax,make-file-name): Delete.
6967         (sim-test-analyze!): Use syntax-break-out.
6968         (cgen-build.sh): Use gen-file-name.
6969         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6970         * insn.scm (syntax-break-out): New proc.
6971         * utils.scm (gen-file-name): New proc.
6972
6973         * fixup.scm (nil,<?,<=?,>?): Delete.
6974
6975         * utils.scm (count-true): Rewrite.
6976
6977         * slib/sort.scm: Move sort.scm to slib directory.
6978         * cpu.scm: Update.
6979
6980         * iformat.scm (ifmt-compute!): Record empty format.
6981
6982         * rtl.scm (semantic-in-out-operands): Simplify by moving several
6983         internal procs outside.  Handle expression register numbers.
6984         Handle index-of.
6985
6986         * rtx-funcs.scm (annul): Rename new_pc to vpc.
6987
6988         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6989         every register.
6990         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6991         (gen-semantic-fn,-gen-sem-case): Ditto.
6992         (cgen-cpu.c): Define WANT_CPU to @cpu@.
6993         (cgen-semantics.c): Ditto.
6994         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6995         (gen-ifmt-argvars-defns): New proc.
6996         (gen-ifmt-argvars-assigns): New proc.
6997         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6998         (-gen-decode-fn): Handle non-with-scache case.
6999         (cgen-decode.c): Define WANT_CPU to @cpu@.
7000         * sim-models.scm (-gen-mach-defns): Emit bfd name.
7001         (cgen-model.c): Define WANT_CPU to @cpu@.
7002         * sim.scm (gen-ifld-extract-argvar): New proc.
7003         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7004         with FUN-ACCESS specified.
7005         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7006         (<hw-register>,gen-extract): New arg local?.
7007         (<hw-address>,gen-extract): Ditto.
7008         (-hw-cxmake-get): Handle non-with-scache case.
7009         (-hw-gen-set-quiet): Ditto.
7010         (<hw-address>,cxmake-get): Handle non-with-scache case.
7011         (gen-op-extract-argvar): New proc.
7012         (<operand>,gen-record-profile): Rewrite.
7013         (<operand>,gen-profile-code): Rewrite.
7014         (<unit>,gen-profile-code): Use -gen-argfld-ref.
7015         (gen-argbuf-fields-union): New proc.
7016         (gen-argbuf-type): Use it.  Handle non-scache case.
7017
7018         * *.scm: class:foo procs renamed to class-foo.
7019         * attr.scm (<attribute>): New member `for'.
7020         (-attr-parse): New first value in list for default if
7021         none specified.
7022         (non-bool-attr-list,attr:add!): Delete.
7023         (def-attr): Use current-attr-add!.
7024         (atlist-attr-value-no-default): New proc.
7025         (attr-lookup-default): Handle boolean attributes.
7026         (gen-attr-enum): New proc.
7027         (-attr-remove-meta-attrs-alist): New proc.
7028         (attr-nub): New proc.
7029         (current-attr-list-for): New proc.
7030         (current-{ifld,hw,op,insn}-attr-list): New procs.
7031         (attr-builtin!): New proc.
7032         * cpu.scm (keep-obj?): Rewrite.
7033         (-init-parse-cpu!): Call arch-init!.
7034         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7035         (-finish-parse-cpu!): Call arch-finish!.
7036         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7037         (def-enum,def-full-enum): Use current-enum-add!.
7038         (gen-obj-list-enums): New proc.
7039         * hardware.scm (hw:add!,hw:lookup): Delete.
7040         (def-hardware,def-hardware-ext): Use current-hw-add!.
7041         (hw:std-attrs,hw:attr-list): Delete.
7042         (hardware-builtin!): Define builtin hardware attributes.
7043         * ifield.scm (ifld:add!,ifld:lookup): Delete.
7044         (def-ifield,def-full-ifield): Use current-ifld-add!.
7045         (ifld:std-attrs,ifld:attr-list): Delete.
7046         (ifield-builtin!): New proc.
7047         * insn.scm (insn:add!,insn:lookup): Delete.
7048         (def-full-insn): Use current-insn-add!.
7049         (insn:std-attrs): Delete.
7050         (insn-builtin!): New proc.
7051         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7052         minsn-list.
7053         (<arch-data>): New member machs.
7054         (current-attr-list,current-enum-list): New procs.
7055         (current-op-list,current-minsn-list): New procs.
7056         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7057         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7058         Ditto.
7059         (-parse-arch-machs): New proc.
7060         (-arch-parse): New arg machs, all callers updated.
7061         (-arch-read): Handle machs spec.
7062         (def-arch): Define MACH attribute here.
7063         (mach-init!,mach-finish!): Not here.
7064         (cpu:add!,cpu:lookup): Delete.
7065         (def-cpu): Use current-cpu-add!.
7066         (<mach>): New member bfd-name.
7067         (-mach-parse): New arg bfd-name, all callers updated.
7068         (-mach-read): Handle bfd-name spec.
7069         (mach:add!,mach:lookup): Delete.
7070         (def-mach): Use current-mach-add!.
7071         (def-mach-attr!): New proc.
7072         (arch-init!): New proc.
7073         (arch-finish!): New proc.  Reverse all object lists here.
7074         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7075         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7076         (define-normal-macro-insn): Ignore minsn if mach not kept.
7077         * mode.scm (mode-builtin!): New proc.
7078         * model.scm (model:add!,model:lookup): Delete.
7079         (def-model): Use current-model-add!.
7080         * opcodes.scm (insn:attr-list): Delete.
7081         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7082         (gen-attr-table-defn): Emit value for default.
7083         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7084         (op:attr-list): Delete.
7085         (gen-operand-decls,gen-insn-decls): New proc.
7086         (compute-insn-attr-list): Delete.
7087         (cgen-opc.h): Reorganize and simplify.
7088         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7089         (def-operand,def-full-operand): Use current-op-add!.
7090         (op:std-attrs): Delete.
7091         (operand-enum): Delete.
7092         (operand-builtin!): Define builtin operand attrs.
7093         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7094         (gen-attr-enum-decl): Use gen-obj-list-enums.
7095         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7096         Rewrite.
7097         * fr30.cpu (define-arch): Add machs spec.
7098         (f-i4): SIGNED attribute -> !UNSIGNED.
7099         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7100         (HASH-PREFIX): Define operand attribute.
7101         (NOT-IN-DELAY-SLOT): Define insn attribute.
7102         * i960.cpu (define-arch): Add machs spec.
7103         * m32r.cpu (define-arch): Add machs spec.
7104         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7105         (HASH-PREFIX): Define operand attribute.
7106         (FILL-SLOT): Define insn attribute.
7107
7108 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7109
7110         * fr30.cpu (stilm): Correct mask for and operation.
7111
7112 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7113
7114         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7115         Replace START/EXIT with start/pass.
7116         (gen-sim-test): Delete ".text".
7117
7118 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7119
7120         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7121
7122 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7123
7124         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7125         (h-sbit): Make it FUN-ACCESS.
7126         (h-gr): Reorder so that general regs are always printed by number.
7127
7128 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7129
7130         * i960.cpu (flushreg): Use nop.
7131
7132 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7133
7134         * m32r.cpu (default-alignment): Specify.
7135         * mach.scm (<arch-data>): New member default-alignment.
7136         (adata:default-alignment): New proc.
7137         (current-arch-default-alignment): New proc.
7138         (-arch-parse): New arg default-alignment.
7139         (parse-alignment): New proc.
7140         (-arch-read): Handle default-alignment spec.
7141
7142         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7143
7144         * insn.scm (f-%): Delete.
7145         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7146         be readded if proved useful.
7147         (gen-extract-fields): Ditto.  Use gen-ifetch.
7148         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7149         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7150
7151 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7152
7153         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7154
7155 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7156
7157         * fr30.cpu: Remove stub macros.
7158         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7159         (div2): Don't use addc/subc.
7160
7161 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7162
7163         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7164         if opcodes.
7165
7166 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7167
7168         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7169
7170 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7171
7172         * cpu.scm (keep-all?): New proc.
7173         (assert-keep-all): Use it.
7174         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7175         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7176         Check for spelling errors.
7177
7178 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7179
7180         * rtl.scm (s-convop): Call -rtx-sem-mode.
7181
7182 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7183
7184         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7185         (-parse-hw-profile): Ditto.
7186         (<hw-register>, parse!): Return `void' result.
7187         (<hw-pc>, parse!): Ditto.
7188         (<hw-memory>, parse!): Ditto.
7189         (<hw-immediate>, parse!): Ditto.
7190         (<hw-address>, parse!): Ditto.
7191
7192         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7193         (-ifld-parse-encode-decode): New proc.
7194         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7195         (-multi-ifield-parse): Set encode/decode to #f.
7196         (ifld:decode-mode): New proc.
7197         * utils.scm (nub): Rewrite.
7198         * operand.scm (op-nub): Rewrite.
7199         * sim.scm (<ifield>, gen-type): Rewrite.
7200         (-gen-ifld-argbuf-defn): New proc.
7201         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7202         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7203         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7204         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7205         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7206         New method gen-trace-extract.
7207         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7208         from gen-argbuf-elm, return "" if not caching register address.
7209         Rewrite gen-extract.  New method gen-trace-extract.
7210         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7211         gen-extract, gen-trace-extract, cxmake-get.
7212         (<hw-iaddress>): New method cxmake-get.
7213         (op-needed-iflds): New proc.
7214         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7215         (-gen-op-argbuf-defn): New proc.
7216         (gen-op-extract): Renamed from op:extract.
7217         (gen-op-trace-extract): Renamed from op:trace-extract.
7218         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7219         and rewritten.
7220         (gen-argbuf-elm): Rewrite.
7221         * sim-decode.scm (-gen-record-args): Update.
7222
7223         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7224
7225         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7226         argument position.  Flag symbolic macros in function position as
7227         an error.
7228         (define-pmacro): Handle quoting in definition of symbolic macros.
7229         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7230
7231 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7232
7233         * fr30.opc (parse_register_list): Account for reverse masks
7234         for load and store.
7235         (print_register_list): Ditto.
7236         (parse_low_register_list_ld): New function.
7237         (parse_hi_register_list_ld): New function.
7238         (parse_low_register_list_st): New function.
7239         (parse_hi_register_list_st): New function.
7240         (print_hi_register_list_ld): New function.
7241         (print_hi_register_list_st): New function.
7242         (print_low_register_list_ld): New function.
7243         (print_low_register_list_st): New function.
7244         * fr30.cpu (ldr15dr): Implement workaround.
7245         (ldm0,ldm1,stm0,stm1): Implemented.
7246
7247 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7248
7249         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7250         * configure: Regenerate.
7251         * Makefile.am (WITH_HOBBIT): Update.
7252         (cgen-hob.c): Remove Makefile dependency.
7253         (cgen.o): Depend on cgen-gh.h, config.h.
7254         * Makefile.in: Regenerate.
7255         * aclocal.m4: Regenerate.
7256
7257 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7258
7259         * i960.cpu, i960.opc: New files.
7260
7261 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7262
7263         * fr30.opc (parse_register_number): New function.
7264         (parse_register_list): New function.
7265         (parse_low_register_list): Use parse_register_list.
7266         (parse_hi_register_list): Use parse_register_list.
7267         * fr30.cpu (sth): Fix assembler syntax. Implement more
7268         insns.
7269
7270 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7271
7272         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7273         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7274         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7275         (-op-gen-set-trace-parallel): Ditto.
7276         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7277
7278         * fr30.cpu (call,calld): Fix setting of pc.
7279         (f-op5): Fix start bit number.
7280
7281 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7282
7283         * fr30.cpu (st): Fix operand ordering. Implement more
7284         insns.
7285
7286 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7287
7288         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7289         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7290         (fmt-semantic-operands): Move to sim.scm.
7291         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7292         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7293         (<hw-index>): New method get-name.
7294         (op-profilable?): Moved to sim.scm.
7295         (op-nub): New proc.
7296         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7297         (op-profilable?): Moved here from operand.scm.
7298         (gen-extract-type): Delete.
7299         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7300         (-gen-argfld-ref): New proc.
7301         (-gen-ifld-argfld-name): New proc.
7302         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7303         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7304         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7305         (<hardware-base>): Delete method gen-extract-type.  New method
7306         gen-argbuf-elm.
7307         (<hw-register): Ditto.  Update method gen-extract.
7308         (<operand>, method gen-argbuf-elm): Rewrite.
7309         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7310         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7311         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7312
7313         * sim-decode.scm (-gen-record-args): Tweak.
7314
7315         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7316
7317 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7318
7319         * doc/porting: Fix typo: gas->sim.
7320         * fr30.opc (print_m4): New function.
7321         * fr30.cpu: Implemented many insns.
7322
7323 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7324
7325         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7326
7327         * fr30.cpu (f-rel9): Delete RELOC attribute.
7328         (f-rel12): Add PCREL-ADDR attribute.
7329         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7330         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7331         * fr30.opc (print_label9): Delete.
7332
7333         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7334         code for CTI indicators.
7335         * insn.scm (insn-cti?): Simplify.
7336         * utils-cgen.scm (atlist:cti?): New proc.
7337
7338 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7339
7340         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7341         (f-i20-4,f-i20-16,f-i20): New fields.
7342         (i20): New operand.
7343         (ldi8): Implement.
7344         (ldi20): New insn.
7345         (ldi32m): Delete.
7346         (jmpd): Implement.
7347         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7348         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7349         * mach.scm (arch-data): Ditto.
7350         (current-arch-default-insn-word-bitsize): Renamed from
7351         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7352         (-arch-read): Update.
7353
7354         * hardware.scm (hw:attr-list): Move here ...
7355         * opcodes.scm: ... from here.
7356
7357         * ifield.scm (fld:bitrange): Delete.
7358         (fld:word-offset,fld:word-length): New procs.
7359         (ifield?): Use class-instance.
7360         (<ifield>, method field-start): Rewrite.
7361         (ifld:enum): New proc.
7362         (<ifield>, methods field-mask,field-value): Rewrite.
7363         (-ifield-parse): Rewrite.
7364         (<multi-ifield> support): Rewrite.
7365         (ifld-beyond-base?): Rewrite.
7366         (ifld:std-attrs): New variable.
7367         (ifld:attr-list): New proc.
7368         * iformat.scm (-compute-insn-mask): Rewrite.
7369         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7370         Simplify.
7371         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7372         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7373         onto type.
7374         (<operand>): Ditto.  Forward onto index instead.
7375         (gen-ifld-decls,gen-ifld-defns): New procs.
7376         (ifld:insert,ifld:extract): New procs.
7377         (<ifield>): New methods gen-insert, gen-extract.
7378         (<multi-ifield>): Ditto.
7379         (<hw-index>): Forward gen-insert,gen-extract onto value.
7380         (<hw-asm>): Delete insert/extract support.
7381         (<hw-register,hw-memory,hw-immediate>): Ditto.
7382         (gen-hash-defines): Use string-list.
7383         Define CGEN_MAX_IFMT_OPERANDS.
7384         (gen-switch): Use string-list,string-list-map.
7385         (gen-fget-switch,gen-fset-switch): Use string-list.
7386         (gen-parse-switch,gen-insert-switch): Ditto.
7387         (gen-extract-switch,gen-print-switch): Ditto.
7388         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7389         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7390         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7391         (gen-ivalue-entry): New proc.
7392         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7393         computation.  Use 0 for operand ref table if ALIAS insn.
7394         (gen-minsn-table-entry): Use string-list.
7395         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7396         (gen-opcode-open): Record address of ifield table.
7397         (cgen-opc.h): Call gen-ifld-decls.
7398         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7399         * types.scm (<bitrange>): New members word-offset,word-length.
7400         Delete member total-length.  Delete methods start,mask,value.
7401         (bitrange:word-offset,bitrange:word-length): New procs.
7402         * sim-cpu.scm (gen-define-fields): Simplify.
7403         (gen-extract-fields): Simplify.
7404         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7405         (<ifield>): New methods gen-ifld-extract-decl.
7406         Delete method gen-ifld-extract-beyond.
7407         (<multi-ifield>): New methods gen-ifld-extract-decl.
7408         (<multi-ifield>, method gen-ifld-extract): Implement.
7409         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7410         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7411
7412         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7413         (-rtx-traverse-syntax-no-mode): New proc.
7414         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7415         (s-ifield): New proc.
7416         (s-shop): Don't prepend `unsigned' for unsigned modes.
7417         * rtx-funcs.scm (ifield): New rtx function.
7418         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7419         (delay): New rtx function.
7420         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7421
7422         * cos.scm (-elm-make-method-getter): Fix typo.
7423
7424         * utils.scm (backslash): Handle lists of strings.
7425
7426 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7427
7428         * fr30.cpu (f-rel9): Correct for pc+2.
7429         (label9): Use print_label9.
7430         * fr30.opc (print_label9): New function.
7431
7432 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7433
7434         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7435         * fr30.opc (parse_low_register_list): Renamed.
7436         (parse_hi_register_list): Renamed.
7437         (print_hi_register_list): Renamed.
7438         (print_low_register_list): Renamed.
7439
7440 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7441
7442         * fr30.cpu (f-rel9): Now a pc relative offset.
7443
7444 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7445
7446         * opcodes.scm (op-asm): Move to here, from operands.scm.
7447         (<op-asm>, method parse!): Validate arguments.
7448         (<operand>, method gen-function-name): Fix thinko.
7449         * operand.scm (<operand>, method make!): Don't set op-asm here.
7450         * utils.scm (list-elements-ok?): New proc.
7451
7452         * opcodes.scm: Clean up pass.
7453
7454 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7455
7456         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7457         the fr30_int function.
7458         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7459         (h-dr): Add FUN-ACCESS attribute.
7460
7461 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7462
7463         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7464         for C symbol for models array.
7465
7466 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7467
7468         * fr30.opc (parse_reglist_low): New function.
7469         (parse_reglist_hi): New function.
7470         (print_reglist_low): New function.
7471         (print_reglist_hi): New function.
7472         * fr30.cpu: Finish remaining insn stubs.
7473
7474 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7475
7476         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7477
7478         * fr30.cpu (ldi32m): Don't use for disassembly.
7479
7480 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7481
7482         * fr30.cpu (int): Implement it.
7483
7484 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7485
7486         * rtx-funcs.scm (nop): Fix C code.
7487
7488         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7489
7490         * fr30.cpu (f-i32): New ifield.
7491         (i32): New operand.
7492         (ldi32): New insn.
7493         (ldi32m): New macro insn.
7494         (inte): Provide simple version for now.
7495
7496         * sim-arch.scm: New file.
7497         * sim.scm: Move architecture support generation to sim-arch.scm.
7498         * cgen-sim.scm: Load sim-arch.scm.
7499         * dev.scm: Ditto.
7500
7501         * hardware.scm (pc?) New proc.
7502         (class <hardware-base>): Rewrite method 'pc?.
7503         (class <hardware>): Forward 'pc? to the hardware type.
7504         (class <hw-pc>): New method 'pc?.
7505
7506         Add support for variable length ISAs.
7507         * ifield.scm (ifld-beyond-base?): New proc.
7508         * m32r.cpu: Remove integral-insn? spec.
7509         * mach.scm (arch:derived,arch:set-derived!): New procs.
7510         (arch:app-data,arch:set-app-data!): New procs.
7511         (class <arch>): New members derived, app-data.
7512         (class <cpu>): Delete member integral-insn?.
7513         (cpu:integral-insn?): Delete.
7514         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7515         (-cpu-read): Delete integral-insn? support.
7516         (state:decode-assist): Delete.
7517         (state:int-insn?): Delete.
7518         (<derived-arch-data>): New class.
7519         (-adata-set-derived!): New proc.
7520         (mach-finish!): Call it.
7521         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7522         (gen-operand-instance): Add COND_REF support.
7523         (gen-operand-instance-table): Ditto.
7524         (gen-hash-defines): Update.
7525         (gen-extract-switch): Update type of `insn_value' arg.
7526         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7527         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7528         updated.
7529         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7530         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7531         beyond the base insn (for large insns).
7532         (-gen-extract-beyond-var-list): New proc.
7533         (gen-extract-fields): Handle large insns.
7534         (-gen-write-case): Update sem_arg computation.
7535         Update initial vpc computation.
7536         (gen-semantic-fn): Ditto.  Update type of `insn'.
7537         (-gen-sem-case): Update sem_arg computation.
7538         Update initial vpc computation.
7539         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7540         (-gen-extract-word): New proc.
7541         (<ifield>): New method gen-ifld-extract-beyond.
7542         (gen-ifld-extract-beyond): New proc.
7543         * types.scm (bitrange-overlap?): New proc.
7544
7545         * utils.scm (bits->bytes): New proc.
7546         (bytes->bits): New proc.
7547
7548         Move extraction support into decoder.
7549         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7550         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7551         support to sim-decode.scm.
7552         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7553         be array of IDESC,FMT entries.  Make the array const.
7554         (-gen-gcc-label-table): Make array const.
7555         (-gen-decode-switch): Branch to extraction code after insn has been
7556         identified.
7557         (-gen-decode-insn-globals): Delete extract handler from
7558         @cpu@_insn_sem.
7559         (gen-decode-fn): Add extraction support.
7560         (-gen-sem-fn-decls): Delete extraction fn decls.
7561         (-gen-idesc-decls): Update @cpu@_decode decl.
7562         (-gen-idesc-init-fn): Delete extraction support.
7563         (-gen-extract-decls): New proc.
7564
7565         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7566         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7567
7568         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7569         All callers updated.
7570         (table-entry:make): Record insn value as insn object, not name.
7571         All uses updated.
7572
7573         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7574         collision with C function.
7575         (path_dirname): Similarily.
7576         * hobbit.c,hobbit.h: Rebuild.
7577
7578 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7579
7580         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7581
7582 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7583
7584         * fr30.cpu: Implement more instruction stubs.
7585
7586 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7587
7588         * fr30.cpu: Implement more instruction stubs.
7589
7590 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7591
7592         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7593
7594         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7595
7596         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7597         (op:std-attrs): Ditto.
7598         * opcodes.scm (gen-operand-instance): Ditto.
7599         (gen-switch): Ditto.
7600         * m32r.cpu (condbit,accum): Update.
7601         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7602
7603 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7604
7605         * enum.scm (-enum-read): Fix typo.
7606
7607         * iformat.scm (-ifmt-search-key): Simplify a little.
7608
7609 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7610
7611         * doc/porting: semantics.c -> sem.c.
7612         * Makefile.in: Regenerate.
7613         * fr30.cpu (add): Change ADD to add. Add more registers and set
7614         status bits on 'add' instruction.
7615
7616 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7617
7618         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7619         of 0.
7620
7621 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7622
7623         * minsn.scm (minsn:enum): Update, call current-arch-name.
7624
7625         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7626
7627         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7628         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7629         (ARCH,CGEN,CGENFLAGS): New variables.
7630         (gas-test,sim-test): New rules.
7631         * Makefile.in: Rebuild.
7632         * configure.in (arch): Define.
7633         * configure: Rebuild.
7634
7635         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7636         * All .scm files: Ditto.
7637
7638         * dev.scm: Fix gas-test call to cpu-load.
7639         * gas-test.scm: Clean up pass to remove bit-rot.
7640         * sim-test.scm: Ditto.
7641
7642         * enum.scm (read-enum): Fix typo in `vals' handling.
7643
7644         * hardware.scm (-parse-hw-type): Fix typo.
7645         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7646         (def-hardware,define-normal-hardware): Ditto.
7647
7648         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7649         (display-var): Use it.
7650         * hobbit.c: Rebuild.
7651         * hobbit.h: Rebuild.
7652
7653         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7654         avoid hobbit problem.
7655         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7656         `parallel-insns-' to avoid hobbit problem.
7657
7658 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7659
7660         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7661         (parse_slo16,parse_ulo16): Ditto.
7662         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7663
7664 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7665
7666         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7667         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7668         * Makefile.in: Rebuild.
7669         * insn.scm (define-normal-insn): Expand pmacros.
7670         * mode.scm (<mode>): New member `host?'.  All uses updated.
7671         (mode:host?): New proc.
7672         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7673         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7674         (define-rtx-dual-mode): Ditto.
7675         (s-index-of): New proc.
7676         (s-unop): Use plain C for host mode operations.
7677         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7678         * rtx-funcs.scm (index-of): New rtx function.
7679         * sim.scm (<hw-index>): New method cxmake-get.
7680
7681 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7682
7683         * sim-cpu.scm (-gen-engine-decls): Delete.
7684
7685 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7686
7687         * doc/rtl (Example): Correct Typo.
7688         * doc/porting: Add 'make dep' step to opcodes port instructions.
7689         * fr30.opc: New file.
7690         * fr30.cpu: New file.
7691
7692 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7693
7694         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7695         * Makefile.am (GUILEINCDIR): New variable.
7696         (INCLUDES): Use it.
7697         * configure: Regenerate.
7698         * Makefile.in: Ditto.
7699         * aclocal.m4: Ditto.
7700
7701 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7702
7703         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7704         (cgen-semantics.c): Ditto.
7705         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7706         * sim-model.scm (cgen-model.c): Ditto.
7707         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7708         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7709
7710         * opcodes.scm (read-cpu.opc): Handle empty file.
7711
7712         * cos.scm (-elm-make-method-setter): Fix typo.
7713
7714         * cpu.scm (-init-parse-cpu!): Call types-init!.
7715         (-finish-parse-cpu!): Call types-finish!.
7716         * ifield.scm (<ifield>): Delete members start,length.
7717         New member bitrange.
7718         (<ifield>, methods field-start,field-length): Update.
7719         (fld:start): New arg insn-len.  All callers updated.
7720         (<ifield>, methods field-mask,field-value): Update.
7721         (-ifield-parse): Update.
7722         (ifield-init!): Update.
7723         * iformat.scm (compute-insn-length): Simplify.
7724         (compute-insn-mask): Update.
7725         * insn.scm (insn:value): Update.
7726         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7727         (current-arch-default-insn-bitsize): New proc.
7728         (current-arch-insn-lsb0?): New proc.
7729         (-arch-parse,-arch-read): Update.
7730         (<cpu>): New member file-transform.
7731         (-cpu-parse,-cpu-read): Update.
7732         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7733         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7734         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7735         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7736         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7737         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7738         * operand.scm (op:start): Update call to field-start method.
7739         * sim-decode.scm (opcode-slots): New arg lsb0?.
7740         (fill-slot!,build-slots): Ditto.
7741         (build-decode-table-entry,build-decode-table-guts): Ditto.
7742         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7743         (gen-decode-fn): Ditto.
7744         (cgen-decode.c): Update call to gen-decode-fn.
7745         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7746         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7747         (cgen-cpuall.h): Call -gen-cpuall-includes.
7748         * types.scm (<bitrange>): New class.
7749         (types-init!,types-finish!): New procs.
7750         * utils-cgen.scm (parse-number): New proc.
7751         (parse-boolean): New proc.
7752         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7753         (word-mask): Rewrite.
7754         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7755         (m32rxf): New field `file-transform'.
7756         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7757
7758         * hobbit.h: Fix include file name.
7759
7760 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7761
7762         * slib: New directory of slib files used by cgen/hobbit.
7763         * hobbit.scm: New file.
7764         * hobbit.c: New file.
7765         * hobbit.h: New file.
7766         * hobscmif.h: New file.
7767         * hob-main.c: New file.
7768         * hobslib.scm: New file.
7769         * hob.sh: New file.
7770         * Makefile.am: Add support for compiling hobbit, and using compiled
7771         version of hobbit to compile cgen.
7772         * Makefile.in: Regenerate.
7773         * configure.in: Support --with-hobbit.
7774         * configure: Regenerate.
7775         * acconfig.h (WITH_HOBBIT): Add.
7776         * config.in: Regenerate.
7777
7778         * rtl.scm: New file, was cdl-c.scm.
7779         Definition of rtx funcs moved to rtx-funcs.scm.
7780         (semantic-in-out-operands): Rewrite to compute object form of
7781         semantic code.
7782         * rtx-funcs.scm: New file.
7783
7784         * cgen-gh.c: #include "config.h".
7785         (gh_cadddr,gh_cddddr): New fns.
7786         (cgh_vector_to_list): New fn.
7787         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7788         (cgh_init): Prefix qsort procs with "cgh-".
7789         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7790         * cgen.c: #include "config.h".
7791
7792         * attr.scm (bitset-attr?): New proc.
7793         (<bitset-attribute>, method parse-value): Value syntax changed from
7794         (val1 val2 ...) to val1,val2,....
7795         (<bitset-attribute>): New method gen-value.
7796         (<integer-attribute>): New method gen-value.
7797         (<enum-attribute>): New method gen-value.
7798         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7799         (<reader>): New class.
7800         (CURRENT-ARCH,CURRENT-READER): New globals.
7801         (keep-mach?): Move here from mach.scm.
7802         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7803         (<arch>): New class.
7804         (<arch-data>): New class.
7805         (<cpu>): Make subclass of <ident>.
7806         (*ENDIAN* variables): Delete.
7807         (process-state-vars): Delete.
7808         (mach-finish!): Add `base' value to MACH attribute.
7809         * hardware.scm (<hardware>): Make subclass of <ident>.
7810         (hw:std-attrs): New global.
7811         (hw-profilable?): New proc.
7812         * ifield.scm (<ifield>): Make subclass of <ident>.
7813         (sort-ifield-list): Move here from iformat.scm.
7814         * iformat.scm (<iformat>): Renamed from <insn-format>.
7815         Make subclass of <ident>.
7816         (-ifmt-search-key): Include cti? in categorization of formats.
7817         (ifmt-analyze): Compile semantics (turn to object form).
7818         * insn.scm (<insn>): Make subclass of <ident>.
7819         New member compiled-semantics.
7820         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7821         * mode.scm (<mode>): Make subclass of <ident>.
7822         (UBI): Delete.
7823         * model.scm (<unit>): Make subclass of <ident>.
7824         New members inputs,outputs.
7825         (<model>): Make subclass of <ident>.  New member state.
7826         (-unit-parse): Parse inputs,outputs.
7827         (<iunit>): New class.
7828         (-insn-timing-parse-model): New proc.
7829         (parse-insn-timing): Function unit spec rewritten.
7830         * operand.scm (<operand>): Make subclass of <ident>.
7831         New members sem-name,num,cond?  New method gen-pretty-name.
7832         (hw-index-scalar): New global.
7833         (op-nub-hw): Move here from rtl.scm.
7834         (op:lookup-sem-name,op-profilable?): New procs.
7835         * pmacros.scm: Rewrite to pass through hobbit.
7836         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7837         * utils.scm (logit): Make a macro.
7838         (bit-set?): Rewrite.
7839         (high-part): Rewrite.
7840
7841         * m32r.cpu (define-arch): Move to top of file.
7842         (cpu family m32rbf): Renamed from m32rb.
7843         (model m32r/d): Function unit spec rewritten.
7844         (all insns): Ditto.  Replace UBI with BI.
7845
7846         * opcodes.scm (gen-attr-table-decls): Declare
7847         @arch@_cgen_hw_attr_table.
7848         (gen-attr-table-defns): Generate hw attribute table.
7849
7850         * sim-cpu.scm (-gen-engine-decls): New proc.
7851         (-gen-model-decls): New proc.
7852         (gen-parallel-exec-type): Add new member `written' to struct parexec.
7853         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7854         (-gen-record-profile-args): Simplify.
7855         (-gen-parallel-sem-case): Delete.
7856         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7857         New local `written'.  Delete profiling code.
7858         (-gen-sem-case): Ditto.
7859         (-uncond-written-mask,-any-cond-written?): New procs.
7860         (cgen-sem-switch.c): Include duplicates of insns that can be executed
7861         parallelly or serially, and write-back handlers for all parallel insns.
7862         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7863         support to initialization of struct insn_sem.
7864         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7865         (-gen-insn-sem-type): Add parallel write-back support to struct
7866         insn_sem.
7867         (-gen-idesc-init-fn): Add support for virtual insns.
7868         Add parallel write-back support.
7869         * sim-model.scm (gen-model-profile-fn): Delete
7870         (-gen-model-fn-decls): New proc.
7871         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7872         (-gen-model-init-fn): New proc.
7873         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7874         members in @mach@_init_cpu.
7875         (cgen-model.c): Generate model handlers for each insn.
7876         * sim.scm (gen-define-field-macro): Cti insns handled differently.
7877         (<hw-pc>): New method gen-write.
7878         (<hw-register>, method gen-write): New arg `mode'.
7879         (<hw-register>): Delete method gen-record-profile!.
7880         New method gen-profile-index-type.
7881         (<hw-memory>, method gen-write): New arg `mode'.
7882         (<hw-address>, method gen-extract): Delete.
7883         (<hw-address>, method gen-write): New arg `mode'.
7884         (<hw-index>, method get-write-index): Rewrite.
7885         (<pc>, method cxmake-get-direct): Delete.
7886         (<pc>): New method cxmake-get.  Comment out methods
7887         gen-set-quiet,gen-set-trace.
7888         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7889         gen-profile-index-type,gen-profile-code.
7890         Delete method gen-pretty-name.  Rewrite method gen-write.
7891         Delete method cxmake-get-direct.
7892         (-op-gen-set-trace): Update `written'.
7893         (-op-gen-set-trace-parallel): Ditto.
7894         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7895         (gen-cpu-insn-enum-decl): Add extra entries for parallel
7896         insns and their write-back handlers.
7897         (insn-op-lookup): New proc.
7898         (<unit>): New method gen-profile-code.
7899         (<iunit>): New method gen-profile-code.
7900         (gen-argbuf-elm): Add profiling elements.
7901         (gen-argbuf-type): Define cti insns separately in their own struct.
7902         Add member `addr_cache' to this struct.  Add entries for pbb virtual
7903         insns.  Move semantic entries here from struct scache.
7904         Delete everything from struct scache except argbuf.
7905         (<insn>, method gen-profile-locals): Rewrite.
7906         (<insn>, method gen-profile-code): Rewrite.
7907         (sim-finish!): Create virtual pbb insns.
7908
7909 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7910
7911         * m32r.cpu (h-cr): Add bbpc,bbpsw.
7912         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7913         (h-psw,h-bpsw,h-bbpsw): Define.
7914         (rte,trap): Handle bbpc,bbpsw.
7915         * opcodes.scm (max-operand-instances): Fix typo.
7916         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7917         hardware elements to be fun-access.
7918         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7919
7920 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7921
7922         * m32r.cpu (trap): Pass `pc' to m32r_trap.
7923
7924 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
7925
7926         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7927
7928 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
7929
7930         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7931         architecture name.
7932         (mach m32r): Update.
7933
7934         * mach.scm (mach:supports?): New proc.
7935         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7936         gen-reg-access-{decls,defns}.
7937         * sim.scm (gen-reg-access-{decl,defn}): New procs.
7938         (gen-mach-bfd-name): New proc.
7939         (gen-arch-reg-access-{decls,defns}): New procs.
7940         (cgen-arch.[ch]): Output register access cover fns.
7941
7942         * hardware.scm (hardware-builtin!): Set print handlers for
7943         h-addr,h-iaddr.
7944         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7945         `od'.
7946         (CGEN_PRINT_NORMAL,print_hash): Ditto.
7947         (my_print_insn): Ditto.  Delete args buf, buflen.
7948         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7949         (-hw-asm-specs): Add `handlers' spec.
7950         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
7951         `normal-hw-asm'.
7952         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
7953         print.
7954         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7955         (<hw-asm>, parse!): New method.
7956         (gen-insn-table-entry): Print semantics.
7957         (gen-opcode-open): Renamed from gen-opcode-table.
7958
7959         * utils.scm (string-write): No longer a macro.
7960         (-string-write): Handle procedure args.
7961         * opcodes.scm: Update all calls to string-write.
7962         * sim-cpu.scm: Ditto.
7963         * sim-decode.scm: Ditto.
7964         * sim-model.scm: Ditto.
7965         * sim.scm: Ditto.
7966
7967 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
7968
7969         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7970         (-gen-insn-builders,-gen-insn-builder): New procs.
7971
7972 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
7973
7974         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7975         (gen-opcode-table): Properly terminate comment.
7976
7977 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
7978
7979         * Version 0.6.0.
7980         Clean up pass over everything, so starting fresh.