OSDN Git Service

tweak last entry
[pf3gnuchains/pf3gnuchains4x.git] / cgen / ChangeLog
1 2009-09-25  Doug Evans  <dje@sebabeach.org>
2
3         * operand.scm (/anyof-merge-setter): Handle set-quiet.
4         * rtl.scm (rtx-single-set?): Handle set-quiet.
5
6         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
7         rtl-cover-fns?, macro?.  All callers updated.
8         (estate-make-for-normal-rtl-c): Delete, have all callers call
9         estate-make-for-rtl-c directly.
10         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
11         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
12
13         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
14         replaces /par-replace-set-dests.
15         (/par-replace-set-src-expr-fn): New function, replaces
16         /par-replace-set-srcs.
17         (s-parallel): Rewrite.
18
19         * rtl.scm (rtx-pretty-strdump): New function.
20         * rtl-traverse.scm (/rtx-canon-error): Use it.
21         (<eval-state>): New member outer-expr.
22         (estate-error): Include outer expression in error message if present.
23
24 2009-09-23  Doug Evans  <dje@sebabeach.org>
25
26         * xc16x.cpu (h-cr): New hardware.
27         (muls): Comment out parts that won't compile, add fixme.
28         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
29         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
30         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
31
32         Rewrite rtl processing to require it to be "canonicalized" first,
33         and write a full canonicalizer / expression checker.
34         Remove all appearances of DFLT in canonical rtl.
35         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
36         then rtx-simplify.
37         * iformat.scm (ifmt-analyze) Use canonical semantics.
38         * insn (<insn>): New member canonical-semantics.
39         * mach.scm (<arch>): New member multi-insns-instantiated?.
40         (/instantiate-multi-insns!): New function.
41         (/canonicalize-insns!): New function.
42         (arch-analyze-insns!): Canonicalize insn semantics before processing
43         them.
44         * mode.scm (/mode-set-word-params!): New function.
45         (mode-void?): New function.
46         (mode-compatible?): VOID is compatible with VOID.
47         (/mode-word-sizes-defined?): New global.
48         (mode-set-word-modes!): Use/set it.
49         (mode-ensure-word-sizes-defined): Update.
50         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
51         Redo WI/UWI/AI/IAI handling.
52         (op:new-mode): No longer accept DFLT.
53         (<derived-operand> constructor): Ensure all fields are initialized.
54         (<anyof-operand> constructor): Ditto.
55         (/derived-parse-ifield-assertion): Delete arg `args'.
56         All callers updated.
57         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
58         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
59         (rtl-c-expr, rtl-c++): Ditto.
60         (/rtl-c-get): Use mode of operand, not containing expression.
61         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
62         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
63         estate-for-insn? instead.
64         (s-unop): Use mode of expression, not first operand.
65         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
66         (s-sequence): Remove DFLT support.
67         (ifield): Use mode of expression, not UINT.
68         (pc): Comment out, unused.
69         (int-attr): New rtx kind.
70         (attr): Deprecate.
71         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
72         * rtl-traverse.scm (/rtx-canon-debug?): New global.
73         (/make-cstate): New function.
74         (/cstate-context, /cstate-outer-expr): New functions.
75         (/rtx-canon-error): New function.
76         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
77         /rtx-get-last-cond-case-rtx): New functions.
78         (/rtx-canon-*): New functions.
79         (/rtx-canner-table, /rtx-operand-canoners): New globals.
80         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
81         (/rtx-option, /rtx-option-list?): Rewrite.
82         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
83         Rewritten, all callers updated.
84         (/rtx-canon-expr, /rtx-canon): New functions.
85         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
86         (rtx-canonicalize-stmt): New function.
87         (tstate-make): Remove arg `set?'.  All callers updated.
88         (tstate-new-set?): Delete.
89         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
90         moved to /rtx-canon-*.
91         (/rtx-traverse-normal-operand): New function.
92         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
93         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
94         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
95         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
96         Ditto.
97         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
98         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
99         (/rtx-make-traverser-table): Update.
100         (/rtx-traverse-operands): Remove mode processing, now done during
101         canonicalization.
102         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
103         (/rtx-traverse): Ditto.
104         (rtx-init-traverser-tables!): New function.
105         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
106         (rtx-verify-no-dflt-modes): New function.
107         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
108         (rtx-simplify-insn): Use insn-canonical-semantics.
109         (rtx-canonicalize): Moved to rtl-traverse.scm.
110         (/compile-expr-fn, rtx-compile): Delete.
111         (/rtx-trim-rtx-list): New function.
112         (/rtx-trim-for-doc): Handle set, if.
113         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
114         (/rtx-valid-mode-types): Update.
115         (/rtx-valid-matches): Update.
116         (/rtx-find-matchexpr-index): New function.
117         (rtx-lookup): Require rtx-kind to be the rtx name.
118         (def-rtx-node): New arg result-mode, all callers updated.
119         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
120         (rtx-lazy-sem-mode): Delete.
121         (/rtx-closure-make): New arg `mode', all callers updated.
122         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
123         (rtx-operand-obj): Rewrite.
124         (rtx-make-xop): New functions.
125         (/hw): Renamed from `hw', all callers updated.
126         Use the correct mode instead of DFLT for the index.
127         (rtl-builtin!): Call rtx-init-traversal-tables!.
128         (rtl-finish!): Update.
129         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
130         Update mode arg-type.
131         (pc): Comment out.
132         (int-attr): New rtx kind.
133         (attr): Deprecate.
134         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
135         (/frag-cost-compute!): Ditto.
136         * semantics.scm (/build-operand!): Delete args op-name, op.
137         New arg op-expr.  All callers updated.
138         (/build-mem-operand!): Remove DFLT support.
139         (semantic-compile): Update process-expr!, mode arg deleted.
140         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
141         rtl-c++ calls.
142         (/gen-sem-case, /gen-sfrag-code): Ditto.
143         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
144         (/op-gen-set-trace): New function.  If not doing profiling, or using
145         the pbb engine, call /op-gen-set-quiet.
146         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
147         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
148         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
149         * utils.scm (find-first-index): New function.
150         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
151
152         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
153         to COMPARE.
154         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
155
156 2009-09-21  Doug Evans  <dje@sebabeach.org>
157
158         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
159         All callers updated.  Add FIXME.
160         (all rtx functions): Rename local estate to *estate*.  It's an
161         artificial argument added to the rtx, so make it stand out.
162
163         * openrisc.cpu (or32 isa): Fix setup-semantics.
164
165         * rtl.scm (rtx-class-*?): Delete, unused.
166         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
167
168         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
169         (init-reader!): Set /CGEN-RTL-VERSION to default.
170
171         * read.scm (cpu-load): Print load parameters.
172
173         * dev.scm (load-doc): Set verbose-level to 2.
174
175 2009-09-20  Doug Evans  <dje@sebabeach.org>
176
177         * rtl.scm (rtx-strdump): Use write instead of display.
178
179 2009-09-17  Doug Evans  <dje@sebabeach.org>
180
181         * utils-cgen.scm (obj-csv-names): New function.
182         * utils-sim.scm (/sfmt-contents): Use it in logging message.
183
184 2009-09-12  Doug Evans  <dje@sebabeach.org>
185
186         Clean up pass of mode handling.
187         Make use of mode name vs <mode> object more consistent and clear.
188         * hardware.scm (/keyword-read): Default mode to the mode name,
189         not the <mode> object.
190         (/hw-parse-indices): Parse mode name and pass mode object to
191         <hw-asm> constructor.
192         (/hw-parse-values): Ditto.
193         (<hw-register> parse!): Pass mode name to /hw-parse-indices
194         and /hw-parse-values.
195         (<hw-memory> parse!): Ditto.
196         (<hw-address> parse!): Ditto.
197         * mode.scm (/mode-table): New global, replaces mode-list.
198         Modes stored in hashtable instead of list.
199         (/mode-class-table): New global.
200         (mode-list-non-alias-values): Update.
201         (mode:eq?, mode-compatible?, mode:add!): Update.
202         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
203         (mode-maybe-lookup): New function.
204         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
205         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
206         (mode-find, mode-set-word-modes!): Update
207         (mode-ensure-word-sizes-defined): Update.
208         (/sort-mode-classes!): New function.
209         (mode-builtin!): Update.  Sort mode classes here.
210         (mode-finish!): Sort mode classes here too.
211         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
212         All callers updated.
213         (rtl-c-set-quiet): Allow mode to be name of object.
214         (rtl-c-set-trace): Ditto.
215         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
216         <mode> object.  All callers updated.
217         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
218         (rtx-lazy-sem-mode): Ditto.
219         (<rtx-temp> make!): Assert mode arg is a <mode> object.
220         (rtx-env-make): Allow var-list modes to be name or object.
221         * sem-frags.scm (/frag-expr-assq-locals): New function.
222         (/frag-compute-locals!): Call it.
223         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
224         All callers updated.
225         * semantics.scm (/build-mem-operand!): Handle mode aliases.
226
227         * sim-test.scm (*): Symbols no longer can be passed to string-append.
228
229 2009-09-10  Doug Evans  <dje@sebabeach.org>
230
231         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
232         Improve error message for missing or too many bits.
233         (/insn-parse): Don't verify iformat for virtual insns.
234         
235         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
236         non-multi-insns.
237         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
238         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
239         * sid.scm (pbb-engine-insns): Ditto.
240         * sim-decode.scm (cgen-decode.c): Ditto.
241
242 2009-09-09  Doug Evans  <dje@sebabeach.org>
243
244         * rtl-traverse.scm: Comment tweaks.
245         * rtl-xform.scm: Comment and reformatting tweaks.
246         * doc/rtl.texi: Add text to docs on ifield-assertions.
247
248         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
249         saving.
250
251         Add support for controlling warnings/errors.
252         Add tests for iformat description errors.
253         * dev.scm (cload): New option #:diag.
254         * read.scm (<reader>): New member verify-iformat?.
255         (/parse-diagnostic, parse-warning): New functions.
256         (parse-error): Guts moved to /parse-diagnostic.
257         (/set-diagnostic-options!): New function.
258         (cpu-load): New arg diagnostic-options, all callers updated.
259         Recognize -w diagnostic-option-list.
260         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
261         (ifld-simple-ifields, ifields-simple-ifields): New function.
262         * insn.scm (/parse-insn-format-iflds): New function.
263         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
264         New arg isa, all callers updated.  Do some basic validation of the
265         ifield list if requested.
266         * mach.scm (/sanity-check-insns): Improve error message text.
267         * doc/running.texi: Document -w option.
268         * doc/porting.texi: Document #:trace, #:diag options to cload.
269
270         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
271
272         * dev.scm (*): Change default verbosity level to 2.
273
274         * ifield.scm (<ifield> pretty-print): New method.
275         (ifld-pretty-print): New function.
276         (<multi-ifield> pretty-print): New method.
277
278         * ifield.scm (<ifield> field-start): Delete word-len arg.
279         All callers updated.
280         (ifld-start): Ditto.
281         (<multi-ifield> field-start): Ditto.
282         * operand.scm (<hw-index> field-start): Ditto.
283
284         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
285         total-bitsize.  All callers updated.
286         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
287         New member /insn-base-value.
288         (insn-base-value): New function.
289         * mach.scm (/sanity-check-insns): New function.
290         (arch-analyze-insns!): Call it.
291
292 2009-09-08  Doug Evans  <dje@sebabeach.org>
293
294         * iformat.scm (ifields-base-ifields): Simplify.
295         (compute-insn-length): Simplify, call ifields-base-ifields.
296         (compute-insn-base-mask): Ditto.
297         * ifield.scm (ifld-known-values): Ditto.
298         (ifld-base-ifields): Ditto.
299         * insn.scm (insn-value): Ditto.
300         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
301
302 2009-09-08  DJ Delorie  <dj@redhat.com>
303
304         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
305         preprocessor macro, not an enum.
306
307 2009-09-08  Doug Evans  <dje@sebabeach.org>
308
309         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
310         to string-append.
311         (*): Remove trailing ":" from error messages passed to estate-error.
312
313 2009-09-07  Doug Evans  <dje@sebabeach.org>
314
315         * types.scm (<struct>): Delete.
316
317         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
318         updated.
319         (/pmacro-loc-error): New function.
320
321         * mach.scm (/isa-parse-decode-assist): New function.
322         (/isa-parse): Call it.
323
324         * decode.scm (/get-subopcode-value): New function.
325         (/opcode-slots): Call it.
326         (/fill-slot!): Add logging message.
327
328         * cos.scm (/object-error): Convert symbols to strings before passing
329         to string-append.
330
331         * read.scm (rtl-version-equal?): New function.
332         (rtl-version-at-least?, rtl-version-older?): New functions.
333
334         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
335         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
336         rtl versions >= 0.9.
337         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
338
339 2009-09-03  Doug Evans  <dje@sebabeach.org>
340
341         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
342         is simple.
343
344 2009-09-01  DJ Delorie  <dj@redhat.com>
345
346         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
347         (parse_unsigned16_range): Likewise.
348         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
349         isa.
350
351 2009-09-01  Doug Evans  <dje@sebabeach.org>
352
353         Pmacro .equals -> .equal?
354         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
355         -pmacro-builtin-equals.  All callers updated.
356         (pmacros-init!): Rename .equals to .equal?.
357         * doc/pmacros.texi: Update.
358         * testsuite/pmacros-1.test: Update.
359
360         * doc/porting.texi: Work around texi2html bug where it doesn't
361         properly escape <> inside double-quotes inside @code.
362
363         * doc/porting.texi (Doing an opcodes port): Add step to specify
364         the .opc file.
365
366 2009-08-29  Doug Evans  <dje@sebabeach.org>
367
368         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
369         rtl version 0.7.
370         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
371
372 2009-08-27  Doug Evans  <dje@sebabeach.org>
373
374         Add do-count rtl function.
375         * rtl-c.scm (s-do-count): New function.
376         (do-count): New rtl handler.
377         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
378         (-rtx-make-traverser-table): Add ITERATION.
379         * rtl.scm (rtx-make-iteration-limit-var): New function.
380         (rtx-env-make-iteration-locals): New function.
381         * rtx-funcs.scm (do-count): New rtl function.
382         * cpu/play.cpu: Add do-count-test insn.
383         * doc/rtl.texi: Add docs on do-count.
384
385 2009-08-26  Doug Evans  <dje@sebabeach.org>
386
387         * read.scm (parse-error): Change error message output format
388         to match context-owner-error.
389         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
390         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
391         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
392         (operand): Call estate-error instead of context-error.
393         (local, delay): Ditto.
394         (ref, attr): Call estate-error instead of error.
395         * rtl-traverse.scm (tstate-error): New function.
396         (-rtx-traverse-error): Call tstate-error instead of context-error.
397         (-rtx-traverse-operands, -rtx-traverse): Ditto.
398         (estate-error): New function.
399         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
400         instead of error.
401         (e-if): Call estate-error instead of error.
402         * rtx-funcs.scm (error): Call estate-error instead of context-error.
403         (member): Ditto.
404         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
405         Rewrite to call context-owner-error.
406         (context-owner-error): New function.
407
408         * ifield.scm (<ifield> constructor): New arg `location',
409         all callers updated.
410         * insn.scm (<insn> constructor): Ditto.
411         (<multi-insn> constructor): Ditto.
412         * minsn.scm (<macro-insn> constructor): Ditto.
413         * operand.scm (<operand> constructor): Ditto.
414         * utils-cgen.scm (builtin-location): New function.
415         (<source-ident>): Fix default value of member `location'.
416         (source-ident?): New function.
417
418         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
419         (estate-push-env, estate-with-modifiers): Ditto.
420         (estate-deepen): New function.
421
422 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
423
424         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
425         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
426         routines.
427
428 2009-08-25  Doug Evans  <dje@sebabeach.org>
429
430         * doc/pmacros.texi (pmacro default argument values): Add text.
431
432 2009-08-23  Doug Evans  <dje@sebabeach.org>
433
434         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
435         Rename member prefix -> name-prefix.
436         (<keyword> getters): Update.
437         (-keyword-parse): Update.  Default enum-prefix to NAME-.
438         (-keyword-read): Update.  Don't compute default value for
439         enum-prefix here.
440         (define-keyword): Update.
441         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
442         * read.scm (cgen-rtl-version): New function.
443         (-supported-rtl-versions): Add (0 8).
444         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
445         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
446         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
447         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
448         Update, print-name -> enum-prefix, make uppercase.
449         Remove unnecessary name-prefix spec.
450         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
451         * cpu/ip2k.cpu (register-names): Ditto.
452         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
453         * cpu/sparc.cpu (gr-names): Ditto.
454         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
455         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
456         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
457         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
458         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
459         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
460         prefix -> name-prefix.
461         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
462         Update, print-name -> enum-prefix, make uppercase.
463         (drc-names, xf-names): Ditto.
464         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
465         * doc/rtl.texi (Keywords): New section.
466         (hardware indices): Update text.
467         (rtl versions): Add 0.8.
468
469         Add define-rtl-version.
470         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
471         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
472         (cgen-lang-fixlevel): Delete.
473         (-supported-rtl-versions): New variable.
474         (-cmd-define-rtl-version): New function.
475         (init-reader!): New command define-rtl-version.
476         (-cgen): Add rtl version to --version output.
477         * doc/rtl.texi: Document rtl version support.
478         * cpu/play.cpu: Add define-rtl-version.
479
480 2009-08-22  Doug Evans  <dje@sebabeach.org>
481
482         * Makefile.am (OPTIONS): Define.
483         (desc): Just generate <arch>-desc.[ch] files.
484         * Makefile.in: Regenerate.
485         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
486         no .opc file.
487         (cgen-desc.c): Similarly.
488         * gen-all-desc: New file.
489         * opcodes.scm (opc-file-provided?): New function.
490
491         * mach.scm (current-*-add!): Update calls to parse-error.
492         * operand.scm (op:new-mode): Update call to parse-error.
493         * utils-cgen.scm (make-obj-context): New function.
494
495         * NEWS: Copy over entries from 1.1 branch.
496
497 2009-08-20  Doug Evans  <dje@sebabeach.org>
498
499         * gas-test.scm (<keyword> test-data): Catch invalid requests,
500         flag a warning and compensate.
501         (<hw-address test-data): Tweak for readability.
502         (<hw-iaddress test-data): Ditto.
503         (cgen-build.sh): Convert symbols to strings before passing to
504         string-append.
505         (cgen-allinsn.exp): Ditto.
506
507         * doc/pmacros.texi (.splice): Add more text.
508
509 2009-08-19  Doug Evans  <dje@sebabeach.org>
510
511         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
512         distinguish from 1.1.
513         * configure: Regenerate.
514         * read.scm (-CGEN-VERSION): Update.
515         * doc/version.texi: Update.
516
517         New builtin .pmacro?.
518         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
519         (pmacros-init!): Add .pmacro?.
520         * doc/pmacros.text: Document .pmacro?.
521         * testsuite/pmacros-1.test: Test .pmacro?.
522
523         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
524         of a pmacro begins before its arguments are evaluated, improves
525         readability.
526
527         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
528         * testsuite/pmacros-1.test: Ditto.  Add better tests.
529
530         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
531         in assembler syntax.
532         (Operands): Similarly.
533
534 2009-08-18  Doug Evans  <dje@sebabeach.org>
535
536         * ifield.scm (ifld-encode-mode): Add FIXME.
537         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
538         modes.
539         (<ifield> gen-extract): Similarly.
540
541         * read.scm (parse-error): Handle #f for context-location.
542         * utils-cgen.scm (unspecified-location): Fix building of
543         single-location.
544
545         * doc/rtl.texi: Document how to write hex and boolean values.
546
547         * gas-test.scm (<hw-asm> test-data): Handle () values.
548         (<keyword> test-data): Convert symbols to strings before passing
549         to string-append.
550         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
551         result for scalars.
552
553         * operand.scm (hw-index-scalar): Set `name'.
554         (hw-index-anyof, hw-index-derived): Ditto.
555
556 2009-08-17  Doug Evans  <dje@sebabeach.org>
557
558         * pmacros.scm (-pmacro-builtin-internal-test): New function.
559         (pmacros-init!): Add .internal-test.
560         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
561         * testsuite/testsuite.cpu (internal-verify): New pmacro.
562         * doc/pmacros.text: Document .internal-test.
563
564         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
565         (parse-comment): Allow numbers.
566         * doc/porting.texi: Document that names and comments may be lists.
567
568         * insn.scm (-insn-parse): Fix typo.
569
570         Rename .eval -> .exec.  Add new .eval.
571         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
572         (-pmacro-builtin-eval): New function.
573         (pmacros-init!): Add .exec.
574         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
575         * testsuite/location-1.test: Update.
576         * testsuite/pmacros-1.test: Add test for .eval.
577
578 2009-08-16  Doug Evans  <dje@sebabeach.org>
579
580         * doc/porting.texi: Remove support for Guile 1.4.
581
582         * read.scm (current-reader-location): Return unspecified location
583         if reader hasn't been initialized yet.
584
585 2009-08-13  Doug Evans  <dje@sebabeach.org>
586
587         * dev.scm: Document tracing options.
588
589         * pmacros.scm (pmacro-dump): New function.
590         (check-pmacro): Tweak debugging output.
591         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
592         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
593
594         Add .let* pmacro builtin.
595         * pmacros.scm (-pmacro-builtin-let*): New function.
596         (pmacros-init!): Add .let*.
597         * doc/pmacros.texi: Document .let*.
598         * testsuite/pmacros-1.test: Test .let*.
599
600 2009-08-12  Doug Evans  <dje@sebabeach.org>
601
602         Clean up cpu file parsing, pass context consistently instead of the
603         old "errtxt" argument.
604         NOTE: ACU == "All Callers Updated".
605         * attr.scm (-parse-simple-attribute): Renamed from
606         parse-simple-attribute, ACU.
607         (-attr-parse): Change errtxt argument to context, ACU.
608         (-attr-read): Ditto.
609         (atlist-parse): Ditto.  Put context arg first.
610         (attr-parse): Use parse-error instead of context-error.
611         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
612         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
613         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
614         `context' arg is now a <context> object.  ACU.
615         (-keyword-read): `context' arg is now a <context> object.  ACU.
616         (-hw-parse-indices): Change errtxt argument to context, ACU.
617         (-hw-parse-values, -hw-parse-handlers): Ditto.
618         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
619         (-hw-validate-layout, -hw-create-getter-from-layout,
620         -hw-create-setter-from-layout): Ditto.
621         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
622         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
623         (<hw-address>:parse!): Ditto.
624         * ifield.scm (-ifield-parse, ifield-read): Ditto.
625         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
626         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
627         (-multi-ifield-parse, -multi-ifield-read): Ditto.
628         * insn.scm (-insn-parse, -insn-read): Ditto.
629         (parse-syntax): Ditto.  Put context arg first.
630         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
631         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
632         (-parse-insn-format): Ditto.
633         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
634         (-arch-parse-isas): Ditto.
635         (-isa-read): Add context arg, ACU.
636         (-cpu-parse, -cpu-read, -mach-read): Ditto.
637         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
638         context, ACU.
639         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
640         (minsn-make-alias): Ditto.
641         * mode.scm (-mode-parse): Ditto.
642         (parse-mode-name): Ditto.  Put context arg first.
643         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
644         errtxt argument to context, ACU.
645         (-unit-parse, -model-parse, -model-read): Ditto.
646         * operand.scm (-operand-parse-getter): Use parse-error instead of
647         context-error.
648         (-operand-parse-setter): Ditto.
649         (-operand-parse): Change errtxt argument to context, ACU.
650         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
651         (-anyof-operand-parse, -anyof-operand-read): Ditto.
652         * read.scm (reader-error): Delete.  Use parse-error instead.
653         (parse-error): Change errtxt argument to context, ACU.  Split args
654         argument into expr and maybe-help-text.
655         (-reader-process-expanded-1!): Reorganize.
656         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
657         * types.scm (parse-type): Ditto.
658         * utils-cgen.scm (single-location->simple-string): New function.
659         (<context>): Replace members file,lineno with location.
660         (make-prefix-context): Renamed from context-make-prefix, ACU.
661         (make-current-context): New function.
662         (context-append, context-append-name): New functions.
663         (context-make-reader): Delete.
664         (parse-name): Change errtxt argument to context, ACU.
665         Put context arg first.
666         (parse-comment): Ditto.
667         (parse-number): Change errtxt argument to context, ACU.
668         (arg-list-validate-name, arg-list-check-no-args,
669         arg-list-symbol-arg): Ditto.
670
671         * read.scm (-cmd-if): Don't assume test is a list.
672
673         * html.scm (get-insn-properties): Delete errtxt, unused.
674
675 2009-08-11  Doug Evans  <dje@sebabeach.org>
676
677         * doc/rtl.texi (hardware types): Add pc.
678
679 2009-08-07  Doug Evans  <dje@sebabeach.org>
680
681         Add -t option for tracing things like commands, pmacro expansion.
682         * dev.scm (cload): New arg #:trace.
683         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
684         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
685         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
686         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
687         (-reader-process-expanded-1!): Trace commands if requested.
688         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
689         (-set-trace-options!): New function.
690         (-init-reader!): New function.
691         (cpu-load): New arg trace-options, all callers updated.
692         Call -init-reader! and -set-trace-options!.
693         (cgen-usage): Improve output formatting.
694         (common-arguments): New option -t.
695         (-cgen): Process -t.
696         * utils-cgen.scm (single-location->string): Renamed from
697         pretty-print-single-location.  All callers updated.
698         (location->string): Renamed from pretty-print-location.
699         All callers updated.
700         (source-properties-location->string): New function.
701         * doc/running.texi: Document -t.
702
703 2009-08-06  Doug Evans  <dje@sebabeach.org>
704
705         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
706         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
707         * utils.scm: ... here.
708
709 2009-08-05  Doug Evans  <dje@sebabeach.org>
710
711         Track source location better, for better error messages.
712         * pmacros.scm (-pmacro-eval): Delete, unused.
713         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
714         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
715         (scan-list, scan): Ditto.
716         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
717         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
718         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
719         (scan-list1): New function.
720         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
721         * read.scm (<reader>): New member `location'.
722         (-reader-lookup-command): Renamed from reader-lookup-command,
723         all callers updated.
724         (reader-error): Rewrite to produce better source location info.
725         (current-reader-location): New function.
726         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
727         All callers updated.  Record source location of expression.
728         (reader-process-expanded!): Renamed from reader-process-expanded.
729         All callers updated.
730         (-reader-process!): Renamed from reader-process.  New arg `loc'.
731         All callers updated.  Record source location of define-pmacro.
732         * utils-cgen.scm (<location>): New class.
733         (single-location): New (pseudo) class.
734         (pretty-print-single-location, pretty-print-location): New functions.
735         (location-top, location-push-single, location-push): New functions.
736         (unspecified-location, current-input-location): New functions.
737         (location-property): New object property.
738         (location-property-set!): New function.
739         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
740         All uses updated.
741         * testsuite/location-1.test: New testcase.
742         * testsuite/run-tests.sh: Fix fail count handling.
743         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
744         to expect cgen to fail.
745
746         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
747
748         * read.scm (-cmd-include): Renamed from include.  All callers updated.
749         (-cmd-if): Renamed from cmd-if.  All callers updated.
750         Use reader-process-expanded! on then/else clauses instead of eval1.
751
752 2009-07-22  Doug Evans  <dje@sebabeach.org>
753
754         * modes.scm (TI,OI): New modes.
755         * types.scm (parse-type): Improve error checking.  Don't hardwire
756         mode names here.
757         * utils.scm (non-negative-integer?): New function.
758
759         * pmacros.scm (-pmacro-builtin-find): New predicate.
760         (pmacros-init!): Add .find.
761         * doc/pmacros.tex: Document .find.
762         * testsuite/pmacros-1.test: Test .find.
763
764 2009-07-20  Doug Evans  <dje@sebabeach.org>
765
766         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
767         commented out printfs.
768         * rtl.scm (rtl-finish!): Whitespace tweaks.
769         * model.scm (parse-insn-timing): Tweak logging message.
770         * operand.scm: Comment and whitespace tweaks.
771         (op:type): Tweak error message.
772         (op-ifield): Tweak logging message.
773         (-derived-operand-parse, anyof-merge-semantics): Ditto.
774         * read.scm: Whitespace cleanup.
775         * utils.scm: Whitespace cleanup.
776
777 2009-07-19  Doug Evans  <dje@sebabeach.org>
778
779         Fix binding of nested pmacro parameters.
780         * pmacros.scm (-pmacro-env-make): New arg prev-env.
781         All callers updated.
782         (-pmacro-bulid-lambda): Ditto.
783         * doc/pmacros.texi: Update.
784         * testsuite/pmacros-1.test: Add testcase.
785
786         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
787         calculation.
788         (-multi-ifield-make-default-extract): Ditto.
789
790         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
791         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
792         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
793         Define.
794         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
795         * doc/rtl.texi: Update.
796
797         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
798
799         Rename builtin boolean pmacros, for consistency with rtl.
800         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
801         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
802         * doc/pmacros.texi: Update.
803         * testsuite/pmacros-1.test: Update.
804
805 2009-07-17  Doug Evans  <dje@sebabeach.org>
806
807         Use hash tables to record ifields, operands, insns, macro-insns.
808         * attr.scm (attr-builtin!): Tweak some comments.
809         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
810         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
811         <ident>.
812         (<multi-ifield>): New constructor.
813         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
814         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
815         <ident>.
816         (-sub-insn-make!): Add hack to avoid differences in generated code.
817         (multi-insn-instantiate!): Add total number of multi-insns to
818         logging message.
819         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
820         minsn-list to foo-table.  New member next-ordinal.
821         Update getters/setters.
822         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
823         New functions.
824         (-get-next-ordinal!, -get-lowest-ordinal): New function.
825         (-make-ident-object-table, -ident-object-table->list,
826         -ident-object-table-add!, -ident-object-table-lookup): New functions.
827         (current-ifld-list, current-ifld-add! current-ifld-lookup,
828         -ifld-already-defined?): Rewrite.
829         (current-op-list, current-op-add! current-op-lookup,
830         -op-already-defined?): Rewrite.
831         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
832         (current-insn-list, current-insn-add! current-insn-lookup,
833         -insn-already-defined?): Rewrite.
834         (current-minsn-list, current-minsn-add! current-minsn-lookup,
835         -minsn-already-defined?): Rewrite.
836         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
837         (MAX-VIRTUAL-INSNS): Define.
838         (arch-analyze-insns!): Add hack to avoid differences in generated code.
839         Update use of arch-insn-list.
840         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
841         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
842         minsn-list.
843         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
844         <ident>.  New constructor.
845         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
846         <ident>.
847         * sid.scm (-virtual-insn-add!): New function.
848         (-create-virtual-insns!): Call it.
849         (-fill-sim-insn-list!): Rewrite.
850         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
851         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
852         * utils-cgen.scm (<ordered-ident>): New class.
853         (obj-ordinal, obj-set-ordinal!): New functions.
854         (add-ident-methods!): Delete.
855
856         * model.scm (parse-insn-timing): Change logging message to level 3.
857
858 2009-07-16  Doug Evans  <dje@sebabeach.org>
859
860         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
861         add a link to define-normal-insn-enum.
862
863         * doc/porting.texi (Conventions): Add docs on writing integers.
864
865         * cpu/simplify.inc (*): One line doc strings don't need \n.
866         (df): Invoke define-full-ifield instead of claiming it's an alias.
867         (dno): Define.
868         (dnop): Mark as deprecated.
869
870         * cpu/play.cpu: Add example of hardware `layout'.
871         * doc/porting.tex: Add docs on simplify.inc.
872         * doc/rtl.texi: Cleanup pass over "Simplification macros",
873         and other things.
874
875         * ifield.scm: Whitespace/formatting cleanup.
876
877         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
878
879         * read.scm (parse-error): Don't print single entry args as a list.
880         (-reader-process-expanded-1): Convert symbol to string for
881         string-append.
882
883         * insn.scm (multi-insn-instantiate!): Tweak logging message.
884
885 2009-07-15  Doug Evans  <dje@sebabeach.org>
886
887         * cpu/simplify.inc (dno): New pmacro.
888         * doc/porting.texi: Add section on simplify.inc.
889         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
890
891 2009-07-15  Doug Evans  <devans@sourceware.org>
892
893         * gen-all-doc: Generate index.html.
894
895 2009-07-13  Doug Evans  <dje@sebabeach.org>
896
897         Extend pmacro language, add testsuite.
898         * Makefile.am (SUBDIRS): Add testsuite.
899         * Makefile.in: Regenerate.
900         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
901         testsuite/test-utils.sh.
902         * configure: Regenerate.
903         * dev.scm (cload): Handle testsuite app.
904         (load-testsuite): New function.
905         * pmacros.scm: (-pmacro-debug?): New global.
906         (-smacro-table): New global.
907         (-smacro-lookup, -smacro-set!): New functions.
908         (-pmacro-make): New argument `syntactic-form?', all callers updated.
909         (-pmacro-syntactic-form?): New function.
910         (-pmacro-expected-number, -pmacro-verify-number): New functions.
911         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
912         (-pmacro-expected-non-negative-integer): New function.
913         (-pmacro-verify-non-negative-integer): New function.
914         (-pmacro-expand-expr-list): New function.
915         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
916         (-pmacro-process-args): Renamed from -pmacro-invoke.
917         (-pmacro-apply, -smacro-apply): New functions.
918         (-pmacro-expand): Rewrite syntactic form processing.
919         (-pmacro-build-lambda): Reformat.
920         (define-pmacro): Watch for more errors in definition.
921         (pmacro-debug): New function.
922         (pmacro-trace): Set/reset -pmacro-debug?.
923         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
924         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
925         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
926         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
927         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
928         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
929         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
930         (pmacros-init!): Initialize -smacro-table.
931         Rewrite pmacro initialization.
932         * read.scm (reader-process-expanded): Renamed from
933         -reader-process-expanded.  All callers updated.
934         Recognize () as a no-op.
935         (cpu-load): Tweak logging messages.
936         * utils.scm (message): Add comment.
937         * cpu/play.cpu: Add some instructions to play with .let.
938         * doc/cgenint.texi: Move some debugging related docs to here from
939         cgen.texi.
940         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
941         * testsuite/Makefile.am: New file.
942         * testsuite/Makefile.in: New file.
943         * testsuite/test-utils.sh.in: New file.
944         * testsuite/run-tests.sh: New file.
945         * testsuite/testsuite.cpu: New file.
946         * testsuite/pmacros-1.test: New file.
947
948         * decode.scm: Comment and formatting tweaks.
949         (-build-decode-table-guts): Add more data to logging message.
950
951 2009-07-12  Doug Evans  <dje@sebabeach.org>
952
953         Delete files that now live in ../cpu.
954         * cpu/iq10.cpu: Delete.
955         * cpu/iq2000.cpu: Delete.
956         * cpu/iq2000.opc: Delete.
957         * cpu/iq2000m.cpu: Delete.
958         * cpu/m32r.cpu: Delete.
959         * cpu/m32r.opc: Delete.
960
961 2009-07-09  Doug Evans  <dje@sebabeach.org>
962
963         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
964         All callers updated.  Work around -ve shifts by referencing the
965         entire value.
966
967         * utils.scm (message): Handle pairs.
968
969 2009-07-08  DJ Delorie  <dj@redhat.com>
970
971         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
972         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
973         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
974         written to.
975
976 2009-07-07  Doug Evans  <dje@sebabeach.org>
977
978         * cpu/play.cpu (add): Use (ifield enum) for one format element.
979         * cpu/play.opc: New file.
980
981         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
982         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
983         * doc/rtl.texi (Instructions): Update.
984
985         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
986         (opc-arguments, -OPC): Call set-opc-file-path!.
987         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
988         (set-opc-file-path!): New function.
989         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
990
991         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
992         before passing to gen-c-args.
993
994 2009-07-06  DJ Delorie  <dj@redhat.com>
995
996         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
997         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
998         unspecified accesses to control registers.
999
1000 2009-07-01  DJ Delorie  <dj@redhat.com>
1001
1002         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1003         unspecified accesses to control registers.
1004
1005         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1006         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1007
1008 2009-06-27  Doug Evans  <dje@sebabeach.org>
1009
1010         * gen-all-intrinsics: New file.
1011
1012 2009-06-24  Doug Evans  <dje@sebabeach.org>
1013
1014         * All *.scm files: Update copyright year.
1015         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1016
1017 2009-06-23  DJ Delorie  <dj@redhat.com>
1018
1019         * intrinsics.scm: Updates to support IVC2.
1020         (belongs-to-group?): Check IVC2 slots.
1021         (-slots-attribute): New.
1022         (targets::attributes): Add SLOTS.
1023         (target:add-well-known-intrinsics): Add CPMOV.
1024         (md-insn): Add CPTYPE and CRET?.
1025         (add-md-insn): Likewise.
1026         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1027         duplicate insns with different bit patterns.
1028         (write-cgen-insn?): Add cret? support.
1029         (intrinsics.h): Add vector types.
1030         (runtime-op): Add vector support.
1031         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1032
1033         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1034         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1035         (h-cr-ivc2): Default to typeless.
1036         (h-ccr-ivc2): Fix register width.
1037         (SLOTS): Fix values and default.
1038         (ivc2_*): Add control register names.
1039         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1040
1041         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1042         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1043
1044 2009-06-22  Doug Evans  <dje@sebabeach.org>
1045
1046         * semantics.scm (insn-build-known-values): Fix typo in comment.
1047
1048 2009-06-21  Doug Evans  <dje@sebabeach.org>
1049
1050         * rtl-xform.scm (rtx-simplify-insn): New function.
1051         * html.scm (gen-insn-docs): Call it.
1052         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1053         * iformat.scm (ifmt-analyze): Minor simplification.
1054
1055         * semantics.scm (semantic-compile): Change arg sem-code-list to
1056         sem-code.
1057         (semantic-attrs): Ditto.
1058         * iformat.scm (ifmt-analyze): Update.
1059         (ifmt-compute!): Update.
1060         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1061         rtl-xform.scm.
1062         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1063         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1064         * semantics.scm (rtx-simplify): Ditto.
1065         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1066         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1067         (-simplify-expr-fn): Move to rtl-xform.scm.
1068         (-solve-expr-fn, rtx-solve): Ditto.
1069         * rtl-xform.c: New file.
1070         * read.scm: Load it.
1071
1072         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1073         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1074         (-rtx-traverse, rtx-traverse): Ditto.
1075
1076 2009-06-20  Doug Evans  <dje@sebabeach.org>
1077
1078         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1079
1080         * configure.in: Update version to 1.1.
1081         * configure: Regenerate.
1082         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1083
1084 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1085             Doug Evans  <dje@sebabeach.org>
1086
1087         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1088         (cgen-desc.c): Ditto.
1089         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1090         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1091         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1092         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1093         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1094         (cgen-cpuall.h, cgen-ops.c): Ditto.
1095         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1096         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1097         (cgen-sem-switch.c): Ditto.
1098         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1099         * sim-model.c (cgen-model.c): Ditto.
1100
1101 2009-06-18  Doug Evans  <dje@sebabeach.org>
1102
1103         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1104
1105         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1106
1107         * dev.scm (cload): Change #:arch argument to take the path to the
1108         .cpu file instead of just the name of the architecture.
1109         * read.scm (arch-path): Remove trailing '/'.
1110         (cpu-load): Set `arch-path' to directory of .cpu file.
1111         (-cgen): Don't set `arch-path' here.
1112         (include): Update.
1113         * doc/porting.texi: Update.
1114
1115 2009-06-14  Doug Evans  <dje@sebabeach.org>
1116
1117         * gen-all-doc: Use files in ../cpu where possible.
1118
1119         * Makefile.am (ARCHFILE): Fix path.
1120         * Makefile.in: Regenerate.
1121         * html.scm: Use "pre" instead of "plaintext".
1122
1123         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1124         * doc/app.texi: Cleanup pass.
1125         * doc/cgen.texi: Cleanup pass.
1126         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1127         * doc/intro.texi: Cleanup pass.
1128         * doc/mdate-sh: New file.
1129         * doc/opcodes.texi: Cleanup pass.
1130         * doc/pmacros.texi: Cleanup pass.
1131         * doc/porting.texi: Cleanup pass.
1132         * doc/rtl.texi: Cleanup pass.
1133         * doc/running.texi: Cleanup pass.  Document more runtime options.
1134         * doc/stamp-vti: Update.
1135         * doc/version.texi: Update.
1136
1137         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1138         (GUILE): Fix definition.
1139         * Makefile.in: Regenerate with automake 1.9.6.
1140         * aclocal.m4: Regenerate with aclocal 1.9.6.
1141         * configure.in (AC_PREREQ): Set to 2.59.
1142         (GENINSRC_NEVER): Define.
1143         * configure: Regenerate with autoconf 2.59.
1144         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1145         (cgen.info,cgen.dvi): Delete.
1146         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1147         (noinst_TEXINFOS): Add cgenint.texi.
1148         (DOCFILES): Add missing files.
1149         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1150         * doc/Makefile.in: Regenerate with automake 1.9.6.
1151
1152         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1153
1154         * attr.scm: Removing trailing whitespace.
1155         * cgen-intrinsics.scm: Ditto.
1156         * cgen-sim.scm: Ditto.
1157         * cos.scm: Ditto.
1158         * enum.scm: Ditto.
1159         * guile.scm: Ditto.
1160         * sim.scm: Ditto.
1161
1162 2009-05-28  DJ Delorie  <dj@redhat.com>
1163
1164         * cpu/mep.opc (parse_signed16_range): New.
1165         (parse_unsigned16_range): New.
1166         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1167
1168 2009-05-26  DJ Delorie  <dj@redhat.com>
1169
1170         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1171         accumulator names.
1172         (f-ivc2-ccrn-c3hi): New.
1173         (f-ivc2-ccrn-c3lo): New.
1174         (f-ivc2-ccrn-c3): New.
1175         (ivc2c3ccrn): Use it.
1176
1177 2009-05-22  DJ Delorie  <dj@redhat.com>
1178
1179         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1180         (mep_config_map): Regenerate.
1181
1182         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1183         ivc2-specific names.
1184         (simm8p20): New.
1185         (cmovc): move to after field definitions, use ivc2-specific
1186         register names.
1187         (cpmovi_b_P0S_P1): New.
1188         
1189 2009-05-19  DJ Delorie  <dj@redhat.com>
1190
1191         * cpu/mep.opc: Regenerate configuration.
1192         (parse_cdisp10): Only check CPU flags, not COP flags.
1193         (check_configured_mach): Likewise.
1194
1195 2009-05-13  DJ Delorie  <dj@redhat.com>
1196
1197         * intrinsics.scm (insns.md): Add RTL predicates.
1198         (intrinsics.h): Remove old C intrinsics.
1199
1200 2009-04-29  DJ Delorie  <dj@redhat.com>
1201
1202         * mep-ivc2.cpu: New.
1203         * mep-core.cpu: Regenerated.  Add support for deferred register
1204         writes.
1205         (SLOT): Add IVC2 slot types.
1206         (sim-syscall): Rename to something more appropriate.
1207         * mep-ext-cop.cpu: Regenerate.
1208         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1209         (print_slot_insn): New.
1210         (mep_examine_ivc2_insns): New.
1211         (mep_print_insn_set_ivc2_mode): New.
1212         (mep_print_insn): Support IVC2 slotting.
1213         
1214 2009-04-20  DJ Delorie  <dj@redhat.com>
1215
1216         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1217         (guess-mode): Drop COP* syntax.
1218         (need-insn): Add "--syscall--" to the list.
1219         (enum-type): Drop COP* syntax.
1220         (intrinsics.h): Likewise.
1221         (intrinsic-protos.h): Change file header to allow it to be
1222         included.
1223
1224 2009-04-17  DJ Delorie  <dj@redhat.com>
1225
1226         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1227         (lhucpm1): Limit to C5 mach.
1228         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1229         * cpu/mep-core.cpu (extend-cdisp10): New.
1230         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1231         
1232 2009-04-08  DJ Delorie  <dj@redhat.com>
1233
1234         * cpu/mep-c5.cpu: New.
1235         * cpu/mep-core.cpu: Add C5 support.
1236         * cpu/mep.opc: Likewise.
1237
1238 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1239
1240         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1241         about calling memset with a zero length.
1242
1243 2009-02-03  DJ Delorie  <dj@redhat.com>
1244
1245         * cpu/mep-core.cpu: Update to new MeP configuration.
1246         * cpu/mep-ext-cop.cpu: Likewise.
1247         * cpu/mep.opc: Likewise.
1248
1249 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1250
1251         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1252
1253 2008-06-17  Dave Brolley  <brolley@redhat.com>
1254
1255         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1256         (h-gr): Likewise.
1257
1258 2007-11-13  Dave Brolley  <brolley@redhat.com>
1259
1260         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1261
1262 2007-11-05  Dave Brolley  <brolley@redhat.com>
1263
1264         * intrinsics.scm,cgen-intrinsics.scm: New application which
1265         generates code to support intrinsic functions for insns in the
1266         mep architecture in gcc.
1267
1268 2007-09-21  Dave Brolley  <brolley@redhat.com>
1269
1270         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1271         (rn3us): CDATA attribute now LONG.
1272         
1273 2007-08-21  Dave Brolley  <brolley@redhat.com>
1274
1275         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1276         than 32 bits.
1277
1278 2007-07-05  Nick Clifton  <nickc@redhat.com>
1279
1280         * utils.scm (copyright-fsf): Update copyright notice to refer to
1281         the GPL version 3.
1282
1283 2007-05-22  Nick Clifton  <nickc@redhat.com>
1284
1285         * doc/cgen.texi: Use @copying around the copyright notice.
1286         * doc/internals.texi: Likewise.
1287
1288 2007-02-05  Dave Brolley  <brolley@redhat.com>
1289
1290         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1291
1292 2007-02-05  Dave Brolley  <brolley@redhat.com>
1293
1294         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1295         in the generated code for @arch@_cgen_init_asm if it is defined.
1296
1297         * Contribute the following changes:
1298         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1299
1300         * attr.scm (<string-attribute>): New attribute class.
1301         (attr-kind): Handle <string-attribute>.
1302         (parse-simple-attribute): New function.
1303         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1304         (<bitset-attribute> 'parse-value): Likewise.
1305         (<boolean-attribute> 'parse-value): Likewise.
1306         (<enum-attribute> 'parse-value): Likewise.
1307         (<string-attribute> 'parse-value): New function.
1308         (-attr-parse): Handle <string-attribute>.
1309         (-attr-read): Likewise.
1310         (<string-attribute> 'gen-value-for-defn-raw): New function.
1311         (<string-attribute> 'gen-value-for-defn): New function.
1312
1313 2006-11-07  Dave Brolley  <brolley@redhat.com>
1314
1315         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1316         necessary.
1317
1318 2006-10-18  Dave Brolley  <brolley@redhat.com>
1319
1320         * Contribute the following changes:
1321
1322         2006-07-11  Dave Brolley  <brolley@redhat.com>
1323
1324         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1325         (movcol): New insn.
1326         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1327         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1328         hardware or memory mode which was used.
1329         * sid-cpu.scm (hw-need-write-stack?): New function.
1330         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1331         identify hardware which uses write stacks.
1332         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1333         Initialized to an empty list.
1334         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1335         hw-need-write-stack?.
1336         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1337         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1338         (used-in-delay-rtl?): New method of <hardware-base>.
1339         (hw-used-in-delay-rtl?): New function.
1340
1341         2006-06-20  Dave Brolley  <brolley@redhat.com>
1342
1343         * sid.scm (gen-attr-type): Removed.
1344         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1345         (SH2a-MACH): Add sh5.
1346         (sh2a-nofpu-models): Add units for sh5.
1347         (sh2a-fpu-models): Likewise.
1348
1349         2006-06-15  Dave Brolley  <brolley@redhat.com>
1350
1351         * cpu/sh-sim.cpu: New file.
1352         * cpu/sh-sid.cpu: New file.
1353         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1354         (All fields): Remap for (insn-lsb0? #f)
1355         (All insns): Add timing specs.
1356         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1357         'xattrs' and .splice it in.
1358         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1359         (h-frc,h-drc): Add PROFILE attribute.
1360         (h-fpccr): Removed.
1361         (h-vbr): New hardware.
1362         (All fields): Remap for (insn-lsb0? #f)
1363         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1364         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1365         (fpscr): Use h-fpscr.
1366         (fsdm,fsdn): Use h-fsd.
1367         (dshci): Add xtiming argument and splice it in.
1368         (dr,xd): pmacros removed.
1369         (All insns): Add timing specs, *-MACH attribibutes,
1370         SH4{A}-GROUP attributes.
1371         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1372         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1373         we're being processed for sim or sid.
1374         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1375         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1376         (define-isa compact): Add (isa-parallel-insns 2).
1377         (define-isa media): Add (isa-parallel-insns 2). Add
1378         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1379         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1380         sh4a, sh4al
1381         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1382         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1383         (SH4al-MACH, SH5-MACH): New pmacros.
1384         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1385         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1386         (sh5-media-fp-units, common-model, common-model-with-fp) 
1387         (sh3-model, sh3e-model): New pmacros.
1388         (define-model sh2): New model.
1389         (define-model sh2e): New model.
1390         (define-model sh3): New model.
1391         (define-model sh3e): New model.
1392         (define-model sh2a-nofpu): New model.
1393         (define-model sh2a-fpu): New model.
1394         (define-model sh4-nofpu): New model.
1395         (define-model sh4): New model.
1396         (define-model sh4a-nofpu): New model.
1397         (define-model sh4a): New model.
1398         (define-model sh4al): New model.
1399         (define-model sh5-media): New model.
1400         (define-model sh5): Add all units.
1401         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1402         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1403         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1404         (h-pc): Add PROFILE attribute.
1405         (h-fr): Likewise.
1406         (h-tr): Likewise.
1407         (h-gr,h-grc): Likewise.
1408         (h-cr): Set h-sr in setter.
1409         (h-frbit): Get/Set h-fpscr.
1410         (h-szbit,h-prbit): Likewise.
1411         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1412         Add getter and setter.
1413         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1414         Adjust getter and setter.
1415         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1416         Adjust getter and setter.
1417         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1418         (h-fsd,h-fmov): New hardware.
1419
1420 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1421
1422         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1423         doc/notes.texi, doc/porting.texi, doc/running.texi,
1424         doc/sim.texi: Fix some typos.
1425
1426 2006-07-14  Dave Brolley  <brolley@redhat.com>
1427
1428         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1429         hardware or memory mode which was used.
1430         * sid-cpu.scm (hw-need-write-stack?): New function.
1431         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1432         identify hardware which uses write stacks.
1433         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1434         Initialized to an empty list.
1435         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1436         hw-need-write-stack?.
1437         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1438         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1439         (used-in-delay-rtl?): New method of <hardware-base>.
1440         (hw-used-in-delay-rtl?): New function.
1441
1442 2006-06-20  Dave Brolley  <brolley@redhat.com>
1443
1444         * sid.scm (gen-attr-type): Removed.
1445
1446 2006-05-10  Dave Brolley  <brolley@redhat.com>
1447
1448         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1449         support for (if (application-is? <appname>) (...) (...)).
1450         (-cgen): Add trailing "/" to arch-path.
1451         * utils.scm (dirname): Removed. dirname is a primitive function.
1452
1453 2006-05-09  Dave Brolley  <brolley@redhat.com>
1454
1455         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1456         'entire_insn' not 'base_insn'.
1457         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1458         is null.
1459         * sim.scm (-gen-arch-model-decls): Likewise.
1460         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1461         abuf->written if profiling.
1462         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1463         object->string om the mode.
1464         (-hw-gen-write-stack-decl): Likewise.
1465         * read.scm (include): Use arch-path as file location.
1466         (arch-path): Define it with a default setting.
1467         (-cgen): Update arch-path when "-a" option is specified.
1468         * utils.scm (dirname): New function.
1469
1470 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1471
1472         * configure.in: Remove AC_ARG_PROGRAM.
1473         * configure: Regenerate with autoconf 2.59.
1474
1475 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1476
1477         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1478         SIMULATOR.
1479
1480 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1481
1482         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1483         or an error message otherwise.
1484         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1485         Fix up comments to correctly describe the functions.
1486
1487 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1488             Anil Paranjape   <anilp1@kpitcummins.com>
1489             Shilin Shakti    <shilins@kpitcummins.com>
1490
1491         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1492         CPU description.
1493         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1494
1495 2006-02-10  Nick Clifton  <nickc@redhat.com>
1496
1497         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1498
1499 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1500
1501         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1502         for concatenation.
1503         (-hw-gen-write-stack-decl): Likewise.
1504
1505 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1506
1507         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1508         non-(adata-integral-insn? CURRENT-ARCH) case.
1509
1510 2005-10-28  Dave Brolley  <brolley@redhat.com>
1511
1512         Contribute the following changes:
1513         2005-09-19  Dave Brolley  <brolley@redhat.com>
1514
1515         * attr.scm (gen-value-for-defn-raw): New methods.
1516         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1517         gen-value-for-defn-raw.
1518         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1519
1520         2002-12-13  Dave Brolley  <brolley@redhat.com>
1521
1522         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1523         (-gen-attr-accessors): New function.
1524         (gen-obj-attr-defn): Update terminating initializer.
1525         (gen-obj-attr-end-defn): New function.
1526         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1527         * sid-cpu.scm (cgen-desc.h): Generate code to include
1528         "opcode/cgen-bitset.h"
1529         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1530         name.
1531         * desc.scm ('gen-defn): Update terminating initializer.
1532         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1533         terminatinig initializer.
1534         (gen-hw-decls): Ditto.
1535         (gen-operand-decls): Ditto.
1536         (gen-insn-decls): Ditto.
1537         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1538         (gen-insn-table): Update terminating initializer.
1539         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1540         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1541         * attr.scm (charmask-bytes): New function.
1542         (bitset-attr->charmask): New function.
1543         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1544         differences for SID-SIMULATOR.
1545         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1546         (<enum-attribute>): Ditto.
1547
1548 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1549
1550         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1551
1552 2005-10-24  DJ Delorie  <dj@redhat.com>
1553
1554         * operand.scm (-anyof-merge-syntax): Print a more useful error
1555         message.
1556
1557 2005-10-19  Nick Clifton  <nickc@redhat.com>
1558
1559         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1560         patch.
1561
1562 2005-10-18  Andreas Schwab  <schwab@suse.de>
1563
1564         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1565
1566 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1567
1568         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1569         size.
1570
1571 2005-08-02  Dave Brolley  <brolley@redhat.com>
1572
1573         * rtl-c.scm (s-unop): Don't dereference
1574         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1575         (s-binop, s-convop, s-cmpop): Likewise.
1576
1577 2005-07-29  Dave Brolley  <brolley@redhat.com>
1578
1579         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1580         if with-profile or with-parallel-write.
1581         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1582         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1583         string-append.
1584
1585 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1586
1587         * cpu/fr30.opc (print_register_list): Correct format strings.
1588         * cpu/ip2k.opc: Likewise.
1589
1590 2005-07-05  Nick Clifton  <nickc@redhat.com>
1591
1592         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1593         unsigned in order to avoid compile time warnings about sign
1594         conflicts.
1595
1596 2005-07-01  Nick Clifton  <nickc@redhat.com>
1597
1598         * desc-cpu.scm: Update to ISO C90 function declaration style.
1599         * opc-asmdis.scm: Likewise.
1600         * opc-ibld.scm: Likewise.
1601         * opc-itab.scm: Likewise.
1602         * cpu/fr30.opc: Likewise.
1603         * cpu/i960.opc: Likewise.
1604         * cpu/ip2k.opc: Likewise.
1605         * cpu/iq2000.opc: Likewise.
1606         * cpu/m32r.opc: Likewise.
1607         * cpu/openrisc.opc: Likewise.
1608         * cpu/sh.opc: Likewise.
1609         * cpu/sparc.opc: Likewise.
1610         * cpu/xstormy16.opc: Likewise.
1611
1612 2005-06-15  Dave Brolley  <brolley@redhat.com>
1613
1614         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1615         (cgen-cpu.h): Call it.
1616
1617         Contributed on behalf of Graydon Hoare
1618         2001-06-05  graydon hoare  <graydon@redhat.com>
1619
1620         * utils.scm (foldl): Define.
1621         (foldr): Define.
1622         (filter): Define.
1623         (union): Define.
1624         (intersection): Simplify.
1625         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1626         (-op-gen-delayed-set-maybe-trace): Define.
1627         (<operand> 'gen-set-{quiet,trace}): Delegate to
1628         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1629         up and needs cleaning.
1630         (-with-parallel?): Hardwire with-parallel to #t.
1631         (<operand> 'cxmake-get): Replace with lookahead-aware code
1632         * sid-decode.scm: Remove per-insn writeback fns.
1633         (-gen-idesc-decls): Redefine sem_fn type.
1634         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1635         with write stack stuff.
1636         (cgen-write.cxx): Replace per-insn writebacks with single write
1637         stack writeback. Add write stack reset function.
1638         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1639         stack stuff.
1640         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1641         estate attribute set.
1642         (delay): Set #:delayed attribute to calculated delay, update
1643         maximum delay of cpu, check (delay ...) usage.
1644         * operand.scm (<operand>): Add delayed slot to <operand>.
1645         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1646         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1647         * doc/rtl.texi (Expressions): Add section on (delay ...).
1648
1649 2005-06-13  Jim Blandy  <jimb@redhat.com>
1650
1651         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1652         as well as strings.
1653
1654 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1655
1656         * doc/porting.texi: Change all mention of md_apply_fix3 and
1657         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1658         respectively.
1659
1660 2005-05-18  Dave Brolley  <brolley@redhat.com>
1661
1662         * utils-sim.scm (-gen-decode-default-entry): New function.
1663         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1664         code to check that all opcodes bits match.
1665         (-gen-decoder-switch): Use -gen-decode-default-entry.
1666
1667 2005-05-16  Jim Blandy  <jimb@redhat.com>
1668
1669         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1670         fetched by one of our GETIMEM* methods.
1671         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1672         base-insn-sized chunks.
1673
1674 2005-05-10  Nick Clifton  <nickc@redhat.com>
1675
1676         * Update the address and phone number of the FSF organization in
1677         the GPL notices in the following files:
1678         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1679         cpu/powerpc.cpu, slib/random.scm
1680
1681 2005-05-06  Jim Blandy  <jimb@redhat.com>
1682
1683         * pprint.scm, cos-pprint.scm: Add documentation.
1684
1685         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1686
1687         * pprint.scm, cos-pprint.scm: New files.
1688
1689 2005-04-04  Nick Clifton  <nickc@redhat.com>
1690
1691         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1692         avoid a compile time warning.
1693
1694 2005-03-18  Nick Clifton  <nickc@redhat.com>
1695
1696         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1697         "percent-operand" from "%operand" as the latter confuses xgettext
1698         into thinking that it is a C printf formating directive, which
1699         prevents proper translation.
1700
1701 2005-02-23  Nick Clifton  <nickc@redhat.com>
1702
1703         * opcodes.scm (gen-parse-number): Add a cast to the desired
1704         pointer signed'ness in order to prevent compile time warnings.
1705         * cpu/ip2k.opc: Fixed compile time warnings about differing
1706         signed'ness of pointers passed to functions.
1707         * cpu/iq2000.opc: Likewise.
1708         * cpu/m32r.opc: Likewise.
1709         * cpu/openrisc.opc: Likewise.
1710         * cpu/xstormy16.opc: Likewise.
1711
1712 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1713
1714         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1715         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1716
1717 2005-02-16  Dave Brolley  <brolley@redhat.com>
1718
1719         * utils.scm: Update copyright years.
1720         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1721         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1722         * operand.scm (-derived-operand-parse): Move logit message from level 1
1723         to level 2.
1724
1725 2005-02-15  Nick Clifton  <nickc@redhat.com>
1726
1727         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1728         prevent compile time warning messages.
1729         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1730         * utils-gen.scm (attr-int-gen-defn): Likewise.
1731         (attr-gen-defn): Likewise.
1732         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1733         (print_dollarhex16): Remove unused function.
1734
1735 2005-02-15  Jim Blandy  <jimb@redhat.com>
1736
1737         * guile.scm (cgen-call-with-debugging): Doc fix.
1738
1739         Make backtraces work more reliably.
1740         * guile.scm: Set up debugging parameters, and enable debugging and
1741         source positions while loading.
1742         (cgen-call-with-debugging, cgen-debugging-stack-start): New
1743         functions.
1744         * read.scm: Don't set debugging parameters here.
1745         (catch-with-backtrace): Function deleted.
1746         (-cgen): Simply note the presence or absence of the -b option.
1747         Pass the flag to cgen-call-with-debugging, so debugging is turned
1748         off here if the user didn't request it, for faster computation.
1749         (cgen): Call cgen-debugging-stack-start here, instead of
1750         catch-with-backtrace.
1751
1752         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1753         trailing -s.
1754         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1755         Don't write out the trailing -s here.
1756         * Makefile.in: Regenerated.
1757         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1758         fixup.scm here; let the caller decide which Scheme's customization
1759         file to preload.
1760         * dev.scm: Load guile.scm, not fixup.scm.
1761         * fixup.scm: Deleted; contents have all moved to guile.scm.
1762         * README: Doc fix.
1763
1764         * guile.scm (debug-write): New function.
1765
1766 2005-02-14  Jim Blandy  <jimb@redhat.com>
1767
1768         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1769         transformer procedure, not eval.  Transformer procedures take one
1770         argument.
1771
1772 2005-02-11  Nick Clifton  <nickc@redhat.com>
1773
1774         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1775         to 'bfd_vma *' in order avoid compile time warning message.
1776
1777 2005-02-09  Jim Blandy  <jimb@redhat.com>
1778
1779         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
1780         corresponding change in the sim/common directory.)
1781
1782 2005-02-07  Jim Blandy  <jimb@redhat.com>
1783
1784         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
1785         changes in the opcodes directory.)
1786
1787         * guile.scm: New file, containing Guile-specific definitions and
1788         adaptations.  This is loaded by the app-specific shell scripts.
1789         Initially identical to fixup.scm.
1790         * cgen-sid.scm: Don't load fixup.scm here.
1791
1792         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1793         latter is a macro.
1794
1795 2005-01-27  Jim Blandy  <jimb@redhat.com>
1796
1797         * utils.scm (string/symbol->append): Renamed from 'concat'.
1798         * opcodes.scm (gen-switch): Use new name.
1799         * insn.scm (-sub-insn-make!): Same.
1800         * rtl.scm (rtx-dump): Same.
1801         * semantics.scm (semantic-compile): Same.
1802
1803 2005-01-20  Jim Blandy  <jimb@redhat.com>
1804
1805         * opcodes.scm (gen-switch): Use concat instead of string-map.
1806
1807         * utils.scm (concat): New function.
1808         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1809         * rtl.scm (rtx-dump): Same.
1810         * semantics.scm (semantic-compile): Same.
1811
1812 2004-12-16  Jim Blandy  <jimb@redhat.com>
1813
1814         * utils-cgen.scm (parse-name): Don't assume that string-map can be
1815         applied to symbols.  Process everything as strings, and then
1816         convert to a symbol at the end.
1817
1818         * read.scm (debug-repl): Temporarily redirect input and output to
1819         /dev/tty while we debug, so we don't interfere with whatever CGEN
1820         is reading or writing.
1821         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1822         New functions.
1823
1824 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
1825
1826         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1827         will work with newer versions of guile.
1828
1829 2004-10-27  Nick Clifton  <nickc@redhat.com>
1830
1831         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1832         * cpu/iq2000.cpu: Likewise.
1833
1834 2004-07-21  DJ Delorie  <dj@redhat.com>
1835
1836         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1837
1838 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
1839
1840         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1841         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1842
1843 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1844
1845         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1846
1847 2004-03-22  Dave Brolley  <brolley@redhat.com>
1848
1849         * utils.scm (copyright-fsf): Update copyright years.
1850         (copyright-red-hat): Ditto.
1851         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1852         code.
1853         (-op-gen-set-trace-parallel): Ditto.
1854
1855 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
1856
1857         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1858         disassembling codes for 0x*2 addresses.
1859
1860 2004-01-29  Dave Brolley  <brolley@redhat.com>
1861
1862         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1863         zeroes in the extra bit positions and generate 'opcode-mask' with ones
1864         in the extra bit positions.
1865
1866 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1867
1868         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1869
1870 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
1871
1872         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1873         "short" being 16 bit.
1874         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
1875         internationalize error message.
1876         (parse_lo16): Likewise.  Remove useless code.
1877
1878 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1879
1880         * cpu/m32r.cpu : Add new model m32r2.
1881         Add new instructions.
1882         Replace occurrances of 'Mitsubishi' with 'Renesas'.
1883         Changed PIPE attr of push from O to OS.
1884         Care for Little-endian of M32R.
1885         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1886         Care for Little-endian of M32R.
1887         (parse_slo16): signed extension for value.
1888
1889 2003-10-26  Dave Brolley  <brolley@redhat.com>
1890
1891         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1892         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1893         (-gen-extract-fn): Call -gen-record-profile-args.
1894
1895 2003-10-21  Dave Brolley  <brolley@redhat.com>
1896
1897         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1898         a static const int.
1899         * decode.scm (-opcode-slots): Correct typo in logit call.
1900
1901 2003-10-09  Jim Blandy  <jimb@redhat.com>
1902
1903         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1904         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
1905
1906         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1907
1908 2003-10-06  Dave Brolley  <brolley@redhat.com>
1909
1910         * gen-all-doc: Add fr550.
1911
1912 2003-09-11  Doug Evans  <dje@sebabeach.org>
1913
1914         * Makefile.am (ARCHFILE): New var.
1915         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1916         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1917         * Makefile.in: Regenerate.
1918
1919 2003-09-08  Dave Brolley  <brolley@redhat.com>
1920
1921         On behalf of Doug Evans <dje@sebabeach.org>
1922         Pass in paths to input files, instead of assuming they live in
1923         $srcdir/cpu.  Plus misc. option processing cleanup.
1924         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1925         Add pre-process pass to all options.
1926         * cgen-gas.scm (gas-arguments): Ditto.
1927         * cgen-sid.scm (sim-arguments): Ditto.
1928         * cgen-sim.scm (sim-arguments): Ditto.
1929         * cgen-stest.scm (stest-arguments): Ditto.
1930         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
1931         (-opc-file-path): New global.
1932         (opc-file-path): New fn.
1933         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1934         All callers updated.
1935         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1936         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1937         Replace srcdir arg with opc-file.  All callers updated.
1938         * read.scm (-opt-spec-update): Delete.
1939         (opt-get-first-pass,opt-get-second-pass): New fns.
1940         (-cgen): Process application-specific arguments in two passes.
1941
1942 2003-08-29  Dave Brolley  <brolley@redhat.com>
1943
1944         * cpu/frv.cpu: Removed.
1945         * cpu/frv.opc: Removed.
1946
1947 2003-08-21  Nick Clifton  <nickc@redhat.com>
1948
1949         * cpu/frv.cpu (mbtoh): Replace input parameter to
1950         u-media-dual-expand and u-media-dual-btoh with output parameter.
1951         (cmbtoh): Add profiling hack.
1952
1953 2003-08-19  Michael Snyder  <msnyder@redhat.com>
1954
1955         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1956
1957 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
1958
1959         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1960         the elements for the END record of CGEN_OPINST, silencing warnings.
1961
1962 2003-07-15  Doug Evans  <dje@sebabeach.org>
1963
1964         Add guile 1.6.4 support.
1965         - empty list must be quoted
1966         - string functions have stricter type checking
1967         - eval now takes a second argument
1968         - symbol-bound? is deprecated
1969         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1970         (bitset-attr->list): Ensure arg to string-cut is a string.
1971         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1972         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1973         * cos.scm (-class-list): Must quote empty list.
1974         (-class-parent-classes,-class-compute-class-desc): Ditto.
1975         (class-make,make,object-reset!): Ditto.
1976         (method-make-make!): Call eval1 instead of eval.
1977         (method-make-forward!,method-make-virtual-forward!): Ditto.
1978         * decode.scm (subdtable-add): Use stringsym-append instead of
1979         string-append.
1980         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1981         (-build-decode-table-entry): Fetch string name of insn.
1982         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1983         (-gen-mach-table-defns): Ditto for mach.
1984         (gen-ifld-defns): Ditto for ifld.
1985         (gen-hw-table-defns): Ditto for hw.
1986         (gen-operand-table): Ditto for op.
1987         (gen-insn-table-entry): Ditto for insn.
1988         * desc.scm (gen-attr-table-defn): Ditto for attr.
1989         (<keyword>,gen-defn): Don't pass symbols to string-append.
1990         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1991         symbol-append.
1992         (enum-vals-upcase): Use symbol-upcase to build result.
1993         (-enum-parse): Use stringsym-append to build errtxt.
1994         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1995         (eval1): New function.
1996         (symbol-bound?): Provide own version if >= guile 1.6.
1997         * hardware.scm (define-keyword): Use string-append instead of
1998         symbol-append.
1999         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2000         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2001         before using.
2002         (gen-list-entry): Handle either symbol or string `name' arg.
2003         (gen-obj-doc-header): Fetch string name of `o' arg.
2004         (define-cpu-intro): Ditto for cpu.
2005         (gen-mach-intro): Ditto for mach.
2006         (gen-model-intro): Ditto for model.
2007         (gen-isa-intro): Ditto for isa.
2008         (gen-machine-doc-1): Ditto for isa.
2009         (gen-reg-doc-1): Convert mach to string first.
2010         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2011         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2012         to string first.
2013         (gen-insn-categories): Fetch string name of mach.  Convert
2014         enum-val-name to string first.
2015         (gen-insn-docs): Fetch string name of mach.
2016         * ifield.scm (ifld-ilk): Result is a string.
2017         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2018         Fetch string name of ifld.
2019         (-sfmt-search-key): Similarily for ifld and op.
2020         * insn.scm (syntax-make): Fetch string name of syntax element.
2021         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2022         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2023         * mode.scm (mode:c-type): Result is a string.
2024         (mode:enum): Fetch string name of mode.
2025         (-mode-parse): Use stringsym-append to build errtxt.
2026         * model.scm (model:enum): Fetch string name of model.
2027         (-model-parse): Use stringsym-append to build errtxt.
2028         (parse-insn-timing): Must quote empty list.
2029         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2030         (-gen-minsn-opcode-entry): Ditto.
2031         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2032         convert to string.
2033         (read-cpu.opc): Convert current-arch-name to a string before using.
2034         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2035         (<derived-operand>): Must quote empty list.
2036         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2037         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2038         of ifld.
2039         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2040         (-pmacro-sym): Must convert symbols to strings before passing to
2041         string-append.
2042         (-pmacro-str): Ditto.
2043         (pmacros-init!): Use eval1 instead of eval.
2044         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2045         (keep-isa-atlist?): Ditto.
2046         (cmd-if): Use eval1 instead of eval.
2047         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2048         (-rtl-c-get): Fetch string name of src.
2049         (s-unop): Ditto for mode.
2050         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2051         (-gen-par-temp-defns,subword): Ditto.
2052         (join): Use stringsym-append instead of string-append.
2053         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2054         (rtx-traverse-debug): Fetch string name of rtx-obj.
2055         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2056         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2057         (rtx-pretty-name): Result is a string.
2058         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2059         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2060         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2061         before using.
2062         (-gen-sfrag-case): Fetch string name of user.
2063         * sid-model.scm (unit:enum): Fetch string name of unit.
2064         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2065         (<hw-memory>,gen-set-quiet): Ditto.
2066         (gen-mode-defs): Ditto.
2067         (sim-finish!): Convert current-arch-name to a string before using.
2068         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2069         (-gen-no-scache-semantic-fn): Ditto.
2070         (cgen-defs.h): Fetch string name of isa.
2071         (cgen-read.c): Convert current-arch-name to a string before using.
2072         (cgen-write.c): Ditto.
2073         * sim-model.scm (unit:enum): Fetch string name of unit.
2074         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2075         (-gen-model-timing-table): Fetch string name of model.
2076         (-gen-mach-model-table): Ditto.
2077         (-gen-mach-defns): Fetch string name of mach.
2078         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2079         (<hw-memory>,cxmake-get): Fetch string name of mode.
2080         (<hw-memory>,gen-set-quiet): Ditto.
2081         (gen-mode-defs): Ditto.
2082         (sim-finish!): Must quote empty list.
2083         * utils-cgen.scm (<ident>): Must quote empty list.
2084         (obj:str-name): New fn.
2085         (parse-comment): Result is a string.
2086         (parse-symbol): Result is a symbol.
2087         (parse-string): Result is a string.
2088         (keyword-list?): Convert arg to string before calling string-ref.
2089         (keyword-list->arg-list): Ditto.
2090         (gen-attr-name): Convert attr-name to string first.
2091         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2092         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2093         (gen-define-ifmt-ifields): Ditto for fld.
2094         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2095         map-over-string.
2096         (gen-file-name): Ditto.
2097         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2098         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2099         (reduce): Call eval1 instead of eval.
2100         * cpu/m32r.cpu (addi): Don't use `#.'.
2101
2102         * gen-all-sim: Fix some typos.
2103
2104 2003-07-08  Doug Evans  <dje@sebabeach.org>
2105
2106         * gen-all-doc: Ensure run from cgen src dir.
2107         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2108         * gen-all-sid: Similarily, in ./tmp-sid.
2109         * gen-all-sim: Similarily, in ./tmp-sim.
2110
2111 2003-06-20  Doug Evans  <dje@sebabeach.org>
2112
2113         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2114
2115 2003-06-19  Doug Evans  <dje@sebabeach.org>
2116
2117         * mach.scm (-ifld-already-defined?): New proc.
2118         (current-ifld-add!): Use it.
2119         (-op-already-defined?): New proc.
2120         (current-op-add!): Use it.
2121         (-insn-already-defined?): New proc.
2122         (current-insn-add!): Use it.
2123         (-minsn-already-defined?): New proc.
2124         (current-minsn-add!): Use it.
2125         (obj-isa-list): New proc.
2126         (isa-supports?): Use it.
2127
2128 2003-06-10  Doug Evans  <dje@sebabeach.org>
2129
2130         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2131         * cpu/m32r.cpu (all insns): Ditto.
2132
2133         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2134         "unspecified".
2135
2136         * gen-all-doc: Split arm and frv docs up a bit.
2137
2138         * cpu/arm.cpu: Add IDOC attribute.
2139         * cpu/frv.cpu: Ditto.
2140         * cpu/i960.cpu: Ditto.
2141         * cpu/openrisc.cpu: Ditto.
2142         * cpu/xstormy16.cpu: Ditto.
2143         * cpu/m32r.cpu: Ditto.
2144         (all insns): Explicitly specify IDOC attribute.
2145
2146         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2147         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2148         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2149         * Makefile.in: Regenerate.
2150         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2151         (-attr-read): Defer computing default value until we know the type.
2152         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2153         (<attr-list>:attr-present?): New method.
2154         (atlist-attr-present?,obj-attr-present?): New fns.
2155         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2156         (attr-builtin!): New insn attr IDOC.
2157         * cgen-doc.scm (doc-arguments): New args -I,-N.
2158         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2159         Support comment as fourth element of enum value.
2160         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2161         * html.scm (gen-html-header): New arg kind, all callers updated.
2162         (gen-table-of-contents): New arg insn-file, all callers updated.
2163         (gen-list-entry,gen-doc-header): New fn.
2164         (get-operands): Delete.
2165         (gen-iformat-table): Rewrite.
2166         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2167         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2168         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2169         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2170         (get-insns-for-category,gen-categories-insn-lists): New fns.
2171         (gen-insn-docs): Simplify each insn's semantics first.
2172         Print insn tables sorted by IDOC categories.
2173         (*insn-html-file-name*): New global.
2174         (cgen-insn.html): New fn.
2175         (cgen-all): Update.
2176         * insn.scm (<insn>): Create a setter for the `tmp' member.
2177         * semantics.scm (insn-build-known-values): Renamed from
2178         -build-known-values.  All callers updated.
2179
2180         * rtl.scm: Move traveral/evaluation support to ...
2181         * rtl-traverse.scm: New file.
2182         * read.scm: Maybe-load rtl-traverse.scm.
2183
2184         * rtl.scm (-rtx-valid-types): Add SETRTX.
2185
2186         * rtx-funcs.scm (nop,parallel): Fix mode.
2187
2188         * utils.scm (eqv-lookup-index): New fn.
2189         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2190
2191         * dev.scm (load-doc): Set APPLICATION.
2192
2193 2003-06-10  Dave Brolley  <brolley@redhat.com>
2194
2195         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2196         * sid-decode.scm: Generate #include of config.h into
2197         @prefix@-decode.cxx.
2198         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2199
2200 2003-06-07  Doug Evans  <dje@sebabeach.org>
2201
2202         * gen-all-sid: New file.
2203         * gen-all-opcodes: New file.
2204
2205 2003-06-05  Nick Clifton  <nickc@redhat.com>
2206
2207         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2208         version of the FRinti operand.
2209         (FRintjeven): Likewise for FRintj.
2210         (FRintkeven): Likewise for FRintk.
2211         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2212         media-quad-arith-sat-semantics, media-quad-arith-sat,
2213         conditional-media-quad-arith-sat, mdunpackh,
2214         media-quad-multiply-semantics, media-quad-multiply,
2215         conditional-media-quad-multiply, media-quad-complex-i,
2216         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2217         conditional-media-quad-multiply-acc, munpackh,
2218         media-quad-multiply-cross-acc-semantics, mdpackh,
2219         media-quad-multiply-cross-acc, mbtoh-semantics,
2220         media-quad-cross-multiply-cross-acc-semantics,
2221         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2222         media-quad-cross-multiply-acc-semantics, cmbtoh,
2223         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2224         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2225         cmhtob): Use new operands.
2226         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2227         (parse_even_register): New function.
2228
2229 2003-06-04  Doug Evans  <dje@sebabeach.org>
2230
2231         Better handling of 64 bit and mixed 32/64 bit architectures.
2232         * hardware.scm (hw-update-word-modes!): New fn.
2233         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2234         hw-update-word-modes!.
2235         (state-word-bitsize): Replace FIXME with requested check.
2236         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2237         * mode.scm (mode-find): Ignore INT,UINT.
2238         (-mode-word-sizes-kind): New global.
2239         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2240         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2241         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2242         of mode-list to ...
2243         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2244         unusable, correct values set later.
2245         (mode-finish!): Remove cruft.
2246         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2247         * opcodes.scm (opcodes-init!): Ditto.
2248         * rtx-funcs.scm (annul): Fix mode of pc.
2249         * cpu/ia64.cpu: Remove cruft that sets word modes.
2250         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2251
2252 2003-06-03  Nick Clifton  <nickc@redhat.com>
2253
2254         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2255         immediate value not unsigned.
2256
2257 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2258
2259         * cpu/sh.cpu: Amend comments to refer to SuperH.
2260         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2261         * cpu/sh64-media.cpu: Likewise.
2262         (Saturation): Update manual reference.
2263
2264 2003-05-15  Doug Evans  <dje@sebabeach.org>
2265
2266         * Makefile.am (srcroot): New var.
2267         (html): New rule.
2268         * Makefile.in: Regenerate.
2269         * cgen-doc.scm: New file.
2270         * html.scm: New file.
2271         * gen-all-doc: New file.
2272         * dev.scm (cload): Handle DOC application.
2273         (load-doc): New fn.
2274         * machs.scm (machs-for-cpu): New fn.
2275         * model.scm (models-for-cpu): New fn.
2276         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2277         All uses updated.
2278         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2279         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2280
2281         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2282         (-gen-decode-bits): Instead put in better fix here.
2283
2284         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2285
2286 2003-05-01  DJ Delorie  <dj@redhat.com>
2287
2288         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2289         word accesses.
2290         (set-alignfix-mem): Likewise.
2291
2292 2003-04-16  Dave Brolley  <brolley@redhat.com>
2293
2294         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2295         * utils.scm (copyright-fsf): Update generate copyright years.
2296         (copyright-cygnus): Ditto.
2297         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2298         operands.
2299         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2300         here.
2301         (<operand>'gen-profile-code): New parameter 'when'.
2302         (<iunit>'gen-profile-code): Ditto.
2303         (<insn>'gen-profile-code): Ditto.
2304         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2305         'insn_reference' for the 'after' function.
2306         * model.scm (unit:enum): Moved to sim-model.scm.
2307         * sim-model.scm (unit:enum): Moved from model.scm.
2308         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2309         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2310         * sid-model.scm (unit:enum): New version for sid.
2311         (gen-model-class-name): New function.
2312         (gen-model-unit-fn-decl): New function.
2313         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2314         (gen-model-unit-fn-name): New parameter 'when'.
2315         (-gen-model-insn-fn-name): Ditto.
2316         (-gen-model-insn-qualified-fn-name): New function.
2317         (-gen-model-insn-fn-decl): New function.
2318         (-gen-model-insn-fn-decls): New function.
2319         (-gen-model-insn-fn): New parameter 'when'. Call
2320         -gen-model-insn-qualified-fn-name.
2321         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2322         functions for modelling insn before and after execution.
2323         (-gen-model-class-decls): New function.
2324         (" (gen-model-class-name model) "): New function.
2325         (gen-model-classes): New function.
2326         (-gen-insn-timing): Generate functions for modelling insn before and after
2327         execution.
2328         (-gen-insn-unit-timing): Generate class-qualified names.
2329         (-gen-model-timing-table): Ditto.
2330         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2331         not needed (yet) by sid.
2332         (cgen-model.h): New function.
2333
2334 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2335
2336         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2337         * cpu/sh64-compact.cpu: Likewise.
2338         * cpu/sh64-media.cpu: Likewise.
2339
2340 2003-03-21  DJ Delorie  <dj@redhat.com>
2341
2342         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2343         which indicates if the sign flag is set from bit 15 or 7.
2344         Adjust all callers.
2345         (set-psw): New argument ws, propogate it.
2346         (set-psw-nowrite): Likewise.
2347         (set-mem-psw): Likewise.
2348         (set-psw-carry): Likewise.  Use temporaries to prevent
2349         prematurely overwriting needed inputs.
2350         (set-psw-rrotate17): Fix logic.
2351         (shrgrgr): Preserve carry for zero-bit shifts.
2352         (shrgrimm): Likewise.
2353         (shlgrgr): Likewise.
2354         (shlgrimm): Likewise.
2355         (asrgrgr): Likewise.
2356         (asrgrimm): Likewise.
2357         (reset): New.
2358
2359 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2360
2361         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2362
2363 2002-03-05  DJ Delorie  <dj@redhat.com>
2364
2365         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2366         prematurely overwriting needed inputs.
2367         (set-psw-sub): Likewise.
2368
2369 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2370
2371         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2372
2373 2003-02-18  DJ Delorie  <dj@redhat.com>
2374
2375         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2376         (movlmemimm): Just mask the address.
2377         (movhmemimm): Likewise.
2378         (movlmemgr): Likewise.
2379         (movhmemgr): Likewise.
2380         (set-psw): Always set the psw last.
2381         (set-psw-carry): Likewise.
2382         (set-psw-add): Likewise.
2383         (set-psw-sub): Likewise.
2384
2385         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2386         of 16 patterns from the set-psw-rotate17 function.
2387         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2388         movgriipostincgr, movgriipredecgr): Set psw correctly.
2389         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2390         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2391         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2392
2393 2003-02-11  Dave Brolley  <brolley@redhat.com>
2394
2395         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2396         @arch@_cgen-ifld_table.
2397         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2398         @arch@_cgen-ifld_table.
2399
2400 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2401
2402         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2403
2404 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2405
2406         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2407         empty ISAs.
2408
2409 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2410
2411         * utils-gen.scm (attr-int-gen-defn): Define.
2412
2413 2002-12-21  Doug Evans  <dje@sebabeach.org>
2414
2415         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2416         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2417
2418         * dev.scm (cload): Update location of .cpu files.
2419
2420 2002-12-19  Doug Evans  <dje@sebabeach.org>
2421
2422         * utils-sim.scm (gen-profile-sym): New fn.
2423         (<operand>,sbuf-profile-sym): New method.
2424         (<operand>,sbuf-profile-elm): Use it.
2425         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2426         of hardcoding symbol name.
2427         (<operand>,gen-profile-code): Ditto.
2428         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2429         symbol name.
2430
2431         * mode.scm (mode-sem-mode): New fn.
2432         * operand.scm (op:new-mode): Update. mode-name.
2433         (op-natural-mode?) New fn.
2434         * rtl.scm (hw): Set hw-name,mode-name.
2435
2436         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2437         Instead do:
2438         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2439         as size of IDESC-TABLE-VAR.
2440         (@prefix@_init_idesc_table): Ditto.
2441         * sim-model.scm (-gen-mach-defns): Ditto.
2442         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2443
2444         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2445
2446         * insn.scm (-parse-insn-format-symbol): Improve error message.
2447         (-parse-insn-format): Ditto.
2448
2449         * gen-all-sim: New script.
2450
2451 2002-12-16  DJ Delorie  <dj@delorie.com>
2452
2453         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2454
2455 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2456
2457         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2458         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2459         (parse_immediate16): Handle immediate16 values, which now include
2460         @hi(label) and @lo(label)
2461
2462 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2463
2464         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2465         Add braces and cast for union field.
2466         (gen-multi-ifield-nodes): Add braces and cast for union field.
2467         (cgen_operand_table): Similarly fix sentinel.
2468         (cgen_cpu_close): Constify "insns".  Formatting.
2469         (cgen-desc.c): Include xregex.h.
2470         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2471         Prototype.
2472         <opc.c>: Include safe-ctype.h.
2473         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2474         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2475         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2476         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2477         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2478         (parse_addr16): Correct type of "value".  Formatting.
2479         (parse_addr16_p): Likewise.
2480         (parse_addr16_cjp): Likewise.
2481         (parse_lit8): Likewise.
2482         (parse_bit3): Formatting.
2483         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2484         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2485         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2486         print_decimal.
2487         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2488         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2489         (print_dollarhex8): Likewise.
2490         (print_dollarhex16): Likewise.
2491         (print_dollarhex_addr16h): Likewise.
2492         (print_dollarhex_addr16l): Likewise.
2493         (print_dollarhex_p): Likewise.
2494         (print_dollarhex_cj): Likewise.
2495         (print_decimal): Likewise.
2496         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2497
2498 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2499
2500         * doc/rtl.texi (Model variants): Mention current limitations for
2501         unit inputs and outputs.
2502         (Hardware elements) <attribute PROFILE>: Be slightly more
2503         verbose.
2504         (Instructions) <timing>: input/output overrides have a direction
2505         operand.
2506
2507 2002-11-25  DJ Delorie  <dj@redhat.com>
2508
2509         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2510
2511 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2512
2513         * cpu/iq10.cpu: New file.
2514         * cpu/iq2000.cpu: Likewise.
2515         * cpu/iq2000.opc: Likewise.
2516         * cpu/iq2000m.cpu: Likewise.
2517
2518 2002-11-19  DJ Delorie  <dj@redhat.com>
2519
2520         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2521
2522 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2523
2524         * dev.scm: Call getenv with a string, not a symbol.
2525
2526 2002-10-08  Doug Evans  <dje@transmeta.com>
2527             Hans-Peter Nilsson  <hp@axis.com>
2528
2529         * types.scm (bitrange-overlap?): Handle lsb0?.
2530
2531 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2532
2533         From Robert Cragie <rcc@jennic.com>:
2534         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2535
2536 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2537             Ben Elliston  <bje@redhat.com>
2538             John Healy  <jhealy@redhat.com>
2539             Jeff Johnston  <jjohnstn@redhat.com>
2540             Alan Lehotsky  <alehotsky@redhat.com>
2541             Ubicom Inc. <SupportDesk@ubicom.com>
2542
2543         * cpu/ip2k.cpu: New file.
2544         * cpu/ip2k.opc: Likewise.
2545
2546 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2547
2548         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2549
2550 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2551
2552         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2553         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2554         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2555         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2556         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2557         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2558         (-sthi-byte): If there is a single byte to store, store it at
2559         proper address.
2560         (sthil, sthiq): Fix big-endian behaviour.
2561         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2562         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2563         (saturate): Use Dimode to check if saturation operation is required.
2564         (usaturate): Likewise.
2565         (mpermw): Fix mask.
2566         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2567         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2568         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2569         (msadubq): Fix subword index in second operand of first subtraction.
2570
2571 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2572
2573         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2574         code.
2575
2576 2002-06-18  Dave Brolley  <brolley@redhat.com>
2577
2578         * cpu/frv.cpu: New cpu description.
2579         * cpu/frv.opc: New cpu support code.
2580
2581 2002-05-21  Dave Brolley  <brolley@redhat.com>
2582
2583         * decode.scm (-opcode-slots): Don't consider bits beyond the
2584         length of the insn.
2585
2586 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2587
2588         * cpu/powerpc.cpu: New file.
2589
2590 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2591
2592         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2593
2594 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2595
2596         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2597         results are expanded recursively.
2598
2599 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2600
2601         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2602         call scan-symbol on it, to enable recursive macro-expansion.
2603
2604 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2605
2606         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2607         for multiple-isa configurations.
2608         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2609
2610 2002-02-04  Ben Elliston  <bje@redhat.com>
2611
2612         * cpu/sh.cpu, cpu/sh.opc: New files.
2613         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2614
2615 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2616
2617         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2618         (Enumerated constants): Mention that an ifield must not specify a
2619         multi-ifield.
2620         (Instruction operands): Ditto for index.
2621         (Expressions) <parallel>: Remove misplaced mention of local
2622         variables.
2623         <if>: Mention that mode must be specified and non-VOID when the
2624         result is used.
2625
2626 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2627
2628         * doc/porting.texi: When referring to *.opc, mention they are in
2629         the cpu subdir.  Call top-level directory toplevel, not devo.
2630         Close string in define-normal-insn example.
2631
2632         * doc/pmacros.texi: Fix .substr typo to .substring.
2633         Mention that .sym expansions are not further expanded.
2634
2635 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2636
2637         * desc-cpu.scm (ifld-number-cache): Add.
2638         (ifld-number): Add.
2639         (gen-maybe-multi-ifld-of-op): Add.
2640         (gen-maybe-multi-ifld): Add.
2641         (gen-multi-ifield-nodes): Add.
2642         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2643
2644 2002-01-10  matthew green  <mrg@redhat.com>
2645
2646         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2647         (gr-Rb-names): ... to this.
2648         (h-Rb): New hardware piece.
2649         (h-Rbj): Use gr-Rb-names.
2650         (Rb): Use h-Rb.
2651         (holdx): New instruction.
2652
2653 2002-01-07  Ben Elliston  <bje@redhat.com>
2654
2655         * utils.scm (package-cygnus-simulators): Rename from this ..
2656         (package-red-hat-simulators): .. to this.
2657         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2658         * sid-cpu.scm (cgen-desc.h): Likewise.
2659         (cgen-cpu.h): Likewise.
2660         (cgen-defs.h): Likewise.
2661         (cgen-write.cxx): Likewise.
2662         (cgen-semantics.cxx): Likewise.
2663         (cgen-sem-switch.cxx): Likewise.
2664         * sid-decode.scm (cgen-decode.h): Likewise.
2665         (cgen-decode.cxx): Likewise.
2666         * sid-model.scm (cgen-model.cxx): Likewise.
2667         * sid.scm (option-set!): Likewise.
2668         * sim.scm (option-set!): Likewise.
2669
2670 2002-01-07  Ben Elliston  <bje@redhat.com>
2671
2672         * utils.scm (copyright-fsf): Add 2002.
2673         (copyright-cygnus): Rename to copyright-red-hat.
2674         (copyright-red-hat): Add 2002.
2675         (CURRENT-COPYRIGHT): Update comment.
2676         * opcodes.scm (option-set!): Update callers.
2677         * sid-model.scm (cgen-model.cxx): Likewise.
2678         * sid-cpu.scm: Likewise.
2679         * sid-decode.scm: Likewise.
2680         * sid.scm (option-set!): Handle "redhat" as an option for
2681         "copyright"; use copyright-red-hat.
2682         * sim.scm (option-set!): Likewise.
2683
2684 2002-01-03  Dave Brolley  <brolley@redhat.com>
2685
2686         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2687         number of insns in the list.  Update the population count function to
2688         identify and prioritize 3 catgories of useful bits.
2689         (-population-top-few): Don't consider bits with a population count of
2690         zero.
2691         (-build-decode-table-entry): Don't call
2692         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2693         identical insns at the next tree level.
2694         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2695         this function is no longer used.
2696         (filter-non-specialized-ambiguous-insns): New function.
2697         (filter-identical-ambiguous-insns): New function.
2698         (find-identical-insn): New function.
2699         (filter-harmlessly-ambiguous-insns): Removed.
2700
2701 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2702             matthew green  <mrg@redhat.com>
2703             Frank Ch. Eigler  <fche@redhat.com>
2704             Nick Clifton  <nickc@cambridge.redhat.com>
2705
2706         * cpu/xstormy16.cpu: New file.
2707         * cpu/xstormy16.opc: New file.
2708
2709 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2710
2711         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2712
2713 2001-11-14  Dave Brolley  <brolley@redhat.com>
2714
2715         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2716         of the field being extracted.
2717
2718 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2719
2720         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2721         (cos ...) and (sin ..) rtx.
2722
2723 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2724
2725         * desc-cpu.scm: Do not include ctype.h in generated desc
2726         files.  They will inherit safe-ctype.h instead.
2727
2728 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2729
2730         * desc-cpu.scm: Add missing function prototypes (for generated
2731         C files).  Fix compile time warning messages about unused
2732         parameters (for generated C files).
2733         * opc-asmdis.scm: The same.
2734         * opc-ibld.c: The same.
2735         * opc-itab.scm: The same.
2736         * cpu/fr30.opc: The same.
2737         * cpu/m32r.opc: The same.
2738         * cpu/openrisc.opc: The same.
2739
2740 2001-09-17  graydon hoare  <graydon@redhat.com>
2741
2742         * insn.scm (syntax-break-out): Correct logic in handling escaped
2743         syntax characters.
2744
2745 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
2746
2747         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2748         call @arch@_cgen_build_insn_regex now that regex support is in
2749         libiberty.
2750
2751 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
2752
2753         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2754         (mask-superset?): Look for strict supersets to allow rejection of
2755         duplicate insns.
2756
2757 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2758
2759         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2760         (cgen-desc.h): Call it.
2761         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2762         decode-size.
2763         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2764         entire_insn for extraction, if it's shorter than base-insn-bitsize.
2765
2766 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2767
2768         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2769         mach->cpu insn-chunk-bitsize.
2770         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2771         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2772         * mach.scm (<cpu>): New field insn-chunk-bitsize.
2773         (-cpu-parse, -cpu-read): Parse/initialize it.
2774         * doc/rtl.texi (define-cpu): Document it.
2775
2776 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
2777
2778         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2779
2780 2001-07-06  Ben Elliston  <bje@redhat.com>
2781
2782         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2783
2784 2001-07-05  Ben Elliston  <bje@redhat.com>
2785
2786         * README: Update.
2787
2788         * read.scm (include): Include files from srcdir/cpu.
2789         (-cgen): Likewise for loading .cpu files.
2790         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2791         * *.cpu: Move all cpu descriptions into cpu subdirectory.
2792         * *.opc: Likewise.
2793         * simplify.inc: Likewise.
2794
2795 2001-07-04  Ben Elliston  <bje@redhat.com>
2796
2797         * read.scm (include): Log "Including file" message at level 1,
2798         rather than outputting it with (display).
2799         (cpu-load): Log "Loading cpu description" and "Processing cpu
2800         description" messages at levels 1 and 2, respectively, rather than
2801         using (display).
2802
2803 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
2804
2805         * desc.scm (<keyword> 'gen-defn): Add extra zero into
2806         CGEN_KEYWORD_ENTRY initializers.
2807
2808         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2809         (<operand> 'test-data): Involve both the index and the hardware
2810         in testcase generation.
2811         (<hw-indx> 'test-data): Generate test data from the underlying
2812         object.
2813         (<ifield> 'test-data): Generate test data by computing bit
2814         patterns for the field, then decoding them.
2815         (<hw-address> 'test-data): Allow for new calling convention.
2816         (<hw-iaddress> 'test-data): Likewise.
2817         (<keyword> 'test-data): Convert index values into keywords.
2818         (<hw-asm> 'test-data): Convert index values into integer strings.
2819
2820         * gas-test.scm (cgen-build.sh): Escape '.' as well.
2821
2822 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
2823
2824         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2825         is required for multi-mode hw types (memory).
2826
2827 2001-05-11  Ben Elliston  <bje@redhat.com>
2828
2829         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2830         when generating allinsn.d from objdump output. Without it, the
2831         testsuite will treat $ as the regular expression for end of line.
2832
2833 2001-05-09  Ben Elliston  <bje@redhat.com>
2834
2835         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2836         with `cgen_cpu_open'; documentation had become out of date.
2837         * doc/rtl.texi (Instruction operands): Likewise.
2838
2839 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
2840
2841         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2842         various-base-length instruction sets.
2843
2844 2001-04-02  Ben Elliston  <bje@redhat.com>
2845
2846         * sid-cpu.scm (-last-insn): New function.
2847         (-gen-sem-switch-engine): Loop through idesc while less than or
2848         equal to the last instruction enum, not less than the MAX enum.
2849         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2850         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2851         table's size to be the last instruction enum plus one, not
2852         @PREFIX@_INSN_MAX.
2853         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2854         instruction onto the instruction list.
2855
2856         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2857         using the size of the table and its elements.
2858         (-gen-decode-insn-globals): Define the idesc table's size to be
2859         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2860         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2861         last instruction enum plus one, not @CPU@_INSN_MAX.
2862
2863 2001-03-28  Ben Elliston  <bje@redhat.com>
2864
2865         * doc/version.texi (UPDATED, EDITION): Update.
2866         * doc/stamp-vti: Likewise.
2867
2868 2001-03-26  Ben Elliston  <bje@redhat.com>
2869
2870         * doc/credits.texi (Credits): Update.
2871
2872         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2873         specified prefix and, if necessary, escape `$' in gas-build.sh to
2874         prevent unwanted shell variable expansion.
2875
2876 2001-03-24  Ben Elliston  <bje@redhat.com>
2877
2878         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2879         (<keyword>,test-data): Likewise.
2880         (<hw-address>,test-data): Likewise.
2881         (<hw-iaddress>,test-data): Likewise.
2882         (-collate-test-set): New function.
2883         (build-test-set): Use it.
2884         (gen-gas-test): Generate five test cases per instruction.
2885         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2886
2887         * read.scm: Load "slib/random" if random is not defined.
2888         * slib/random.scm: New file.
2889
2890         * utils.scm: Remove comments about the Hobbit compiler.
2891         (copyright-cygnus): Add 2001.
2892         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2893         (package-gnu-simulators): Tidy.
2894
2895 2001-03-23  Ben Elliston  <bje@redhat.com>
2896
2897         * cgen-gas.scm: Inline documentation improvements.
2898
2899 2001-03-21  Ben Elliston  <bje@redhat.com>
2900
2901         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2902         given in a syntax string is undefined.
2903
2904         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2905         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2906
2907 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
2908
2909         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2910         for arg_type CGEN_CPU_OPEN_BFDMACH.
2911
2912 2001-03-20  Ben Elliston  <bje@redhat.com>
2913
2914         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2915         instruction onto the instruction list. Define MAX_INSNS to be the
2916         value of the last instruction enum plus one.
2917
2918 2001-03-14  Nick Clifton  <nickc@redhat.com>
2919
2920         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
2921
2922 2001-03-05  Dave Brolley  <brolley@redhat.com>
2923
2924         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2925         if the number of ifields is greater than zero.
2926
2927 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
2928
2929         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2930         Emit LIKELY/UNLIKELY branch probability hints.
2931         * sid-decode.cpu (-gen-record-args): Ditto.
2932
2933 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
2934
2935         * desc-cpu.scm (-gen-hash-defines): Rename
2936         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2937
2938 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
2939
2940         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2941         writeback tracking.
2942         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2943         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2944         if unnecessary.
2945         * sid.scm (<operand> gen-write): Use unsigned long long expression
2946         for writeback.
2947         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2948         (<unit> gen-profile-code): Ditto.
2949
2950 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
2951
2952         * doc/rtl.texi (Expressions): Document the (index-of ...) and
2953         (regno ...) rtx.
2954
2955 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2956
2957         * operand.scm (<operand> pretty-sem-name): New field.
2958         (<operand> make): Initialize it from hw-name.
2959         (op:set-pretty-sem-name!): New function.
2960         (<operand> gen-pretty-name): Default to fetching new field.
2961         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
2962         sem-name setting from -rtx-hw-name.
2963
2964 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2965
2966         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2967         its subsequent gen-pretty-name.
2968
2969         * read.scm: Increase thread working stack limit and backtrace
2970         depth limits.
2971
2972 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2973
2974         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2975
2976 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
2977
2978         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2979         current insn plus 4.
2980         (h-delay-insn): New hardware register.
2981         (l-jal): Uses h-delay-insn instead of pc when setting link register.
2982         (l-jalr): Likewise.
2983         (l-bal): Likewise.
2984
2985         * openrisc.opc (parse_hi16): Sign extend value.
2986         (parse_lo16): Likewise.
2987
2988 2001-01-06  Ben Elliston  <bje@redhat.com>
2989
2990         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2991         instead of @cpu@ and @CPU@ to generically prefix symbol names.
2992         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2993         (-gen-semantic-fn-table): Likewise.
2994         (-gen-scache-semantic-fn): Likewise.
2995         (-gen-no-scache-semantic-fn): Likewise.
2996         (cgen-read.c): Likewise.
2997         (cgen-sem-switch.c): Likewise.
2998         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2999         is a filename prefix.
3000         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3001         (-gen-decode-insn-globals): Likewise.
3002         (-gen-idesc-decls): Likewise.
3003         (cgen-decode.h): Likewise.
3004         (cgen-decode.c): Likewise.
3005         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3006         (gen-cpu-insn-enum): Likewise.
3007         (sim-finish!): Likewise.
3008
3009 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3010
3011         * openrisc.cpu: New file.
3012         * openrisc.opc: Likewise.
3013
3014 2000-12-12  Ben Elliston  <bje@redhat.com>
3015
3016         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3017
3018 2000-12-07  Ben Elliston  <bje@redhat.com>
3019
3020         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3021         "insn" when there are zero ifields to extract.
3022
3023 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3024
3025         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3026         used by simple/non-scache simulators.
3027         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3028         regardless of with-scache?.
3029         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3030
3031 2000-12-03  Ben Elliston  <bje@redhat.com>
3032
3033         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3034         (cgen-desc.c): Likewise.
3035
3036 2000-12-01  Greg McGary  <greg@mcgary.org>
3037
3038         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3039
3040 2000-12-01  Ben Elliston  <bje@redhat.com>
3041
3042         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3043         definitions if run without with-multipla-isa?.
3044         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3045         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3046
3047 2000-11-24  Ben Elliston  <bje@redhat.com>
3048
3049         * sim-cpu.scm (-gen-hardware-struct): New function.
3050         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3051         hardware elements wich have share one or more ISAs with the ISAs
3052         being kept.
3053
3054         * sim.scm (-with-multiple-isa?): New symbol.
3055         (with-multiple-isa?): New function.
3056         (option-init!): Initialise -with-multiple-isa?.
3057         (option-set!): Handle with-multiple-isa option.
3058
3059 2000-11-21  Ben Elliston  <bje@redhat.com>
3060
3061         * utils.scm (copyright-fsf): Add the year 2000.
3062
3063 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3064
3065         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3066         unneeded "\n\n" from F() macro definition.
3067
3068 2000-11-15  Greg McGary  <greg@mcgary.org>
3069
3070         * utils-cgen.scm (gen-define-with-symcat): New function.
3071         * desc-cpu.scm (gen-ifld-defns): Use it.
3072         (gen-hw-table-defns): Use it.
3073         (-gen-hash-defines): Use it.
3074         (gen-operand-table): Use it.
3075         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3076         * opc-itab.scm (-gen-ifmt-table): Use it.
3077         (-gen-insn-opcode-table): Use it.
3078         (-gen-macro-insn-table): Use it.
3079         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3080         * sim-cpu.scm (cgen-semantics.c): Use it.
3081         (cgen-sem-switch.c): Use it.
3082
3083 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3084
3085         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3086         request to emit calls to insn extractors as functions rather than
3087         branches to inline blocks.
3088         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3089         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3090
3091         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3092         to extractor clauses.
3093
3094 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3095
3096         * decode.scm (-distinguishing-bit-population): Significantly
3097         improve popularity heuristic.  Renamed from
3098         (-mask-bit-population): Gone.
3099         (-population-above-threshold): Sort new bit numbers in order of
3100         popularity.
3101         (-population-top-few): Allow up to three more bits to be selected
3102         than requested.  Correct selection order to prefer better bits.
3103         Correct bug in fewer-than-requested case.  Keep threshold as
3104         floating-point.
3105         (decode-best-get-bits): Pass also the insn-values.
3106
3107         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3108         future optimization.
3109
3110         * utils.scm (message): Format nested lists better.
3111
3112 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3113
3114         * dev.scm: Add srcdir to %load-path.
3115
3116         * rtx-funcs.scm (subword): Mode of argument can be different
3117         than mode of result, so don't use OP0 to specify argument's mode.
3118
3119 2000-11-02  Ben Elliston  <bje@redhat.com>
3120
3121         * doc/porting.texi (Building a GAS test suite): Document my change
3122         to gas-build.sh.
3123
3124 2000-11-01  Ben Elliston  <bje@redhat.com>
3125
3126         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3127
3128 2000-10-31  Ben Elliston  <bje@redhat.com>
3129
3130         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3131         with no command line arguments if the gas build directory can be
3132         determined.
3133
3134 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3135
3136         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3137         op-ifld -> op-ifield.
3138
3139 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3140
3141         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3142
3143 2000-10-13  matthew green  <mrg@cygnus.com>
3144
3145         * utils-cgen.scm (get-ifetch): Move from here ...
3146         * sim.scm (get-ifetch): ... to here.
3147         * sid.scm (get-ifetch): Copy and port to c++.
3148
3149 2000-10-06  Dave Brolley  <brolley@redhat.com>
3150
3151         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3152         ifld-start + ifld-word-offset.
3153         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3154         the field is beyond the base number of bits.
3155         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3156         (gen-extract-ifields): Ditto.
3157         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3158         characters in the regular expression.
3159
3160 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3161
3162         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3163         preprocessor constant.
3164
3165 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3166
3167         * slib/logical.scm: New file from slib.  Provides robust bitwise
3168         logical operations for large integers.
3169         * read.scm: maybe-load it.
3170
3171 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3172
3173         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3174         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3175         single-isa predicate, but support keep-isa filtering.
3176
3177 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3178
3179         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3180         statement-expression and comma-expression contexts.
3181         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3182
3183 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3184
3185         * decode.scm (-population-top-few): Signal error gracefully if
3186         decoding is about to become ambiguous.
3187
3188 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3189
3190         * doc/rtl.texi (decode-assist): Describe this field as optional.
3191
3192 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3193
3194         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3195         with decode proc.
3196
3197 2000-09-05  Dave Brolley  <brolley@redhat.com>
3198
3199         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3200         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3201
3202 2000-08-29  Dave Brolley  <brolley@redhat.com>
3203
3204         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3205         adata-integral-insn is true for this architecture.
3206
3207 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3208
3209         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3210         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3211         * rtl-c.scm (-c-rtl-get): Improve an error message.
3212         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3213
3214 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3215
3216         * Makefile.in (DIST_COMMON): Regenerated.
3217         * ifield.scm (<derived-ifield> needed-iflds): New method.
3218         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3219         sfmts built from <derived-ifield>s.
3220         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3221         type symbol 'derived-ifield, not an unparseable string.
3222         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3223         (-sfmt-contents): Add tracing.
3224
3225         From Doug Evans <dje@transmeta.com>:
3226         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3227         C code.
3228
3229 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3230
3231         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3232         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3233         (-rtl-c-get): Rename from rtl-c-get.
3234         (rtl-c-get): New fn for getter logging.
3235
3236 2000-07-28  Ben Elliston  <bje@redhat.com>
3237
3238         * NEWS: Update.
3239
3240 2000-07-25  Ben Elliston  <bje@redhat.com>
3241
3242         * doc/credits.texi (Credits): Add Frank Eigler.
3243
3244 2000-07-24  Dave Brolley  <brolley@redhat.com>
3245
3246         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3247         fully.
3248         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3249         (<keyword>): Initialize all elements fully.
3250         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3251         fully.
3252         (-gen-mach-table-defns): Ditto.
3253         (-gen-ifld-defns): Ditto.
3254         (-gen-operand-table): Ditto.
3255         (-gen-insn-table): Ditto.
3256         (-gen-cpu-open): Nothing to do for the mach table.
3257
3258 2000-07-13  Ben Elliston  <bje@redhat.com>
3259
3260         * doc/version.texi (UPDATED): Update.
3261
3262 2000-07-05  Ben Elliston  <bje@redhat.com>
3263
3264         * configure.in (AC_PATH_PROG): Remove.
3265         * configure: Regenerate.
3266         * Makefile.am (GUILE): Locate guile dynamically.
3267         * Makefile.in: Regenerate.
3268         * doc/Makefile.in: Likewise.
3269
3270 2000-07-03  Ben Elliston  <bje@redhat.com>
3271
3272         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3273         * opc-itab.scm (cgen-opc.c): Likewise.
3274
3275 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3276
3277         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3278         guile 1.4 compatibility.
3279         (rtx-env-dump): Comment out buggy display calls.
3280
3281 2000-06-15  matthew green  <mrg@redhat.com>
3282
3283         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3284
3285 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3286
3287         * Makefile.in: Regenerated.
3288
3289         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3290         (gen-ifld-defns): Ditto.
3291         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3292         * rtl.c (rtl-finish!): Ditto.
3293         * opc-itab.scm (-gen-ifield-decls): Ditto.
3294         * opcodes.scm (gen-switch): Exclude derived operands.
3295         * operand.scm (op-iflds-used): Expand derived operands.
3296         (hw-index-derived): New dummy function to create dummy object.
3297         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3298         constructor.  Set object's hw-name and index fields.
3299         (-anyof-merge-subchoices): Set instance object's index also.
3300         (-anyof-name): New helper function.
3301         (anyof-merge-semantics): Correct replacement of operand names in
3302         anyof instance.
3303         (op-ifield): Tolerate derived-operands and their funny indices better.
3304         * ifield.scm (ifld-known-values): Expand derived ifields.
3305         (non-multi-ifields, non-derived-ifields): New utility functions.
3306         (ifld-decode-mode): Tolerate objects with unbound decode field.
3307         * iformat.scm (compute-insn-length): Expand derived ifields.
3308         (compute-insn-base-mask): Ditto.
3309         * insn.scm (insn-base-ifields): Remove.
3310         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3311         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3312         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3313         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3314         (-frag-test-data): Ditto.
3315         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3316         (-gen-sem-switch-engine); Ditto.
3317         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3318         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3319         (-gen-record-args): Tolerate unbound op-ifield.
3320         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3321         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3322         Exclude multi-insns.
3323         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3324         * utils-sim.scm (op-extract?): Handle derived operands.
3325
3326         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3327         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3328         * hardware.scm (hardware-for-mode): New function.
3329
3330         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3331         cleaning up decode tables.
3332         (mask-superset?): Little helper function for above.
3333         * decode.scm (-build-decode-table-entry): Call it.
3334         (-opcode-slots): Add some more tracing.
3335         * arm.cpu: Disable decode-splits construct due to implementation
3336         conflict with `filter-harmlessly-ambiguous-insns'
3337
3338         * decode.scm (-population-top-few): New function for better decode
3339         bit generation.  Includes minor helper functions.
3340         (decode-get-best-bits): Call it instead.
3341         (OLDdecode-get-best-bits): Renamed previous version of above.
3342
3343
3344 2000-06-13  Ben Elliston  <bje@redhat.com>
3345
3346         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3347         for the Guile library directory.
3348         * configure: Regenerate.
3349         * Makefile.in, doc/Makefile.in: Regenerate.
3350
3351         * Makefile.in, doc/Makefile.in: Regenerate.
3352         * configure.in: Remove unnecessary tests. Move to version 1.0.
3353         * acconfig.h, config.in: Remove.
3354         * configure, aclocal.m4: Regenerate.
3355         * doc/stamp-vti, doc/version.texi: Likewise.
3356         * AUTHORS: New file.
3357
3358 2000-06-07 Ben Elliston  <bje@redhat.com>
3359
3360         * fixup.scm (symbol-bound?): Reduce debugging output.
3361
3362 2000-06-02  matthew green  <mrg@redhat.com>
3363
3364         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3365         a given instruction, replacing derived fields with their subfields.
3366         (insn-value): Use `insn-base-ifields' to find all constant values.
3367         (multi-insn-instantiate!): Comment some debug messages.
3368
3369 2000-06-01  Ben Elliston  <bje@redhat.com>
3370
3371         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3372         symbol names used in a (c-call ..) rtx.
3373
3374         * sim-test.scm (build-test-set): Return (()) for an instruction
3375         with no operands, so it too is included in the generated test set.
3376
3377 2000-05-31  Ben Elliston  <bje@redhat.com>
3378
3379         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3380         (sim-test): Likewise.
3381         * Makefile.in: Regenerate.
3382
3383 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3384
3385         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3386         stack traceback, in an order that resembles gdb's `bt'.
3387
3388 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3389
3390         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3391         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3392         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3393         multi insns.
3394         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3395         virtual functions.
3396         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3397         * iformat.scm (ifmt-expanded-ifields): Gone.
3398         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3399         work.
3400         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3401         ifmt entries.
3402
3403         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3404         code.
3405
3406 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3407
3408         * sid.scm (with-any-profile?): New function clone.
3409
3410 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3411
3412         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3413
3414 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3415
3416         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3417         (-multi-ifield-read): Parse them.
3418         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3419         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3420         (multi-ifield gen-extract): Add decode hook.
3421         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3422
3423         * insn.scm (syntax-break-out): More correctly handle \-escaped
3424         syntax characters.
3425         (syntax-make-elements): Ditto.
3426         * opc-itab.scm (compute-syntax): Ditto.
3427
3428 2000-05-17  Ben Elliston  <bje@redhat.com>
3429
3430         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3431
3432 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3433
3434         * gas-test.scm (build-test-set): Return (()) for an instruction
3435         with no operands, so it too is included in the generated test set.
3436
3437 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3438
3439         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3440         IFMT_OPERANDS and SYNTAX_BYTES.
3441
3442 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3443
3444         * sim.scm (with-any-profile?): New function.
3445         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3446         to decide whether or not to include profiling counters.
3447
3448 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3449
3450         Fuller derived-operand support for opcodes.
3451         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3452         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3453         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3454         (gen-operand-table): Omit derived- and anyof- operands from table.
3455         (gen-insn-table): Omit multi-insns from table.
3456         * iformat.scm (ifmt-expanded-fields): New function to expand
3457         subfields of derived-ifields.
3458         (ifmt-compute!): Ignore remaining multi-insns.
3459         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3460         multi-insns.
3461         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3462         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3463         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3464         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3465         (gen-switch): Omit anyof-operands.
3466         * operand.scm (-anyof-syntax): New function.
3467         (-anyof-merge-syntax): Call it.
3468         * utils.scm (collect): New idiomatic function.
3469
3470 2000-05-10  Ben Elliston  <bje@redhat.com>
3471
3472         * m68k.cpu: New file (work in progress).
3473
3474 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3475
3476         * Makefile.am (all-local): New target.  Create stamp-cgen.
3477         * Makefile.in: Regenerated.
3478         * doc/Makefile.in: Regenerated.
3479
3480 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3481
3482         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3483         (-operand-parse-setter): Ditto.
3484         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3485         for CACHE-ADDR operands.
3486         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3487         trace entries.  Widen byte-wide values for printing.
3488         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3489         Widen byte-wide values for printing.  Hexify memory addresses.
3490
3491 2000-04-23  matthew green  <mrg@redhat.com>
3492
3493         * m32r.cpu: Fix a typo.
3494
3495 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3496
3497         * ia64.cpu (define-model): Change merced to Itanium.
3498         (f-qp): Change quilifying to qualifying.
3499         (movbr_ph, movbr_pvec): Delete.
3500         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3501
3502 2000-04-07  Ben Elliston  <bje@redhat.com>
3503
3504         * doc/porting.texi (Building a simulator test suite): Clarify
3505         where generated test cases are placed.
3506
3507 2000-04-07  Ben Elliston  <bje@redhat.com>
3508
3509         * Makefile.am (gas-test): Remove dependency on `cgen'.
3510         (sim-test): Ditto.
3511         * Makefile.in: Regenerate.
3512
3513 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3514
3515         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3516         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3517         type reconfiguration.
3518         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3519         with-profile?.
3520
3521 2000-03-30  Ben Elliston  <bje@redhat.com>
3522
3523         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3524
3525 2000-03-24  Ben Elliston  <bje@redhat.com>
3526
3527         * Makefile.am (stamp-cgen): Reinstate target.
3528         * Makefile.in: Regenerate.
3529
3530 2000-03-22  Ben Elliston  <bje@redhat.com>
3531
3532         * slib/ppfile.scm: Remove; unused.
3533         * slib/defmacex.scm: Likewise.
3534
3535 2000-03-21  Ben Elliston  <bje@redhat.com>
3536
3537         * doc/internals.texi (Source file overview): Document.
3538
3539         * Makefile.am (GUILEDIR): Remove.
3540         (CGEN): Ditto. Callers use $(GUILE) instead.
3541         (GUILEFLAGS): Ditto.
3542         (CGENFILES): Ditto.
3543         (APPDESCFILES): Ditto.
3544         (OPCODESFILES): Ditto.
3545         (SIMFILES): Ditto.
3546         (pkgdata_SCRIPTS): Ditto.
3547         (stamp-cgen): Remove target.
3548         * Makefile.in: Regenerate.
3549
3550         * configure.in: Remove header and library tests.
3551         * configure: Regenerate.
3552         * config.in: Likewise.
3553
3554 2000-03-20  Ben Elliston  <bje@redhat.com>
3555
3556         * read.scm: Cease loading "hob-sup.scm".
3557         * utils.scm: Inherit the fastcall family of procedures (for now).
3558         * hob-sup.scm: Remove.
3559
3560 2000-03-20  Ben Elliston  <bje@redhat.com>
3561
3562         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3563         * configure: Regenerate.
3564         * gdbinit.in: Remove.
3565
3566 2000-03-17  Ben Elliston  <bje@redhat.com>
3567
3568         * Makefile.am (CGEN): Use guile, not cgen.
3569         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3570         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3571         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3572         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3573         (HOB_OBJS): Likewise.
3574         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3575         (CGENOBJS): Likewise.
3576         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3577         (hobbit, hobbit.o, hobbit.c): Remove targets.
3578         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3579         (CLEANFILES): Update.
3580         * acconfig.h (WITH_HOBBIT): Remove.
3581         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3582         option --with-cgen-hobbit.
3583         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3584         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3585         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3586         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3587         * Makefile.in: Regenerate.
3588         * config.in: Likewise.
3589         * aclocal.m4: Likewise.
3590         * configure: Likewise.
3591         * README (Hobbit support): Remove.
3592         * doc/internals.texi (Conventions): Do not mention Hobbit.
3593         * doc/porting.texi (Supported Guile versions): Likewise.
3594
3595 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3596
3597         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3598         callback convention to new sid sidutil::basic_cpu code.
3599         (-gen-sfrag-engine-fn): Ditto.
3600         * sid.scm (-create-virtual-insns!): Ditto.
3601         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3602         mode.
3603         (cxmake-skip): Implement properly for pbb mode.
3604
3605 2000-03-03  Ben Elliston  <bje@redhat.com>
3606
3607         * doc/internals.texi: New file.
3608
3609 2000-02-29  Ben Elliston  <bje@redhat.com>
3610
3611         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3612         * doc/porting.texi: Formatting tweaks.
3613
3614 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3615
3616         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3617         field.
3618
3619 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3620
3621         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3622         mode.
3623
3624 2000-02-23  Andrew Haley  <aph@cygnus.com>
3625
3626         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3627         instruction.
3628
3629 2000-02-24  Ben Elliston  <bje@redhat.com>
3630
3631         * doc/rtl.texi (Derived operands): Add some cindex entries.
3632
3633 2000-02-23  Ben Elliston  <bje@redhat.com>
3634
3635         * ia32.cpu (dndo): Move general purpose macro from here ..
3636         * simplify.inc (dndo): .. to here.
3637
3638 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3639
3640         * arm.cpu (h-tbit): Add c-call setter function.
3641         (h-mbits): Ditto.
3642
3643 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3644
3645         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3646         (-frag-cost-compute!): Ditto.
3647         * utils.scm (copyright-cygnus): Add Y2K.
3648         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3649
3650 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3651
3652         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3653         flags field of the CGEN_CPU_TABLE structure.
3654
3655 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3656
3657         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3658         All references updated.
3659
3660 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3661
3662         * ia32.cpu: Rewrite addressing mode support.
3663
3664         * ifield.scm (<ifield>): New member `follows'.
3665         (ifld-known-values): New proc.
3666         (<ifield>): New method set-word-offset!.
3667         (ifld-set-word-offset!): New proc.
3668         (ifld-new-word-offset): New proc.
3669         (<ifield>): New method next-word.
3670         (<multi-ifield>): New method next-word.
3671         (ifld-next-word): New proc.
3672         (ifld-precedes?): New proc.
3673         (-ifield-parse): New args word-offset,word-length,follows.
3674         All callers updated.  Handle CISC-style vs RISC-style ifields.
3675         (-ifield-read): Recognize word-offset,word-length,follows specs.
3676         (-ifld-parse-follows): New proc.
3677         (-multi-ifield-make-default-insert): New proc.
3678         (-multi-ifield-make-default-extract): New proc.
3679         (-multi-ifield-parse): Provide default values for insert,extract
3680         handlers if not specified.
3681         (<derived-ifield>): New class.
3682         (derived-ifield?): New predicate.
3683         (ifld-derived-operand?): New predicate.
3684         (f-anyof): New global.
3685         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3686         (f-derived,ifld-derived?): Delete.
3687         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3688         * insn.scm (-sub-insn-ifields): New proc.
3689         (-sub-insn-make!): New proc.
3690         (multi-insn-instantiate!): Provide initial implementation.
3691         (-insn-parse): If insn contains "anyof" operands, create a
3692         <multi-insn> object instead of a plain <insn>.
3693         (-parse-insn-format-symbol): Rewrite derived operand handling.
3694         Add anyof operand handling.
3695         (-parse-insn-format-ifield-spec): Rewrite.
3696         (-parse-insn-format-operand-spec): Delete.
3697         (-parse-insn-format-list): Delete support for `(operand value)'.
3698         (anyof-operand-format?): Replaces derived-operand-format?.
3699         * operand.scm (-operand-parse-getter): Improve error messages.
3700         (-operand-parse-setter): Ditto.
3701         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3702         ifield-assertion.
3703         (<anyof-operand>): Change baseclass from <derived-operand> to
3704         <operand>.  Delete member values.  New members base-ifield,choices.
3705         (anyof-operand?): New predicate.
3706         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3707         (-derived-operand-parse): Rewrite.
3708         (-derived-operand-read): Rewrite.
3709         (-anyof-parse-choice): New proc.
3710         (-anyof-operand-parse): Rewrite.
3711         (-anyof-operand-read,define-anyof-operand): New procs.
3712         (<anyof-value>): Rewrite.
3713         (-anyof-initial-known): New proc.
3714         (anyof-satisfies-assertions?): New proc.
3715         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3716         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3717         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3718         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3719         (-anyof-value-from-derived): New proc.
3720         (-anyof-all-choices-1,anyof-all-choices): New procs.
3721         (operand-init!): Create define-anyof-operand reader command.
3722
3723         * insn (syntax-break-out): Take syntax as argument instead of insn.
3724         All callers updated.
3725         (syntax-make): Move here, from ???.
3726
3727         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3728         bitrange-foo. All uses updated.
3729         (bitrange-next-word): New proc.
3730
3731         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3732
3733         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3734         (rtx-make-const,rtx-make-enum): New procs.
3735         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3736         (rtx-mem-addr,rtx-mem-sel): New procs.
3737         (rtx-change-address): New proc.
3738         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3739         (rtx-make-set,rtx-single-set?): New procs.
3740         (rtx-combine): New proc.
3741
3742         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
3743         (rtx-traverse-with-locals): Ditto.
3744         (-rtx-traverse,-rtx-traverse-*): Ditto.
3745
3746         * rtl.scm (define-subr): New proc.
3747         (rtl-init!): Create reader command `define-subr'.
3748
3749         * cos.c (_object_mi_p): Ensure argument is an object.
3750         (indent): New function.
3751         (_object_print_elms): Add pretty-printing support.
3752         (_object_print): Ditto.
3753
3754         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3755         (*floats-s->c-fun-table*): Ditto.
3756         * hobbit.c,hobbit.h: Rebuild.
3757         * hob-sup.c (fastcall7): New proc.
3758         * hob-sup.h (fastcall7): Declare.
3759         * hob-sup.scm (fastcall7): New macro.
3760
3761         * mach.scm (<arch>): New member subr-list.
3762         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3763         (arch-finish!): Reverse recorded subr list.
3764
3765         * read.scm (debug-env): New global.
3766         (debug-var-names,debug-var,debug-repl-env): New procs.
3767         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
3768         (debug-quit): Renamed from `continue'.
3769
3770         * simplify.inc (dsmf): New pmacro.
3771
3772         * utils.scm (plus-scan): New proc.
3773         (split-bits): Rewrite.
3774         (split-value): New proc.
3775
3776 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
3777
3778         * doc/Makefile.am (DOCFILES): Add notes.texi.
3779         * doc/Makefile.in: Rebuild.
3780
3781 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
3782
3783         * ifield.scm (ifld-derived?): New proc.
3784         (f-derived): New global.
3785         (ifield-builtin!): Create ifield f-derived.
3786         (<multi-insn>): New class.
3787         (multi-insn?): New predicate.
3788         (multi-insn-instantiate!): New proc.
3789         (-insn-parse): Create <multi-insn> objects for insns with derived
3790         ifields.
3791         (-parse-insn-format-symbol): Handle derived ifields.
3792         (-parse-insn-format-ifield-spec): New proc.
3793         (-parse-insn-format-operand-spec): New proc.
3794         (-parse-insn-format-list): Simplify.
3795         (-parse-insn-format): No longer allow (ifield-object value) spec.
3796         (derived-operand-format?): New proc.
3797         (insn-alias?): New proc.
3798         (non-alias-insns): Rewrite.
3799         (insn-real?): Renamed from real-insn?, all callers updated.
3800         (virutal-insns): Rewrite.
3801         (multi-insns): New proc.
3802         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3803         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3804         Return #f if operand doesn't have an index or if index is not an
3805         ifield.
3806         (hw-index-anyof): New proc.
3807         (-operand-parse): Allow integer indices.
3808         (<derived-operand>): New class.
3809         (derived-operand?): New predicate.
3810         (<anyof-operand>): New class.
3811         (<anyof-value>): New class.
3812         (-anyof-parse-value,-anyof-operand-parse): New procs.
3813         (-derived-operand-parse,-derived-operand-read): New procs.
3814         (define-derived-operand,define-full-derived-operand): New procs.
3815         (operand-init!): New reader command define-derived-operand.
3816
3817         * utils.scm (list-take): Handle negative amount.
3818         (element?): Rewrite.
3819
3820 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
3821
3822         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3823
3824 1999-10-04  Richard Henderson  <rth@cygnus.com>
3825
3826         * ia64.cpu: Checkpoint.
3827
3828 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
3829
3830         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3831
3832         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
3833         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
3834
3835 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
3836
3837         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3838         PC returned by sim_engine_invalid_insn.
3839
3840 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
3841
3842         * ia32.cpu: New file.
3843
3844 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
3845
3846         * utils.scm (bit-set?): Fix off by one error.
3847
3848         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3849
3850         * rtl.scm (hw): Check for valid hardware element before trying to
3851         get its mode.
3852
3853         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
3854         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3855         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3856         * thumb.cpu (*): arm_compute_operand2_foo renamed to
3857         compute_operand2_foo.
3858
3859         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3860         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3861         Call delayed_branch/branch methods instead of assigning to `vpc'.
3862         (<hw-pc>,cxmake-skip): Call skip method.
3863         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3864         (<pc>,cxmake-skip): Ditto.
3865         (-create-virtual-insns!): Ditto.
3866         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3867         (op:write): Ditto.
3868         (op:record-profile): Specify #:output-language "c++".
3869         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3870         @arch@_insn_attr.
3871         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3872         Define enums here.
3873         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3874         (gen-semantic-code): Ditto.
3875         (-gen-sem-case,-gen-sfrag-code): Ditto.
3876         (-gen-hardware-types): Delete class @cpu@_cpu_base.
3877         (cgen-cpu.h): File is now #included by main cpu class, rather than
3878         subclassing.
3879         (cgen-defs.h): New proc.
3880         (-gen-scache-semantic-fn): Change result type to sem_status.
3881         New local `status'.  Call done_cti_insn/done_insn method at end.
3882         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3883         cgen-ops.h.
3884         (cgen-sem-switch.cxx): Ditto.
3885         * sid-decode.scm (-gen-idesc-decls): Update return type of
3886         @prefix@_sem_fn.
3887         (cgen-decode.h): Add using namespace @arch@.
3888         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3889
3890         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3891         (estate-output-language-c?,estate-output-language-c++?): New procs.
3892         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3893         (estate-make-for-normal-rtl-c++): New proc.
3894         (rtl-c++-parsed,rtl-c++): New proc.
3895         (s-c-call): Invoke cpu class method if c++.
3896         (join): Use s-c-raw-call.
3897
3898         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3899         (nop): Rewrite.
3900
3901         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3902         * rtl.scm (<eval-state>): New member `modifiers'.
3903         (<eval-state>,vmake!): Handle #:modifiers.
3904         (estate-with-modifiers): New proc.
3905
3906         * rtl.scm (rtx-side-effects?): New proc.
3907         (rtx-canonical-bool): Don't change expr if it has side effects.
3908         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3909         better.
3910
3911 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
3912
3913         * sim.scm (gen-scache-type): Fix typo in last patch.
3914
3915 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
3916
3917         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3918
3919 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
3920
3921         * sid.scm (<hw-pc>,cxmake-skip): New method.
3922         (<pc>,cxmake-skip): New method.
3923
3924         * decode.scm (decode-build-table): Delete args startbit,index-list.
3925         All callers updated.
3926         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3927         All callers updated.
3928         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3929         to decode-get-best-bits.
3930         * sid-decode.scm (-gen-decode-fn): Ditto.
3931
3932         * hardware.scm (hw-bits): New proc.
3933         (-hw-parse): New arg layout.  All callers updated.
3934         (define-full-hardware): New arg layout.  All callers updated.
3935         (-hw-validate-layout): New proc.
3936         (-hw-create-[gs]etter-from-layout): New procs.
3937         (<hw-register>,parse!): Handle layout spec.
3938         * types.scm (type-bits): New proc.
3939
3940         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3941         UNARY, BINARY, TRINARY rtxs.
3942
3943         * attr.scm (<enum-attribute>,parse-value): Allow strings.
3944         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3945         Support '- as "unused spot" indicator.
3946
3947 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
3948
3949         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3950
3951 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
3952
3953         * rtx-funcs.scm (subword): Fix mode spec of `value'.
3954
3955         * rtl.scm (-rtx-traverse-operands): Fix debugging message
3956         construction.
3957         (tstate-make): New arg `depth'.  All callers updated.
3958         (tstate-depth,tstate-set-depth!): New procs.
3959         (tstate-incr-depth!,tstate-decr-depth!): New procs.
3960         (-rtx-traverse-operands): Indent debugging output by traversal depth.
3961         (-rtx-traverse): Ditto.  Keep track of traversal depth.
3962
3963 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
3964
3965         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3966         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3967         * utils-sim.scm: Decoder generator support moved here.
3968         (-decode-equiv-entries?,-decode-sort-entries): New procs.
3969         (-gen-decoder-switch): Sort entries for more fall-throughs.
3970
3971         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3972         * Makefile.in: Rebuild.
3973         * sim-test.scm (build-sim-testcase): Add logging message.
3974         * dev.scm (cload): Recognize SIM-TEST application.
3975         (load-stest): Set APPLICATION to SIM-TEST.
3976
3977         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3978
3979         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3980         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3981         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3982
3983         * insn.scm (syntax-break-out): Handle ${foo}.
3984
3985 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
3986
3987         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3988         (bin_PROGRAMS): Define.
3989         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3990         (cgen-hob.c): Prepend $(srcdir)/ here.
3991         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3992         (libcpu_a_SOURCES): Delete.
3993         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3994         (CGEN_HOB_OBJ,CGENOBJS): New variables.
3995         * configure.in (LIBS): Replace -Wl,-rpath with -R.
3996         Add AC_CHECK_LIB(guile,main).
3997         * Makefile.in: Rebuild.
3998         * doc/Makefile.in: Rebuild.
3999         * aclocal.m4: Rebuild.
4000         * config.in: Rebuild.
4001         * configure: Rebuild.
4002
4003 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4004
4005         Rename rtx functions from name: to name, accept optional leading
4006         modifier and mode.
4007         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4008         * attr.scm (-attr-eval): Update.
4009         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4010         (<hw-register>,mode-ok?): Disallow VOID.
4011         (<hw-immediate>,mode-ok?): Disallow VOID.
4012         (<hw-address>,mode-ok?): Disallow VOID.
4013         * mode.scm (mode-name?): New proc.
4014         (VOID): Renamed from VM.
4015         (DFLT): Renamed from DM.
4016         (mode-builtin!): Update.
4017         * opcodes.scm (<ifield>,gen-insert): Update.
4018         (<ifield>,gen-extract): Update.
4019         (<multi-ifield>,gen-insert,gen-extract): Update.
4020         * operand.scm (op:mode): Update.
4021         (<pc>,make!): Update.
4022         (op:new-mode): Update.
4023         (-operand-read): Update.
4024         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4025         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4026         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4027         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4028         (rtx-make): Call -rtx-munge-mode&options.
4029         (rtx accessors): Rewrite.
4030         (rtx-pretty-name): Update.
4031         (-rtx-traverse-*): Update.
4032         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4033         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4034         (-rtx-make-traverse-table): Update.
4035         (-rtx-traverse-operands): Update.
4036         (-rtx-option?,-rtx-option-list?): New procs.
4037         (-rtx-munge-mode&options): New proc.
4038         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4039         (-rtx-traverse): Update.
4040         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4041         (rtx-compile-time-constant?): Update.
4042         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4043         (rtx-value): Update.
4044         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4045         * rtx-funcs.scm (*): Update.
4046         * rtl-c.scm (rtl-c-get): Update.
4047         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4048         (s-c-call,s-c-raw-call): Update.
4049         (s-boolifop,s-convop,s-if,s-cond): Update.
4050         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4051         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4052         (s-parallel,s-sequence): Update.
4053         (rtl-c-build-table): Update.
4054         * sem-frags.scm (-frag-hash-compute!): Update.
4055         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4056         for temporary bug compatibility with previous version.
4057         (-frag-expr-locals,-frag-expr-stmts): Update.
4058         (-frag-compute-desired-frags,-frag-pick-best): Update.
4059         * semantics.scm (-simplify-expr-fn): Update.
4060         (rtx-simplify): Update.
4061         (-rtx-ref-type): Update.  Account for modifiers.
4062         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4063         (-build-ifield-operand!): Update.
4064         (-build-known-values): Update.
4065         (semantic-compile): Update.
4066         (-gen-reg-access-defns): Update.
4067         (gen-semantic-code,-gen-sem-case): Update.
4068         (-gen-sfrag-code,-gen-sfrag-case): Update.
4069         * sim-cpu (gen-semantic-code): Update.
4070         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4071         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4072         (-hw-cxmake-get): Update.
4073         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4074         (<hw-index>,cxmake-get): Update.
4075         (<operand>,gen-type,gen-read,cxmake-get): Update.
4076         (<operand>,gen-set-quiet,gen-set-trace): Update.
4077         (<pc>,cxmake-get): Update.
4078         (sim-finish!): Update.
4079         * utils-gen.scm (-gen-ifld-extract-base): Update.
4080         (-gen-ifld-extract-beyond): Update.
4081         (gen-multi-ifld-extract): Update.
4082         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4083         * sid.scm (<hw-pc>,gen-write): Update.
4084         (-gen-decode-insn-globals): Update.
4085         (-hw-cxmake-get): Update.
4086         (<hw-register>,cxmake-get-raw): Update.
4087         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4088         (<hw-index>,cxmake-get): Update.
4089         (<operand>,gen-type,gen-read,cxmake-get): Update.
4090         (<operand>,gen-set-quiet,gen-set-trace): Update.
4091         (<pc>,cxmake-get): Update.
4092         (-create-virtual-insns!): Update.
4093         (-decode-split-build-assertion): Update.
4094         * *.cpu: Update.
4095         * simplify.inc: Update.
4096
4097 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4098
4099         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4100         Prefix queue function name with sim_ instead of @cpu@_.
4101
4102         * sim.scm (-with-parallel-only?): New global.
4103         (option-init!): Initialize it.
4104         (option-set!): Set it.
4105         (with-parallel-only?): New proc.
4106         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4107         and writeback markers if with-parallel-only.
4108         (-gen-idesc-init-fn): Update.
4109         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4110         with-generic-write.
4111
4112 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4113
4114         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4115         with the invalid insn handler.
4116
4117         * utils.scm (list-maybe-ref): New proc.
4118
4119         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4120         define-arch.
4121         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4122
4123         * i960.cpu (test*-*): Delete `expr' arg.
4124         (test-op,branch-op): Update.
4125
4126 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4127
4128         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4129         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4130         updated.
4131         (gen-reg-access-defn): Ditto.
4132         (-gen-hw-addr): Rewrite.
4133         (-op-gen-queued-write): Rewrite.
4134         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4135         (-gen-scache-semantic-fn): Handle with-generic-write.
4136         (-gen-no-scache-semantic-fn): Ditto.
4137
4138 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4139
4140         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4141
4142         * sim.scm (-with-generic-write?): New global.
4143         (option-init!): Initialize it.
4144         (option-set!): Set it.
4145         (with-generic-write?): New proc.
4146         (-gen-hw-addr): New proc.
4147         (-op-gen-queued-write): New proc.
4148         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4149
4150         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4151         turned off.
4152         (-gen-sem-switch): Preserve existing with-parallel? value.
4153         (-gen-sem-parallel-switch): Ditto.
4154         (-gen-write-case): Add /indent support.
4155         (cgen-write.c): Rewrite.
4156
4157         * utils.scm (-current-print-state): New global.
4158         (make-print-state): New proc.
4159         (pstate-indent,pstate-set-indent!): New procs.
4160         (pstate-cmd?,pstate-cmd-do): New procs.
4161         (/indent): New global.
4162         (/indent-set,/indent-add): New procs.
4163         (string-write): Set -current-print-state.
4164         (-string-write): New arg pstate, all callers updated.
4165         Handle print-state commands.
4166         (-string-list-flatten): New proc.
4167         (string-list->string): Use it.
4168
4169         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4170         (-gen-sem-fn-table-entry): New proc.
4171         (-gen-semantic-fn-table): New proc.
4172         (-gen-scache-semantic-fn): Make fn static.
4173         (-gen-no-scache-semantic-fn): Ditto.
4174         (cgen-semantics.c): Define macro SEM_FN_NAME.
4175         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4176         FAST,FULL.  Update @cpu@_insn_sem contents.
4177         (-gen-semf-fn-name): Delete.
4178         (-gen-sem-fn-decls): Delete.
4179         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4180         @cpu@_semf_init_idesc_table.
4181         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4182         handlers here.
4183         (cgen-decode.h): Print sfmt enum.
4184         * sid-decode.scm (-gen-semf-fn-name): Delete.
4185         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4186
4187         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4188         (ifmt-compute!): Ditto.
4189         * sim-decode.scm (-gen-decoder-switch): Ditto.
4190         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4191         (-gen-decoder-switch): Ditto.
4192
4193         * insn.scm (insn-virtual?): New proc.
4194
4195         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4196         convert to string.
4197         * mach.scm (<arch>): attr-list is now a pair of lists.
4198         (current-attr-list): Rewrite.
4199         (current-attr-add!,current-attr-lookup): Rewrite.
4200         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4201
4202 1999-08-06  Richard Henderson  <rth@cygnus.com>
4203
4204         * ia64.cpu: Initial checkpoint.
4205
4206 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4207
4208         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4209         (pmacros-init!): Update .apply help string.
4210
4211 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4212
4213         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4214         (<hw-pc>,cxmake-skip): New method.
4215         (<pc>,cxmake-skip): New method.
4216         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4217         (gen-argbuf-type): New member `skip_count'.
4218         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4219         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4220
4221         * utils-sim.scm: New file.
4222         * dev.scm (load-sim): Load it.
4223         (load-sid): Load it.
4224         * cgen-sid.scm: Load it.
4225         * cgen-sim.scm: Load it.
4226         * iformat.scm (<sformat>): New member sbuf, not initialized by
4227         default make.
4228         * rtx-funcs.scm (skip): Rewrite.
4229         * rtl-c.scm (skip): Rewrite.
4230         * m32r.cpu (sc,snc): Update `skip' usage.
4231         * mode.scm (mode-real-mode): New proc.
4232         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4233         Distinguish fragments by the <sformat-abuf> they use.
4234         * sim.scm (gen-profile-index-type): Delete.
4235         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4236         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4237         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4238         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4239         (-gen-argbuf-elm): Rewrite.
4240         (-gen-argbuf-hw-elm): Delete.
4241         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4242         of each sfmt.
4243         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4244         (sim-init!): Initialize them.
4245         (sim-analyze-insns!): Set them.
4246         (current-sbuf-list): New proc.
4247         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4248         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4249         * sim-model.scm (-gen-model-insn-fn): Ditto.
4250         * sim-decode.scm (-gen-extract-decls): Delete.
4251         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4252         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4253         sim.scm.
4254         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4255         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4256         (-gen-op-extract,-gen-op-trace-extract): New procs.
4257         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4258         gen-sfmt-argvars-foo and rewrite.
4259         (-gen-record-args): Rewrite.
4260         (-gen-extract-case): Tweak.
4261         * sid.scm (gen-profile-index-type): Delete.
4262         (ifield argbuf support): Move to utils-sim.scm.
4263         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4264         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4265         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4266         (-sim-sformat-argbuf-list): New global.
4267         (sim-init!): Initialize it.
4268         (sim-analyze-insns!): Set it.
4269         (current-sbuf-list): New proc.
4270         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4271         (-gen-argbuf-hw-elm): Delete.
4272         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4273         of each sfmt.
4274         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4275         (-gen-extract-decls): Delete.
4276         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4277         sid.scm.
4278         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4279         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4280         (-gen-op-extract,-gen-op-trace-extract): New procs.
4281         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4282         gen-sfmt-argvars-foo and rewrite.
4283         (-gen-record-args): Rewrite.
4284         (-gen-extract-case): Tweak.
4285
4286         * cgen-gh.c (gh_putc,gh_puts): New functions.
4287         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4288         * cos.c (_object_print_elms,_object_print): Use them.
4289         * hob-sup.c (fastcall_print): Use them.
4290         * configure.in: Check for scm_gen_puts, scm_puts.
4291         * config.in: Rebuild.
4292         * configure: Rebuild.
4293         * aclocal.m4: Rebuild.
4294         * Makefile.in: Rebuild.
4295
4296         * dev.scm (load-opc): Use load instead of maybe-load.
4297         (load-gtest,load-sim,load-stest): Ditto.
4298         (load-sid): Ditto.
4299
4300 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4301
4302         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4303         up to avoid g++ 'goto crosses initialization' warning.
4304         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4305         (-gen-sfrag-case): Update use of NEXT_FRAG.
4306
4307 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4308
4309         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4310
4311         * read.scm: Load sem-frags.scm.
4312         * sem-frags.scm (*): Lots rewritten.
4313         * sid.scm (-with-sem-frags?): New global
4314         (with-sem-frags?): New proc.
4315         (option-init!): Initialize -with-sem-frags?.
4316         (option-set!): Recognize with-sem-frags.
4317         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4318         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4319         if asked to.
4320         (-gen-sfrag-engine-decls): New proc.
4321         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4322         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4323         (-gen-sfrag-engine): New proc.
4324         (-gen-sem-case): Emit setup-semantics if specified.
4325         (-gen-sem-switch-engine): Update init/use of computed goto label.
4326         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4327         from local vars.
4328         (-gen-idesc-decls): Replace sem_address with cgoto.
4329         (-gen-scache-decls): Rewrite definition of `execute' member.
4330         * arm.cpu (arm isa): Enable decode-splits.
4331         * arm7.cpu (multiply insns): Rename result to mul-result.
4332
4333         Rename decode-specialize to decode-split.
4334         * decode.scm (*): Update.
4335         * insn.scm (*): Update.
4336         * mach.scm (*): Update.
4337         * sid.scm (*): Update.
4338
4339 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4340
4341         Record objects as a smob.
4342         * cos.c (scm_tc16_object): New static global.
4343         (cos_init): Initialize it.
4344         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4345         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4346         (_object_tag): Delete.
4347         (_object_make_smob): New function.
4348         (_object_make_x,_object_make_with_values_x): Rewrite.
4349         (_object_elements,_object_class_desc): Rewrite.
4350         (_object_copy,object_p): Rewrite.
4351         (_object_specialize): Rewrite.
4352         (_object_print_elms,_object_print): New functions.
4353         (object_smob): New static global.
4354         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4355
4356         * cos.c (_make_x_symbol): New static global.
4357         (object_make): Use it.
4358         (cos_init): Initialize it.
4359
4360 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4361
4362         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4363         instead to determine whether to use FLD macro.
4364         (<rtl-c-eval-state>): New member ifield-var?.
4365         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4366         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4367         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4368
4369         * rtl.scm (rtx-sequence-assq-locals): New proc.
4370
4371         * cos.scm (-object-error): Don't crash on non-objects.
4372
4373         * Makefile.am (CLEANFILES): Add hobbit.
4374         * Makefile.in: Rebuild.
4375
4376         * rtl-c.scm (s-c-call): Delete unnecessary code.
4377
4378 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4379
4380         * rtl-c.scm (ifield): Always reference value via `FLD'.
4381
4382         * cos.c (elm_bound_p): Return problem SCM boolean values.
4383
4384         * utils-cgen.scm (display-argv): New proc.
4385         * cgen-opc.scm (cgen): Call it.
4386         * cgen-sim.scm (cgen): Ditto.
4387         * cgen-gas.scm (cgen): Ditto.
4388         * cgen-stest.scm (cgen): Ditto.
4389         * cgen-sid.scm (cgen): Ditto.
4390
4391 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4392
4393         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4394         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4395         (-gen-extract-switch): Initialize result to 1.
4396         * opcodes.scm (gen-ifield-default-type): New proc.
4397         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4398         updated.
4399         (<hw-index>,gen-insert): Handle non-ifield indices.
4400         (<hw-index>,gen-extract): Ditto.
4401         (<hw-asm>,gen-parse): Ditto.
4402         (<hw-asm>,gen-print): Ditto.
4403         (<keyword>,gen-parse): Ditto.
4404         (<keyword>,gen-print): Ditto.
4405         (<operand>,gen-fget): Ditto.
4406         (<operand>,gen-fset): Ditto.
4407
4408         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4409         (-gen-hw-index): Ditto.
4410         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4411         (-gen-hw-index): Ditto.
4412
4413         * sem-frags.scm: New file.
4414
4415         * attr.scm (attr-parse): Add better checking of input.
4416
4417         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4418         All uses updated.
4419         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4420
4421         * ifield.scm (ifld-nil?): New proc.
4422
4423         * operand.scm (<operand>): New members getter,setter.
4424         (<operand>,make!): New args getter,setter.  All uses updated.
4425         (op:getter,op:setter): New procs.
4426         (<hw-index>,field-start): Return 0 for non-ifield indices.
4427         (<hw-index>,field-length): Return 0 for non-ifield indices.
4428         (-operand-parse-getter,-operand-parse-setter): New procs.
4429         (-operand-parse): New args getter,setter.  All callers updated.
4430         Always use hw-index-scalar for scalar operands.
4431         (-operand-read): Handle getter,setter.
4432         (define-full-operand): New args getter,setter.  All uses updated.
4433         * semantics.scm (-build-ifield-operand!): Update.
4434         (-build-index-of-operand!): Update.
4435         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4436         * simplify.inc (define-normal-operand): Update.
4437
4438         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4439         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4440         (s-binop,s-cmpop,s-convop): Ditto.
4441         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4442         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4443         (fcc-tests): New insn-enum.
4444         (fcc-value): Rename from fcc-type.
4445         * sparcfpu.cpu: New file.  All fp support moved here.
4446
4447         * rtl.scm (<rtx-func>): New member class.
4448         (rtx-class-*?): New procs.
4449         (def-rtx-node): New arg class.  All callers updated.
4450         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4451         * rtx-funcs.scm (*): Specify class.
4452
4453         * utils-cgen.scm (context-make-reader): New proc.
4454
4455         * utils.scm (assert-fail-msg): New variable.
4456         (assert): Use it.
4457         (list-drop,list-tail-drop): New procs.
4458
4459 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4460
4461         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4462         CGEN_MIN_INSN_SIZE deleted on March 22.
4463
4464         * ifield.scm (<ifield>,needed-iflds): New method.
4465         (<multi-ifield>,needed-iflds): New method.
4466         (ifld-needed-iflds): New proc.
4467         (multi-ifield?): New proc.
4468         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4469         (-sfmt-search-key): Include insn length in key.
4470         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4471         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4472         (-ifmt-lookup-ifmt!): Compute key here.
4473         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4474         All callers updated.
4475         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4476         All callers updated.
4477         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4478         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4479         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4480         to ifmt-build.
4481         * operand.scm (op-iflds-used): New proc.
4482         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4483         and sim-cpu.scm.
4484         And from sid.scm,sid-cpu.scm as well.
4485         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4486         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4487         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4488         (gen-extracted-ifld-value): Ditto.
4489         (-extract-chunk-specs): Ditto.
4490         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4491         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4492         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4493         (-extract-insert-subfields): New function.
4494         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4495         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4496         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4497         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4498         gen-extract-foo.
4499         (-gen-no-scache-semantic-fn): Ditto.
4500         (-gen-sem-case): Ditto.
4501         (-gen-read-case): Update calls to gen-define-ifields,
4502         gen-extract-ifields.
4503         * sim-decode.scm (-gen-record-args): Update.
4504         (-gen-sfmt-argvars-assigns): Update.
4505         (-gen-extract-case): Update.
4506         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4507         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4508         gen-extract-foo.
4509         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4510         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4511         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4512         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4513         gen-define-ifields, gen-extract-ifields.
4514         (-gen-record-args): Update.
4515         (gen-sfmt-argvars-assigns): Update.
4516         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4517         with gen-define-ifields.  Ditto for gen-extract-foo.
4518         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4519         procs rather than method calls.
4520
4521 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4522
4523         * sid.scm (-create-virtual-insns!): New local `context', pass it
4524         to insn-read.
4525
4526         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4527         (operand name) not (operand object), (local name) not (local object).
4528         (rtx-traverse-with-locals): New proc.
4529         (-compile-expr-fn): New proc.
4530         (rtx-compile): Rewrite.
4531         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4532         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4533         (rtl-c-set-trace): Ditto.
4534         (operand define-fn): Recognize operand name argument.
4535         (local define-fn): Recognize sequence temp name argument.
4536         * rtx-funcs.scm (operand): Argument is operand name, not object,
4537         so call current-op-lookup.
4538         (local): Similarily, so call rtx-temp-lookup.
4539
4540         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4541         (rtx-operand?): Ditto.
4542         (rtx-pretty-name): Ditto.
4543         (rtx-local-obj): Flag symbol argument as an error.
4544         (rtx-local-name): New proc.
4545         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4546
4547         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4548
4549         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4550         updated.
4551
4552         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4553         (and: QI rd #xff).
4554
4555         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4556         (*floats-s->c-fun-table*): Ditto.
4557         * hobbit.c,hobbit.h: Rebuild.
4558         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4559         * semantics.scm (rtx-simplify): Use /fastcall-make.
4560
4561         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4562
4563         * insn.scm (<insn>): Delete members condition, compiled-condition.
4564         (<insn>,make!): Update
4565         (<insn> getters,setters): Update.
4566         (-insn-parse,insn-read,define-full-insn): Update.
4567         * minsn.scm (minsn-make-alias): Update.
4568         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4569         (ifmt-compute!): Ditto.
4570         * sim.scm (sim-finish!): Update.
4571         * simplify.inc: (define-normal-insn): Update.
4572         * sid-cpu.scm (gen-semantic-code): Update.
4573
4574         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4575         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4576         (ifmt-compute!): Ditto.
4577
4578 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4579
4580         * minsn.scm (minsn-compute-iflds): Print better error message for
4581         missing ifields.
4582
4583 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4584
4585         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4586
4587         * Makefile.am (HOBFLAGS): New variable.
4588         (cgen-hob.c): Use it.
4589         (hobbit.c): Use it.
4590         (libcpu_a_SOURCES): Add hob-sup.c.
4591         (hob-sup.o): New rule.
4592         * Makefile.in: Rebuild.
4593         * cgen.c: #include hob-sup.h.
4594         (cgen_init_c): Call hobbit_init_support.
4595         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4596         (*special-scm->c-functions*): Add them.
4597         (display-c-expression): Handle *c-symbol*.
4598         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4599         (*floats-s->c-fun-table*): Ditto.
4600         (normalize): Recognize /fastcall-make.
4601         (normalize-fastcall-make): New proc.
4602         * hobbit.c,hobbit.h: Rebuild.
4603         * hob-sup.scm: New file.
4604         * hob-sup.c: New file.
4605         * hob-sup.h: New file.
4606         * read.scm: Load hob-sup.scm.
4607         * rtl.scm (-rtx-name-list): New variable.
4608         (rtx-name-list): New proc.
4609         (rtx-lookup): Try symbol first.
4610         (def-rtx-node): Add name to -rtx-name-list.
4611         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4612         (-rtx-traverse-anymode): New proc.
4613         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4614         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4615         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4616         (-rtx-traverse-{symornum,object}): New procs.
4617         (-rtx-make-traverse-table): Rewrite.
4618         (-rtx-traverse-operands): Rewrite arg-types handling.
4619         Handle #f result of traverser.
4620         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4621         Move debug handling here.
4622         (-rtx-traverse-debug): Delete.
4623         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4624         for each rtx.
4625         * semantics.scm (semantic-compile:process-expr!): Fix call to
4626         -rtx-traverse.
4627         * utils.scm (map1-improper): New proc.
4628
4629 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4630
4631         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4632         (h-mbits): Ditto.
4633         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4634         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4635         (<operand>,cxmake-get): Tweak.
4636         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4637
4638 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4639
4640         * thumb.cpu (dnti): Delete timing spec.
4641         (all insn): Update.
4642
4643         * arm.cpu (arm isa): New fields condition, setup-semantics.
4644         (thumb isa): New field setup-semantics.
4645         (h-gr): Add attribute CACHE-ADDR.
4646         * arm7.cpu (dnai): Delete condition.
4647         (eval-cond): Delete.
4648
4649         * mach.scm (<isa>): New member setup-semantics.
4650         (-isa-parse-setup-semantics): New proc.
4651         (-isa-parse): New arg setup-semantics.
4652         (-isa-read): Recognize setup-semantics.
4653
4654         * sid-cpu.scm (gen-extract-fields): Split into two:
4655         gen-extract-ifields, gen-extract-ifmt-ifields.
4656         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4657         tracing begin/end messages (done by caller now).
4658         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4659         tracing begin/end messages (done by x-before,x-after virtual insns).
4660         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4661         end so don't have to look it up again next time.
4662         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4663         (-decode-expr-ifield-tracking-key): New proc.
4664         (-decode-expr-ifield-tracking): New proc.
4665         (-decode-expr-ifield-values-used): New proc.
4666         (-decode-expr-ifield-mark-used!): New proc.
4667         (-gen-decode-expr-set-itype): New proc.
4668         (-gen-decode-expr-entry): Rewrite.
4669         (-gen-decode-table-entry): New proc.
4670         (-gen-decoder-switch): Use it.
4671         (-gen-virtual-insn-finder): New proc.
4672         (-gen-argbuf-elm): Move here from sid.scm.
4673         (-gen-argbuf-hw-elm): Ditto.
4674         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4675         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4676         conditional-execution isas.
4677         (-gen-decode-fn): Record conditional-exec ifield.
4678         * sid.scm (-current-pbb-engine?): New global.
4679         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4680         (<ifield>,gen-ifld-extract): New arg `indent'.
4681         (<multi-ifield>,gen-ifld-extract): Ditto.
4682         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4683         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4684         (-gen-arch-model-decls): Only scan real insns.
4685         (scache-engine-insns,pbb-engine-insns): New procs.
4686         (-create-virtual-insns!): New proc.
4687         (sim-finish!): Call it.
4688         (-decode-specialize-insn?): New proc.
4689         (-decode-specialize-build-assertion): New proc.
4690         (-decode-specialize-insn-1): New proc.
4691         (-decode-specialize-insn): New proc.
4692         (-fill-sim-insn-list!): New proc.
4693         (sim-analyze!): Create copies of insns to be specialized.
4694         * utils-cgen.scm (obj-set-name!): New proc.
4695
4696         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4697         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4698         semantic-attrs.
4699         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4700         sformats.
4701         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4702         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4703         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4704         (attr): Rewrite test for insn owner.
4705         (member): New rtx function.
4706         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4707         as separate function.
4708         (rtx-ifield?,rtx-ifield-name): New procs.
4709         (rtx-operand-obj): Rewrite.
4710         (rtx-operand-name): New proc.
4711         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4712         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4713         (tstate-make): New args owner, known.  All callers updated.
4714         (tstate-known-lookup): New proc.
4715         (rtx-traverse): New arg owner.  All callers updated.
4716         (rtx-make-bool): New proc.
4717         (rtl-find-ifields): Rewrite.
4718         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4719         * semantics.scm: ... here.
4720         (rtx-const-equal,rtx-const-list-equal): New procs.
4721         (-build-known-values): New proc.
4722         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4723         (semantic-attrs): Ditto.
4724         * rtx-funcs.scm (member,number-list): New rtx functions.
4725
4726         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4727         Rewrite.  Delete arg `all-attrs'. All callers updated.
4728         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4729         updated.
4730         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4731
4732         * decode.scm (subdtable-add): Handle `expr' entries.
4733         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4734         (exprtable-entry-*): Update.
4735         (exprtable-entry-iflds): New proc.
4736         (exprentry-cost): New proc.
4737         (exprtable-sort,-gen-exprtable-name): New procs.
4738         (exprtable-make): New arg `name'.  All callers updated.  use vector.
4739         (exprtable-*): Update.
4740         (-build-decode-table-entry): Don't issue collision warning if all are
4741         specialized insns.  Sort exprtable entries before building table.
4742
4743         * read.scm (-reader-process-expanded-1): Move pretty printing of
4744         input to logging level 4.
4745
4746         * utils.scm (string-list->string): New proc.
4747
4748         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4749         semantics.
4750         (insn-read): Delete leading '-' in name.  All callers updated.
4751         (real-insn?): New proc.
4752         (real-insns): Rewrite.
4753         (insn-has-ifield?): New proc.
4754         (insn-builtin!): Create insn attribute SPECIALIZED.
4755
4756         * mach.scm (<arch>): Delete member app-data.
4757         (current-raw-insn-list): New proc.
4758         (insn-list-car,insn-list-splice!): New procs.
4759         (<decode-specialize>): New class.
4760         (-isa-parse-decode-specialize): New proc.
4761         (-isa-parse-decode-specializes): New proc.
4762         (<isa>): New members `condition', `decode-specializes'.
4763         (-isa-parse-condition): New proc.
4764         (-isa-parse): New args condition, decode-specializes.
4765         (-isa-read): Recognize condition, decode-specializes.
4766         (-isa-add-decode-specialize!): New proc.
4767         (modify-isa): New proc.
4768         (isa-conditional-exec?,state-conditional-exec?): New procs.
4769         (arch-init!): New reader command `modify-isa'.
4770
4771         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4772         (mode-signed,mode-unsigned?): New procs.
4773
4774 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
4775
4776         * types.scm (<array>): New method get-shape.
4777         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4778         onto type.
4779         (hw-shape,hw-num-elms): New procs.
4780         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4781         if there's more than 255 registers.
4782         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4783
4784         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4785         with get/set specs.
4786
4787 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
4788
4789         * cgen-sid.scm (sim-arguments): Add -X.
4790         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4791         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4792         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
4793         Simplify by supporting pbb engine only.
4794         (-gen-sem-switch-init): New proc.
4795         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4796         (cgen-sem-switch.cxx): New proc.
4797         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4798         with with-pbb?.  Support dual scache/pbb engines.
4799         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4800         Support dual scache/pbb engines.
4801         (cgen-decode.h): Generate semantic fn decls if with-scache?.
4802         * sid.scm (*) with-pbb? replaces with-sem-switch?.
4803         (sim-finish!): Create pbb support virtual insns if with-pbb?.
4804
4805 1999-05-10  Ben Elliston  <bje@cygnus.com>
4806
4807         * arm7.cpu: Remove coprocessor related fields, operands and insn
4808         definitions for now. Take the undefined instruction trap instead.
4809         (ldmda-wb): New instruction.
4810         (ldmib-wb): Likewise.
4811         (ldmdb-wb): Likewise.
4812         (stmdb-wb): Likewise.
4813         (stmib-wb): Likewise.
4814         (stmda-wb): Likewise.
4815
4816 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
4817
4818         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4819         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4820
4821         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4822         hobbit can't handle optional third arg.
4823
4824 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
4825
4826         * arm.cpu (h-tbit): Delete set spec.
4827         (h-mbits): Don't call arm_mbits_set in set spec.
4828         * arm.sim: New file.
4829         * hardware.scm (modify-hardware): New proc.
4830         (hardware-init!): Add modify-hardware command.
4831         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4832         (-hw-gen-set-quiet): Ditto.
4833         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
4834         hardware attribute.  Load $arch.sim file if present.
4835         * utils-cgen.scm (keyword-list?): New proc.
4836         (keyword-list->arg-list,arg-list-validate-name): New procs.
4837         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4838
4839         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4840
4841         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4842         @cpu@_cpu_cgen.
4843
4844         * attr.scm (obj-prepend-atlist!): New proc.
4845
4846         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4847
4848         * sid.scm (<operand>,profilable?): Use op:type.
4849         * sim.scm (<operand>,profilable?): Use op:type.
4850
4851 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
4852
4853         * utils.scm (find-index,find): Be more stack friendly.
4854
4855         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4856         (bic-imm): Ditto.
4857
4858 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
4859
4860         * arm.cpu (h-gr-usr): New hardware element.
4861         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4862         (arm-mode): New keyword.
4863         (h-mbits): Add set spec.
4864         (h-spsr): Implement get/set specs.
4865
4866         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4867         (-reader-process-expanded-1): Pretty print logging output.
4868
4869         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4870         (cgen-cpu.h): Print enums before hardware elements.
4871         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4872         * sid-decode.scm (cgen-decode.cxx): Ditto.
4873         * sid-model.scm (cgen-model.cxx): Ditto.
4874
4875         * utils-cgen.scm (context-error): Accept variable number of
4876         trailing args.
4877
4878         * rtx-funcs.scm (error:): New rtx function.
4879         * rtl-c.scm (s-case-vm): New proc.
4880         (-gen-non-vm-case-get,s-case-non-vm): New procs.
4881         (s-case): Simplify, handle non-VM result.
4882         (error:): New rtx function.
4883
4884 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
4885
4886         * arm.cpu (h-pc): Add set spec to zero bottom bits.
4887         (test-hi,test-ls): Fix cbit handling.
4888         (shift-type,h-operand2-shifttype): Move here ...
4889         * arm7.cpu: ... from here.
4890         (set-cond,set-cond-maybe,dnix): Delete, unused.
4891         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4892         * arm.cpu: ... to here.
4893         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4894         (alu-cmn): Use set-add-flags.
4895         (alu-tst): Use set-zn-flags.
4896         (alu-cmp): Use set-sub-flags.
4897         (lsl,lsr,asr): Set condition codes.
4898         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4899         (alu-op): Split into three: alu-logical-op,alu-arith-op,
4900         alu-shift-op.
4901         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4902         All callers updated.
4903         (sub-sp): Rename from add-sp-neg.
4904         (f-lbwl-offset): Delete.
4905         (f-lbwl-hi,f-lbwl-lo): New ifields.
4906         (lbwl-hi,lbwl-lo): Update.
4907         (bl-hi): Add 4 to pc.
4908         (push-reg,pop-reg): Simplify.
4909         (push,push-lr): Push registers in correct order.
4910         (pop,pop-pc): Pop registers in correct order.
4911         (save-reg-inc,load-reg-inc): Simplify.
4912         (ldmia): Save registers in correct order.
4913
4914 1999-04-30  Ben Elliston  <bje@cygnus.com>
4915
4916         * arm7.cpu (f-op-hdt): Remove; unused.
4917         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4918         (f-ror-imm8): New multi-ifield.
4919         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4920         callers updated.
4921         (f-uimm12): New field.
4922         (ror-imm8): New operand.
4923         (uimm12): Likewise.
4924         (hdt-offset8): Reinstate operand.
4925         (offset4-hi,offset4-lo): Remove.
4926         (set-cond): Remove macro; unused.
4927         (set-cond-maybe): Likewise.
4928         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4929         (store-word/byte): Likewise.
4930         (load-halfword): Use hdt-offset8 multifield operand instead of two
4931         4-bit operands that are explicitly combined by semantic code.
4932         (do-halfword-store): Bug fix. Set address when not preindexing.
4933         (store-halfword): Also use hdt-offset8 operand.
4934         (arith-op): Avoid clobbering source registers when one of them is
4935         the destination register.
4936         (arith-imm-op): Likewise.
4937         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4938         (teq-imm): Likewise.
4939         (ldm-p): Rename to ldmdb.
4940         (stm-pw): Rename to stmdb-wb.
4941         (multi-action): New macro; test reg-list bits and execute a
4942         semantic fn if the bit is set.
4943         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4944         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4945         (all insns): Use dnai entries for simplicity rather than dni.
4946         (*): Use short-form of (const ..).
4947
4948 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
4949
4950         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
4951         member eval to evaluator.
4952         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
4953         (tstate-make): Delete arg op-fn.  All callers updated.
4954         (tstate-op-fn,tstate-set-op-fn!): Delete.
4955         (rtx-traverse): Delete op-fn arg.  All callers updated.
4956         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4957         split out of -simplify-for-compilation.
4958
4959         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4960         (cgen_DEPENDENCIES): Add stamp-cgen.
4961         (stamp-cgen): New rule.
4962         * Makefile.in: Rebuild.
4963
4964         * rtl-c.scm (enum:): Define emitter for.
4965         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4966         enums as well.
4967         (rtx-constant-value,rtx-enum-value): New procs.
4968         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4969         (rtx-compile-time-constant?): Return #t for enums.
4970         (rtx-true?,rtx-false?): Handle enums.
4971         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4972         building result by hand.
4973         (rtx-simplify-eq-attr-insn): Ditto.
4974         * rtx-funcs.scm (enum:,enum): New rtx functions.
4975
4976         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4977         aliases-analyzed?.
4978         (arch-analyze-insns!): New proc.
4979         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4980         of calling ifmt-compute! directly.
4981         * sid.scm (-sim-insns-analyzed?): Delete.
4982         (sim-analyze!): Call arch-analyze-insns! instead of calling
4983         ifmt-compute! directly.
4984         * sim.scm (-sim-insns-analyzed?): Delete.
4985         (sim-analyze!): Call arch-analyze-insns! instead of calling
4986         ifmt-compute! directly.
4987
4988         * utils.scm (string-take-with-filler): New proc.
4989         (string-take): Use it.
4990
4991         * pgmr-tools.scm: New file.
4992         * read.scm: Load it.
4993         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4994
4995         * insn.scm (insn-base-mask): Renamed from insn:mask.
4996         All callers updated.
4997         (insn-base-mask-length): Renamed from insn:mask-length.
4998         All callers updated.
4999         (insn-foo): Renamed from insn:foo.  All callers updated.
5000         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5001         * iformat.scm (compute-insn-base-mask-length): Renamed from
5002         compute-insn-mask-length.  All callers updated.
5003         (compute-insn-base-mask): Renamed from compute-insn-mask.
5004         All callers updated.
5005
5006         * enum.scm (-enum-parse-prefix): New proc.
5007         (<enum>,make!): Don't parse enum values here.
5008         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5009         (define-full-insn-enum): Ditto.
5010         (enum-vals-upcase): New proc.
5011         * hardware.scm (define-keyword): Make enum prefix uppercase.
5012         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5013
5014         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5015         (<ifield>,field-extract): New method.
5016         (<multi-ifield>,field-extract): New method.
5017         (ifld-extract): New proc.
5018         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5019         (ifld-extract-fn-name): Renamed from ifld-extract.
5020
5021         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5022         All callers updated.
5023
5024         * ifield.scm (ifld-lsb0?): New proc.
5025         (sort-ifield-list): New arg up?.  All callers updated.
5026         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5027         rather than global state.
5028
5029 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5030
5031         * insn.scm (pretty-print-insn-format): New proc.
5032
5033         * Makefile.in: Rebuild.
5034         * aclocal.m4: Rebuild
5035         * configure: Rebuild.
5036
5037 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5038
5039         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5040         * configure: Rebuild.
5041         * aclocal.m4: Rebuild.
5042         * Makefile.in: Rebuild.
5043         * doc/Makefile.in: Rebuild.
5044         * doc/version.texi: Rebuild.
5045
5046 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5047
5048         * utils.scm (bits->bools): New proc.
5049
5050 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5051
5052         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5053         subfield's gen-ifld-extract-decl method.
5054
5055 1999-04-23  Ben Elliston  <bje@cygnus.com>
5056
5057         * arm7.cpu (ldrsh-pu): Remove.
5058         (do-halfword-load): New pmacro.
5059         (load-halfword): Likewise.
5060         (do-halfword-store): Likewise.
5061         (store-halfword): Likewise.
5062         (strh-*): New instructions.
5063         (ldrsb-*): Likewise.
5064         (ldrh-*): Likewise.
5065         (ldrsh-*): Likewise.
5066
5067 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5068
5069         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5070         fields.
5071
5072         * arm7.cpu (do-word/byte-store): Fix typo.
5073
5074 1999-04-22  Ben Elliston  <bje@cygnus.com>
5075
5076         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5077         register is the program counter (R15).
5078
5079         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5080         (str-*): Implement using store-word-byte. Remove older versions.
5081         (bic): Use the `inv' rtx for obtaining bitwise complements.
5082         (bic-imm): Likewise.
5083         (mvn): Likewise.
5084         (mvn-imm): Likewise.
5085         (store-indev-reg): Remove crufty pmacro.
5086         (load-indiv-reg): Likewise.
5087         (ldm-p): Reverse the order of register processing for decrement.
5088         (stm-p): Likewise.
5089         (stbi): Remove; handled by the str-* insns.
5090
5091 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5092
5093         * thumb.cpu (cmp): Fix carry bit computation.
5094         (alu-cmp): Ditto.
5095
5096 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5097
5098         * arm.cpu (h-tbit): Specify set spec.
5099         (h-cpsr): Ditto.
5100         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5101         (set-sub-flags): Interpret "carry bit" as a borrow.
5102         (all sub/cmp insns): Carry bit is actually a borrow bit.
5103         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5104         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5105         .pmacro instead.
5106         (hireg-add,hireg-cmp,hireg-move): Ditto.
5107
5108         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5109         (-CGEN-LANG-VERSION): Ditto.
5110
5111 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5112
5113         * pmacros.scm (-pmacro-make): New arg `default-values',
5114         all callers updated.
5115         (-pmacro-default-values): New proc.
5116         (-pmacro-process-keyworded-args): New proc.
5117         (-pmacro-process-args): New proc.
5118         (-pmacro-invoke): Process arguments before expanding macro.
5119         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5120         (define-pmacro): Handle default values specified in arg list.
5121         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5122         (rtx-boolif-op-arg[01]): New procs.
5123         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5124         (rtx-simplify): Handle not,orif,andif.
5125         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5126         * utils.scm (alist-copy): New proc.
5127         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5128         (ldr*): Rewrite.
5129         (swi): Explicitly set pc.
5130
5131         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5132
5133 1999-04-17  Ben Elliston  <bje@cygnus.com>
5134
5135         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5136         correctly adjusts the program counter now.
5137
5138         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5139         (f-signed?): Rename from `f-hdt-signed?'.
5140         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5141         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5142         (f-hdt-offset8): Use new field names.
5143         (ldr): Use `imm12' field, not `offset12', since we do our own
5144         address arithmetic.
5145         (str, str-*): Likewise.
5146         (ldu-*): Remove most; better not implemented than broken.
5147         (ldrh*): Likewise.
5148         (ldrsh-pu): New insn.
5149         (stri): Likewise.
5150         (stri-p): Likewise.
5151         (stbi): Likewise.
5152         (ldm-p): Likewise; replace (load-indiv-reg) version.
5153
5154 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5155
5156         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5157         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5158         (*): Explicitly specify mode in c-call.
5159         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5160         (arith-op): Ditto.
5161         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5162         (arith-imm-op): New pmacro.
5163         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5164         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5165
5166 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5167
5168         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5169
5170         * rtl.scm (rtl-find-ifields): Implement.
5171
5172         * utils-gen.scm: New file.
5173         * read.scm: Load it.
5174         * desc.scm: Move generic attribute code to utils-gen.scm.
5175         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5176         * Makefile.in: Rebuild.
5177
5178         * arm7.cpu (R15-OFFSET): New attribute.
5179         (dnai): New pmacro.
5180         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5181         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5182         for reg-shift version.
5183         (arith-op): Ditto.
5184         (data processing insns): Reorganize.  Use dnai.
5185
5186         * attr.scm (attr-kind): New proc.
5187         (attr-list-enum-list): Rewrite.
5188         (-attr-sort): Split result into two lists, bools and non-bools.
5189         (current-attr-list-for): Update.
5190
5191         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5192         * sid-cpu.scm (-gen-attr-decls): New proc.
5193         (-gen-insn-attr-decls): New proc.
5194         (cgen-desc.h): New proc.
5195         (cgen-cpu.h): Put everything in @cpu@ namespace.
5196         (gen-parallel-exec-type): Change prefix of parexec struct from
5197         @cpu@ to @prefix@.
5198         (-gen-trace-record-type): Ditto for trace_record struct.
5199         (-gen-write-case): Update.
5200         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5201         @prefix@.  Update scache struct references.
5202         (-gen-sem-case): Update scache struct references.
5203         (-gen-sem-switch-fn): Update idesc struct reference.
5204         Update insn_type enum reference.
5205         (cgen-write.cxx): Update scache,argbuf references.
5206         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5207         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5208         from @cpu@ to @prefix@.
5209         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5210         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5211         from @CPU@ to @PREFIX@.
5212         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5213         from @CPU@ to @PREFIX@.
5214         (-gen-decode-insn-globals): Generate insn attributes.
5215         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5216         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5217         semantic fn typedef.
5218         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5219         Change prefix of scache struct from @cpu@ to @prefix@.
5220         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5221         Change prefix of idesc struct from @cpu@ to @prefix@.
5222         Change prefix of insn_type enum from @cpu@ to @prefix@.
5223         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5224         from @cpu@ to @prefix@.
5225         (-gen-scache-decls): Change prefix of scache struct from
5226         @cpu@ to @prefix@.  Update idesc struct name.
5227         Update decode,execute methods.
5228         (-gen-extract-case): Update to type name changes.
5229         (-gen-decode-fn): Ditto.
5230         (cgen-decode.h): Put everything in @cpu@ namespace (except
5231         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5232         (cgen-decode.cxx): Add using namespace @cpu@.
5233         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5234         model_mark_get/set from @cpu@ to @prefix@.
5235         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5236         @prefix@.
5237         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5238         of model_insn_before/after from @cpu@ to @prefix@.
5239         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5240         Update insn_word type name.
5241         (-gen-model-timing-table): Update INSN_TIMING struct name.
5242         (-gen-model-init-fn): Update MODEL_DATA struct name.
5243         (-gen-mach-defns): Update name of init_idesc_table fn.
5244         (cgen-model.cxx): Add using namespace @cpu@.
5245         * sid.scm (gen-cpu-class): Delete.
5246         (gen-attr-type): New proc.
5247         (gen-obj-attr-sid-defn): New proc.
5248         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5249         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5250         @CPU@ to @PREFIX@.
5251         (gen-cpu-insn-enum): Update name of insn enum.
5252         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5253         (bx-hs): Ditto.
5254         (swi): Rename @cpu@_swi to @prefix@_swi.
5255
5256         * decode.scm (-build-decode-table-entry): Remove heuristic for
5257         distinguishing insns, and use insn ifield-assertion specs.
5258
5259         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5260         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5261         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5262         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5263         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5264         all callers updated.
5265         (gen-attr-name): New proc
5266         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5267         (gen-obj-attr-defn): Delete num_nonbools count.
5268
5269         * iformat.scm (ifmt-analyze): Handle insn-condition.
5270         (ifmt-compute!): Ditto.
5271         * insn.scm (<insn>): Specify default value for condition,
5272         post-cond-trap,compiled-condition,compiled-semantics.
5273         (<insn>,make!): New arg condition.
5274         (<insn>): Add getters for condition,compiled-condition.
5275         (-insn-parse): New arg condition, all callers updated.
5276         (-insn-read): Recognize condition spec.
5277         (define-full-insn): New arg condition.
5278         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5279         * semantics.scm (semantic-compile): Change arg sem-code to
5280         sem-code-list.
5281         (semantic-attrs): Ditto.
5282         * sim.scm (sim-finish!): Update calls to define-full-insn.
5283         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5284         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5285         * sid.scm (sim-finish!): Update call to define-full-insn.
5286
5287 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5288
5289         * Makefile.am (sim-cpu): Allow specification of ISA.
5290         * Makefile.in: Rebuild.
5291
5292 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5293
5294         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5295
5296 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5297
5298         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5299
5300         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5301
5302         * attr.scm (atlist?): New proc.
5303         (-attr-eval): Rewrite.
5304         (attr-parse): New proc.
5305         (atlist-parse): Use it.
5306
5307         * decode.scm (exprtable-entry-make): New proc.
5308         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5309         (exprtable-make,exprtable-insns): New procs.
5310
5311         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5312         All uses updated.
5313         (hardware-builtin!): Make h-memory a vector.
5314
5315         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5316         All callers updated.
5317         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5318
5319         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5320         All uses updated.
5321         (-insn-parse): Set semantics to #f if not specified.
5322         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5323         if simulator.
5324         (-parse-insn-format): Recognize `=' iformat spec.
5325
5326         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5327         (isa-max-insn-bitsize): Ditto.
5328
5329         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5330         rtl-c-with-alist.
5331         (<ifield>,gen-extract): Ditto.
5332         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5333         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5334         (gen-define-ifmt-ifields): New proc.
5335         (gen-semantic-code): Rewrite.
5336         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5337         (-gen-decoder-switch): Handle expression tables.
5338         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5339         gen-define-fields.
5340         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5341         instead of gen-define-fields.
5342         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5343         callers updated.
5344         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5345         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5346         (-gen-ifld-extract-beyond): Ditto.
5347         (<multi-ifield>,gen-ifld-extract): Ditto.
5348         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5349         rtl evaluation code.
5350         (op:read): Build an <eval-state> to pass to gen-read.
5351         (op:write): Build an <eval-state> to pass to gen-write.
5352         (op:record-profile): Build an <eval-state> to pass to
5353         gen-record-profile.
5354         * sim-cpu.scm (gen-semantic-code): Rewrite.
5355         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5356         rtl-c-with-alist.
5357         (-gen-ifld-extract-beyond): Ditto.
5358         (<multi-ifield>,gen-ifld-extract): Ditto.
5359         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5360         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5361         rtl evaluation code.
5362         (op:read): Build an <eval-state> to pass to gen-read.
5363         (op:write): Build an <eval-state> to pass to gen-write.
5364         (op:record-profile): Build an <eval-state> to pass to
5365         gen-record-profile.
5366
5367         * operand.scm (<operand>): Give `selector' default value of #f.
5368         Give `num' default value of -1.  Give `cond?' default value of #f.
5369         (op:new-mode): Delete arg `set?', all uses updated.
5370
5371         * read.scm (reader-error): Handle #f return from port-filename.
5372         (-init-parse-cpu!): Call rtl-c-init!.
5373         (reader-install-builtin!): Call rtl-builtin!.
5374
5375         * rtl-c.scm: New file.
5376         * semantics.scm: New file.
5377         * read.scm: Load them.
5378         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5379         to semantics.scm.
5380         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5381         type,eval,num.
5382         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5383         (-rtx-num-text,-rtx-max-num): New globals.
5384         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5385         (-rtx-macro-lookup): New proc.
5386         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5387         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5388         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5389         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5390         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5391         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5392         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5393         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5394         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5395         (rtx-pretty-name): New proc.
5396         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5397         (rtx-traverse-*): Rewrite rtx traversing.
5398         (rtx-eval-*): Rewrite rtx evaluation.
5399         (rtx-compile): New proc.
5400         (rtx-simplify): New proc.
5401         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5402         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5403         (ifield,index-of): Rewrite.
5404         (name): Renamed from `operand:'.
5405         (operand,xop,local): New rtx's.
5406         (current-insn): Rewrite.
5407         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5408         (cgen-hob.h): Remove rule for.
5409         (cgen-hob.o): Depend on cgen-hob.c only.
5410         * Makefile.in: Rebuild.
5411
5412         * utils-cgen.scm (vmake): New proc.
5413         (<context>): New class.
5414         (context-make-prefix,context-error): New procs.
5415
5416 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5417
5418         * i960.cpu: Add some ??? comments.
5419         (xnor, ornot): New instructions.
5420         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5421
5422 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5423
5424         * cos.scm (-object-error): Print better error message.
5425
5426         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5427         (-pmacro-env-ref): Renamed from -env-ref.
5428
5429 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5430
5431         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5432         (h-pc): Delete.
5433         (hardware-builtin!): Delete h-pc builtin.
5434         * arm.cpu (h-pc): Define.
5435         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5436         * arm7.cpu (set-logical-cc-maybe): Delete.
5437         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5438         (data processing insns): Rewrite.
5439         * m32r.cpu (h-pc): Define.
5440         * fr30.cpu (h-pc): Define.
5441         * i960.cpu (h-pc): Define.
5442         * sparc.cpu (h-pc): Define.
5443
5444         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5445         (s-parallel): Replace do {...} while (0) with {...}.
5446         (s-sequence): Ditto.
5447
5448         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5449         consistent.
5450         (-gen-write-case,-gen-sem-case): Ditto.
5451         (-gen-sem-case): Only specify `written' if profiling or
5452         parallel-write-back.
5453         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5454         (-gen-sem-switch-fn): New proc.
5455         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5456         based on with-sem-switch option.
5457         * sid-decode.scm (-gen-decode-insn-globals): Only define
5458         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5459         addresses in idesc_table if !with-sem-switch.
5460         (-gen-sem-fn-decls): Rewrite.
5461         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5462         member based on with-sem-switch.  Only define
5463         `idesc_table_initialized_p' member if with-sem-switch.
5464         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5465         * sid.scm (-with-sem-switch?): New variable.
5466         (option-init!): Initialize it.
5467         (option-set!): Set it.
5468         (with-sem-switch?): New proc.
5469         (-op-gen-set-trace): Only emit `written' reference if profiling.
5470         (sim-finish!): Use h_pc_set to set pc.
5471
5472 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5473
5474         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5475         All callers updated.
5476         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5477
5478         * sid.scm (gen-argbuf-type): Delete.
5479         (-gen-argbuf-fields-union): Move to ...
5480         * sid-decode.scm: ... here.
5481
5482         * read.scm (-reader-process-expanded-1): New proc.
5483         (-reader-process-expanded): Call it to catch nested begin's.
5484         (reader-process): Move `begin' handling to -reader-process-expanded.
5485
5486         * insn.scm (-insn-read): Fix name of `format' spec.
5487
5488         * pmacros.scm (.pmacro): New builtin.
5489         (scan-symbol): If procedure macro, return macro rather than its symbol.
5490         (check-macro): Don't do lookup, instead check if (car expr) is
5491         macro object.
5492         (scan-list): Handle .pmacro.
5493         (scan): No longer re-examine text for another macro invocation.
5494         (-pmacro-build-lambda): New proc.
5495         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5496         another, fetch the other's value (rather than doing it during
5497         expansion).
5498
5499 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5500
5501         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5502         * Makefile.in: Rebuild.
5503
5504         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5505         (-fill-slot!): Simplify.
5506         (-build-slots): Simplify.
5507
5508         * dev.scm (load-sid): Don't load sid-arch.scm.
5509
5510         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5511         switch's.
5512         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5513         switch's.
5514
5515 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5516
5517         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5518         * decode.scm: ... here.  New file.
5519         * sid-decode.scm: Use decoder computation code in decode.scm.
5520         * read.scm: Load decode.scm.
5521
5522         * arm.cpu (arm710 model): Add u-exec function unit.
5523         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5524         Add get/set specs to redirect reg 15 to h-pc.
5525         (h-*): Indicate for both ARM and THUMB isas.
5526         (cbit,nbit,vbit,zbit): Ditto.
5527         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5528         (h-cpsr): Make virtual.  Add get/set specs.
5529         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5530         (h-spsr): New virtual reg.
5531         * arm7.cpu (shift-type): New explicitly defined keyword.
5532         (h-operand2-shifttype): Use it.
5533         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5534         All callers updated.  Don't set cbit.
5535         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5536         shift-type enum as case choices.  Set cbit.
5537         (and,orr,eor,add-imm): Uncomment out.
5538         (undefined): Temporarily comment out.
5539         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5540         (lda-pc,lda-sp): Ditto.
5541         (ldr-pc): Rename from ldr.
5542         (cbranch): Mark insns as being thumb insns.
5543
5544         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5545
5546         * cgen-sid.scm: Don't load sid-arch.scm.
5547         (sim-arguments): Delete unused entries.
5548         * sid-arch.scm: Delete.
5549
5550         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5551         (<insn>,ifld-assertions): New member.
5552         (<insn>,make!): New arg ifld-assertions, all callers updated.
5553         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5554         (insn:fields): Delete.
5555         (-insn-parse): New arg ifld-assertions.  All callers updated.
5556         (-insn-read,define-insn): New procs.
5557         (define-full-insn): New arg ifld-assertions.  All callers updated.
5558         (insn-init!): New comment define-insn.
5559
5560         * model.scm (-model-parse): Ensure at least one unit specified.
5561
5562         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5563         (<c-expr-temp>,get-name): New method.
5564         (-rtx-make-current-closure,s-closure): New proc.
5565         (hw:): Wrap rtx indices in a closure.
5566         (-gen-case-prefix): New proc.
5567         (s-case): Simplify.
5568         * rtx-funcs.scm (case:): Fix call to s-case.
5569         (closure): New rtx func.
5570
5571         * hardware.scm (<hardware-base>): New member isas-cache.
5572         (<hardware-base>,get-isas): New method.
5573         (hardware-builtin): Indicate for all isas.
5574         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5575         * mach.scm (current-arch-mach-name-list): Return list of names.
5576         (current-isa-mach-name-list): Ditto.
5577         (define-arch): Install builtin objects here.
5578         * read.scm (keep-atlist?): Only keep if both mach and isa are
5579         being kept.
5580         (keep-mach-atlist?): New proc.
5581         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5582         (reader-install-builtin!): Renamed from -install-builtin!.
5583         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5584         -gen-cpu-reg-access-defns.  Rewrite.
5585         (gen-reg-access-defn): Delete.
5586         (-gen-hardware-struct): New proc.
5587         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5588         (gen-semantic-fn,-gen-all-semantics): Delete.
5589         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5590         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5591         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5592         Call sem-analyze-insns!.
5593         (cgen-semantics.cxx): Add multiple-isa support.
5594         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5595         (-gen-scache-decls,-gen-decode-fn): Ditto.
5596         (cgen-decode.h): Call sem-analyze-insns!.
5597         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5598         * sid.scm (-with-multiple-isa?): New variable.
5599         (option-init!): Initialize it.
5600         (option-set!): Set it.
5601         (with-multiple-isa?): New proc.
5602         (gen-cpu-ref): New arg isas.  All callers updated.
5603         (gen-cpu-class): New proc.
5604         (*-get-macro,*-set-macro): Delete.
5605         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5606         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5607         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5608         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5609         (-sim-insns-analyzed): New global variable.
5610         (sim-init!): Reset it.
5611         (sim-analyze-insns!): New proc.
5612         (sim-analyze!): Don't do instruction analysis here.
5613         (sim-finish!): Specify isa of x-invalid insn.
5614         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5615
5616 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5617
5618         * thumb.cpu (cpu,mach,model): Delete.
5619         (dntf): New pmacro.  Use it for all field definitions.
5620         (dntop): New pmacro.  Use it for all operand definitions.
5621         (asr): Correct field list.
5622         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5623
5624         * utils-cgen.scm (define-getters): New macro to simplify
5625         writing class accessors.
5626         (define-setters): Ditto.
5627         (sanitize): Recognize isa elements.
5628
5629         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5630         state-parallel-exec?.
5631         * sid-model.scm (*): Ditto.
5632         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5633         state-decode-assist.
5634
5635         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5636         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5637         * sim-decode.scm (-gen-decode-switch): Ditto.
5638
5639         * sim-arch.scm (-regs-for-access-fns): Delete.
5640         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5641         (-gen-arch-reg-access-defns): Delete.
5642
5643         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5644         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5645         with state-parallel=exec?.
5646         (cgen-*): Call sim-analyze-insns! here.
5647         * sim-decode.scm (cgen-*): Ditto.
5648         * sim-model.scm (cgen-*): Ditto.
5649         * sim.scm (-sim-insns-analyzed): New global variable.
5650         (sim-init!): Reset it.
5651         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5652         already done the analysis.
5653
5654         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5655         MACH struct.
5656
5657         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5658         (arm arch): Update isa spec.
5659         (arm,thumb isas): Define.
5660         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5661         (arm7tdmi mach): Add isa spec.
5662         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5663         `const' on word number.
5664         * fr30.cpu (fr30 arch): Update isa spec.
5665         (fr30 isa): Define.
5666         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5667         moved to isa spec.
5668         * i960.cpu (i960 arch): Update isa spec.
5669         (i960 isa): Define.
5670         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5671         liw-insns,parallel-insns moved to isas spec.
5672         * m32r.cpu (m32r arch): Update isas spec.
5673         (m32r isa): Define.
5674         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5675         liw-insns,parallel-insns moved to isa spec.
5676         * sparc.cpu (sparc arch): Update isas spec.
5677         (sparc isa): Define.
5678         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5679         decode-assist moved to isa spec.
5680         * sparc64.cpu (sparc64 cpu): Ditto.
5681         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5682         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5683         (-gen-mach-table-defns): Output mach table.
5684         (-gen-hash-defines): Delete insn size macros, except for
5685         CGEN_MAX_INSN_SIZE.
5686         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5687         (cgen-desc.h): Define MAX_ISAS.
5688         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5689         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5690         (arch-* accessors): Renamed from arch:*.  All callers updated.
5691         (current-arch-isa-name-list): New proc.
5692         (-arch-parse-isas): Renamed from -arch-parse-isa.
5693         (def-isa-attr!): Rewrite.
5694         (<iframe>): New class.
5695         (<itype>): New class.
5696         (<isa>): Rewrite.
5697         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5698         (isa-integral-insn?,isa-parallel-exec?): New procs.
5699         (-isa-parse,-isa-read,define-isa): New proc.
5700         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5701         liw-insns moved to <isa>.
5702         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5703         (-cpu-parse,-cpu-read): Update.
5704         (state-*): Renamed from state:*.  All callers updated.
5705         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5706         not cpu.
5707         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5708         (state-decode-assist): New proc.
5709         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5710         (-adata-set-derived!): Rewrite.
5711         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5712         callers updated.
5713         (arch-init!): Add define-isa command.
5714         * read.scm (<reader>): Default keep-isa member to (all).
5715         (reader-* accessors): Renamed from reader:*.  All callers updated.
5716         (-keep-isa-set!): Call string->symbol on isa name list.
5717         (keep-isa-validate!): Rewrite.
5718         (current-isa): New proc.
5719         (keep-isa?): Recognize "all".
5720         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5721         Call -keep-isa-set!.
5722         (cmd-if): Recognize keep-isa?.
5723         (cpu-load): New arg keep-isa.  All callers updated.
5724         (-opt-spec-update): New proc.
5725         (common-arguments): First arg is string, not symbol.
5726         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5727
5728         * rtl.scm (rtx-get): Default mode of string arg is INT.
5729
5730         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5731
5732         * rtx-funcs.scm (join:): Pass cpu to handler.
5733
5734         * configure.in (guile_include_dir): Delete.
5735         * configure: Rebuild.
5736         * Makefile.in: Rebuild.
5737         * doc/Makefile.in: Rebuild.
5738
5739         * sid-cpu.scm (-extract-chunk-specs): New proc.
5740         (gen-define-fields): Use it.
5741         (-extract-chunk): New proc.
5742         (-gen-extract-beyond-var-list): Use it.
5743         (gen-extract-fields): Simplify.
5744
5745 1999-03-22  Ben Elliston  <bje@cygnus.com>
5746
5747         * arm7.cpu (ldri-p): New instruction.
5748         (swi): Do not vector through 0x8 yet--there is nothing there.
5749         (addi): Reinstate.
5750         (movi): Likewise.
5751         (all): Use (const x) in subreg expressions.
5752
5753 1999-03-19  Ben Elliston  <bje@cygnus.com>
5754
5755         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5756         (smlal): Likewise.
5757
5758 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
5759
5760         * fr30.cpu (define-arch): Specify "forced" default-alignment.
5761         * mach.scm (-parse-alignment): Recognize "forced" alignment.
5762         * sim-cpu.scm (-extract-chunk-specs): New proc.
5763         (gen-define-fields): Use it.
5764         (-extract-chunk): New proc.
5765         (-gen-extract-beyond-var-list): Use it.
5766         (gen-extract-fields): Simplify.
5767
5768         Port to guile 1.3.1.
5769         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5770         (LIBIBERTY): New var.
5771         (HOB_OBJS): Add cgen-gh.o.
5772         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5773         * Makefile.in: Rebuild.
5774         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5775         * config.in: Rebuild.
5776         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5777         libncurses, libtermcap.
5778         Add checks for needed functions in guile 1.2 not in guile 1.3,
5779         and vice versa.  Add test for 3 argument scm_make_vector.
5780         * configure: Rebuild.
5781         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5782         definitions if guile doesn't have them.
5783         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5784         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
5785         with gh_vector_set_x.
5786         (cgh_qsort): Replace gh_list_length with gh_length.
5787         * cgen-gh.h: Add decls for added functions.
5788         (cgh_qsort): Don't declare if IN_HOBBIT.
5789         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
5790         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5791         scm_make_vector with gh_make_vector.
5792         * cos.scm: Use vector-length instead of length on vectors.
5793         * dev.scm (cload): Make varargs proc with keyword/value args.
5794         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
5795         provide version that works with guile 1.2 or 1.3.
5796         Include private copy of scmhob.h.
5797         * scmhob.h: New file.  Keep our own copy for now.
5798
5799 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
5800
5801         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5802         plain text.
5803         (-rtx-traverse-operands): Dump cx temp stack if debugging.
5804         (-cx-temp-dump-stack): Pretty up output.
5805
5806         * arm.cpu: comment out thumb.cpu until isa support ready.
5807         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5808         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5809         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5810
5811         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5812
5813 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5814
5815         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5816         (<hw-address>,mode-ok?): unsigned/signed are compatible.
5817
5818         * operand (op:new-mode): Improve error message.
5819
5820         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
5821         * arm7.cpu: New file.
5822
5823 1999-03-12  Ben Elliston  <bje@cygnus.com>
5824
5825         * arm.cpu: Lots of minor fixes after desk checking.
5826
5827 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5828
5829         * thumb.cpu: snapshot of current work
5830
5831         * rtl.scm (rtx-get): Tweak error message.
5832
5833 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
5834
5835         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5836         * Makefile.in: Rebuild.
5837
5838         * cos.c (cos_vector_copy): New function.
5839         (_object_copy): Use it.
5840
5841         * mode.scm (mode:eq?): Clean up.
5842         * rtl.scm (cx-new-mode): Copy attributes.
5843         (rtx-get): Don't make copy if <c-expr> with identical mode.
5844
5845         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5846         add new isas spec.
5847         (gr-names): h-gr register names moved here.
5848         (h-gr): Update.
5849         (cr-names): h-cr register names moved here.
5850         (h-cr): update.
5851         (dr-names): h-dr register names moved here.
5852         (h-dr): update.
5853         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5854         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5855         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5856         add new isas spec.
5857         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5858         add new isas spec.
5859         (gr-names): h-gr register names moved here.
5860         (h-gr): Update.
5861         (cr-names): h-cr register names moved here.
5862         (h-cr): update.
5863         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5864         (h-accums,h-psw): Ditto.
5865         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5866         add new isas spec.
5867         (gr-names): h-gr register names moved here.
5868         (h-gr-indices): Delete.
5869         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
5870         (sparc64 h-gr): Ditto.
5871         (h-y): Add get/set specs.
5872         (fp regs): Rewrite.
5873         (fp operands): Rewrite.
5874         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5875         (h-tbr,h-cwp,h-wim): Ditto.
5876         * sparc64.cpu (h-fpsr): Add get/set specs.
5877         * sparccom.cpu (ldd-reg+reg): Load value all at once.
5878         (fp-ld-op): New arg `dest', all callers updated.
5879         (*): Replace `make-di' with `join'.
5880
5881         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5882         present.
5883         (gen-semantic-code): Save/restore rtl generator state.
5884         (cgen-cpu.h): Call rtl-gen-init!.
5885         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5886         (-gen-ifld-extract-beyond): Ditto.
5887         (<multi-ifield>,gen-ifld-extract): Ditto.
5888         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5889         `gstate'.
5890         (-hw-gen-set-quiet-pc): Ditto.
5891         (<hw-pc>,gen-write): Ditto.
5892         (-hw-cxmake-get): Ditto.  Call getter function if present.
5893         (<hw-register>,cxmake-get-raw): New method.
5894         (<hw-register>,gen-set-quiet-raw): New method.
5895         (-hw-gen-set-quiet): New arg `gstate'.
5896         (hw-fun-access?): Delete.
5897         (gen-reg-access-defn): Output function contents.
5898         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5899         invocation.
5900         (-gen-hw-index): Ditto.
5901         (op:read): Update gen-read invocation.
5902         (op:write): Update gen-write invocation.
5903         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5904         operands.
5905         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5906         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5907         (<unit>,gen-profile-code): Update to sim.scm version.
5908
5909         * sim-arch.scm (-regs-for-access-fns): New proc.
5910         (-biggest-reg-mode): New proc.
5911         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5912         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5913         virtual regs separately.
5914         (-gen-cpu-reg-access-defns): Replace fun-access? with new
5915         get/set specs.
5916         (gen-semantic-code): Save/restore rtl generator state.
5917         (cgen-cpu.h): Call rtl-gen-init!.
5918         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
5919         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
5920         renamed to mach-bfd-name.
5921         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5922         (-gen-ifld-extract-beyond): Ditto.
5923         (<multi-ifield>,gen-ifld-extract): Ditto.
5924         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5925         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5926         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5927         `gstate'.
5928         (hw-fun-access?): Delete.
5929         (-hw-gen-set-quiet-pc): New arg `gstate'.
5930         (<hw-register>,gen-get-macro): Rewrite.
5931         (<hw-register>,gen-set-macro): Rewrite.
5932         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5933         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
5934         (<hw-register>,cxmake-get-raw): New method.
5935         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
5936         (<hw-register>,gen-set-quiet-raw): New method.
5937         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5938         invocation.
5939         (-gen-hw-index): Ditto.
5940         (<hw-index>): New arg `gstate'.
5941         (-gen-hw-selector): Update call to rtx-c.
5942         (<pc>): New arg `gstate'.
5943         (op:read): Update gen-read invocation.
5944         (op:write): Update gen-write invocation.
5945         (<operand>,cxmake-get): Handle raw-reg.
5946         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5947         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5948         (<operand>,gen-set-quiet): Handle raw-reg.
5949         (<operand>,gen-set-trace): Handle raw-reg.
5950         (-gen-mach-data): mach:cpu renamed to mach-cpu.
5951
5952         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5953         cgen_operand_type enum.
5954         (gen-operand-table): Add operand type enum.  Replace pointer to
5955         hardware element with its enum.  Null terminate table.
5956         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5957         Build operand table.
5958         * ifield.scm (-ifield-parse): Recognize ISA attribute.
5959         * mach.scm (<arch-data>): New member `isas'.
5960         (adata-isas): New accessor.
5961         (<isa>): New class.
5962         (isa-default-insn-word-bitsize): New accessor.
5963         (isa-enum): New proc.
5964         (current-arch-default-insn-word-bitsize): Delete.
5965         (current-isa-list,current-isa-lookup): New procs.
5966         (-arch-parse-isa): New proc.
5967         (-arch-parse): Rewrite.
5968         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
5969         (define-arch): Define ISA attribute.
5970         (def-isa-attr!,isa-supports?): New procs.
5971         (<mach>): New member `isas'.
5972         (mach-isas): New accessor.
5973         (-mach-parse): New arg `isas', all callers updated.
5974         (-mach-read): Recognize `isas'.
5975         (arch-finish!): Rewrite.
5976         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5977         @arch@_cgen_get_{int,vma}_operand.
5978         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5979         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5980         of pointer to table entry.
5981         * opcodes.scm (gen-switch): Handle multiply defined operands.
5982         * operand.scm (op-sort): New proc.
5983
5984         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5985         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5986         (hw-enum): Accept symbol argument.
5987         (hardware-builtin!): Delete attribute FUN-ACCESS.
5988         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5989
5990         * attr.scm (atlist-source-form): New proc.
5991         (attr-builtin!): New attr `PRIVATE'.
5992         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5993         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5994         if they have `PRIVATE' attribute.
5995         (gen-hw-table-defns): Output definitions of explicitly defined
5996         keyword tables.
5997         * hardware.scm (<keyword>): New member print-name.  Rename member
5998         `value' to `values', all uses updated.
5999         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6000         (keyword-parse): Rewrite.
6001         (-keyword-read): New proc.
6002         (define-keyword): New proc.
6003         (-hw-parse-keyword): New proc.
6004         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6005         `extern-keyword'.
6006         (-hw-parse-values): Ditto.
6007         (-hw-parse-get,-hw-parse-set): Rewrite.
6008         (hardware-init!): Add new comment define-keyword.
6009         * mach.scm (<arch>): New member `kw-list'.
6010         (arch:kw-list,arch_set-kw-list!): New accessors.
6011         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6012
6013         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6014         * mode.scm (mode-class-integral?): New proc.
6015         (mode-class-float?,mode-class-numeric?): New procs.
6016         (mode-integral?,mode-float?,mode-numeric?): New procs.
6017         (mode-compatible?): New proc.
6018         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6019         rtx-c-with-alist.
6020         (<ifield>,gen-extract): Ditto.
6021         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6022         (<gstate>): New class.
6023         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6024         (gstate-context,gstate-set-context!): New accessors.
6025         (gstate-macro?,gstate-set-macro?!): New accessors.
6026         (gstate-make,gstate-copy): New procs.
6027         (-rtl-current-gstate): New global.
6028         (current-gstate-simulator?): New proc.
6029         (current-gstate-context,current-gstate-macro?): New procs.
6030         (current-gstate,current-gstate-set!): New procs.
6031         (rtl-gen-init!): Rewrite.
6032         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6033         (tstate-make): New arg `gstate', all callers updated.
6034         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6035         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6036         (tstate-gstate,tstate-set-gstate!): New accessors.
6037         (tstate-copy): New proc.
6038         (tstate-new-cond?,tstate-new-set?): Rewrite.
6039         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6040         (rtx-traverse): New arg `gstate', all callers updated.
6041         (rtx-strdump): New proc.
6042         (-simplify-for-compilation): New arg `gstate', all callers updated.
6043         (semantic-in-out-operands): Ditto.
6044         (semantic-attrs): Ditto.
6045         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6046         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6047         (rtx-value): Rewrite.
6048         (<c-expr>,gen-name): New method.
6049         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6050         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6051         (cx-new-mode): New proc.
6052         (-rtx-c-with-tstate): New proc.
6053         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6054         callers updated.
6055         (-rtx-mode): Rewrite.
6056         (-rtx-mode-compatible?): New proc.
6057         (<c-expr-temp>): New member `value'.
6058         (cx-temp:value): New accessor.
6059         (<c-expr-temp>,make!): Override default method.
6060         (<c-expr-temp>,cxmake-get): Rewrite.
6061         (<c-expr-temp>,gen-set-quiet): Rewrite.
6062         (<c-expr-temp>,gen-set-trace): Rewrite.
6063         (gen-temp-defs): Use cx-temp:value.
6064         (record-temp!): New arg value, all callers updated.
6065         (cx-temp:cx:make): Delete.
6066         (-cx-temp-dump-stack): New proc.
6067         (rtx-get): New arg `gstate', all callers updated.  Do mode
6068         compatibility checks.  Ensure result has specified mode.
6069         (rtx-set-quiet): New arg `gstate', all callers updated.
6070         (rtx-set-trace): Ditto.
6071         (s-c-call): New arg `tstate', all callers updated.
6072         (s-c-raw-call): Ditto.
6073         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6074         (s-cmpop,s-if,e-if): Ditto.
6075         (s-subreg): New proc.
6076         (-par-new-temp!): New proc.
6077         (-par-next-temp!): Rewrite.
6078         (-par-replace-set-dests): Use -par-new-temp!.
6079         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6080         (s-sequence): Use -rtx-c-with-state.
6081         * rtx-funcs.scm (*): Update.
6082         (raw-reg:): New rtx function.
6083         (make-di): Delete.
6084         (join:,subreg:): New rtx functions.
6085
6086         * insn.scm (<insn>): New members pre-cond-trap, condition,
6087         post-cond-trap, compiled-condition.
6088
6089         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6090
6091         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6092
6093         * utils-cgen.scm (parse-symbol): New proc.
6094         (parse-string): New proc.
6095         (gen-get-macro,gen-set-macro): New arg `index-args'.
6096         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6097         Prepend \ to newlines.
6098
6099         * utils.scm (alist-remove-duplicates): Delete.
6100
6101         * sid.scm (sim-init!): Delete private debugging code.
6102
6103 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6104
6105         * cgen-sid.scm: New file for C++ simulator application.
6106         * sid-arch.scm: Ditto.
6107         * sid-cpu.scm: Ditto.
6108         * sid-decode.scm: Ditto.
6109         * sid-model.scm: Ditto.
6110         * sid.scm: Ditto.
6111         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6112
6113 1999-03-05  Ben Elliston  <bje@cygnus.com>
6114
6115         * arm.cpu: New file.
6116
6117 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6118
6119         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6120         * Makefile.in: Rebuild.
6121
6122         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6123         (-attr-parse): Validate default value.
6124
6125         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6126         (-CGEN-LANG-VERSION): Ditto.
6127         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6128         (<reader>): New member keep-isa plus accessors.
6129         (-keep-isa-set!,keep-isa-validate!): New procs.
6130         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6131         (common-arguments): New variable.
6132         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6133         (-debug-repl,continue): New procs.
6134         (-cgen,cgen): New procs.
6135         * cgen-gas.scm: Rewrite.
6136         * cgen-opc.scm: Rewrite.
6137         * cgen-sim.scm: Rewrite.
6138         * cgen-stest.scm: Rewrite.
6139
6140         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6141         (gas-test-finish!): Call opcodes-finish!.
6142         (gas-test-analyze!): Call opcodes-analyze!.
6143         (<hw-asm>): New method test-data.
6144         (<operand>,testdata): Rewrite.
6145         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6146         (sim-test-finish!): Call opcodes-finish!.
6147         (sim-test-analyze!): Call opcodes-analyze!.
6148         (<hw-asm>): New method test-data.
6149         (<operand>,testdata): Rewrite.
6150
6151 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6152
6153         * fixup.scm (reverse!): Define if missing.
6154         * *.scm: Use reverse! instead of list-reverse!.
6155
6156         * utils.scm (leading-id-char?): New proc.
6157         (id-char?): Rewrite.
6158         (chars-until-delimiter): New proc.
6159         * opc-itab.scm (extract-syntax-operands): Rewrite.
6160         (strip-mnemonic): Rewrite.
6161         (compute-syntax): Rewrite.
6162
6163         * pmacros.scm (-pmacro-substr): New proc.
6164         (pmacros-init!): Add builtin .substr.
6165
6166 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6167
6168         * thumb.cpu: New file.
6169
6170 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6171
6172         * Makefile.am (CGENCFLAGS): New variable.
6173         (WITH_HOBBIT): Use automake conditional.
6174         (CGEN_HOB_SRC): New variable.
6175         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6176         (*.o): Compile with CGENCFLAGS.
6177         (cgen-hob.c): Simplify.
6178         (cgen-nohob.c): New rule.
6179         (hobbit): Renamed from hob.x.
6180         (CLEANFILES): Add cgen-nohob.c.
6181         * Makefile.in: Rebuild.
6182         * doc/Makefile.in: Rebuild.
6183         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6184         (WITH_HOBBIT): Use AM_CONDITIONAL.
6185         * configure: Rebuild.
6186         * aclocal.m4: Rebuild.
6187
6188         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6189         with string-write-map.
6190
6191         * sim-cpu.scm (hw-need-storage?): New proc.
6192         (-gen-hardware-types): Use it.
6193         (gen-parallel-exec-elm): Call op-save-index?.
6194
6195         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6196
6197         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6198         UNSIGNED attribute.
6199         (-gen-ifld-extract-beyond): Ditto.
6200         (<integer>): Delete all references.
6201         (<sim-hardware>): Delete.
6202         (hw-profilable?): New proc.
6203         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6204         (<hw-register>): Rename method get-index-mode to save-index?.
6205         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6206         (<hw-register>,gen-sym-decl): Make virtual.
6207         (<hw-memory>,gen-sym-decl): Make virtual.
6208         (<hw-memory>): Rename method get-index-mode to save-index?.
6209         (<hw-address>,gen-sym-decl): Make virtual.
6210         (<operand>): New method save-index?.
6211         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6212
6213         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6214         prefix added.  All uses updated.
6215
6216         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6217         rather than pointer to table entry.
6218
6219         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6220         Remove all hw-asm,op-asm support.
6221         (-gen-parse-number,-gen-parse-address): New procs.
6222         (<keyword>,gen-parse): Redo function name computation.
6223         (<keyword>,gen-print): Ditto.
6224         (<operand>,gen-function-name): Rewrite.
6225         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6226         (opcodes-init!): Delete call to add-parser!.
6227
6228         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6229         Define enum using hardware semantic name.
6230         (-gen-hw-decl,-gen-hw-defn): New procs.
6231         (gen-hw-table-decls): Use -gen-hw-decl.
6232         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6233         CGEN_HW_ENTRY structs.
6234         (gen-operand-table): Output hw's enum, not pointer to table entry.
6235         (-gen-cpu-open): Build table of selected hardware elements.
6236
6237         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6238         (<hardware> support): Delete.
6239         (<hw-asm>): Delete, moved to hardware.scm.
6240         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6241         (<hw-asm>,gen-table-entry): New method.
6242         (<hw-asm>,parse!): Delete.
6243         (<keyword>,gen-table-entry): New method.
6244         (<keyword>,parse!): Delete.
6245         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6246         for gen-decl,gen-defn,gen-ref,gen-init.
6247         (desc-init!): Don't create parser for operand asm specs.
6248
6249         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6250         * ifield.scm (<ifield>): New member `mode'.
6251         (<ifield>,make!): New arg `mode'.
6252         (ifld-mode): Rewrite.
6253         (ifld-hw-type): Rewrite.
6254         (<ifield>,min-value): Rewrite.
6255         (<ifield>,max-value): Rewrite.
6256         (-ifield-parse): New arg `mode'.
6257         (-ifield-read): Update.
6258         (define-full-ifield): New arg `mode'.
6259         (define-full-multi-ifield): Ditto.
6260         (-multi-ifield-parse): Ditto.
6261         (-multi-ifield-read): Update.
6262         (define-full-multi-ifield): New arg `mode'.
6263         (ifield-builtin!): Update definition of f-nil.
6264         * simplify.inc (define-normal-ifield): Update call to
6265         define-full-ifield.
6266         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6267         (define-normal-hardware): Delete arg asm.  New args indices, values,
6268         handlers.  Update call to define-full-hardware.
6269         (define-simple-hardware,dsh): New pmacros.
6270         (define-normal-operand): Update call to define-full-operand.
6271         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6272         Specify INT/UINT mode instead.
6273         (h-gr,h-cr): Use "indices" instead of "asm".
6274         (h-dr,h-ps): Update keyword syntax.
6275         (h-r13,h-r14,h-r15): Ditto.
6276         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6277         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6278         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6279         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6280         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6281         Specify INT/UINT mode instead.
6282         (h-gr): Use "indices" instead of "asm".
6283         (h-cc): Update keyword syntax.
6284         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6285         Specify INT/UINT mode instead.
6286         (h-hi16,h-slo16,h-ulo16): Update.
6287         (h-gr,h-cr): Use "indices" instead of "asm".
6288         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6289         (h-accums): Update keyword syntax.
6290         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6291         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6292         Specify INT/UINT mode instead.
6293         (h-gr-indices): New pmacro.
6294         (h-gr32,h-gr64): Split up from h-gr.
6295         (h-a): Update type spec.  Use values instead of asm spec.
6296         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6297         (h-y,h-annul-p): Ditto.
6298         (h-asr): Update keyword spec.
6299         (h-lo10,h-lo13,h-hi22): Update.
6300         (get-freg-spec,set-freg-spec): New pmacros.
6301         (h-fr32,h-fr64): Split up from h-fr.
6302         (rdd): Comment out get/set specs.
6303         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6304         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6305         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6306         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6307         UNSIGNED.  Specify INT/UINT mode instead.
6308         (h-*): Use dsh instead of dnh where appropriate.
6309         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6310         (h-p,h-membarmask): Ditto.
6311         (membarmask): Use "handlers" instead of "asm".
6312
6313         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6314         values,handlers,getters,setters plus accessors.
6315         (hw-mode-ok?,hw-default-mode): New procs.
6316         (<hardware-base>): Rename method new-mode to mode-ok?
6317         (<hardware-base>): New method get-index-mode.
6318         (hw-index-mode): New proc.
6319         (pc?): Delete, moved to operand.scm.
6320         (address?): New proc.
6321         (<hardware>): Delete.
6322         (<hw-asm>): Definition moved here from desc.scm.
6323         (keyword-parse): New proc.
6324         (hardware-parsers): Delete.
6325         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6326         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6327         (-hw-parse-get,-hw-parse-set): New procs.
6328         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6329         indices,values,handlers,get,set.  Rewrite.
6330         (-hw-read-extra): Delete.
6331         (-hw-read): Update.
6332         (define-hardware): Don't add object if not selected.
6333         (define-full-hardware): Ditto.
6334         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6335         (<hw-register>): Member `type' moved to baseclass.  Delete member
6336         hw-asm.
6337         (<hw-register>,parse!): Rewrite.
6338         (<hw-register>): Delete methods get-rank,get-mode.
6339         (<hw-register>): Method new-mode renamed to mode-ok?
6340         (<hw-register>): New method get-index-mode.
6341         (<hw-pc>,parse!): Rewrite.
6342         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6343         (<hw-memory>,parse!): Rewrite.
6344         (<hw-memory>): Delete methods get-rank,get-mode.
6345         (<hw-memory>): Method new-mode renamed to mode-ok?
6346         (<hw-memory>): New method get-index-mode.
6347         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6348         hw-asm.
6349         (<hw-immediate>,parse!): Rewrite.
6350         (<hw-immediate>): Delete methods get-rank,get-mode.
6351         (<hw-immediate>): Method new-mode renamed to mode-ok?
6352         (<hw-address>): Delete member hw-asm.
6353         (<hw-address>,parse!): Rewrite.
6354         (<hw-address>): Delete methods get-rank,get-mode.
6355         (<hw-address>): Method new-mode renamed to mode-ok?
6356         (hw-profilable?): Delete.
6357         (hardware-init!): Delete hardware-parsers reference.
6358         Update argument specs of command define-full-hardware.
6359         (hardware-builtin!): Update definitions of hardware builtins.
6360         * operand.scm (<operand>): New members hw-name,mode-name.
6361         Delete member op-asm.  New member handlers.
6362         (<operand>,make!): Update.
6363         (op:hw-name,op:mode-name,op:handlers): New procs.
6364         (op:type): Rewrite.
6365         (op:mode): Rewrite.
6366         (<operand>): New method get-index-mode.
6367         (<pc>,make!): Update.
6368         (op:new-mode): Rewrite.
6369         (operand-parsers): Delete.
6370         (-operand-parse): Rewrite.  Return #f if insn not selected.
6371         (-op-read-extra): Delete.
6372         (-operand-read): Update.
6373         (define-operand,define-full-operand): Update.
6374         (operand-init!): Delete operand-parsers reference.
6375         Update syntax of define-full-operand command.
6376
6377         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6378         (define-full-insn): Update.
6379         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6380         (define-full-minsn): Update.
6381
6382         * mode.scm (<mode>): New member class.
6383         (mode:class): New proc.
6384         (mode?): Rewrite.
6385         (-mode-parse): New arg class.
6386         (define-full-mode): Update.
6387         (mode-find): Rewrite.
6388         (mode-make-int,mode-make-uint): New procs.
6389         (mode-init!): Update syntax of define-full-mode command.
6390         (mode-builtin!): Update definitions of builtin modes.
6391
6392         * model.scm (<profile>): Delete.
6393
6394         * read.scm (keep-atlist?): New proc.
6395         (keep-multiple?): New proc.
6396         (<parser-list>): Delete.
6397         (add-parser!,parse-spec!): Delete.
6398
6399         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6400         (def-rtx-syntax-node): Ditto.
6401         (-rtx-traverse-debug?): New variable.
6402         (tstate-make): New proc.
6403         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6404         (tstate-new-cond?,tstate-new-set?): New procs.
6405         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6406         tstate.  All callers updated.
6407         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6408         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6409         (-build-operand!): Replace arg cond? with tstate.
6410         (-build-reg-operand!,-build-mem-operand!): Ditto.
6411         (-build-index-of-operand!): Update making of <operand> object.
6412         (s-ifield): New arg tstate.  All callers updated.
6413         (hw:): New arg tstate.  All callers updated.  Replace call to
6414         current-hw-lookup with current-hw-sem-lookup-1.
6415         (s-index-of): New arg tstate.  All callers updated.
6416         (reg:,mem:): Ditto.
6417         (-rtx-use-sem-fn?): New proc.
6418         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6419         semantic cover fns.
6420         (s-convop): Only use semantic mode when using semantic cover fns.
6421         (s-cmpop): Call -rtx-use-sem-fn?.
6422         (s-cond,s-case): New arg tstate.  All callers updated.
6423         (s-parallel,s-sequence): Ditto.
6424
6425         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6426
6427         * types.scm (<scalar>): Rewrite implementation.
6428         (<integer>): Delete.
6429         (parse-type): Rewrite.
6430
6431         * utils-cgen.scm (parse-handlers): New proc.
6432
6433         * utils.scm (!=): New proc.
6434
6435 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6436
6437         * pmacros.scm (-pmacro-expand): Fix typo.
6438
6439 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6440
6441         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6442         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6443         * i960.cpu (build-hex2): New pmacro.
6444         (insn-opcode): Simplify.
6445         (insn-opcode2): Ditto.
6446
6447         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6448         * cgen-stest.scm (catch-with-backtrace): Ditto.
6449
6450 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6451
6452         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6453         All callers updated.
6454         (-pmacro-invoke): New proc.
6455         (-pmacro-sym,-pmacro-str): New procs.
6456         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6457         (pmacros-init!): Install builtins .iota, .map, .apply.
6458         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6459         (h-fr): Simplify register name spec.
6460         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6461         * utils.scm (num-args-ok?): New proc.
6462
6463 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6464
6465         * pmacros.scm (-pmacro-error): New proc.
6466         (-pmacro-expand): Use it.
6467         (-pmacro-splice): New proc.
6468         (pmacros-init!): Install new builtin .splice.
6469
6470         * sparc.cpu: Include sparc64.cpu when appropriate.
6471         (f-mmask,f-simm11): Moved to sparc64.cpu.
6472         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6473         (ANNUL attribute): Delete.
6474         (test-* pmacros): New arg cc, all callers updated.
6475         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6476         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6477         atomic-opc.
6478         (ldstub,swap): Moved to sparccom.cpu.
6479         * sparc64.cpu: Add more insns.
6480
6481 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6482
6483         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6484         CGEN_ATTR_VALUE.
6485         (cgen-sem-switch.c): Ditto.
6486         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6487         moved to cgen-engine.h.
6488         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6489         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6490         global.  Cache attributes and insn length in IDESC.
6491         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6492         @cpu@_opcode renamed to @cpu@_get_idata.
6493         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6494         done later underneath sim_resume.
6495         (@mach@_mach): Record @cpu@_prepare_run.
6496         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6497         updated.
6498         (-hw-gen-set-quiet-pc): Ditto.
6499         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6500         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6501         (<hw-addr>,cxmake-get): Ditto.
6502         (<hw-iaddr>,cxmake-get): Ditto.
6503         (<pc>,cxmake-get): Ditto.
6504         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6505         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6506         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6507         (<hw-pc>,gen-write): Use hw-selector-default.
6508         (<hw-register>,gen-write): Ditto.
6509         (<hw-memory>,gen-write): Ditto.
6510         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6511         (-gen-hw-selector): New proc.
6512
6513         * desc.scm: New file.
6514         * desc-cpu.scm: New file.
6515         * opcodes.scm: Split up into several smaller files.
6516         * opc-asmdis.scm: New file.
6517         * opc-ibld.scm: New file.
6518         * opc-itab.scm: New file.
6519         * opc-opinst.scm: New file.
6520         * Makefile.am (desc): New target.
6521         (opcodes): Update args to cgen-opc.scm.
6522         * Makefile.in: Rebuild.
6523         * aclocal.m4: Rebuild.
6524         * config.in: Rebuild.
6525         * configure.in: Update arg to AC_INIT.
6526         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6527         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6528         AC_PROG_INSTALL.
6529         * configure: Rebuild.
6530         * cgen-gas.scm: Update files to load.
6531         * cgen-opc.scm: Ditto.  Reorganize option letters.
6532         * cgen-sim.scm: Update files to load.
6533         * cgen-stest.scm: Ditto.
6534         * dev.scm (cload): New app "DESC".
6535         (load-opc): Update files to load.
6536         (load-gtest,load-sim,load-stest): Ditto.
6537
6538         * attr.scm (bool-attr?): New proc.
6539         (attr-list-enum-list): New proc.
6540         (-attr-sort): Rewrite.
6541         (attr-builtin!): Give ALIAS attribute a fixed index.
6542         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6543         calculate attribute enum list.
6544         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6545
6546         * insn.scm (-insn-parse): Renamed from parse-insn.
6547
6548         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6549         (-hw-read): Ditto.
6550
6551         * mode.scm (-mode-parse): Renamed from parse-mode.
6552
6553         * operand.scm (<operand>): New member `selector'.
6554         (<operand>,make!): Use default selector.
6555         (hw-selector-default): New variable.
6556         (hw-selector-default?): New proc.
6557
6558         * pmacros.scm (pmacros-init!): New proc.
6559         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6560         (-env-set!): Delete.
6561         (-pmacro-expand): New proc apply-macro.
6562         Use it in scan-list,scan.  Scan list first, then see if macro
6563         invocation.
6564         (define-pmacro): Rewrite.
6565         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6566
6567         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6568         selected if (current-mach) seen.
6569         (rtx?): Renamed from rtx-uneval?, all callers updated.
6570         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6571         updated.
6572         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6573         selector, all callers updated.
6574         (hw:): New arg selector, all callers updated.  Delete old comments
6575         and code.
6576         (reg:,mem:): Handle selectors
6577         * rtx-funcs.scm (reg:): Handle selectors.
6578
6579         * read.scm: Renamed from cpu.scm.
6580         (<command>): New class.
6581         (<reader>): New member commands.
6582         (reader-add-command!): New proc.
6583         (reader-lookup-command): New proc.
6584         (reader-error,-reader-process-expanded,reader-process): New procs.
6585         (reader-read-file!): New proc.
6586         (include): Call reader-read-file!.
6587         (cmd-if): New proc.
6588         (cpu-load): Call reader-read-file!.
6589         * utils.scm (num-args): New proc.
6590         * simplify.inc: New file.
6591         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6592         procs.  Move define-normal-foo procs (and abbreviated forms) to
6593         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6594         routines.
6595         * fr30.cpu: Include simplify.inc.
6596         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6597         * i960.cpu: Include simplify.inc.
6598         * m32r.cpu: Include simplify.inc.
6599         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6600         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6601         * sparc.cpu: Include simplify.inc.
6602         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6603         * utils-cgen.scm (parse-error): Moved to read.scm.
6604         (sanitize): Rewrite.
6605         (utils-init!): New proc.
6606
6607 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6608
6609         * sparc.cpu: New file.
6610         * sparc32.cpu: New file.
6611         * sparc64.cpu: New file.
6612         * sparccom.cpu: New file.
6613         * sparc.opc: New file.
6614
6615 1999-01-27  Frank Eigler  <fche@cygnus.com>
6616
6617         * utils.scm (gen-copyright): New proc.
6618
6619 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6620
6621         Parameterize rtl parsing, rather than having lots of little handlers.
6622         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6623         Delete member traverse.
6624         (rtx:set-traverse!): Delete.
6625         (-rtx-valid-types,-rtx-valid-matches): New variables.
6626         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6627         instead of expression.  All callers updated.
6628         (def-rtx-node): New args arg-types,arg-modes.
6629         (def-rtx-syntax-node): Ditto.
6630         (def-rtx-dual-mode): Ditto.
6631         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6632         All callers updated.
6633         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6634         All callers updated.
6635         (rtx-macro-expand): New proc.
6636         (-rtx-traverse-check-args): Delete.
6637         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6638         an rtx specific traverser.
6639         (-rtx-any-mode?,-rtx-symornum?): New procs.
6640         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6641         (-rtx-traverse-no-mode): Delete.
6642         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6643         (-rtx-traverse-operands): Rewrite.
6644         (-rtx-traverse-expr): Rewrite.
6645         (rtx-traverse): Don't expand macros here, leave for caller to do.
6646         (rtx-simplify): Delete.
6647         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6648         attributes.
6649         (rtx-true?,rtx-false?): Ditto.
6650         (-rtx-ref-type): Set dest is operand 1 now.
6651         (-simplify-for-compilation): New proc.
6652         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6653         Expand macros before calling rtx-traverse.  Sort operands by name
6654         to avoid unnecessary semantic formats.
6655         (semantic-attrs): New proc.
6656         (rtx-uneval?): Handle (<rtx-func> ...).
6657         (s-boolifop): Delete arg mode.  All callers updated.
6658         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6659         (eq-attr): New arg obj.
6660         (eq-attr:): Delete.
6661         * m32r.cpu (rach): Update calls to andif.
6662
6663         * minsn.scm (-minsn-parse-expansion): Renamed from
6664         parse-minsn-expansion.
6665         (-minsn-parse): Renamed from parse-minsn.
6666         (-minsn-read): Renamed from read-minsn.
6667         (def-minsn): Don't check APPLICATION here.
6668         (def-full-minsn): New proc.
6669         (define-macro-insn): Check APPLICATION here.  Expand macros.
6670         (define-normal-macro-insn): Ditto.
6671
6672         * utils.scm (word-value): New arg start-lsb?.
6673         (word-mask,word-extract): Ditto.
6674         (split-bits,powers-of-2): Use integer-expt instead of expt.
6675         (bit-set?): Handle 32 bit values (which are bignums).
6676         (cg-logand,cg-logxor): New functions.
6677         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6678         (<ifield>,field-value): Update call to word-value.
6679         (<ifield>,min-value): Use integer-expt instead of expt.
6680         (<ifield>,max-value): Ditto.
6681
6682         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6683
6684         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6685
6686         Compute raw instruction format in addition to semantic based format.
6687         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6688         (<iformat> accessors): Rename accessors to ifmt-*.
6689         (<sformat>): New class.
6690         (fmt-enum): Renamed from fmt:enum.
6691         (-ifmt-search-key): Rewrite.
6692         (-sfmt-search-key): New proc.
6693         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6694         Compute iformat and sformat search keys.
6695         (ifmt-build): Update.
6696         (sfmt-build): New proc.
6697         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6698         (ifmt-compute!): Compute instruction format <iformat> based on
6699         instruction fields alone.  Compute new semantic format <sformat>
6700         based on instruction fields and semantic information.
6701         (ifmt:lookup): Delete.
6702         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6703         (current-sfmt-list): New proc.
6704         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6705         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6706         (insn-length,insn-length-bytes): Update.
6707         (insn:mask-length,insn:mask): Update.
6708         (insn-lookup-op): Update.
6709         * gas-test.scm (gas-test-analyze!): Update.
6710         (gen-gas-test): Ditto.
6711         * sim-test.scm (sim-test-analyze!): Update.
6712         (gen-sim-test): Ditto.
6713         * opcodes.scm (gen-operand-instance-table): Update.
6714         (gen-operand-instance-ref): Ditto.
6715         (max-operand-instances): Use heuristic if semantics not parsed.
6716         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6717         (opcodes-analyze!): Only scan semantics of building operand instance
6718         tables.
6719         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6720         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6721         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6722         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6723         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6724         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6725         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6726
6727         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6728         New arg lsb0?  All callers updated.
6729         (decode-bits): New arg lsb0?.  All callers updated.
6730         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6731         of expt.
6732         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6733         (build-slots): Call integer-expt instead of expt.
6734         (build-decode-table-entry): Handle crossing word boundaries better.
6735         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6736         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6737
6738         * enum.scm (define-enum): Rewrite.
6739         (define-normal-enum): Ditto.
6740         (def-full-insn-enum): New proc.
6741         (define-normal-insn-enum): Rewrite.
6742
6743         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6744         valid C.
6745         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6746
6747         * dev.scm: Add sid support.
6748
6749         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6750         (CLEANFILES): Add tmp-*.
6751         * Makefile.in: Rebuild.
6752
6753         * doc/Makefile.am: New file.
6754         * doc/Makefile.in: New file.
6755         * doc/cgen.texi: New file.
6756         * Makefile.am (SUBDIRS): Define.
6757         * Makefile.in: Rebuild.
6758         * configure.in: Create doc/Makefile.
6759         * configure: Rebuild.
6760
6761 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
6762
6763         * insn.scm (insn:syn): Delete.
6764
6765 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
6766
6767         * fr30.cpu (model fr30-1): Add state variables load-regs,
6768         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
6769         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6770         (model m32rx): Ditto.
6771         (addi): Simplify function unit usage spec.
6772         (ld-plus): Rewrite operand names in function unit usage spec.
6773         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6774         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6775         overridden.  Allow operand to appear in input and output spec.
6776         (<insn>,gen-profile-code): string-append -> string-list.
6777
6778         * ifield.scm (define-ifield): Call pmacro-expand.
6779         (define-full-ifield,define-normal-ifield): Ditto.
6780         (define-multi-ifield,define-normal-multi-ifield): Ditto.
6781
6782         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6783         with-scache and without-scache cases.
6784
6785 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
6786
6787         * fr30.cpu (fr30-1): Add state variable h-gr.
6788         Add units u-cti, u-load, u-store, u-ldm, u-stm.
6789         (all insns): First pass at providing cycle counts.
6790         * sim.scm (<unit>,gen-profile-code): Only check for output operands
6791         when initializing unit output operands, ditto for input operands.
6792
6793         * insn.scm (insn-length,insn-length-bytes): New procs.
6794         * mach.scm (-adata-set-derived!): Use them.
6795         * sim-cpu.scm (-gen-sem-case): Ditto.
6796
6797         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6798         (-gen-write-case): Ditto.
6799         (gen-semantic-fn): Ditto.  Split into two:
6800         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
6801         in non-scache case.
6802         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
6803         scache/no-scache appropriately.  All callers updated.
6804         (-gen-sem-case): PCADDR->IADDR.
6805         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6806
6807         * sim-decode.scm (*): Replace string-append,string-map with
6808         string-list,string-list-map where the result is sufficiently large.
6809         (-gen-decode-insn-table): Go back to simple version for non-scache
6810         case: just record IDESC in decoder tables and leave field extraction
6811         to the caller.
6812         (-gen-decode-switch): Ditto.
6813         (-gen-decode-fn): Ditto.
6814         (-gen-extract-decls): Only emit format enum if with-scache?.
6815         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6816         non-scache case.
6817         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6818         (-gen-insn-timing): Ditto.
6819         * sim.scm (gen-argbuf-type): Only output sem_fields union in
6820         with-scache case.
6821
6822         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6823         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6824
6825 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
6826
6827         * cpu.scm (keep-mach-validate!): New proc.
6828         (include): New proc.
6829
6830         * mach.scm (current-arch-mach-name-list): New proc.
6831         (-parse-arch-machs): Always return canonical form.
6832         (def-arch): Validate user specified machs to be kept.
6833         (def-mach-attr!): Simplify.
6834
6835         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6836         (option-init!): Initialize it.
6837         (option-set!): Set it.
6838         (gen-insn-table-entry): Emit 0 for operand instance ref if not
6839         output operand instance tables.
6840         (cgen-opc.in): Only output operand instance tables if asked to.
6841
6842         * sim.scm (option-init!,option-set!): Clarify returned value.
6843
6844         * sim.scm (gen-mach-bfd-name): Move from here.
6845         * utils-cgen.scm: To here.
6846
6847 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
6848
6849         * fr30.cpu (ilm): Fix comment field.
6850         (cond-branch): Remove explicit setting of COND-CTI, let cgen
6851         compute it.
6852
6853         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6854         (rtx-true?, rtx-false?): New procs.
6855         * rtx-funcs.scm (annul): Rename vpc to pc.
6856         (-rtx-traverse-if): Improve determination of whether then/else parts
6857         are conditionally executed.
6858
6859         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6860         outer level.
6861         (gen-argbuf-type): Simplify generated definition (big sem_fields
6862         union moved outside).
6863
6864 1999-01-11  Ben Elliston  <bje@cygnus.com>
6865
6866         * doc/porting.texi: New file.
6867
6868         * doc/intro.texi: New file.
6869         (Layout): Use @example to insert preformatted ASCII text (such as
6870         diagrams). @code is inappropriate here.
6871
6872 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
6873
6874         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6875
6876         * m32r.opc (print_hash): Cast dis_info.
6877
6878         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6879         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6880         get/set macros.
6881
6882 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
6883
6884         * i960.cpu (f-br-disp): Remove RELOC attribute.
6885         (f-ctrl-disp): Ditto.
6886         (callx-disp): set-quiet -> set for (reg h-gr 2).
6887         (callx-indirect,callx-indirect-offset): Ditto.
6888
6889         * Makefile.am (gas-test): Fix dependencies.
6890         * Makefile.in: Rebuild.
6891         * cgen-gas.asm: File creation args are -<uppercase-letter>.
6892         * gas-test.scm (break-out-syntax,make-file-name): Delete.
6893         (gas-test-analyze!): Use syntax-break-out.
6894         * sim-test.scm (break-out-syntax,make-file-name): Delete.
6895         (sim-test-analyze!): Use syntax-break-out.
6896         (cgen-build.sh): Use gen-file-name.
6897         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6898         * insn.scm (syntax-break-out): New proc.
6899         * utils.scm (gen-file-name): New proc.
6900
6901         * fixup.scm (nil,<?,<=?,>?): Delete.
6902
6903         * utils.scm (count-true): Rewrite.
6904
6905         * slib/sort.scm: Move sort.scm to slib directory.
6906         * cpu.scm: Update.
6907
6908         * iformat.scm (ifmt-compute!): Record empty format.
6909
6910         * rtl.scm (semantic-in-out-operands): Simplify by moving several
6911         internal procs outside.  Handle expression register numbers.
6912         Handle index-of.
6913
6914         * rtx-funcs.scm (annul): Rename new_pc to vpc.
6915
6916         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6917         every register.
6918         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6919         (gen-semantic-fn,-gen-sem-case): Ditto.
6920         (cgen-cpu.c): Define WANT_CPU to @cpu@.
6921         (cgen-semantics.c): Ditto.
6922         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6923         (gen-ifmt-argvars-defns): New proc.
6924         (gen-ifmt-argvars-assigns): New proc.
6925         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6926         (-gen-decode-fn): Handle non-with-scache case.
6927         (cgen-decode.c): Define WANT_CPU to @cpu@.
6928         * sim-models.scm (-gen-mach-defns): Emit bfd name.
6929         (cgen-model.c): Define WANT_CPU to @cpu@.
6930         * sim.scm (gen-ifld-extract-argvar): New proc.
6931         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6932         with FUN-ACCESS specified.
6933         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6934         (<hw-register>,gen-extract): New arg local?.
6935         (<hw-address>,gen-extract): Ditto.
6936         (-hw-cxmake-get): Handle non-with-scache case.
6937         (-hw-gen-set-quiet): Ditto.
6938         (<hw-address>,cxmake-get): Handle non-with-scache case.
6939         (gen-op-extract-argvar): New proc.
6940         (<operand>,gen-record-profile): Rewrite.
6941         (<operand>,gen-profile-code): Rewrite.
6942         (<unit>,gen-profile-code): Use -gen-argfld-ref.
6943         (gen-argbuf-fields-union): New proc.
6944         (gen-argbuf-type): Use it.  Handle non-scache case.
6945
6946         * *.scm: class:foo procs renamed to class-foo.
6947         * attr.scm (<attribute>): New member `for'.
6948         (-attr-parse): New first value in list for default if
6949         none specified.
6950         (non-bool-attr-list,attr:add!): Delete.
6951         (def-attr): Use current-attr-add!.
6952         (atlist-attr-value-no-default): New proc.
6953         (attr-lookup-default): Handle boolean attributes.
6954         (gen-attr-enum): New proc.
6955         (-attr-remove-meta-attrs-alist): New proc.
6956         (attr-nub): New proc.
6957         (current-attr-list-for): New proc.
6958         (current-{ifld,hw,op,insn}-attr-list): New procs.
6959         (attr-builtin!): New proc.
6960         * cpu.scm (keep-obj?): Rewrite.
6961         (-init-parse-cpu!): Call arch-init!.
6962         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6963         (-finish-parse-cpu!): Call arch-finish!.
6964         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6965         (def-enum,def-full-enum): Use current-enum-add!.
6966         (gen-obj-list-enums): New proc.
6967         * hardware.scm (hw:add!,hw:lookup): Delete.
6968         (def-hardware,def-hardware-ext): Use current-hw-add!.
6969         (hw:std-attrs,hw:attr-list): Delete.
6970         (hardware-builtin!): Define builtin hardware attributes.
6971         * ifield.scm (ifld:add!,ifld:lookup): Delete.
6972         (def-ifield,def-full-ifield): Use current-ifld-add!.
6973         (ifld:std-attrs,ifld:attr-list): Delete.
6974         (ifield-builtin!): New proc.
6975         * insn.scm (insn:add!,insn:lookup): Delete.
6976         (def-full-insn): Use current-insn-add!.
6977         (insn:std-attrs): Delete.
6978         (insn-builtin!): New proc.
6979         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6980         minsn-list.
6981         (<arch-data>): New member machs.
6982         (current-attr-list,current-enum-list): New procs.
6983         (current-op-list,current-minsn-list): New procs.
6984         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6985         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6986         Ditto.
6987         (-parse-arch-machs): New proc.
6988         (-arch-parse): New arg machs, all callers updated.
6989         (-arch-read): Handle machs spec.
6990         (def-arch): Define MACH attribute here.
6991         (mach-init!,mach-finish!): Not here.
6992         (cpu:add!,cpu:lookup): Delete.
6993         (def-cpu): Use current-cpu-add!.
6994         (<mach>): New member bfd-name.
6995         (-mach-parse): New arg bfd-name, all callers updated.
6996         (-mach-read): Handle bfd-name spec.
6997         (mach:add!,mach:lookup): Delete.
6998         (def-mach): Use current-mach-add!.
6999         (def-mach-attr!): New proc.
7000         (arch-init!): New proc.
7001         (arch-finish!): New proc.  Reverse all object lists here.
7002         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7003         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7004         (define-normal-macro-insn): Ignore minsn if mach not kept.
7005         * mode.scm (mode-builtin!): New proc.
7006         * model.scm (model:add!,model:lookup): Delete.
7007         (def-model): Use current-model-add!.
7008         * opcodes.scm (insn:attr-list): Delete.
7009         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7010         (gen-attr-table-defn): Emit value for default.
7011         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7012         (op:attr-list): Delete.
7013         (gen-operand-decls,gen-insn-decls): New proc.
7014         (compute-insn-attr-list): Delete.
7015         (cgen-opc.h): Reorganize and simplify.
7016         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7017         (def-operand,def-full-operand): Use current-op-add!.
7018         (op:std-attrs): Delete.
7019         (operand-enum): Delete.
7020         (operand-builtin!): Define builtin operand attrs.
7021         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7022         (gen-attr-enum-decl): Use gen-obj-list-enums.
7023         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7024         Rewrite.
7025         * fr30.cpu (define-arch): Add machs spec.
7026         (f-i4): SIGNED attribute -> !UNSIGNED.
7027         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7028         (HASH-PREFIX): Define operand attribute.
7029         (NOT-IN-DELAY-SLOT): Define insn attribute.
7030         * i960.cpu (define-arch): Add machs spec.
7031         * m32r.cpu (define-arch): Add machs spec.
7032         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7033         (HASH-PREFIX): Define operand attribute.
7034         (FILL-SLOT): Define insn attribute.
7035
7036 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7037
7038         * fr30.cpu (stilm): Correct mask for and operation.
7039
7040 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7041
7042         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7043         Replace START/EXIT with start/pass.
7044         (gen-sim-test): Delete ".text".
7045
7046 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7047
7048         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7049
7050 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7051
7052         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7053         (h-sbit): Make it FUN-ACCESS.
7054         (h-gr): Reorder so that general regs are always printed by number.
7055
7056 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7057
7058         * i960.cpu (flushreg): Use nop.
7059
7060 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7061
7062         * m32r.cpu (default-alignment): Specify.
7063         * mach.scm (<arch-data>): New member default-alignment.
7064         (adata:default-alignment): New proc.
7065         (current-arch-default-alignment): New proc.
7066         (-arch-parse): New arg default-alignment.
7067         (parse-alignment): New proc.
7068         (-arch-read): Handle default-alignment spec.
7069
7070         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7071
7072         * insn.scm (f-%): Delete.
7073         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7074         be readded if proved useful.
7075         (gen-extract-fields): Ditto.  Use gen-ifetch.
7076         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7077         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7078
7079 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7080
7081         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7082
7083 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7084
7085         * fr30.cpu: Remove stub macros.
7086         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7087         (div2): Don't use addc/subc.
7088
7089 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7090
7091         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7092         if opcodes.
7093
7094 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7095
7096         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7097
7098 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7099
7100         * cpu.scm (keep-all?): New proc.
7101         (assert-keep-all): Use it.
7102         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7103         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7104         Check for spelling errors.
7105
7106 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7107
7108         * rtl.scm (s-convop): Call -rtx-sem-mode.
7109
7110 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7111
7112         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7113         (-parse-hw-profile): Ditto.
7114         (<hw-register>, parse!): Return `void' result.
7115         (<hw-pc>, parse!): Ditto.
7116         (<hw-memory>, parse!): Ditto.
7117         (<hw-immediate>, parse!): Ditto.
7118         (<hw-address>, parse!): Ditto.
7119
7120         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7121         (-ifld-parse-encode-decode): New proc.
7122         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7123         (-multi-ifield-parse): Set encode/decode to #f.
7124         (ifld:decode-mode): New proc.
7125         * utils.scm (nub): Rewrite.
7126         * operand.scm (op-nub): Rewrite.
7127         * sim.scm (<ifield>, gen-type): Rewrite.
7128         (-gen-ifld-argbuf-defn): New proc.
7129         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7130         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7131         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7132         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7133         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7134         New method gen-trace-extract.
7135         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7136         from gen-argbuf-elm, return "" if not caching register address.
7137         Rewrite gen-extract.  New method gen-trace-extract.
7138         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7139         gen-extract, gen-trace-extract, cxmake-get.
7140         (<hw-iaddress>): New method cxmake-get.
7141         (op-needed-iflds): New proc.
7142         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7143         (-gen-op-argbuf-defn): New proc.
7144         (gen-op-extract): Renamed from op:extract.
7145         (gen-op-trace-extract): Renamed from op:trace-extract.
7146         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7147         and rewritten.
7148         (gen-argbuf-elm): Rewrite.
7149         * sim-decode.scm (-gen-record-args): Update.
7150
7151         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7152
7153         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7154         argument position.  Flag symbolic macros in function position as
7155         an error.
7156         (define-pmacro): Handle quoting in definition of symbolic macros.
7157         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7158
7159 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7160
7161         * fr30.opc (parse_register_list): Account for reverse masks
7162         for load and store.
7163         (print_register_list): Ditto.
7164         (parse_low_register_list_ld): New function.
7165         (parse_hi_register_list_ld): New function.
7166         (parse_low_register_list_st): New function.
7167         (parse_hi_register_list_st): New function.
7168         (print_hi_register_list_ld): New function.
7169         (print_hi_register_list_st): New function.
7170         (print_low_register_list_ld): New function.
7171         (print_low_register_list_st): New function.
7172         * fr30.cpu (ldr15dr): Implement workaround.
7173         (ldm0,ldm1,stm0,stm1): Implemented.
7174
7175 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7176
7177         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7178         * configure: Regenerate.
7179         * Makefile.am (WITH_HOBBIT): Update.
7180         (cgen-hob.c): Remove Makefile dependency.
7181         (cgen.o): Depend on cgen-gh.h, config.h.
7182         * Makefile.in: Regenerate.
7183         * aclocal.m4: Regenerate.
7184
7185 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7186
7187         * i960.cpu, i960.opc: New files.
7188
7189 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7190
7191         * fr30.opc (parse_register_number): New function.
7192         (parse_register_list): New function.
7193         (parse_low_register_list): Use parse_register_list.
7194         (parse_hi_register_list): Use parse_register_list.
7195         * fr30.cpu (sth): Fix assembler syntax. Implement more
7196         insns.
7197
7198 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7199
7200         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7201         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7202         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7203         (-op-gen-set-trace-parallel): Ditto.
7204         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7205
7206         * fr30.cpu (call,calld): Fix setting of pc.
7207         (f-op5): Fix start bit number.
7208
7209 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7210
7211         * fr30.cpu (st): Fix operand ordering. Implement more
7212         insns.
7213
7214 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7215
7216         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7217         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7218         (fmt-semantic-operands): Move to sim.scm.
7219         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7220         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7221         (<hw-index>): New method get-name.
7222         (op-profilable?): Moved to sim.scm.
7223         (op-nub): New proc.
7224         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7225         (op-profilable?): Moved here from operand.scm.
7226         (gen-extract-type): Delete.
7227         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7228         (-gen-argfld-ref): New proc.
7229         (-gen-ifld-argfld-name): New proc.
7230         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7231         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7232         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7233         (<hardware-base>): Delete method gen-extract-type.  New method
7234         gen-argbuf-elm.
7235         (<hw-register): Ditto.  Update method gen-extract.
7236         (<operand>, method gen-argbuf-elm): Rewrite.
7237         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7238         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7239         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7240
7241         * sim-decode.scm (-gen-record-args): Tweak.
7242
7243         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7244
7245 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7246
7247         * doc/porting: Fix typo: gas->sim.
7248         * fr30.opc (print_m4): New function.
7249         * fr30.cpu: Implemented many insns.
7250
7251 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7252
7253         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7254
7255         * fr30.cpu (f-rel9): Delete RELOC attribute.
7256         (f-rel12): Add PCREL-ADDR attribute.
7257         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7258         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7259         * fr30.opc (print_label9): Delete.
7260
7261         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7262         code for CTI indicators.
7263         * insn.scm (insn-cti?): Simplify.
7264         * utils-cgen.scm (atlist:cti?): New proc.
7265
7266 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7267
7268         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7269         (f-i20-4,f-i20-16,f-i20): New fields.
7270         (i20): New operand.
7271         (ldi8): Implement.
7272         (ldi20): New insn.
7273         (ldi32m): Delete.
7274         (jmpd): Implement.
7275         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7276         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7277         * mach.scm (arch-data): Ditto.
7278         (current-arch-default-insn-word-bitsize): Renamed from
7279         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7280         (-arch-read): Update.
7281
7282         * hardware.scm (hw:attr-list): Move here ...
7283         * opcodes.scm: ... from here.
7284
7285         * ifield.scm (fld:bitrange): Delete.
7286         (fld:word-offset,fld:word-length): New procs.
7287         (ifield?): Use class-instance.
7288         (<ifield>, method field-start): Rewrite.
7289         (ifld:enum): New proc.
7290         (<ifield>, methods field-mask,field-value): Rewrite.
7291         (-ifield-parse): Rewrite.
7292         (<multi-ifield> support): Rewrite.
7293         (ifld-beyond-base?): Rewrite.
7294         (ifld:std-attrs): New variable.
7295         (ifld:attr-list): New proc.
7296         * iformat.scm (-compute-insn-mask): Rewrite.
7297         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7298         Simplify.
7299         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7300         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7301         onto type.
7302         (<operand>): Ditto.  Forward onto index instead.
7303         (gen-ifld-decls,gen-ifld-defns): New procs.
7304         (ifld:insert,ifld:extract): New procs.
7305         (<ifield>): New methods gen-insert, gen-extract.
7306         (<multi-ifield>): Ditto.
7307         (<hw-index>): Forward gen-insert,gen-extract onto value.
7308         (<hw-asm>): Delete insert/extract support.
7309         (<hw-register,hw-memory,hw-immediate>): Ditto.
7310         (gen-hash-defines): Use string-list.
7311         Define CGEN_MAX_IFMT_OPERANDS.
7312         (gen-switch): Use string-list,string-list-map.
7313         (gen-fget-switch,gen-fset-switch): Use string-list.
7314         (gen-parse-switch,gen-insert-switch): Ditto.
7315         (gen-extract-switch,gen-print-switch): Ditto.
7316         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7317         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7318         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7319         (gen-ivalue-entry): New proc.
7320         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7321         computation.  Use 0 for operand ref table if ALIAS insn.
7322         (gen-minsn-table-entry): Use string-list.
7323         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7324         (gen-opcode-open): Record address of ifield table.
7325         (cgen-opc.h): Call gen-ifld-decls.
7326         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7327         * types.scm (<bitrange>): New members word-offset,word-length.
7328         Delete member total-length.  Delete methods start,mask,value.
7329         (bitrange:word-offset,bitrange:word-length): New procs.
7330         * sim-cpu.scm (gen-define-fields): Simplify.
7331         (gen-extract-fields): Simplify.
7332         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7333         (<ifield>): New methods gen-ifld-extract-decl.
7334         Delete method gen-ifld-extract-beyond.
7335         (<multi-ifield>): New methods gen-ifld-extract-decl.
7336         (<multi-ifield>, method gen-ifld-extract): Implement.
7337         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7338         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7339
7340         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7341         (-rtx-traverse-syntax-no-mode): New proc.
7342         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7343         (s-ifield): New proc.
7344         (s-shop): Don't prepend `unsigned' for unsigned modes.
7345         * rtx-funcs.scm (ifield): New rtx function.
7346         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7347         (delay): New rtx function.
7348         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7349
7350         * cos.scm (-elm-make-method-getter): Fix typo.
7351
7352         * utils.scm (backslash): Handle lists of strings.
7353
7354 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7355
7356         * fr30.cpu (f-rel9): Correct for pc+2.
7357         (label9): Use print_label9.
7358         * fr30.opc (print_label9): New function.
7359
7360 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7361
7362         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7363         * fr30.opc (parse_low_register_list): Renamed.
7364         (parse_hi_register_list): Renamed.
7365         (print_hi_register_list): Renamed.
7366         (print_low_register_list): Renamed.
7367
7368 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7369
7370         * fr30.cpu (f-rel9): Now a pc relative offset.
7371
7372 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7373
7374         * opcodes.scm (op-asm): Move to here, from operands.scm.
7375         (<op-asm>, method parse!): Validate arguments.
7376         (<operand>, method gen-function-name): Fix thinko.
7377         * operand.scm (<operand>, method make!): Don't set op-asm here.
7378         * utils.scm (list-elements-ok?): New proc.
7379
7380         * opcodes.scm: Clean up pass.
7381
7382 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7383
7384         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7385         the fr30_int function.
7386         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7387         (h-dr): Add FUN-ACCESS attribute.
7388
7389 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7390
7391         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7392         for C symbol for models array.
7393
7394 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7395
7396         * fr30.opc (parse_reglist_low): New function.
7397         (parse_reglist_hi): New function.
7398         (print_reglist_low): New function.
7399         (print_reglist_hi): New function.
7400         * fr30.cpu: Finish remaining insn stubs.
7401
7402 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7403
7404         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7405
7406         * fr30.cpu (ldi32m): Don't use for disassembly.
7407
7408 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7409
7410         * fr30.cpu (int): Implement it.
7411
7412 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7413
7414         * rtx-funcs.scm (nop): Fix C code.
7415
7416         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7417
7418         * fr30.cpu (f-i32): New ifield.
7419         (i32): New operand.
7420         (ldi32): New insn.
7421         (ldi32m): New macro insn.
7422         (inte): Provide simple version for now.
7423
7424         * sim-arch.scm: New file.
7425         * sim.scm: Move architecture support generation to sim-arch.scm.
7426         * cgen-sim.scm: Load sim-arch.scm.
7427         * dev.scm: Ditto.
7428
7429         * hardware.scm (pc?) New proc.
7430         (class <hardware-base>): Rewrite method 'pc?.
7431         (class <hardware>): Forward 'pc? to the hardware type.
7432         (class <hw-pc>): New method 'pc?.
7433
7434         Add support for variable length ISAs.
7435         * ifield.scm (ifld-beyond-base?): New proc.
7436         * m32r.cpu: Remove integral-insn? spec.
7437         * mach.scm (arch:derived,arch:set-derived!): New procs.
7438         (arch:app-data,arch:set-app-data!): New procs.
7439         (class <arch>): New members derived, app-data.
7440         (class <cpu>): Delete member integral-insn?.
7441         (cpu:integral-insn?): Delete.
7442         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7443         (-cpu-read): Delete integral-insn? support.
7444         (state:decode-assist): Delete.
7445         (state:int-insn?): Delete.
7446         (<derived-arch-data>): New class.
7447         (-adata-set-derived!): New proc.
7448         (mach-finish!): Call it.
7449         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7450         (gen-operand-instance): Add COND_REF support.
7451         (gen-operand-instance-table): Ditto.
7452         (gen-hash-defines): Update.
7453         (gen-extract-switch): Update type of `insn_value' arg.
7454         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7455         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7456         updated.
7457         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7458         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7459         beyond the base insn (for large insns).
7460         (-gen-extract-beyond-var-list): New proc.
7461         (gen-extract-fields): Handle large insns.
7462         (-gen-write-case): Update sem_arg computation.
7463         Update initial vpc computation.
7464         (gen-semantic-fn): Ditto.  Update type of `insn'.
7465         (-gen-sem-case): Update sem_arg computation.
7466         Update initial vpc computation.
7467         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7468         (-gen-extract-word): New proc.
7469         (<ifield>): New method gen-ifld-extract-beyond.
7470         (gen-ifld-extract-beyond): New proc.
7471         * types.scm (bitrange-overlap?): New proc.
7472
7473         * utils.scm (bits->bytes): New proc.
7474         (bytes->bits): New proc.
7475
7476         Move extraction support into decoder.
7477         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7478         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7479         support to sim-decode.scm.
7480         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7481         be array of IDESC,FMT entries.  Make the array const.
7482         (-gen-gcc-label-table): Make array const.
7483         (-gen-decode-switch): Branch to extraction code after insn has been
7484         identified.
7485         (-gen-decode-insn-globals): Delete extract handler from
7486         @cpu@_insn_sem.
7487         (gen-decode-fn): Add extraction support.
7488         (-gen-sem-fn-decls): Delete extraction fn decls.
7489         (-gen-idesc-decls): Update @cpu@_decode decl.
7490         (-gen-idesc-init-fn): Delete extraction support.
7491         (-gen-extract-decls): New proc.
7492
7493         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7494         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7495
7496         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7497         All callers updated.
7498         (table-entry:make): Record insn value as insn object, not name.
7499         All uses updated.
7500
7501         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7502         collision with C function.
7503         (path_dirname): Similarily.
7504         * hobbit.c,hobbit.h: Rebuild.
7505
7506 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7507
7508         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7509
7510 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7511
7512         * fr30.cpu: Implement more instruction stubs.
7513
7514 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7515
7516         * fr30.cpu: Implement more instruction stubs.
7517
7518 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7519
7520         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7521
7522         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7523
7524         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7525         (op:std-attrs): Ditto.
7526         * opcodes.scm (gen-operand-instance): Ditto.
7527         (gen-switch): Ditto.
7528         * m32r.cpu (condbit,accum): Update.
7529         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7530
7531 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7532
7533         * enum.scm (-enum-read): Fix typo.
7534
7535         * iformat.scm (-ifmt-search-key): Simplify a little.
7536
7537 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7538
7539         * doc/porting: semantics.c -> sem.c.
7540         * Makefile.in: Regenerate.
7541         * fr30.cpu (add): Change ADD to add. Add more registers and set
7542         status bits on 'add' instruction.
7543
7544 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7545
7546         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7547         of 0.
7548
7549 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7550
7551         * minsn.scm (minsn:enum): Update, call current-arch-name.
7552
7553         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7554
7555         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7556         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7557         (ARCH,CGEN,CGENFLAGS): New variables.
7558         (gas-test,sim-test): New rules.
7559         * Makefile.in: Rebuild.
7560         * configure.in (arch): Define.
7561         * configure: Rebuild.
7562
7563         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7564         * All .scm files: Ditto.
7565
7566         * dev.scm: Fix gas-test call to cpu-load.
7567         * gas-test.scm: Clean up pass to remove bit-rot.
7568         * sim-test.scm: Ditto.
7569
7570         * enum.scm (read-enum): Fix typo in `vals' handling.
7571
7572         * hardware.scm (-parse-hw-type): Fix typo.
7573         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7574         (def-hardware,define-normal-hardware): Ditto.
7575
7576         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7577         (display-var): Use it.
7578         * hobbit.c: Rebuild.
7579         * hobbit.h: Rebuild.
7580
7581         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7582         avoid hobbit problem.
7583         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7584         `parallel-insns-' to avoid hobbit problem.
7585
7586 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7587
7588         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7589         (parse_slo16,parse_ulo16): Ditto.
7590         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7591
7592 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7593
7594         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7595         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7596         * Makefile.in: Rebuild.
7597         * insn.scm (define-normal-insn): Expand pmacros.
7598         * mode.scm (<mode>): New member `host?'.  All uses updated.
7599         (mode:host?): New proc.
7600         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7601         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7602         (define-rtx-dual-mode): Ditto.
7603         (s-index-of): New proc.
7604         (s-unop): Use plain C for host mode operations.
7605         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7606         * rtx-funcs.scm (index-of): New rtx function.
7607         * sim.scm (<hw-index>): New method cxmake-get.
7608
7609 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7610
7611         * sim-cpu.scm (-gen-engine-decls): Delete.
7612
7613 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7614
7615         * doc/rtl (Example): Correct Typo.
7616         * doc/porting: Add 'make dep' step to opcodes port instructions.
7617         * fr30.opc: New file.
7618         * fr30.cpu: New file.
7619
7620 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7621
7622         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7623         * Makefile.am (GUILEINCDIR): New variable.
7624         (INCLUDES): Use it.
7625         * configure: Regenerate.
7626         * Makefile.in: Ditto.
7627         * aclocal.m4: Ditto.
7628
7629 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7630
7631         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7632         (cgen-semantics.c): Ditto.
7633         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7634         * sim-model.scm (cgen-model.c): Ditto.
7635         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7636         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7637
7638         * opcodes.scm (read-cpu.opc): Handle empty file.
7639
7640         * cos.scm (-elm-make-method-setter): Fix typo.
7641
7642         * cpu.scm (-init-parse-cpu!): Call types-init!.
7643         (-finish-parse-cpu!): Call types-finish!.
7644         * ifield.scm (<ifield>): Delete members start,length.
7645         New member bitrange.
7646         (<ifield>, methods field-start,field-length): Update.
7647         (fld:start): New arg insn-len.  All callers updated.
7648         (<ifield>, methods field-mask,field-value): Update.
7649         (-ifield-parse): Update.
7650         (ifield-init!): Update.
7651         * iformat.scm (compute-insn-length): Simplify.
7652         (compute-insn-mask): Update.
7653         * insn.scm (insn:value): Update.
7654         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7655         (current-arch-default-insn-bitsize): New proc.
7656         (current-arch-insn-lsb0?): New proc.
7657         (-arch-parse,-arch-read): Update.
7658         (<cpu>): New member file-transform.
7659         (-cpu-parse,-cpu-read): Update.
7660         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7661         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7662         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7663         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7664         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7665         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7666         * operand.scm (op:start): Update call to field-start method.
7667         * sim-decode.scm (opcode-slots): New arg lsb0?.
7668         (fill-slot!,build-slots): Ditto.
7669         (build-decode-table-entry,build-decode-table-guts): Ditto.
7670         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7671         (gen-decode-fn): Ditto.
7672         (cgen-decode.c): Update call to gen-decode-fn.
7673         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7674         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7675         (cgen-cpuall.h): Call -gen-cpuall-includes.
7676         * types.scm (<bitrange>): New class.
7677         (types-init!,types-finish!): New procs.
7678         * utils-cgen.scm (parse-number): New proc.
7679         (parse-boolean): New proc.
7680         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7681         (word-mask): Rewrite.
7682         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7683         (m32rxf): New field `file-transform'.
7684         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7685
7686         * hobbit.h: Fix include file name.
7687
7688 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7689
7690         * slib: New directory of slib files used by cgen/hobbit.
7691         * hobbit.scm: New file.
7692         * hobbit.c: New file.
7693         * hobbit.h: New file.
7694         * hobscmif.h: New file.
7695         * hob-main.c: New file.
7696         * hobslib.scm: New file.
7697         * hob.sh: New file.
7698         * Makefile.am: Add support for compiling hobbit, and using compiled
7699         version of hobbit to compile cgen.
7700         * Makefile.in: Regenerate.
7701         * configure.in: Support --with-hobbit.
7702         * configure: Regenerate.
7703         * acconfig.h (WITH_HOBBIT): Add.
7704         * config.in: Regenerate.
7705
7706         * rtl.scm: New file, was cdl-c.scm.
7707         Definition of rtx funcs moved to rtx-funcs.scm.
7708         (semantic-in-out-operands): Rewrite to compute object form of
7709         semantic code.
7710         * rtx-funcs.scm: New file.
7711
7712         * cgen-gh.c: #include "config.h".
7713         (gh_cadddr,gh_cddddr): New fns.
7714         (cgh_vector_to_list): New fn.
7715         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7716         (cgh_init): Prefix qsort procs with "cgh-".
7717         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7718         * cgen.c: #include "config.h".
7719
7720         * attr.scm (bitset-attr?): New proc.
7721         (<bitset-attribute>, method parse-value): Value syntax changed from
7722         (val1 val2 ...) to val1,val2,....
7723         (<bitset-attribute>): New method gen-value.
7724         (<integer-attribute>): New method gen-value.
7725         (<enum-attribute>): New method gen-value.
7726         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7727         (<reader>): New class.
7728         (CURRENT-ARCH,CURRENT-READER): New globals.
7729         (keep-mach?): Move here from mach.scm.
7730         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7731         (<arch>): New class.
7732         (<arch-data>): New class.
7733         (<cpu>): Make subclass of <ident>.
7734         (*ENDIAN* variables): Delete.
7735         (process-state-vars): Delete.
7736         (mach-finish!): Add `base' value to MACH attribute.
7737         * hardware.scm (<hardware>): Make subclass of <ident>.
7738         (hw:std-attrs): New global.
7739         (hw-profilable?): New proc.
7740         * ifield.scm (<ifield>): Make subclass of <ident>.
7741         (sort-ifield-list): Move here from iformat.scm.
7742         * iformat.scm (<iformat>): Renamed from <insn-format>.
7743         Make subclass of <ident>.
7744         (-ifmt-search-key): Include cti? in categorization of formats.
7745         (ifmt-analyze): Compile semantics (turn to object form).
7746         * insn.scm (<insn>): Make subclass of <ident>.
7747         New member compiled-semantics.
7748         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7749         * mode.scm (<mode>): Make subclass of <ident>.
7750         (UBI): Delete.
7751         * model.scm (<unit>): Make subclass of <ident>.
7752         New members inputs,outputs.
7753         (<model>): Make subclass of <ident>.  New member state.
7754         (-unit-parse): Parse inputs,outputs.
7755         (<iunit>): New class.
7756         (-insn-timing-parse-model): New proc.
7757         (parse-insn-timing): Function unit spec rewritten.
7758         * operand.scm (<operand>): Make subclass of <ident>.
7759         New members sem-name,num,cond?  New method gen-pretty-name.
7760         (hw-index-scalar): New global.
7761         (op-nub-hw): Move here from rtl.scm.
7762         (op:lookup-sem-name,op-profilable?): New procs.
7763         * pmacros.scm: Rewrite to pass through hobbit.
7764         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7765         * utils.scm (logit): Make a macro.
7766         (bit-set?): Rewrite.
7767         (high-part): Rewrite.
7768
7769         * m32r.cpu (define-arch): Move to top of file.
7770         (cpu family m32rbf): Renamed from m32rb.
7771         (model m32r/d): Function unit spec rewritten.
7772         (all insns): Ditto.  Replace UBI with BI.
7773
7774         * opcodes.scm (gen-attr-table-decls): Declare
7775         @arch@_cgen_hw_attr_table.
7776         (gen-attr-table-defns): Generate hw attribute table.
7777
7778         * sim-cpu.scm (-gen-engine-decls): New proc.
7779         (-gen-model-decls): New proc.
7780         (gen-parallel-exec-type): Add new member `written' to struct parexec.
7781         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7782         (-gen-record-profile-args): Simplify.
7783         (-gen-parallel-sem-case): Delete.
7784         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7785         New local `written'.  Delete profiling code.
7786         (-gen-sem-case): Ditto.
7787         (-uncond-written-mask,-any-cond-written?): New procs.
7788         (cgen-sem-switch.c): Include duplicates of insns that can be executed
7789         parallelly or serially, and write-back handlers for all parallel insns.
7790         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7791         support to initialization of struct insn_sem.
7792         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7793         (-gen-insn-sem-type): Add parallel write-back support to struct
7794         insn_sem.
7795         (-gen-idesc-init-fn): Add support for virtual insns.
7796         Add parallel write-back support.
7797         * sim-model.scm (gen-model-profile-fn): Delete
7798         (-gen-model-fn-decls): New proc.
7799         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7800         (-gen-model-init-fn): New proc.
7801         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7802         members in @mach@_init_cpu.
7803         (cgen-model.c): Generate model handlers for each insn.
7804         * sim.scm (gen-define-field-macro): Cti insns handled differently.
7805         (<hw-pc>): New method gen-write.
7806         (<hw-register>, method gen-write): New arg `mode'.
7807         (<hw-register>): Delete method gen-record-profile!.
7808         New method gen-profile-index-type.
7809         (<hw-memory>, method gen-write): New arg `mode'.
7810         (<hw-address>, method gen-extract): Delete.
7811         (<hw-address>, method gen-write): New arg `mode'.
7812         (<hw-index>, method get-write-index): Rewrite.
7813         (<pc>, method cxmake-get-direct): Delete.
7814         (<pc>): New method cxmake-get.  Comment out methods
7815         gen-set-quiet,gen-set-trace.
7816         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7817         gen-profile-index-type,gen-profile-code.
7818         Delete method gen-pretty-name.  Rewrite method gen-write.
7819         Delete method cxmake-get-direct.
7820         (-op-gen-set-trace): Update `written'.
7821         (-op-gen-set-trace-parallel): Ditto.
7822         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7823         (gen-cpu-insn-enum-decl): Add extra entries for parallel
7824         insns and their write-back handlers.
7825         (insn-op-lookup): New proc.
7826         (<unit>): New method gen-profile-code.
7827         (<iunit>): New method gen-profile-code.
7828         (gen-argbuf-elm): Add profiling elements.
7829         (gen-argbuf-type): Define cti insns separately in their own struct.
7830         Add member `addr_cache' to this struct.  Add entries for pbb virtual
7831         insns.  Move semantic entries here from struct scache.
7832         Delete everything from struct scache except argbuf.
7833         (<insn>, method gen-profile-locals): Rewrite.
7834         (<insn>, method gen-profile-code): Rewrite.
7835         (sim-finish!): Create virtual pbb insns.
7836
7837 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7838
7839         * m32r.cpu (h-cr): Add bbpc,bbpsw.
7840         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7841         (h-psw,h-bpsw,h-bbpsw): Define.
7842         (rte,trap): Handle bbpc,bbpsw.
7843         * opcodes.scm (max-operand-instances): Fix typo.
7844         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7845         hardware elements to be fun-access.
7846         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7847
7848 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7849
7850         * m32r.cpu (trap): Pass `pc' to m32r_trap.
7851
7852 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
7853
7854         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7855
7856 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
7857
7858         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7859         architecture name.
7860         (mach m32r): Update.
7861
7862         * mach.scm (mach:supports?): New proc.
7863         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7864         gen-reg-access-{decls,defns}.
7865         * sim.scm (gen-reg-access-{decl,defn}): New procs.
7866         (gen-mach-bfd-name): New proc.
7867         (gen-arch-reg-access-{decls,defns}): New procs.
7868         (cgen-arch.[ch]): Output register access cover fns.
7869
7870         * hardware.scm (hardware-builtin!): Set print handlers for
7871         h-addr,h-iaddr.
7872         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7873         `od'.
7874         (CGEN_PRINT_NORMAL,print_hash): Ditto.
7875         (my_print_insn): Ditto.  Delete args buf, buflen.
7876         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7877         (-hw-asm-specs): Add `handlers' spec.
7878         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
7879         `normal-hw-asm'.
7880         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
7881         print.
7882         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7883         (<hw-asm>, parse!): New method.
7884         (gen-insn-table-entry): Print semantics.
7885         (gen-opcode-open): Renamed from gen-opcode-table.
7886
7887         * utils.scm (string-write): No longer a macro.
7888         (-string-write): Handle procedure args.
7889         * opcodes.scm: Update all calls to string-write.
7890         * sim-cpu.scm: Ditto.
7891         * sim-decode.scm: Ditto.
7892         * sim-model.scm: Ditto.
7893         * sim.scm: Ditto.
7894
7895 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
7896
7897         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7898         (-gen-insn-builders,-gen-insn-builder): New procs.
7899
7900 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
7901
7902         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7903         (gen-opcode-table): Properly terminate comment.
7904
7905 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
7906
7907         * Version 0.6.0.
7908         Clean up pass over everything, so starting fresh.