OSDN Git Service

* operand.scm (/anyof-merge-setter): Handle set-quiet.
[pf3gnuchains/pf3gnuchains3x.git] / cgen / ChangeLog
1 2009-09-25  Doug Evans  <dje@sebabeach.org>
2
3         * operand.scm (/anyof-merge-setter): Handle set-quiet.
4
5         * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
6         rtl-cover-fns?, macro?.  All callers updated.
7         (estate-make-for-normal-rtl-c): Delete, have all callers call
8         estate-make-for-rtl-c directly.
9         (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
10         (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
11
12         * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
13         replaces /par-replace-set-dests.
14         (/par-replace-set-src-expr-fn): New function, replaces
15         /par-replace-set-srcs.
16         (s-parallel): Rewrite.
17
18         * rtl.scm (rtx-pretty-strdump): New function.
19         * rtl-traverse.scm (/rtx-canon-error): Use it.
20         (<eval-state>): New member outer-expr.
21         (estate-error): Include outer expression in error message if present.
22
23         * rtl.scm (rtx-single-set?): Handle set-quiet.
24
25 2009-09-23  Doug Evans  <dje@sebabeach.org>
26
27         * xc16x.cpu (h-cr): New hardware.
28         (muls): Comment out parts that won't compile, add fixme.
29         (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
30         (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
31         (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
32
33         Rewrite rtl processing to require it to be "canonicalized" first,
34         and write a full canonicalizer / expression checker.
35         Remove all appearances of DFLT in canonical rtl.
36         * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
37         then rtx-simplify.
38         * iformat.scm (ifmt-analyze) Use canonical semantics.
39         * insn (<insn>): New member canonical-semantics.
40         * mach.scm (<arch>): New member multi-insns-instantiated?.
41         (/instantiate-multi-insns!): New function.
42         (/canonicalize-insns!): New function.
43         (arch-analyze-insns!): Canonicalize insn semantics before processing
44         them.
45         * mode.scm (/mode-set-word-params!): New function.
46         (mode-void?): New function.
47         (mode-compatible?): VOID is compatible with VOID.
48         (/mode-word-sizes-defined?): New global.
49         (mode-set-word-modes!): Use/set it.
50         (mode-ensure-word-sizes-defined): Update.
51         (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
52         Redo WI/UWI/AI/IAI handling.
53         (op:new-mode): No longer accept DFLT.
54         (<derived-operand> constructor): Ensure all fields are initialized.
55         (<anyof-operand> constructor): Ditto.
56         (/derived-parse-ifield-assertion): Delete arg `args'.
57         All callers updated.
58         * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
59         (rtl-c): Call rtx-canonicalize instead of rtx-compile.
60         (rtl-c-expr, rtl-c++): Ditto.
61         (/rtl-c-get): Use mode of operand, not containing expression.
62         (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
63         (/rtx-use-sem-fn?): Don't check for (insn? owner), check
64         estate-for-insn? instead.
65         (s-unop): Use mode of expression, not first operand.
66         (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
67         (s-sequence): Remove DFLT support.
68         (ifield): Use mode of expression, not UINT.
69         (pc): Comment out, unused.
70         (int-attr): New rtx kind.
71         (attr): Deprecate.
72         (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
73         * rtl-traverse.scm (/rtx-canon-debug?): New global.
74         (/make-cstate): New function.
75         (/cstate-context, /cstate-outer-expr): New functions.
76         (/rtx-canon-error): New function.
77         (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
78         /rtx-get-last-cond-case-rtx): New functions.
79         (/rtx-canon-*): New functions.
80         (/rtx-canner-table, /rtx-operand-canoners): New globals.
81         (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
82         (/rtx-option, /rtx-option-list?): Rewrite.
83         (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
84         Rewritten, all callers updated.
85         (/rtx-canon-expr, /rtx-canon): New functions.
86         (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
87         (rtx-canonicalize-stmt): New function.
88         (tstate-make): Remove arg `set?'.  All callers updated.
89         (tstate-new-set?): Delete.
90         (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
91         moved to /rtx-canon-*.
92         (/rtx-traverse-normal-operand): New function.
93         (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
94         (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
95         /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
96         /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
97         Ditto.
98         (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
99         /rtx-traverse-symornum, /rtx-traverse-object): Delete.
100         (/rtx-make-traverser-table): Update.
101         (/rtx-traverse-operands): Remove mode processing, now done during
102         canonicalization.
103         (/rtx-traverse-expr): Delete arg `mode', all callers updated.
104         (/rtx-traverse): Ditto.
105         (rtx-init-traverser-tables!): New function.
106         * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
107         (rtx-verify-no-dflt-modes): New function.
108         (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
109         (rtx-simplify-insn): Use insn-canonical-semantics.
110         (rtx-canonicalize): Moved to rtl-traverse.scm.
111         (/compile-expr-fn, rtx-compile): Delete.
112         (/rtx-trim-rtx-list): New function.
113         (/rtx-trim-for-doc): Handle set, if.
114         * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
115         (/rtx-valid-mode-types): Update.
116         (/rtx-valid-matches): Update.
117         (/rtx-find-matchexpr-index): New function.
118         (rtx-lookup): Require rtx-kind to be the rtx name.
119         (def-rtx-node): New arg result-mode, all callers updated.
120         (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
121         (rtx-lazy-sem-mode): Delete.
122         (/rtx-closure-make): New arg `mode', all callers updated.
123         (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
124         (rtx-operand-obj): Rewrite.
125         (rtx-make-xop): New functions.
126         (/hw): Renamed from `hw', all callers updated.
127         Use the correct mode instead of DFLT for the index.
128         (rtl-builtin!): Call rtx-init-traversal-tables!.
129         (rtl-finish!): Update.
130         * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
131         Update mode arg-type.
132         (pc): Comment out.
133         (int-attr): New rtx kind.
134         (attr): Deprecate.
135         * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
136         (/frag-cost-compute!): Ditto.
137         * semantics.scm (/build-operand!): Delete args op-name, op.
138         New arg op-expr.  All callers updated.
139         (/build-mem-operand!): Remove DFLT support.
140         (semantic-compile): Update process-expr!, mode arg deleted.
141         * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
142         rtl-c++ calls.
143         (/gen-sem-case, /gen-sfrag-code): Ditto.
144         * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
145         (/op-gen-set-trace): New function.  If not doing profiling, or using
146         the pbb engine, call /op-gen-set-quiet.
147         * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
148         * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
149         (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
150         * utils.scm (find-first-index): New function.
151         * doc/rtl.texi: Delete docs for `attr'.  Add `int-attr'.
152
153         * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
154         to COMPARE.
155         * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
156
157 2009-09-21  Doug Evans  <dje@sebabeach.org>
158
159         * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
160         All callers updated.  Add FIXME.
161         (all rtx functions): Rename local estate to *estate*.  It's an
162         artificial argument added to the rtx, so make it stand out.
163
164         * openrisc.cpu (or32 isa): Fix setup-semantics.
165
166         * rtl.scm (rtx-class-*?): Delete, unused.
167         (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
168
169         * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
170         (init-reader!): Set /CGEN-RTL-VERSION to default.
171
172         * read.scm (cpu-load): Print load parameters.
173
174         * dev.scm (load-doc): Set verbose-level to 2.
175
176 2009-09-20  Doug Evans  <dje@sebabeach.org>
177
178         * rtl.scm (rtx-strdump): Use write instead of display.
179
180 2009-09-17  Doug Evans  <dje@sebabeach.org>
181
182         * utils-cgen.scm (obj-csv-names): New function.
183         * utils-sim.scm (/sfmt-contents): Use it in logging message.
184
185 2009-09-12  Doug Evans  <dje@sebabeach.org>
186
187         Clean up pass of mode handling.
188         Make use of mode name vs <mode> object more consistent and clear.
189         * hardware.scm (/keyword-read): Default mode to the mode name,
190         not the <mode> object.
191         (/hw-parse-indices): Parse mode name and pass mode object to
192         <hw-asm> constructor.
193         (/hw-parse-values): Ditto.
194         (<hw-register> parse!): Pass mode name to /hw-parse-indices
195         and /hw-parse-values.
196         (<hw-memory> parse!): Ditto.
197         (<hw-address> parse!): Ditto.
198         * mode.scm (/mode-table): New global, replaces mode-list.
199         Modes stored in hashtable instead of list.
200         (/mode-class-table): New global.
201         (mode-list-non-alias-values): Update.
202         (mode:eq?, mode-compatible?, mode:add!): Update.
203         (mode:lookup): Restrict arg to the mode's name.  All callers updated.
204         (mode-maybe-lookup): New function.
205         (mode-real-name): Restrict arg to a <mode> object.  All callers updated.
206         (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
207         (mode-find, mode-set-word-modes!): Update
208         (mode-ensure-word-sizes-defined): Update.
209         (/sort-mode-classes!): New function.
210         (mode-builtin!): Update.  Sort mode classes here.
211         (mode-finish!): Sort mode classes here too.
212         * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
213         All callers updated.
214         (rtl-c-set-quiet): Allow mode to be name of object.
215         (rtl-c-set-trace): Ditto.
216         * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
217         <mode> object.  All callers updated.
218         * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
219         (rtx-lazy-sem-mode): Ditto.
220         (<rtx-temp> make!): Assert mode arg is a <mode> object.
221         (rtx-env-make): Allow var-list modes to be name or object.
222         * sem-frags.scm (/frag-expr-assq-locals): New function.
223         (/frag-compute-locals!): Call it.
224         (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
225         All callers updated.
226         * semantics.scm (/build-mem-operand!): Handle mode aliases.
227
228         * sim-test.scm (*): Symbols no longer can be passed to string-append.
229
230 2009-09-10  Doug Evans  <dje@sebabeach.org>
231
232         * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
233         Improve error message for missing or too many bits.
234         (/insn-parse): Don't verify iformat for virtual insns.
235         
236         * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
237         non-multi-insns.
238         * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
239         (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
240         * sid.scm (pbb-engine-insns): Ditto.
241         * sim-decode.scm (cgen-decode.c): Ditto.
242
243 2009-09-09  Doug Evans  <dje@sebabeach.org>
244
245         * rtl-traverse.scm: Comment tweaks.
246         * rtl-xform.scm: Comment and reformatting tweaks.
247         * doc/rtl.texi: Add text to docs on ifield-assertions.
248
249         * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
250         saving.
251
252         Add support for controlling warnings/errors.
253         Add tests for iformat description errors.
254         * dev.scm (cload): New option #:diag.
255         * read.scm (<reader>): New member verify-iformat?.
256         (/parse-diagnostic, parse-warning): New functions.
257         (parse-error): Guts moved to /parse-diagnostic.
258         (/set-diagnostic-options!): New function.
259         (cpu-load): New arg diagnostic-options, all callers updated.
260         Recognize -w diagnostic-option-list.
261         * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
262         (ifld-simple-ifields, ifields-simple-ifields): New function.
263         * insn.scm (/parse-insn-format-iflds): New function.
264         (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
265         New arg isa, all callers updated.  Do some basic validation of the
266         ifield list if requested.
267         * mach.scm (/sanity-check-insns): Improve error message text.
268         * doc/running.texi: Document -w option.
269         * doc/porting.texi: Document #:trace, #:diag options to cload.
270
271         * ifield.scm (/multi-ifield-parse): Initialize bitrange.
272
273         * dev.scm (*): Change default verbosity level to 2.
274
275         * ifield.scm (<ifield> pretty-print): New method.
276         (ifld-pretty-print): New function.
277         (<multi-ifield> pretty-print): New method.
278
279         * ifield.scm (<ifield> field-start): Delete word-len arg.
280         All callers updated.
281         (ifld-start): Ditto.
282         (<multi-ifield> field-start): Ditto.
283         * operand.scm (<hw-index> field-start): Ditto.
284
285         * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
286         total-bitsize.  All callers updated.
287         * insn.scm (<insn>): Rename member ifld-values to /insn-value.
288         New member /insn-base-value.
289         (insn-base-value): New function.
290         * mach.scm (/sanity-check-insns): New function.
291         (arch-analyze-insns!): Call it.
292
293 2009-09-08  Doug Evans  <dje@sebabeach.org>
294
295         * iformat.scm (ifields-base-ifields): Simplify.
296         (compute-insn-length): Simplify, call ifields-base-ifields.
297         (compute-insn-base-mask): Ditto.
298         * ifield.scm (ifld-known-values): Ditto.
299         (ifld-base-ifields): Ditto.
300         * insn.scm (insn-value): Ditto.
301         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
302
303 2009-09-08  DJ Delorie  <dj@redhat.com>
304
305         * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
306         preprocessor macro, not an enum.
307
308 2009-09-08  Doug Evans  <dje@sebabeach.org>
309
310         * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
311         to string-append.
312         (*): Remove trailing ":" from error messages passed to estate-error.
313
314 2009-09-07  Doug Evans  <dje@sebabeach.org>
315
316         * types.scm (<struct>): Delete.
317
318         * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
319         updated.
320         (/pmacro-loc-error): New function.
321
322         * mach.scm (/isa-parse-decode-assist): New function.
323         (/isa-parse): Call it.
324
325         * decode.scm (/get-subopcode-value): New function.
326         (/opcode-slots): Call it.
327         (/fill-slot!): Add logging message.
328
329         * cos.scm (/object-error): Convert symbols to strings before passing
330         to string-append.
331
332         * read.scm (rtl-version-equal?): New function.
333         (rtl-version-at-least?, rtl-version-older?): New functions.
334
335         * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
336         * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
337         rtl versions >= 0.9.
338         (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
339
340 2009-09-03  Doug Evans  <dje@sebabeach.org>
341
342         * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
343         is simple.
344
345 2009-09-01  DJ Delorie  <dj@redhat.com>
346
347         * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
348         (parse_unsigned16_range): Likewise.
349         (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
350         isa.
351
352 2009-09-01  Doug Evans  <dje@sebabeach.org>
353
354         Pmacro .equals -> .equal?
355         * pmacros.scm (-pmacro-builtin-equal?): Renamed from
356         -pmacro-builtin-equals.  All callers updated.
357         (pmacros-init!): Rename .equals to .equal?.
358         * doc/pmacros.texi: Update.
359         * testsuite/pmacros-1.test: Update.
360
361         * doc/porting.texi: Work around texi2html bug where it doesn't
362         properly escape <> inside double-quotes inside @code.
363
364         * doc/porting.texi (Doing an opcodes port): Add step to specify
365         the .opc file.
366
367 2009-08-29  Doug Evans  <dje@sebabeach.org>
368
369         * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
370         rtl version 0.7.
371         * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
372
373 2009-08-27  Doug Evans  <dje@sebabeach.org>
374
375         Add do-count rtl function.
376         * rtl-c.scm (s-do-count): New function.
377         (do-count): New rtl handler.
378         * rtl-traverse.scm (-rtx-traverse-iteration): New function.
379         (-rtx-make-traverser-table): Add ITERATION.
380         * rtl.scm (rtx-make-iteration-limit-var): New function.
381         (rtx-env-make-iteration-locals): New function.
382         * rtx-funcs.scm (do-count): New rtl function.
383         * cpu/play.cpu: Add do-count-test insn.
384         * doc/rtl.texi: Add docs on do-count.
385
386 2009-08-26  Doug Evans  <dje@sebabeach.org>
387
388         * read.scm (parse-error): Change error message output format
389         to match context-owner-error.
390         * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
391         (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
392         (s-if, s-cond, -gen-non-vm-case-test): Ditto.
393         (operand): Call estate-error instead of context-error.
394         (local, delay): Ditto.
395         (ref, attr): Call estate-error instead of error.
396         * rtl-traverse.scm (tstate-error): New function.
397         (-rtx-traverse-error): Call tstate-error instead of context-error.
398         (-rtx-traverse-operands, -rtx-traverse): Ditto.
399         (estate-error): New function.
400         * rtl.scm (rtx-lvalue-mode-name): Handle locals.  Call estate-error
401         instead of error.
402         (e-if): Call estate-error instead of error.
403         * rtx-funcs.scm (error): Call estate-error instead of context-error.
404         (member): Ditto.
405         * utils-cgen.scm (context-error): New arg `intro', all callers updated.
406         Rewrite to call context-owner-error.
407         (context-owner-error): New function.
408
409         * ifield.scm (<ifield> constructor): New arg `location',
410         all callers updated.
411         * insn.scm (<insn> constructor): Ditto.
412         (<multi-insn> constructor): Ditto.
413         * minsn.scm (<macro-insn> constructor): Ditto.
414         * operand.scm (<operand> constructor): Ditto.
415         * utils-cgen.scm (builtin-location): New function.
416         (<source-ident>): Fix default value of member `location'.
417         (source-ident?): New function.
418
419         * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
420         (estate-push-env, estate-with-modifiers): Ditto.
421         (estate-deepen): New function.
422
423 2009-08-25  Dave Korn  <dave.korn.cygwin@googlemail.com>
424
425         * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
426         @CPU@_INSN__MAX.  Use @prefix@ instead of @cpu@ for engine_run
427         routines.
428
429 2009-08-25  Doug Evans  <dje@sebabeach.org>
430
431         * doc/pmacros.texi (pmacro default argument values): Add text.
432
433 2009-08-23  Doug Evans  <dje@sebabeach.org>
434
435         * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
436         Rename member prefix -> name-prefix.
437         (<keyword> getters): Update.
438         (-keyword-parse): Update.  Default enum-prefix to NAME-.
439         (-keyword-read): Update.  Don't compute default value for
440         enum-prefix here.
441         (define-keyword): Update.
442         (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
443         * read.scm (cgen-rtl-version): New function.
444         (-supported-rtl-versions): Add (0 8).
445         * desc-cpu.scm (-gen-hw-decl): Remove cruft.
446         * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
447         * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
448         * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
449         Update, print-name -> enum-prefix, make uppercase.
450         Remove unnecessary name-prefix spec.
451         * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
452         * cpu/ip2k.cpu (register-names): Ditto.
453         * cpu/m68k.cpu (dr-names, ar-names): Ditto.
454         * cpu/sparc.cpu (gr-names): Ditto.
455         * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
456         (grb-names, conditioncode-names, extconditioncode-names): Ditto.
457         (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
458         (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
459         * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
460         define-rtl-version.  Update, print-name -> enum-prefix, make uppercase,
461         prefix -> name-prefix.
462         * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
463         Update, print-name -> enum-prefix, make uppercase.
464         (drc-names, xf-names): Ditto.
465         * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
466         * doc/rtl.texi (Keywords): New section.
467         (hardware indices): Update text.
468         (rtl versions): Add 0.8.
469
470         Add define-rtl-version.
471         * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
472         (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
473         (cgen-lang-fixlevel): Delete.
474         (-supported-rtl-versions): New variable.
475         (-cmd-define-rtl-version): New function.
476         (init-reader!): New command define-rtl-version.
477         (-cgen): Add rtl version to --version output.
478         * doc/rtl.texi: Document rtl version support.
479         * cpu/play.cpu: Add define-rtl-version.
480
481 2009-08-22  Doug Evans  <dje@sebabeach.org>
482
483         * Makefile.am (OPTIONS): Define.
484         (desc): Just generate <arch>-desc.[ch] files.
485         * Makefile.in: Regenerate.
486         * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
487         no .opc file.
488         (cgen-desc.c): Similarly.
489         * gen-all-desc: New file.
490         * opcodes.scm (opc-file-provided?): New function.
491
492         * mach.scm (current-*-add!): Update calls to parse-error.
493         * operand.scm (op:new-mode): Update call to parse-error.
494         * utils-cgen.scm (make-obj-context): New function.
495
496         * NEWS: Copy over entries from 1.1 branch.
497
498 2009-08-20  Doug Evans  <dje@sebabeach.org>
499
500         * gas-test.scm (<keyword> test-data): Catch invalid requests,
501         flag a warning and compensate.
502         (<hw-address test-data): Tweak for readability.
503         (<hw-iaddress test-data): Ditto.
504         (cgen-build.sh): Convert symbols to strings before passing to
505         string-append.
506         (cgen-allinsn.exp): Ditto.
507
508         * doc/pmacros.texi (.splice): Add more text.
509
510 2009-08-19  Doug Evans  <dje@sebabeach.org>
511
512         * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
513         distinguish from 1.1.
514         * configure: Regenerate.
515         * read.scm (-CGEN-VERSION): Update.
516         * doc/version.texi: Update.
517
518         New builtin .pmacro?.
519         * pmacros.scm (-pmacro-builtin-pmacro?): New function.
520         (pmacros-init!): Add .pmacro?.
521         * doc/pmacros.text: Document .pmacro?.
522         * testsuite/pmacros-1.test: Test .pmacro?.
523
524         * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
525         of a pmacro begins before its arguments are evaluated, improves
526         readability.
527
528         * pmacros.scm (.sll, .srl, .sra): Fix thinko.
529         * testsuite/pmacros-1.test: Ditto.  Add better tests.
530
531         * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
532         in assembler syntax.
533         (Operands): Similarly.
534
535 2009-08-18  Doug Evans  <dje@sebabeach.org>
536
537         * ifield.scm (ifld-encode-mode): Add FIXME.
538         * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
539         modes.
540         (<ifield> gen-extract): Similarly.
541
542         * read.scm (parse-error): Handle #f for context-location.
543         * utils-cgen.scm (unspecified-location): Fix building of
544         single-location.
545
546         * doc/rtl.texi: Document how to write hex and boolean values.
547
548         * gas-test.scm (<hw-asm> test-data): Handle () values.
549         (<keyword> test-data): Convert symbols to strings before passing
550         to string-append.
551         (<hw-index> test-data): Enumerate all cases.  Emit correctly sized
552         result for scalars.
553
554         * operand.scm (hw-index-scalar): Set `name'.
555         (hw-index-anyof, hw-index-derived): Ditto.
556
557 2009-08-17  Doug Evans  <dje@sebabeach.org>
558
559         * pmacros.scm (-pmacro-builtin-internal-test): New function.
560         (pmacros-init!): Add .internal-test.
561         * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
562         * testsuite/testsuite.cpu (internal-verify): New pmacro.
563         * doc/pmacros.text: Document .internal-test.
564
565         * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
566         (parse-comment): Allow numbers.
567         * doc/porting.texi: Document that names and comments may be lists.
568
569         * insn.scm (-insn-parse): Fix typo.
570
571         Rename .eval -> .exec.  Add new .eval.
572         * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
573         (-pmacro-builtin-eval): New function.
574         (pmacros-init!): Add .exec.
575         * doc/pmacros.texi: Update, .exec -> .eval.  Document new .eval.
576         * testsuite/location-1.test: Update.
577         * testsuite/pmacros-1.test: Add test for .eval.
578
579 2009-08-16  Doug Evans  <dje@sebabeach.org>
580
581         * doc/porting.texi: Remove support for Guile 1.4.
582
583         * read.scm (current-reader-location): Return unspecified location
584         if reader hasn't been initialized yet.
585
586 2009-08-13  Doug Evans  <dje@sebabeach.org>
587
588         * dev.scm: Document tracing options.
589
590         * pmacros.scm (pmacro-dump): New function.
591         (check-pmacro): Tweak debugging output.
592         * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
593         * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
594
595         Add .let* pmacro builtin.
596         * pmacros.scm (-pmacro-builtin-let*): New function.
597         (pmacros-init!): Add .let*.
598         * doc/pmacros.texi: Document .let*.
599         * testsuite/pmacros-1.test: Test .let*.
600
601 2009-08-12  Doug Evans  <dje@sebabeach.org>
602
603         Clean up cpu file parsing, pass context consistently instead of the
604         old "errtxt" argument.
605         NOTE: ACU == "All Callers Updated".
606         * attr.scm (-parse-simple-attribute): Renamed from
607         parse-simple-attribute, ACU.
608         (-attr-parse): Change errtxt argument to context, ACU.
609         (-attr-read): Ditto.
610         (atlist-parse): Ditto.  Put context arg first.
611         (attr-parse): Use parse-error instead of context-error.
612         * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
613         (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
614         * hardware.scm (-keyword-parse): Renamed from keyword-parse.
615         `context' arg is now a <context> object.  ACU.
616         (-keyword-read): `context' arg is now a <context> object.  ACU.
617         (-hw-parse-indices): Change errtxt argument to context, ACU.
618         (-hw-parse-values, -hw-parse-handlers): Ditto.
619         (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
620         (-hw-validate-layout, -hw-create-getter-from-layout,
621         -hw-create-setter-from-layout): Ditto.
622         (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
623         (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
624         (<hw-address>:parse!): Ditto.
625         * ifield.scm (-ifield-parse, ifield-read): Ditto.
626         (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
627         (-ifld-parse-encode, -ifld-parse-decode): Ditto.
628         (-multi-ifield-parse, -multi-ifield-read): Ditto.
629         * insn.scm (-insn-parse, -insn-read): Ditto.
630         (parse-syntax): Ditto.  Put context arg first.
631         (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
632         (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
633         (-parse-insn-format): Ditto.
634         * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
635         (-arch-parse-isas): Ditto.
636         (-isa-read): Add context arg, ACU.
637         (-cpu-parse, -cpu-read, -mach-read): Ditto.
638         * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
639         context, ACU.
640         (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
641         (minsn-make-alias): Ditto.
642         * mode.scm (-mode-parse): Ditto.
643         (parse-mode-name): Ditto.  Put context arg first.
644         * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
645         errtxt argument to context, ACU.
646         (-unit-parse, -model-parse, -model-read): Ditto.
647         * operand.scm (-operand-parse-getter): Use parse-error instead of
648         context-error.
649         (-operand-parse-setter): Ditto.
650         (-operand-parse): Change errtxt argument to context, ACU.
651         (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
652         (-anyof-operand-parse, -anyof-operand-read): Ditto.
653         * read.scm (reader-error): Delete.  Use parse-error instead.
654         (parse-error): Change errtxt argument to context, ACU.  Split args
655         argument into expr and maybe-help-text.
656         (-reader-process-expanded-1!): Reorganize.
657         * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
658         * types.scm (parse-type): Ditto.
659         * utils-cgen.scm (single-location->simple-string): New function.
660         (<context>): Replace members file,lineno with location.
661         (make-prefix-context): Renamed from context-make-prefix, ACU.
662         (make-current-context): New function.
663         (context-append, context-append-name): New functions.
664         (context-make-reader): Delete.
665         (parse-name): Change errtxt argument to context, ACU.
666         Put context arg first.
667         (parse-comment): Ditto.
668         (parse-number): Change errtxt argument to context, ACU.
669         (arg-list-validate-name, arg-list-check-no-args,
670         arg-list-symbol-arg): Ditto.
671
672         * read.scm (-cmd-if): Don't assume test is a list.
673
674         * html.scm (get-insn-properties): Delete errtxt, unused.
675
676 2009-08-11  Doug Evans  <dje@sebabeach.org>
677
678         * doc/rtl.texi (hardware types): Add pc.
679
680 2009-08-07  Doug Evans  <dje@sebabeach.org>
681
682         Add -t option for tracing things like commands, pmacro expansion.
683         * dev.scm (cload): New arg #:trace.
684         * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
685         (pmacro-trace): New arg `loc'.  Rewrite pmacro tracing.
686         (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
687         * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
688         (-reader-process-expanded-1!): Trace commands if requested.
689         (-reader-process!): Call pmacro-trace of pmacro tracing requested.
690         (-set-trace-options!): New function.
691         (-init-reader!): New function.
692         (cpu-load): New arg trace-options, all callers updated.
693         Call -init-reader! and -set-trace-options!.
694         (cgen-usage): Improve output formatting.
695         (common-arguments): New option -t.
696         (-cgen): Process -t.
697         * utils-cgen.scm (single-location->string): Renamed from
698         pretty-print-single-location.  All callers updated.
699         (location->string): Renamed from pretty-print-location.
700         All callers updated.
701         (source-properties-location->string): New function.
702         * doc/running.texi: Document -t.
703
704 2009-08-06  Doug Evans  <dje@sebabeach.org>
705
706         * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
707         debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
708         * utils.scm: ... here.
709
710 2009-08-05  Doug Evans  <dje@sebabeach.org>
711
712         Track source location better, for better error messages.
713         * pmacros.scm (-pmacro-eval): Delete, unused.
714         (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
715         (-pmacro-expand-expr-list, -smacro-apply): Ditto.
716         (scan-list, scan): Ditto.
717         (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
718         -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
719         -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
720         (scan-list1): New function.
721         (-pmacro-build-lambda): New arg `loc', all callers updated.  Rewrite.
722         * read.scm (<reader>): New member `location'.
723         (-reader-lookup-command): Renamed from reader-lookup-command,
724         all callers updated.
725         (reader-error): Rewrite to produce better source location info.
726         (current-reader-location): New function.
727         (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
728         All callers updated.  Record source location of expression.
729         (reader-process-expanded!): Renamed from reader-process-expanded.
730         All callers updated.
731         (-reader-process!): Renamed from reader-process.  New arg `loc'.
732         All callers updated.  Record source location of define-pmacro.
733         * utils-cgen.scm (<location>): New class.
734         (single-location): New (pseudo) class.
735         (pretty-print-single-location, pretty-print-location): New functions.
736         (location-top, location-push-single, location-push): New functions.
737         (unspecified-location, current-input-location): New functions.
738         (location-property): New object property.
739         (location-property-set!): New function.
740         (<source-ident>): Renamed from <ordered-ident>.  New member `location'.
741         All uses updated.
742         * testsuite/location-1.test: New testcase.
743         * testsuite/run-tests.sh: Fix fail count handling.
744         * testsuite/test-utils.sh.in (run_cgen): New option `-f'.  Allow tests
745         to expect cgen to fail.
746
747         * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
748
749         * read.scm (-cmd-include): Renamed from include.  All callers updated.
750         (-cmd-if): Renamed from cmd-if.  All callers updated.
751         Use reader-process-expanded! on then/else clauses instead of eval1.
752
753 2009-07-22  Doug Evans  <dje@sebabeach.org>
754
755         * modes.scm (TI,OI): New modes.
756         * types.scm (parse-type): Improve error checking.  Don't hardwire
757         mode names here.
758         * utils.scm (non-negative-integer?): New function.
759
760         * pmacros.scm (-pmacro-builtin-find): New predicate.
761         (pmacros-init!): Add .find.
762         * doc/pmacros.tex: Document .find.
763         * testsuite/pmacros-1.test: Test .find.
764
765 2009-07-20  Doug Evans  <dje@sebabeach.org>
766
767         * insn.scm (multi-insn-instantiate!): Use logging messages instead of
768         commented out printfs.
769         * rtl.scm (rtl-finish!): Whitespace tweaks.
770         * model.scm (parse-insn-timing): Tweak logging message.
771         * operand.scm: Comment and whitespace tweaks.
772         (op:type): Tweak error message.
773         (op-ifield): Tweak logging message.
774         (-derived-operand-parse, anyof-merge-semantics): Ditto.
775         * read.scm: Whitespace cleanup.
776         * utils.scm: Whitespace cleanup.
777
778 2009-07-19  Doug Evans  <dje@sebabeach.org>
779
780         Fix binding of nested pmacro parameters.
781         * pmacros.scm (-pmacro-env-make): New arg prev-env.
782         All callers updated.
783         (-pmacro-bulid-lambda): Ditto.
784         * doc/pmacros.texi: Update.
785         * testsuite/pmacros-1.test: Add testcase.
786
787         * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
788         calculation.
789         (-multi-ifield-make-default-extract): Ditto.
790
791         * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
792         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
793         * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
794         Define.
795         (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
796         * doc/rtl.texi: Update.
797
798         * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
799
800         Rename builtin boolean pmacros, for consistency with rtl.
801         * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
802         .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
803         * doc/pmacros.texi: Update.
804         * testsuite/pmacros-1.test: Update.
805
806 2009-07-17  Doug Evans  <dje@sebabeach.org>
807
808         Use hash tables to record ifields, operands, insns, macro-insns.
809         * attr.scm (attr-builtin!): Tweak some comments.
810         * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
811         * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
812         <ident>.
813         (<multi-ifield>): New constructor.
814         (ifield-builtin!): Add isa attr to f-nil, f-anyof.
815         * insn.scm (<insn>): Subclass from <ordered-ident> instead of
816         <ident>.
817         (-sub-insn-make!): Add hack to avoid differences in generated code.
818         (multi-insn-instantiate!): Add total number of multi-insns to
819         logging message.
820         * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
821         minsn-list to foo-table.  New member next-ordinal.
822         Update getters/setters.
823         (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
824         New functions.
825         (-get-next-ordinal!, -get-lowest-ordinal): New function.
826         (-make-ident-object-table, -ident-object-table->list,
827         -ident-object-table-add!, -ident-object-table-lookup): New functions.
828         (current-ifld-list, current-ifld-add! current-ifld-lookup,
829         -ifld-already-defined?): Rewrite.
830         (current-op-list, current-op-add! current-op-lookup,
831         -op-already-defined?): Rewrite.
832         (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
833         (current-insn-list, current-insn-add! current-insn-lookup,
834         -insn-already-defined?): Rewrite.
835         (current-minsn-list, current-minsn-add! current-minsn-lookup,
836         -minsn-already-defined?): Rewrite.
837         (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
838         (MAX-VIRTUAL-INSNS): Define.
839         (arch-analyze-insns!): Add hack to avoid differences in generated code.
840         Update use of arch-insn-list.
841         (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
842         (arch-finish!): Delete references to ifld-list, op-list, insn-list,
843         minsn-list.
844         * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
845         <ident>.  New constructor.
846         * operand.scm (<operand>): Subclass from <ordered-ident> instead of
847         <ident>.
848         * sid.scm (-virtual-insn-add!): New function.
849         (-create-virtual-insns!): Call it.
850         (-fill-sim-insn-list!): Rewrite.
851         * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
852         (sim-finish!): Move contents to -create-virtual-insns!, and call it.
853         * utils-cgen.scm (<ordered-ident>): New class.
854         (obj-ordinal, obj-set-ordinal!): New functions.
855         (add-ident-methods!): Delete.
856
857         * model.scm (parse-insn-timing): Change logging message to level 3.
858
859 2009-07-16  Doug Evans  <dje@sebabeach.org>
860
861         * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
862         add a link to define-normal-insn-enum.
863
864         * doc/porting.texi (Conventions): Add docs on writing integers.
865
866         * cpu/simplify.inc (*): One line doc strings don't need \n.
867         (df): Invoke define-full-ifield instead of claiming it's an alias.
868         (dno): Define.
869         (dnop): Mark as deprecated.
870
871         * cpu/play.cpu: Add example of hardware `layout'.
872         * doc/porting.tex: Add docs on simplify.inc.
873         * doc/rtl.texi: Cleanup pass over "Simplification macros",
874         and other things.
875
876         * ifield.scm: Whitespace/formatting cleanup.
877
878         * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
879
880         * read.scm (parse-error): Don't print single entry args as a list.
881         (-reader-process-expanded-1): Convert symbol to string for
882         string-append.
883
884         * insn.scm (multi-insn-instantiate!): Tweak logging message.
885
886 2009-07-15  Doug Evans  <dje@sebabeach.org>
887
888         * cpu/simplify.inc (dno): New pmacro.
889         * doc/porting.texi: Add section on simplify.inc.
890         * doc/rtl.texi (Instruction operands): Mention dno, dnop.
891
892 2009-07-15  Doug Evans  <devans@sourceware.org>
893
894         * gen-all-doc: Generate index.html.
895
896 2009-07-13  Doug Evans  <dje@sebabeach.org>
897
898         Extend pmacro language, add testsuite.
899         * Makefile.am (SUBDIRS): Add testsuite.
900         * Makefile.in: Regenerate.
901         * configure.in (AC_OUTPUT): Create testsuite/Makefile,
902         testsuite/test-utils.sh.
903         * configure: Regenerate.
904         * dev.scm (cload): Handle testsuite app.
905         (load-testsuite): New function.
906         * pmacros.scm: (-pmacro-debug?): New global.
907         (-smacro-table): New global.
908         (-smacro-lookup, -smacro-set!): New functions.
909         (-pmacro-make): New argument `syntactic-form?', all callers updated.
910         (-pmacro-syntactic-form?): New function.
911         (-pmacro-expected-number, -pmacro-verify-number): New functions.
912         (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
913         (-pmacro-expected-non-negative-integer): New function.
914         (-pmacro-verify-non-negative-integer): New function.
915         (-pmacro-expand-expr-list): New function.
916         (-pmacro-process-args-1): Renamed from -pmacro-process-args.
917         (-pmacro-process-args): Renamed from -pmacro-invoke.
918         (-pmacro-apply, -smacro-apply): New functions.
919         (-pmacro-expand): Rewrite syntactic form processing.
920         (-pmacro-build-lambda): Reformat.
921         (define-pmacro): Watch for more errors in definition.
922         (pmacro-debug): New function.
923         (pmacro-trace): Set/reset -pmacro-debug?.
924         (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
925         (-pmacro-builtin-substring): Fix.  Add support for `end' marker.
926         (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
927         .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
928         .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
929         .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
930         .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
931         (pmacros-init!): Initialize -smacro-table.
932         Rewrite pmacro initialization.
933         * read.scm (reader-process-expanded): Renamed from
934         -reader-process-expanded.  All callers updated.
935         Recognize () as a no-op.
936         (cpu-load): Tweak logging messages.
937         * utils.scm (message): Add comment.
938         * cpu/play.cpu: Add some instructions to play with .let.
939         * doc/cgenint.texi: Move some debugging related docs to here from
940         cgen.texi.
941         * doc/pmacros.texi: Reorganize.  Add docs for new builtin pmacros.
942         * testsuite/Makefile.am: New file.
943         * testsuite/Makefile.in: New file.
944         * testsuite/test-utils.sh.in: New file.
945         * testsuite/run-tests.sh: New file.
946         * testsuite/testsuite.cpu: New file.
947         * testsuite/pmacros-1.test: New file.
948
949         * decode.scm: Comment and formatting tweaks.
950         (-build-decode-table-guts): Add more data to logging message.
951
952 2009-07-12  Doug Evans  <dje@sebabeach.org>
953
954         Delete files that now live in ../cpu.
955         * cpu/iq10.cpu: Delete.
956         * cpu/iq2000.cpu: Delete.
957         * cpu/iq2000.opc: Delete.
958         * cpu/iq2000m.cpu: Delete.
959         * cpu/m32r.cpu: Delete.
960         * cpu/m32r.opc: Delete.
961
962 2009-07-09  Doug Evans  <dje@sebabeach.org>
963
964         * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
965         All callers updated.  Work around -ve shifts by referencing the
966         entire value.
967
968         * utils.scm (message): Handle pairs.
969
970 2009-07-08  DJ Delorie  <dj@redhat.com>
971
972         * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
973         cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
974         cpmovtocc_P0S_P1): Mark volatile.  Note which registers are
975         written to.
976
977 2009-07-07  Doug Evans  <dje@sebabeach.org>
978
979         * cpu/play.cpu (add): Use (ifield enum) for one format element.
980         * cpu/play.opc: New file.
981
982         Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
983         * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
984         * doc/rtl.texi (Instructions): Update.
985
986         * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
987         (opc-arguments, -OPC): Call set-opc-file-path!.
988         * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
989         (set-opc-file-path!): New function.
990         * dev.scm: Mention set-opc-file-path!.  Mention doc options.
991
992         * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
993         before passing to gen-c-args.
994
995 2009-07-06  DJ Delorie  <dj@redhat.com>
996
997         * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
998         * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
999         unspecified accesses to control registers.
1000
1001 2009-07-01  DJ Delorie  <dj@redhat.com>
1002
1003         * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1004         unspecified accesses to control registers.
1005
1006         * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1007         (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1008
1009 2009-06-27  Doug Evans  <dje@sebabeach.org>
1010
1011         * gen-all-intrinsics: New file.
1012
1013 2009-06-24  Doug Evans  <dje@sebabeach.org>
1014
1015         * All *.scm files: Update copyright year.
1016         * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1017
1018 2009-06-23  DJ Delorie  <dj@redhat.com>
1019
1020         * intrinsics.scm: Updates to support IVC2.
1021         (belongs-to-group?): Check IVC2 slots.
1022         (-slots-attribute): New.
1023         (targets::attributes): Add SLOTS.
1024         (target:add-well-known-intrinsics): Add CPMOV.
1025         (md-insn): Add CPTYPE and CRET?.
1026         (add-md-insn): Likewise.
1027         (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1028         duplicate insns with different bit patterns.
1029         (write-cgen-insn?): Add cret? support.
1030         (intrinsics.h): Add vector types.
1031         (runtime-op): Add vector support.
1032         (intrinsic-protos.h): Let GCC define its types.  Add cret? support.
1033
1034         * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1035         * cpu/mep-ivc2.cpu: Update all insns to include type information.
1036         (h-cr-ivc2): Default to typeless.
1037         (h-ccr-ivc2): Fix register width.
1038         (SLOTS): Fix values and default.
1039         (ivc2_*): Add control register names.
1040         (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1041
1042         * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1043         version of BSR when assembling VLIW bundles.  Use it in mep-asm.c
1044
1045 2009-06-22  Doug Evans  <dje@sebabeach.org>
1046
1047         * semantics.scm (insn-build-known-values): Fix typo in comment.
1048
1049 2009-06-21  Doug Evans  <dje@sebabeach.org>
1050
1051         * rtl-xform.scm (rtx-simplify-insn): New function.
1052         * html.scm (gen-insn-docs): Call it.
1053         * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1054         * iformat.scm (ifmt-analyze): Minor simplification.
1055
1056         * semantics.scm (semantic-compile): Change arg sem-code-list to
1057         sem-code.
1058         (semantic-attrs): Ditto.
1059         * iformat.scm (ifmt-analyze): Update.
1060         (ifmt-compute!): Update.
1061         * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1062         rtl-xform.scm.
1063         (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1064         * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1065         * semantics.scm (rtx-simplify): Ditto.
1066         (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1067         (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1068         (-simplify-expr-fn): Move to rtl-xform.scm.
1069         (-solve-expr-fn, rtx-solve): Ditto.
1070         * rtl-xform.c: New file.
1071         * read.scm: Load it.
1072
1073         * rtl-c.scm (delay): Add FIXME, tweak formatting.
1074         * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1075         (-rtx-traverse, rtx-traverse): Ditto.
1076
1077 2009-06-20  Doug Evans  <dje@sebabeach.org>
1078
1079         * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1080
1081         * configure.in: Update version to 1.1.
1082         * configure: Regenerate.
1083         * read.scm (-CGEN-VERSION): Update to 1.1.0.
1084
1085 2009-06-20  Masaki Muranaka  <monaka@monami-software.com>
1086             Doug Evans  <dje@sebabeach.org>
1087
1088         * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1089         (cgen-desc.c): Ditto.
1090         * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1091         (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1092         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1093         * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1094         * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1095         (cgen-cpuall.h, cgen-ops.c): Ditto.
1096         * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1097         (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1098         (cgen-sem-switch.c): Ditto.
1099         * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1100         * sim-model.c (cgen-model.c): Ditto.
1101
1102 2009-06-18  Doug Evans  <dje@sebabeach.org>
1103
1104         * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1105
1106         * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1107
1108         * dev.scm (cload): Change #:arch argument to take the path to the
1109         .cpu file instead of just the name of the architecture.
1110         * read.scm (arch-path): Remove trailing '/'.
1111         (cpu-load): Set `arch-path' to directory of .cpu file.
1112         (-cgen): Don't set `arch-path' here.
1113         (include): Update.
1114         * doc/porting.texi: Update.
1115
1116 2009-06-14  Doug Evans  <dje@sebabeach.org>
1117
1118         * gen-all-doc: Use files in ../cpu where possible.
1119
1120         * Makefile.am (ARCHFILE): Fix path.
1121         * Makefile.in: Regenerate.
1122         * html.scm: Use "pre" instead of "plaintext".
1123
1124         * doc/cgenint.texi: Renamed from internals.texi.  Several cleanups.
1125         * doc/app.texi: Cleanup pass.
1126         * doc/cgen.texi: Cleanup pass.
1127         * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1128         * doc/intro.texi: Cleanup pass.
1129         * doc/mdate-sh: New file.
1130         * doc/opcodes.texi: Cleanup pass.
1131         * doc/pmacros.texi: Cleanup pass.
1132         * doc/porting.texi: Cleanup pass.
1133         * doc/rtl.texi: Cleanup pass.
1134         * doc/running.texi: Cleanup pass.  Document more runtime options.
1135         * doc/stamp-vti: Update.
1136         * doc/version.texi: Update.
1137
1138         * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1139         (GUILE): Fix definition.
1140         * Makefile.in: Regenerate with automake 1.9.6.
1141         * aclocal.m4: Regenerate with aclocal 1.9.6.
1142         * configure.in (AC_PREREQ): Set to 2.59.
1143         (GENINSRC_NEVER): Define.
1144         * configure: Regenerate with autoconf 2.59.
1145         * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1146         (cgen.info,cgen.dvi): Delete.
1147         (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1148         (noinst_TEXINFOS): Add cgenint.texi.
1149         (DOCFILES): Add missing files.
1150         (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1151         * doc/Makefile.in: Regenerate with automake 1.9.6.
1152
1153         * guile.scm: Add "." to %load-path if >= guile version 1.8.
1154
1155         * attr.scm: Removing trailing whitespace.
1156         * cgen-intrinsics.scm: Ditto.
1157         * cgen-sim.scm: Ditto.
1158         * cos.scm: Ditto.
1159         * enum.scm: Ditto.
1160         * guile.scm: Ditto.
1161         * sim.scm: Ditto.
1162
1163 2009-05-28  DJ Delorie  <dj@redhat.com>
1164
1165         * cpu/mep.opc (parse_signed16_range): New.
1166         (parse_unsigned16_range): New.
1167         * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1168
1169 2009-05-26  DJ Delorie  <dj@redhat.com>
1170
1171         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1172         accumulator names.
1173         (f-ivc2-ccrn-c3hi): New.
1174         (f-ivc2-ccrn-c3lo): New.
1175         (f-ivc2-ccrn-c3): New.
1176         (ivc2c3ccrn): Use it.
1177
1178 2009-05-22  DJ Delorie  <dj@redhat.com>
1179
1180         * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1181         (mep_config_map): Regenerate.
1182
1183         * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1184         ivc2-specific names.
1185         (simm8p20): New.
1186         (cmovc): move to after field definitions, use ivc2-specific
1187         register names.
1188         (cpmovi_b_P0S_P1): New.
1189         
1190 2009-05-19  DJ Delorie  <dj@redhat.com>
1191
1192         * cpu/mep.opc: Regenerate configuration.
1193         (parse_cdisp10): Only check CPU flags, not COP flags.
1194         (check_configured_mach): Likewise.
1195
1196 2009-05-13  DJ Delorie  <dj@redhat.com>
1197
1198         * intrinsics.scm (insns.md): Add RTL predicates.
1199         (intrinsics.h): Remove old C intrinsics.
1200
1201 2009-04-29  DJ Delorie  <dj@redhat.com>
1202
1203         * mep-ivc2.cpu: New.
1204         * mep-core.cpu: Regenerated.  Add support for deferred register
1205         writes.
1206         (SLOT): Add IVC2 slot types.
1207         (sim-syscall): Rename to something more appropriate.
1208         * mep-ext-cop.cpu: Regenerate.
1209         * mep.opc: Regenerate.  Add "coprocessor supported" define area.
1210         (print_slot_insn): New.
1211         (mep_examine_ivc2_insns): New.
1212         (mep_print_insn_set_ivc2_mode): New.
1213         (mep_print_insn): Support IVC2 slotting.
1214         
1215 2009-04-20  DJ Delorie  <dj@redhat.com>
1216
1217         * intrinsics.scm (intrinsics-analyze!): Include aliases.
1218         (guess-mode): Drop COP* syntax.
1219         (need-insn): Add "--syscall--" to the list.
1220         (enum-type): Drop COP* syntax.
1221         (intrinsics.h): Likewise.
1222         (intrinsic-protos.h): Change file header to allow it to be
1223         included.
1224
1225 2009-04-17  DJ Delorie  <dj@redhat.com>
1226
1227         * cpu/mep-c5.cpu (f-12s20): Change to signed.
1228         (lhucpm1): Limit to C5 mach.
1229         (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1230         * cpu/mep-core.cpu (extend-cdisp10): New.
1231         (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1232         
1233 2009-04-08  DJ Delorie  <dj@redhat.com>
1234
1235         * cpu/mep-c5.cpu: New.
1236         * cpu/mep-core.cpu: Add C5 support.
1237         * cpu/mep.opc: Likewise.
1238
1239 2009-02-18  Pierre Muller  <muller@ics.u-strasbg.fr>
1240
1241         * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1242         about calling memset with a zero length.
1243
1244 2009-02-03  DJ Delorie  <dj@redhat.com>
1245
1246         * cpu/mep-core.cpu: Update to new MeP configuration.
1247         * cpu/mep-ext-cop.cpu: Likewise.
1248         * cpu/mep.opc: Likewise.
1249
1250 2008-12-23  Frank Ch. Eigler  <fche@redhat.com>
1251
1252         * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1253
1254 2008-06-17  Dave Brolley  <brolley@redhat.com>
1255
1256         * cpu/xstormy16.cpu (h-pc): Add a set handler.
1257         (h-gr): Likewise.
1258
1259 2007-11-13  Dave Brolley  <brolley@redhat.com>
1260
1261         * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1262
1263 2007-11-05  Dave Brolley  <brolley@redhat.com>
1264
1265         * intrinsics.scm,cgen-intrinsics.scm: New application which
1266         generates code to support intrinsic functions for insns in the
1267         mep architecture in gcc.
1268
1269 2007-09-21  Dave Brolley  <brolley@redhat.com>
1270
1271         * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s) 
1272         (rn3us): CDATA attribute now LONG.
1273         
1274 2007-08-21  Dave Brolley  <brolley@redhat.com>
1275
1276         * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1277         than 32 bits.
1278
1279 2007-07-05  Nick Clifton  <nickc@redhat.com>
1280
1281         * utils.scm (copyright-fsf): Update copyright notice to refer to
1282         the GPL version 3.
1283
1284 2007-05-22  Nick Clifton  <nickc@redhat.com>
1285
1286         * doc/cgen.texi: Use @copying around the copyright notice.
1287         * doc/internals.texi: Likewise.
1288
1289 2007-02-05  Dave Brolley  <brolley@redhat.com>
1290
1291         * *mep*: New cpu description for Toshiba Media Processor (MeP).
1292
1293 2007-02-05  Dave Brolley  <brolley@redhat.com>
1294
1295         * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1296         in the generated code for @arch@_cgen_init_asm if it is defined.
1297
1298         * Contribute the following changes:
1299         2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
1300
1301         * attr.scm (<string-attribute>): New attribute class.
1302         (attr-kind): Handle <string-attribute>.
1303         (parse-simple-attribute): New function.
1304         (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1305         (<bitset-attribute> 'parse-value): Likewise.
1306         (<boolean-attribute> 'parse-value): Likewise.
1307         (<enum-attribute> 'parse-value): Likewise.
1308         (<string-attribute> 'parse-value): New function.
1309         (-attr-parse): Handle <string-attribute>.
1310         (-attr-read): Likewise.
1311         (<string-attribute> 'gen-value-for-defn-raw): New function.
1312         (<string-attribute> 'gen-value-for-defn): New function.
1313
1314 2006-11-07  Dave Brolley  <brolley@redhat.com>
1315
1316         * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1317         necessary.
1318
1319 2006-10-18  Dave Brolley  <brolley@redhat.com>
1320
1321         * Contribute the following changes:
1322
1323         2006-07-11  Dave Brolley  <brolley@redhat.com>
1324
1325         * cpu/sh64-compact.cpu (movual, movual2): New insns.
1326         (movcol): New insn.
1327         * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1328         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1329         hardware or memory mode which was used.
1330         * sid-cpu.scm (hw-need-write-stack?): New function.
1331         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1332         identify hardware which uses write stacks.
1333         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1334         Initialized to an empty list.
1335         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1336         hw-need-write-stack?.
1337         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1338         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1339         (used-in-delay-rtl?): New method of <hardware-base>.
1340         (hw-used-in-delay-rtl?): New function.
1341
1342         2006-06-20  Dave Brolley  <brolley@redhat.com>
1343
1344         * sid.scm (gen-attr-type): Removed.
1345         * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1346         (SH2a-MACH): Add sh5.
1347         (sh2a-nofpu-models): Add units for sh5.
1348         (sh2a-fpu-models): Likewise.
1349
1350         2006-06-15  Dave Brolley  <brolley@redhat.com>
1351
1352         * cpu/sh-sim.cpu: New file.
1353         * cpu/sh-sid.cpu: New file.
1354         * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1355         (All fields): Remap for (insn-lsb0? #f)
1356         (All insns): Add timing specs.
1357         * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1358         'xattrs' and .splice it in.
1359         (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1360         (h-frc,h-drc): Add PROFILE attribute.
1361         (h-fpccr): Removed.
1362         (h-vbr): New hardware.
1363         (All fields): Remap for (insn-lsb0? #f)
1364         (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1365         (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1366         (fpscr): Use h-fpscr.
1367         (fsdm,fsdn): Use h-fsd.
1368         (dshci): Add xtiming argument and splice it in.
1369         (dr,xd): pmacros removed.
1370         (All insns): Add timing specs, *-MACH attribibutes,
1371         SH4{A}-GROUP attributes.
1372         (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1373         * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1374         we're being processed for sim or sid.
1375         (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1376         sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1377         (define-isa compact): Add (isa-parallel-insns 2).
1378         (define-isa media): Add (isa-parallel-insns 2). Add
1379         (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1380         (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1381         sh4a, sh4al
1382         (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH) 
1383         (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH) 
1384         (SH4al-MACH, SH5-MACH): New pmacros.
1385         (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units) 
1386         (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units) 
1387         (sh5-media-fp-units, common-model, common-model-with-fp) 
1388         (sh3-model, sh3e-model): New pmacros.
1389         (define-model sh2): New model.
1390         (define-model sh2e): New model.
1391         (define-model sh3): New model.
1392         (define-model sh3e): New model.
1393         (define-model sh2a-nofpu): New model.
1394         (define-model sh2a-fpu): New model.
1395         (define-model sh4-nofpu): New model.
1396         (define-model sh4): New model.
1397         (define-model sh4a-nofpu): New model.
1398         (define-model sh4a): New model.
1399         (define-model sh4al): New model.
1400         (define-model sh5-media): New model.
1401         (define-model sh5): Add all units.
1402         (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models) 
1403         (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models) 
1404         (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1405         (h-pc): Add PROFILE attribute.
1406         (h-fr): Likewise.
1407         (h-tr): Likewise.
1408         (h-gr,h-grc): Likewise.
1409         (h-cr): Set h-sr in setter.
1410         (h-frbit): Get/Set h-fpscr.
1411         (h-szbit,h-prbit): Likewise.
1412         (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1413         Add getter and setter.
1414         (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1415         Adjust getter and setter.
1416         (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1417         Adjust getter and setter.
1418         (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1419         (h-fsd,h-fmov): New hardware.
1420
1421 2006-07-24  Ralk Wildenhues  <Ralf.Wildenhues@gmx.de>
1422
1423         * doc/app.texi, doc/internals.texi, doc/intro.texi,
1424         doc/notes.texi, doc/porting.texi, doc/running.texi,
1425         doc/sim.texi: Fix some typos.
1426
1427 2006-07-14  Dave Brolley  <brolley@redhat.com>
1428
1429         * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1430         hardware or memory mode which was used.
1431         * sid-cpu.scm (hw-need-write-stack?): New function.
1432         (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1433         identify hardware which uses write stacks.
1434         (useful-mode-names): Renamed to write-stack-memory-mode-names.
1435         Initialized to an empty list.
1436         (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1437         hw-need-write-stack?.
1438         * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1439         (define-getters <hardware-base>): Define used-in-delay-rtl?.
1440         (used-in-delay-rtl?): New method of <hardware-base>.
1441         (hw-used-in-delay-rtl?): New function.
1442
1443 2006-06-20  Dave Brolley  <brolley@redhat.com>
1444
1445         * sid.scm (gen-attr-type): Removed.
1446
1447 2006-05-10  Dave Brolley  <brolley@redhat.com>
1448
1449         * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1450         support for (if (application-is? <appname>) (...) (...)).
1451         (-cgen): Add trailing "/" to arch-path.
1452         * utils.scm (dirname): Removed. dirname is a primitive function.
1453
1454 2006-05-09  Dave Brolley  <brolley@redhat.com>
1455
1456         * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1457         'entire_insn' not 'base_insn'.
1458         * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1459         is null.
1460         * sim.scm (-gen-arch-model-decls): Likewise.
1461         * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1462         abuf->written if profiling.
1463         (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1464         object->string om the mode.
1465         (-hw-gen-write-stack-decl): Likewise.
1466         * read.scm (include): Use arch-path as file location.
1467         (arch-path): Define it with a default setting.
1468         (-cgen): Update arch-path when "-a" option is specified.
1469         * utils.scm (dirname): New function.
1470
1471 2006-05-05  Steve Ellcey  <sje@cup.hp.com>
1472
1473         * configure.in: Remove AC_ARG_PROGRAM.
1474         * configure: Regenerate with autoconf 2.59.
1475
1476 2006-03-14  Hans-Peter Nilsson  <hp@axis.com>
1477
1478         * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1479         SIMULATOR.
1480
1481 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1482
1483         * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1484         or an error message otherwise.
1485         (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1486         Fix up comments to correctly describe the functions.
1487
1488 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1489             Anil Paranjape   <anilp1@kpitcummins.com>
1490             Shilin Shakti    <shilins@kpitcummins.com>
1491
1492         * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1493         CPU description.
1494         * cpu/xc16x.opc: New file containing supporting XC16C routines.
1495
1496 2006-02-10  Nick Clifton  <nickc@redhat.com>
1497
1498         * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1499
1500 2005-12-28  Nathan Sidwell  <nathan@codesourcery.com>
1501
1502         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1503         for concatenation.
1504         (-hw-gen-write-stack-decl): Likewise.
1505
1506 2005-12-05  Hans-Peter Nilsson  <hp@axis.com>
1507
1508         * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1509         non-(adata-integral-insn? CURRENT-ARCH) case.
1510
1511 2005-10-28  Dave Brolley  <brolley@redhat.com>
1512
1513         Contribute the following changes:
1514         2005-09-19  Dave Brolley  <brolley@redhat.com>
1515
1516         * attr.scm (gen-value-for-defn-raw): New methods.
1517         (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1518         gen-value-for-defn-raw.
1519         * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1520
1521         2002-12-13  Dave Brolley  <brolley@redhat.com>
1522
1523         * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1524         (-gen-attr-accessors): New function.
1525         (gen-obj-attr-defn): Update terminating initializer.
1526         (gen-obj-attr-end-defn): New function.
1527         * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1528         * sid-cpu.scm (cgen-desc.h): Generate code to include
1529         "opcode/cgen-bitset.h"
1530         * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1531         name.
1532         * desc.scm ('gen-defn): Update terminating initializer.
1533         * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1534         terminatinig initializer.
1535         (gen-hw-decls): Ditto.
1536         (gen-operand-decls): Ditto.
1537         (gen-insn-decls): Ditto.
1538         (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1539         (gen-insn-table): Update terminating initializer.
1540         (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1541         @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1542         * attr.scm (charmask-bytes): New function.
1543         (bitset-attr->charmask): New function.
1544         (<bitset-attribute>): Handle isa-attributes specially. Also handle
1545         differences for SID-SIMULATOR.
1546         (<integer-attribute>): Handle differences for SID-SIMULATOR.
1547         (<enum-attribute>): Ditto.
1548
1549 2005-10-26  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1550
1551         * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1552
1553 2005-10-24  DJ Delorie  <dj@redhat.com>
1554
1555         * operand.scm (-anyof-merge-syntax): Print a more useful error
1556         message.
1557
1558 2005-10-19  Nick Clifton  <nickc@redhat.com>
1559
1560         * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1561         patch.
1562
1563 2005-10-18  Andreas Schwab  <schwab@suse.de>
1564
1565         * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1566
1567 2005-10-14  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1568
1569         * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1570         size.
1571
1572 2005-08-02  Dave Brolley  <brolley@redhat.com>
1573
1574         * rtl-c.scm (s-unop): Don't dereference
1575         CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1576         (s-binop, s-convop, s-cmpop): Likewise.
1577
1578 2005-07-29  Dave Brolley  <brolley@redhat.com>
1579
1580         * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1581         if with-profile or with-parallel-write.
1582         (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1583         * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1584         string-append.
1585
1586 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
1587
1588         * cpu/fr30.opc (print_register_list): Correct format strings.
1589         * cpu/ip2k.opc: Likewise.
1590
1591 2005-07-05  Nick Clifton  <nickc@redhat.com>
1592
1593         * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1594         unsigned in order to avoid compile time warnings about sign
1595         conflicts.
1596
1597 2005-07-01  Nick Clifton  <nickc@redhat.com>
1598
1599         * desc-cpu.scm: Update to ISO C90 function declaration style.
1600         * opc-asmdis.scm: Likewise.
1601         * opc-ibld.scm: Likewise.
1602         * opc-itab.scm: Likewise.
1603         * cpu/fr30.opc: Likewise.
1604         * cpu/i960.opc: Likewise.
1605         * cpu/ip2k.opc: Likewise.
1606         * cpu/iq2000.opc: Likewise.
1607         * cpu/m32r.opc: Likewise.
1608         * cpu/openrisc.opc: Likewise.
1609         * cpu/sh.opc: Likewise.
1610         * cpu/sparc.opc: Likewise.
1611         * cpu/xstormy16.opc: Likewise.
1612
1613 2005-06-15  Dave Brolley  <brolley@redhat.com>
1614
1615         * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1616         (cgen-cpu.h): Call it.
1617
1618         Contributed on behalf of Graydon Hoare
1619         2001-06-05  graydon hoare  <graydon@redhat.com>
1620
1621         * utils.scm (foldl): Define.
1622         (foldr): Define.
1623         (filter): Define.
1624         (union): Define.
1625         (intersection): Simplify.
1626         * sid.scm : Set APPLICATION to SID-SIMULATOR.
1627         (-op-gen-delayed-set-maybe-trace): Define.
1628         (<operand> 'gen-set-{quiet,trace}): Delegate to
1629         op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1630         up and needs cleaning.
1631         (-with-parallel?): Hardwire with-parallel to #t.
1632         (<operand> 'cxmake-get): Replace with lookahead-aware code
1633         * sid-decode.scm: Remove per-insn writeback fns.
1634         (-gen-idesc-decls): Redefine sem_fn type.
1635         * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1636         with write stack stuff.
1637         (cgen-write.cxx): Replace per-insn writebacks with single write
1638         stack writeback. Add write stack reset function.
1639         (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1640         stack stuff.
1641         * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1642         estate attribute set.
1643         (delay): Set #:delayed attribute to calculated delay, update
1644         maximum delay of cpu, check (delay ...) usage.
1645         * operand.scm (<operand>): Add delayed slot to <operand>.
1646         * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1647         * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1648         * doc/rtl.texi (Expressions): Add section on (delay ...).
1649
1650 2005-06-13  Jim Blandy  <jimb@redhat.com>
1651
1652         * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1653         as well as strings.
1654
1655 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1656
1657         * doc/porting.texi: Change all mention of md_apply_fix3 and
1658         gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1659         respectively.
1660
1661 2005-05-18  Dave Brolley  <brolley@redhat.com>
1662
1663         * utils-sim.scm (-gen-decode-default-entry): New function.
1664         (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1665         code to check that all opcodes bits match.
1666         (-gen-decoder-switch): Use -gen-decode-default-entry.
1667
1668 2005-05-16  Jim Blandy  <jimb@redhat.com>
1669
1670         * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1671         fetched by one of our GETIMEM* methods.
1672         * utils-gen.scm (-extract-chunk-specs): Always fetch full
1673         base-insn-sized chunks.
1674
1675 2005-05-10  Nick Clifton  <nickc@redhat.com>
1676
1677         * Update the address and phone number of the FSF organization in
1678         the GPL notices in the following files:
1679         COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1680         cpu/powerpc.cpu, slib/random.scm
1681
1682 2005-05-06  Jim Blandy  <jimb@redhat.com>
1683
1684         * pprint.scm, cos-pprint.scm: Add documentation.
1685
1686         * pprint.scm (pprint): Don't wipe out elide-table after each call.
1687
1688         * pprint.scm, cos-pprint.scm: New files.
1689
1690 2005-04-04  Nick Clifton  <nickc@redhat.com>
1691
1692         * opcodes.scm (-gen-parse-address): Initialise value to zero to
1693         avoid a compile time warning.
1694
1695 2005-03-18  Nick Clifton  <nickc@redhat.com>
1696
1697         * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1698         "percent-operand" from "%operand" as the latter confuses xgettext
1699         into thinking that it is a C printf formating directive, which
1700         prevents proper translation.
1701
1702 2005-02-23  Nick Clifton  <nickc@redhat.com>
1703
1704         * opcodes.scm (gen-parse-number): Add a cast to the desired
1705         pointer signed'ness in order to prevent compile time warnings.
1706         * cpu/ip2k.opc: Fixed compile time warnings about differing
1707         signed'ness of pointers passed to functions.
1708         * cpu/iq2000.opc: Likewise.
1709         * cpu/m32r.opc: Likewise.
1710         * cpu/openrisc.opc: Likewise.
1711         * cpu/xstormy16.opc: Likewise.
1712
1713 2005-02-22  Alan Modra  <amodra@bigpond.net.au>
1714
1715         * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1716         (cgen-desc.h): ..to here, after opcode/cgen.h include.
1717
1718 2005-02-16  Dave Brolley  <brolley@redhat.com>
1719
1720         * utils.scm: Update copyright years.
1721         * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1722         * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1723         * operand.scm (-derived-operand-parse): Move logit message from level 1
1724         to level 2.
1725
1726 2005-02-15  Nick Clifton  <nickc@redhat.com>
1727
1728         * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1729         prevent compile time warning messages.
1730         * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1731         * utils-gen.scm (attr-int-gen-defn): Likewise.
1732         (attr-gen-defn): Likewise.
1733         * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1734         (print_dollarhex16): Remove unused function.
1735
1736 2005-02-15  Jim Blandy  <jimb@redhat.com>
1737
1738         * guile.scm (cgen-call-with-debugging): Doc fix.
1739
1740         Make backtraces work more reliably.
1741         * guile.scm: Set up debugging parameters, and enable debugging and
1742         source positions while loading.
1743         (cgen-call-with-debugging, cgen-debugging-stack-start): New
1744         functions.
1745         * read.scm: Don't set debugging parameters here.
1746         (catch-with-backtrace): Function deleted.
1747         (-cgen): Simply note the presence or absence of the -b option.
1748         Pass the flag to cgen-call-with-debugging, so debugging is turned
1749         off here if the user didn't request it, for faster computation.
1750         (cgen): Call cgen-debugging-stack-start here, instead of
1751         catch-with-backtrace.
1752
1753         * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1754         trailing -s.
1755         (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1756         Don't write out the trailing -s here.
1757         * Makefile.in: Regenerated.
1758         * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1759         fixup.scm here; let the caller decide which Scheme's customization
1760         file to preload.
1761         * dev.scm: Load guile.scm, not fixup.scm.
1762         * fixup.scm: Deleted; contents have all moved to guile.scm.
1763         * README: Doc fix.
1764
1765         * guile.scm (debug-write): New function.
1766
1767 2005-02-14  Jim Blandy  <jimb@redhat.com>
1768
1769         * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1770         transformer procedure, not eval.  Transformer procedures take one
1771         argument.
1772
1773 2005-02-11  Nick Clifton  <nickc@redhat.com>
1774
1775         * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1776         to 'bfd_vma *' in order avoid compile time warning message.
1777
1778 2005-02-09  Jim Blandy  <jimb@redhat.com>
1779
1780         * cgen-sim.scm (load-files): Don't load fixup.scm.  (See
1781         corresponding change in the sim/common directory.)
1782
1783 2005-02-07  Jim Blandy  <jimb@redhat.com>
1784
1785         * cgen-opc.scm: Don't load fixup.scm here.  (See corresponding
1786         changes in the opcodes directory.)
1787
1788         * guile.scm: New file, containing Guile-specific definitions and
1789         adaptations.  This is loaded by the app-specific shell scripts.
1790         Initially identical to fixup.scm.
1791         * cgen-sid.scm: Don't load fixup.scm here.
1792
1793         * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1794         latter is a macro.
1795
1796 2005-01-27  Jim Blandy  <jimb@redhat.com>
1797
1798         * utils.scm (string/symbol->append): Renamed from 'concat'.
1799         * opcodes.scm (gen-switch): Use new name.
1800         * insn.scm (-sub-insn-make!): Same.
1801         * rtl.scm (rtx-dump): Same.
1802         * semantics.scm (semantic-compile): Same.
1803
1804 2005-01-20  Jim Blandy  <jimb@redhat.com>
1805
1806         * opcodes.scm (gen-switch): Use concat instead of string-map.
1807
1808         * utils.scm (concat): New function.
1809         * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1810         * rtl.scm (rtx-dump): Same.
1811         * semantics.scm (semantic-compile): Same.
1812
1813 2004-12-16  Jim Blandy  <jimb@redhat.com>
1814
1815         * utils-cgen.scm (parse-name): Don't assume that string-map can be
1816         applied to symbols.  Process everything as strings, and then
1817         convert to a symbol at the end.
1818
1819         * read.scm (debug-repl): Temporarily redirect input and output to
1820         /dev/tty while we debug, so we don't interfere with whatever CGEN
1821         is reading or writing.
1822         * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1823         New functions.
1824
1825 2004-11-15  Michael K. Lechner <mike.lechner@gmail.com>
1826
1827         * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1828         will work with newer versions of guile.
1829
1830 2004-10-27  Nick Clifton  <nickc@redhat.com>
1831
1832         * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1833         * cpu/iq2000.cpu: Likewise.
1834
1835 2004-07-21  DJ Delorie  <dj@redhat.com>
1836
1837         * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1838
1839 2003-03-14  Frank Ch. Eigler  <fche@redhat.com>
1840
1841         * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1842         (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1843
1844 2004-03-30  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1845
1846         * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1847
1848 2004-03-22  Dave Brolley  <brolley@redhat.com>
1849
1850         * utils.scm (copyright-fsf): Update copyright years.
1851         (copyright-red-hat): Ditto.
1852         * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1853         code.
1854         (-op-gen-set-trace-parallel): Ditto.
1855
1856 2004-02-10  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.dot.com>
1857
1858         * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1859         disassembling codes for 0x*2 addresses.
1860
1861 2004-01-29  Dave Brolley  <brolley@redhat.com>
1862
1863         * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1864         zeroes in the extra bit positions and generate 'opcode-mask' with ones
1865         in the extra bit positions.
1866
1867 2003-12-15  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1868
1869         * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1870
1871 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
1872
1873         * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1874         "short" being 16 bit.
1875         (parse_hi16): Likewise.  Fix type-punned pointer warnings too, and
1876         internationalize error message.
1877         (parse_lo16): Likewise.  Remove useless code.
1878
1879 2003-12-03  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1880
1881         * cpu/m32r.cpu : Add new model m32r2.
1882         Add new instructions.
1883         Replace occurrances of 'Mitsubishi' with 'Renesas'.
1884         Changed PIPE attr of push from O to OS.
1885         Care for Little-endian of M32R.
1886         * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1887         Care for Little-endian of M32R.
1888         (parse_slo16): signed extension for value.
1889
1890 2003-10-26  Dave Brolley  <brolley@redhat.com>
1891
1892         * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1893         and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1894         (-gen-extract-fn): Call -gen-record-profile-args.
1895
1896 2003-10-21  Dave Brolley  <brolley@redhat.com>
1897
1898         * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1899         a static const int.
1900         * decode.scm (-opcode-slots): Correct typo in logit call.
1901
1902 2003-10-09  Jim Blandy  <jimb@redhat.com>
1903
1904         * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1905         for @arch@_cgen_hw_table.  GDB needs to be able to find this.
1906
1907         * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1908
1909 2003-10-06  Dave Brolley  <brolley@redhat.com>
1910
1911         * gen-all-doc: Add fr550.
1912
1913 2003-09-11  Doug Evans  <dje@sebabeach.org>
1914
1915         * Makefile.am (ARCHFILE): New var.
1916         (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1917         (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1918         * Makefile.in: Regenerate.
1919
1920 2003-09-08  Dave Brolley  <brolley@redhat.com>
1921
1922         On behalf of Doug Evans <dje@sebabeach.org>
1923         Pass in paths to input files, instead of assuming they live in
1924         $srcdir/cpu.  Plus misc. option processing cleanup.
1925         * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1926         Add pre-process pass to all options.
1927         * cgen-gas.scm (gas-arguments): Ditto.
1928         * cgen-sid.scm (sim-arguments): Ditto.
1929         * cgen-sim.scm (sim-arguments): Ditto.
1930         * cgen-stest.scm (stest-arguments): Ditto.
1931         * cgen-opc.scm (opc-arguments): Ditto.  New argument -OPC.
1932         (-opc-file-path): New global.
1933         (opc-file-path): New fn.
1934         * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1935         All callers updated.
1936         (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1937         gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1938         Replace srcdir arg with opc-file.  All callers updated.
1939         * read.scm (-opt-spec-update): Delete.
1940         (opt-get-first-pass,opt-get-second-pass): New fns.
1941         (-cgen): Process application-specific arguments in two passes.
1942
1943 2003-08-29  Dave Brolley  <brolley@redhat.com>
1944
1945         * cpu/frv.cpu: Removed.
1946         * cpu/frv.opc: Removed.
1947
1948 2003-08-21  Nick Clifton  <nickc@redhat.com>
1949
1950         * cpu/frv.cpu (mbtoh): Replace input parameter to
1951         u-media-dual-expand and u-media-dual-btoh with output parameter.
1952         (cmbtoh): Add profiling hack.
1953
1954 2003-08-19  Michael Snyder  <msnyder@redhat.com>
1955
1956         * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1957
1958 2003-08-07  Michael Meissner  <gnu@the-meissners.org>
1959
1960         * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1961         the elements for the END record of CGEN_OPINST, silencing warnings.
1962
1963 2003-07-15  Doug Evans  <dje@sebabeach.org>
1964
1965         Add guile 1.6.4 support.
1966         - empty list must be quoted
1967         - string functions have stricter type checking
1968         - eval now takes a second argument
1969         - symbol-bound? is deprecated
1970         * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1971         (bitset-attr->list): Ensure arg to string-cut is a string.
1972         (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1973         (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1974         * cos.scm (-class-list): Must quote empty list.
1975         (-class-parent-classes,-class-compute-class-desc): Ditto.
1976         (class-make,make,object-reset!): Ditto.
1977         (method-make-make!): Call eval1 instead of eval.
1978         (method-make-forward!,method-make-virtual-forward!): Ditto.
1979         * decode.scm (subdtable-add): Use stringsym-append instead of
1980         string-append.
1981         (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1982         (-build-decode-table-entry): Fetch string name of insn.
1983         * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1984         (-gen-mach-table-defns): Ditto for mach.
1985         (gen-ifld-defns): Ditto for ifld.
1986         (gen-hw-table-defns): Ditto for hw.
1987         (gen-operand-table): Ditto for op.
1988         (gen-insn-table-entry): Ditto for insn.
1989         * desc.scm (gen-attr-table-defn): Ditto for attr.
1990         (<keyword>,gen-defn): Don't pass symbols to string-append.
1991         * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1992         symbol-append.
1993         (enum-vals-upcase): Use symbol-upcase to build result.
1994         (-enum-parse): Use stringsym-append to build errtxt.
1995         * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1996         (eval1): New function.
1997         (symbol-bound?): Provide own version if >= guile 1.6.
1998         * hardware.scm (define-keyword): Use string-append instead of
1999         symbol-append.
2000         * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2001         cgen.html,cgen-insn.html): Convert current-arch-name to a string
2002         before using.
2003         (gen-list-entry): Handle either symbol or string `name' arg.
2004         (gen-obj-doc-header): Fetch string name of `o' arg.
2005         (define-cpu-intro): Ditto for cpu.
2006         (gen-mach-intro): Ditto for mach.
2007         (gen-model-intro): Ditto for model.
2008         (gen-isa-intro): Ditto for isa.
2009         (gen-machine-doc-1): Ditto for isa.
2010         (gen-reg-doc-1): Convert mach to string first.
2011         (gen-insn-doc-1): Ditto.  Convert model/unit names to strings first.
2012         (gen-insn-doc-list): Fetch string name of mach.  Convert insn name
2013         to string first.
2014         (gen-insn-categories): Fetch string name of mach.  Convert
2015         enum-val-name to string first.
2016         (gen-insn-docs): Fetch string name of mach.
2017         * ifield.scm (ifld-ilk): Result is a string.
2018         * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2019         Fetch string name of ifld.
2020         (-sfmt-search-key): Similarily for ifld and op.
2021         * insn.scm (syntax-make): Fetch string name of syntax element.
2022         * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2023         * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2024         * mode.scm (mode:c-type): Result is a string.
2025         (mode:enum): Fetch string name of mode.
2026         (-mode-parse): Use stringsym-append to build errtxt.
2027         * model.scm (model:enum): Fetch string name of model.
2028         (-model-parse): Use stringsym-append to build errtxt.
2029         (parse-insn-timing): Must quote empty list.
2030         * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2031         (-gen-minsn-opcode-entry): Ditto.
2032         * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2033         convert to string.
2034         (read-cpu.opc): Convert current-arch-name to a string before using.
2035         * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2036         (<derived-operand>): Must quote empty list.
2037         (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2038         * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2039         of ifld.
2040         * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2041         (-pmacro-sym): Must convert symbols to strings before passing to
2042         string-append.
2043         (-pmacro-str): Ditto.
2044         (pmacros-init!): Use eval1 instead of eval.
2045         * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2046         (keep-isa-atlist?): Ditto.
2047         (cmd-if): Use eval1 instead of eval.
2048         * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2049         (-rtl-c-get): Fetch string name of src.
2050         (s-unop): Ditto for mode.
2051         (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2052         (-gen-par-temp-defns,subword): Ditto.
2053         (join): Use stringsym-append instead of string-append.
2054         * rtl-traverse.scm (rtx-option?): Convert option to string first.
2055         (rtx-traverse-debug): Fetch string name of rtx-obj.
2056         * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2057         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2058         (rtx-pretty-name): Result is a string.
2059         (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2060         * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2061         * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2062         before using.
2063         (-gen-sfrag-case): Fetch string name of user.
2064         * sid-model.scm (unit:enum): Fetch string name of unit.
2065         * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2066         (<hw-memory>,gen-set-quiet): Ditto.
2067         (gen-mode-defs): Ditto.
2068         (sim-finish!): Convert current-arch-name to a string before using.
2069         * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2070         (-gen-no-scache-semantic-fn): Ditto.
2071         (cgen-defs.h): Fetch string name of isa.
2072         (cgen-read.c): Convert current-arch-name to a string before using.
2073         (cgen-write.c): Ditto.
2074         * sim-model.scm (unit:enum): Fetch string name of unit.
2075         (gen-model-fn-decls): Use stringsym-append instead of string-append.
2076         (-gen-model-timing-table): Fetch string name of model.
2077         (-gen-mach-model-table): Ditto.
2078         (-gen-mach-defns): Fetch string name of mach.
2079         * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2080         (<hw-memory>,cxmake-get): Fetch string name of mode.
2081         (<hw-memory>,gen-set-quiet): Ditto.
2082         (gen-mode-defs): Ditto.
2083         (sim-finish!): Must quote empty list.
2084         * utils-cgen.scm (<ident>): Must quote empty list.
2085         (obj:str-name): New fn.
2086         (parse-comment): Result is a string.
2087         (parse-symbol): Result is a symbol.
2088         (parse-string): Result is a string.
2089         (keyword-list?): Convert arg to string before calling string-ref.
2090         (keyword-list->arg-list): Ditto.
2091         (gen-attr-name): Convert attr-name to string first.
2092         (alpha-sort-obj-list): Use symbol<? instead of string<?.
2093         * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2094         (gen-define-ifmt-ifields): Ditto for fld.
2095         * utils.scm (gen-c-symbol): Ensure str is a string before calling
2096         map-over-string.
2097         (gen-file-name): Ditto.
2098         (symbol-downcase,symbol-upcase,symbol<?): New fns.
2099         (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2100         (reduce): Call eval1 instead of eval.
2101         * cpu/m32r.cpu (addi): Don't use `#.'.
2102
2103         * gen-all-sim: Fix some typos.
2104
2105 2003-07-08  Doug Evans  <dje@sebabeach.org>
2106
2107         * gen-all-doc: Ensure run from cgen src dir.
2108         * gen-all-opcodes: Build in ./tmp-opcodes.  Don't delete dir when done.
2109         * gen-all-sid: Similarily, in ./tmp-sid.
2110         * gen-all-sim: Similarily, in ./tmp-sim.
2111
2112 2003-06-20  Doug Evans  <dje@sebabeach.org>
2113
2114         * gen-all-sim: Add fr30,sh64 support.  Only generate m32r by default.
2115
2116 2003-06-19  Doug Evans  <dje@sebabeach.org>
2117
2118         * mach.scm (-ifld-already-defined?): New proc.
2119         (current-ifld-add!): Use it.
2120         (-op-already-defined?): New proc.
2121         (current-op-add!): Use it.
2122         (-insn-already-defined?): New proc.
2123         (current-insn-add!): Use it.
2124         (-minsn-already-defined?): New proc.
2125         (current-minsn-add!): Use it.
2126         (obj-isa-list): New proc.
2127         (isa-supports?): Use it.
2128
2129 2003-06-10  Doug Evans  <dje@sebabeach.org>
2130
2131         * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2132         * cpu/m32r.cpu (all insns): Ditto.
2133
2134         * mach.scm (current-*-add!): Disallow redefinition.  Make result
2135         "unspecified".
2136
2137         * gen-all-doc: Split arm and frv docs up a bit.
2138
2139         * cpu/arm.cpu: Add IDOC attribute.
2140         * cpu/frv.cpu: Ditto.
2141         * cpu/i960.cpu: Ditto.
2142         * cpu/openrisc.cpu: Ditto.
2143         * cpu/xstormy16.cpu: Ditto.
2144         * cpu/m32r.cpu: Ditto.
2145         (all insns): Explicitly specify IDOC attribute.
2146
2147         * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2148         (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2149         (html): Use MACH,ISAS,INSN_FILE_NAME.  Generate insn.html separately.
2150         * Makefile.in: Regenerate.
2151         * attr.scm (<integer-attribute>:parse-value-def): Implement.
2152         (-attr-read): Defer computing default value until we know the type.
2153         (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2154         (<attr-list>:attr-present?): New method.
2155         (atlist-attr-present?,obj-attr-present?): New fns.
2156         (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2157         (attr-builtin!): New insn attr IDOC.
2158         * cgen-doc.scm (doc-arguments): New args -I,-N.
2159         * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2160         Support comment as fourth element of enum value.
2161         (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2162         * html.scm (gen-html-header): New arg kind, all callers updated.
2163         (gen-table-of-contents): New arg insn-file, all callers updated.
2164         (gen-list-entry,gen-doc-header): New fn.
2165         (get-operands): Delete.
2166         (gen-iformat-table): Rewrite.
2167         (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2168         (gen-insn-doc-list): New args name, comment, insns.  All callers updated.
2169         (get-insn-properties,guess-insn-idoc-attr!): New fn.
2170         (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2171         (get-insns-for-category,gen-categories-insn-lists): New fns.
2172         (gen-insn-docs): Simplify each insn's semantics first.
2173         Print insn tables sorted by IDOC categories.
2174         (*insn-html-file-name*): New global.
2175         (cgen-insn.html): New fn.
2176         (cgen-all): Update.
2177         * insn.scm (<insn>): Create a setter for the `tmp' member.
2178         * semantics.scm (insn-build-known-values): Renamed from
2179         -build-known-values.  All callers updated.
2180
2181         * rtl.scm: Move traveral/evaluation support to ...
2182         * rtl-traverse.scm: New file.
2183         * read.scm: Maybe-load rtl-traverse.scm.
2184
2185         * rtl.scm (-rtx-valid-types): Add SETRTX.
2186
2187         * rtx-funcs.scm (nop,parallel): Fix mode.
2188
2189         * utils.scm (eqv-lookup-index): New fn.
2190         (assq-lookup-index): Renamed from lookup-index.  All callers updated.
2191
2192         * dev.scm (load-doc): Set APPLICATION.
2193
2194 2003-06-10  Dave Brolley  <brolley@redhat.com>
2195
2196         * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2197         * sid-decode.scm: Generate #include of config.h into
2198         @prefix@-decode.cxx.
2199         * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2200
2201 2003-06-07  Doug Evans  <dje@sebabeach.org>
2202
2203         * gen-all-sid: New file.
2204         * gen-all-opcodes: New file.
2205
2206 2003-06-05  Nick Clifton  <nickc@redhat.com>
2207
2208         * cpu/frv.cpu (FRintieven): New operand.  An even-numbered only
2209         version of the FRinti operand.
2210         (FRintjeven): Likewise for FRintj.
2211         (FRintkeven): Likewise for FRintk.
2212         (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2213         media-quad-arith-sat-semantics, media-quad-arith-sat,
2214         conditional-media-quad-arith-sat, mdunpackh,
2215         media-quad-multiply-semantics, media-quad-multiply,
2216         conditional-media-quad-multiply, media-quad-complex-i,
2217         media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2218         conditional-media-quad-multiply-acc, munpackh,
2219         media-quad-multiply-cross-acc-semantics, mdpackh,
2220         media-quad-multiply-cross-acc, mbtoh-semantics,
2221         media-quad-cross-multiply-cross-acc-semantics,
2222         media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2223         media-quad-cross-multiply-acc-semantics, cmbtoh,
2224         media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2225         media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2226         cmhtob): Use new operands.
2227         * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2228         (parse_even_register): New function.
2229
2230 2003-06-04  Doug Evans  <dje@sebabeach.org>
2231
2232         Better handling of 64 bit and mixed 32/64 bit architectures.
2233         * hardware.scm (hw-update-word-modes!): New fn.
2234         * mach.scm (define-cpu)): Call mode-set-word-modes!,
2235         hw-update-word-modes!.
2236         (state-word-bitsize): Replace FIXME with requested check.
2237         (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2238         * mode.scm (mode-find): Ignore INT,UINT.
2239         (-mode-word-sizes-kind): New global.
2240         (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2241         mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2242         (mode-init!): Initialize -mode-word-sizes-kind.  Move initialization
2243         of mode-list to ...
2244         (mode-builtin!): ... here.  Initialize WI/UWI/AI/IAI to something
2245         unusable, correct values set later.
2246         (mode-finish!): Remove cruft.
2247         * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2248         * opcodes.scm (opcodes-init!): Ditto.
2249         * rtx-funcs.scm (annul): Fix mode of pc.
2250         * cpu/ia64.cpu: Remove cruft that sets word modes.
2251         * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2252
2253 2003-06-03  Nick Clifton  <nickc@redhat.com>
2254
2255         * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2256         immediate value not unsigned.
2257
2258 2003-05-21  J"orn Rennecke <joern.rennecke@superh.com>
2259
2260         * cpu/sh.cpu: Amend comments to refer to SuperH.
2261         * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2262         * cpu/sh64-media.cpu: Likewise.
2263         (Saturation): Update manual reference.
2264
2265 2003-05-15  Doug Evans  <dje@sebabeach.org>
2266
2267         * Makefile.am (srcroot): New var.
2268         (html): New rule.
2269         * Makefile.in: Regenerate.
2270         * cgen-doc.scm: New file.
2271         * html.scm: New file.
2272         * gen-all-doc: New file.
2273         * dev.scm (cload): Handle DOC application.
2274         (load-doc): New fn.
2275         * machs.scm (machs-for-cpu): New fn.
2276         * model.scm (models-for-cpu): New fn.
2277         * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2278         All uses updated.
2279         (iota): Rewrite to be identical to pmacro version.  All uses updated.
2280         * utils-cgen.scm (alpha-sort-obj-list): New fn.
2281
2282         * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2283         (-gen-decode-bits): Instead put in better fix here.
2284
2285         * cpu/i960.cpu (index): Rename to indx.  All uses updated.
2286
2287 2003-05-01  DJ Delorie  <dj@redhat.com>
2288
2289         * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2290         word accesses.
2291         (set-alignfix-mem): Likewise.
2292
2293 2003-04-16  Dave Brolley  <brolley@redhat.com>
2294
2295         * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2296         * utils.scm (copyright-fsf): Update generate copyright years.
2297         (copyright-cygnus): Ditto.
2298         * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2299         operands.
2300         (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2301         here.
2302         (<operand>'gen-profile-code): New parameter 'when'.
2303         (<iunit>'gen-profile-code): Ditto.
2304         (<insn>'gen-profile-code): Ditto.
2305         (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2306         'insn_reference' for the 'after' function.
2307         * model.scm (unit:enum): Moved to sim-model.scm.
2308         * sim-model.scm (unit:enum): Moved from model.scm.
2309         * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2310         * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2311         * sid-model.scm (unit:enum): New version for sid.
2312         (gen-model-class-name): New function.
2313         (gen-model-unit-fn-decl): New function.
2314         (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2315         (gen-model-unit-fn-name): New parameter 'when'.
2316         (-gen-model-insn-fn-name): Ditto.
2317         (-gen-model-insn-qualified-fn-name): New function.
2318         (-gen-model-insn-fn-decl): New function.
2319         (-gen-model-insn-fn-decls): New function.
2320         (-gen-model-insn-fn): New parameter 'when'. Call
2321         -gen-model-insn-qualified-fn-name.
2322         (-gen-model-insn-fns): Generate the constructor for the model. Generate
2323         functions for modelling insn before and after execution.
2324         (-gen-model-class-decls): New function.
2325         (" (gen-model-class-name model) "): New function.
2326         (gen-model-classes): New function.
2327         (-gen-insn-timing): Generate functions for modelling insn before and after
2328         execution.
2329         (-gen-insn-unit-timing): Generate class-qualified names.
2330         (-gen-model-timing-table): Ditto.
2331         (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2332         not needed (yet) by sid.
2333         (cgen-model.h): New function.
2334
2335 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
2336
2337         * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2338         * cpu/sh64-compact.cpu: Likewise.
2339         * cpu/sh64-media.cpu: Likewise.
2340
2341 2003-03-21  DJ Delorie  <dj@redhat.com>
2342
2343         * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2344         which indicates if the sign flag is set from bit 15 or 7.
2345         Adjust all callers.
2346         (set-psw): New argument ws, propogate it.
2347         (set-psw-nowrite): Likewise.
2348         (set-mem-psw): Likewise.
2349         (set-psw-carry): Likewise.  Use temporaries to prevent
2350         prematurely overwriting needed inputs.
2351         (set-psw-rrotate17): Fix logic.
2352         (shrgrgr): Preserve carry for zero-bit shifts.
2353         (shrgrimm): Likewise.
2354         (shlgrgr): Likewise.
2355         (shlgrimm): Likewise.
2356         (asrgrgr): Likewise.
2357         (asrgrimm): Likewise.
2358         (reset): New.
2359
2360 2003-03-12  Frank Ch. Eigler  <fche@redhat.com>
2361
2362         * sid.scm: Set APPLICATION to SID-SIMULATOR.
2363
2364 2002-03-05  DJ Delorie  <dj@redhat.com>
2365
2366         * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2367         prematurely overwriting needed inputs.
2368         (set-psw-sub): Likewise.
2369
2370 Fri Feb 21 19:48:19 2003  J"orn Rennecke <joern.rennecke@superh.com>
2371
2372         * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2373
2374 2003-02-18  DJ Delorie  <dj@redhat.com>
2375
2376         * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2377         (movlmemimm): Just mask the address.
2378         (movhmemimm): Likewise.
2379         (movlmemgr): Likewise.
2380         (movhmemgr): Likewise.
2381         (set-psw): Always set the psw last.
2382         (set-psw-carry): Likewise.
2383         (set-psw-add): Likewise.
2384         (set-psw-sub): Likewise.
2385
2386         * xstormy16.cpu (set-psw-rrotate17): New.  Choose the correct set
2387         of 16 patterns from the set-psw-rotate17 function.
2388         (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2389         movgriipostincgr, movgriipredecgr): Set psw correctly.
2390         (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2391         movfgriipostincgr, movfgriipredecgr): Fix semantics.
2392         (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2393
2394 2003-02-11  Dave Brolley  <brolley@redhat.com>
2395
2396         * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2397         @arch@_cgen-ifld_table.
2398         (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2399         @arch@_cgen-ifld_table.
2400
2401 2003-02-03  Frank Ch. Eigler  <fche@redhat.com>
2402
2403         * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2404
2405 2003-01-09  Graydon Hoare  <graydon@redhat.com>
2406
2407         * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2408         empty ISAs.
2409
2410 2003-01-07  Graydon Hoare  <graydon@redhat.com>
2411
2412         * utils-gen.scm (attr-int-gen-defn): Define.
2413
2414 2002-12-21  Doug Evans  <dje@sebabeach.org>
2415
2416         * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2417         (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2418
2419         * dev.scm (cload): Update location of .cpu files.
2420
2421 2002-12-19  Doug Evans  <dje@sebabeach.org>
2422
2423         * utils-sim.scm (gen-profile-sym): New fn.
2424         (<operand>,sbuf-profile-sym): New method.
2425         (<operand>,sbuf-profile-elm): Use it.
2426         * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2427         of hardcoding symbol name.
2428         (<operand>,gen-profile-code): Ditto.
2429         (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2430         symbol name.
2431
2432         * mode.scm (mode-sem-mode): New fn.
2433         * operand.scm (op:new-mode): Update. mode-name.
2434         (op-natural-mode?) New fn.
2435         * rtl.scm (hw): Set hw-name,mode-name.
2436
2437         Back out sim*.scm changes of 2001-04-02  Ben Elliston  <bje@redhat.com>
2438         Instead do:
2439         * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2440         as size of IDESC-TABLE-VAR.
2441         (@prefix@_init_idesc_table): Ditto.
2442         * sim-model.scm (-gen-mach-defns): Ditto.
2443         * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2444
2445         * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2446
2447         * insn.scm (-parse-insn-format-symbol): Improve error message.
2448         (-parse-insn-format): Ditto.
2449
2450         * gen-all-sim: New script.
2451
2452 2002-12-16  DJ Delorie  <dj@delorie.com>
2453
2454         * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2455
2456 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2457
2458         * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2459         * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2460         (parse_immediate16): Handle immediate16 values, which now include
2461         @hi(label) and @lo(label)
2462
2463 2002-12-03  Alan Modra  <amodra@bigpond.net.au>
2464
2465         * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2466         Add braces and cast for union field.
2467         (gen-multi-ifield-nodes): Add braces and cast for union field.
2468         (cgen_operand_table): Similarly fix sentinel.
2469         (cgen_cpu_close): Constify "insns".  Formatting.
2470         (cgen-desc.c): Include xregex.h.
2471         * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2472         Prototype.
2473         <opc.c>: Include safe-ctype.h.
2474         (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2475         (PARSE_FUNC_DECL): Declare.  Use to prototype parse_fr, parse_addr16,
2476         parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2477         (parse_fr): Constify "old_strp".  Correct type of "tempvalue".
2478         Don't test it for >= 0.  Use ISSPACE rather than isspace.  Formatting.
2479         (parse_addr16): Correct type of "value".  Formatting.
2480         (parse_addr16_p): Likewise.
2481         (parse_addr16_cjp): Likewise.
2482         (parse_lit8): Likewise.
2483         (parse_bit3): Formatting.
2484         (PRINT_FUNC_DECL): Define.  Use to prototype print_fr, print_dollarhex,
2485         print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2486         print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2487         print_decimal.
2488         (print_fr): Add ATTRIBUTE_UNUSED on unused args.  Formatting.
2489         (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2490         (print_dollarhex8): Likewise.
2491         (print_dollarhex16): Likewise.
2492         (print_dollarhex_addr16h): Likewise.
2493         (print_dollarhex_addr16l): Likewise.
2494         (print_dollarhex_p): Likewise.
2495         (print_dollarhex_cj): Likewise.
2496         (print_decimal): Likewise.
2497         * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2498
2499 2002-11-30  Hans-Peter Nilsson  <hp@axis.com>
2500
2501         * doc/rtl.texi (Model variants): Mention current limitations for
2502         unit inputs and outputs.
2503         (Hardware elements) <attribute PROFILE>: Be slightly more
2504         verbose.
2505         (Instructions) <timing>: input/output overrides have a direction
2506         operand.
2507
2508 2002-11-25  DJ Delorie  <dj@redhat.com>
2509
2510         * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2511
2512 2002-11-21  Jeff Johnston  <jjohnstn@redhat.com>
2513
2514         * cpu/iq10.cpu: New file.
2515         * cpu/iq2000.cpu: Likewise.
2516         * cpu/iq2000.opc: Likewise.
2517         * cpu/iq2000m.cpu: Likewise.
2518
2519 2002-11-19  DJ Delorie  <dj@redhat.com>
2520
2521         * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2522
2523 2002-11-05  Frank Ch. Eigler  <fche@redhat.com>
2524
2525         * dev.scm: Call getenv with a string, not a symbol.
2526
2527 2002-10-08  Doug Evans  <dje@transmeta.com>
2528             Hans-Peter Nilsson  <hp@axis.com>
2529
2530         * types.scm (bitrange-overlap?): Handle lsb0?.
2531
2532 2002-09-07  Frank Ch. Eigler  <fche@redhat.com>
2533
2534         From Robert Cragie <rcc@jennic.com>:
2535         * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2536
2537 2002-07-17  Frank Ch. Eigler  <fche@redhat.com>
2538             Ben Elliston  <bje@redhat.com>
2539             John Healy  <jhealy@redhat.com>
2540             Jeff Johnston  <jjohnstn@redhat.com>
2541             Alan Lehotsky  <alehotsky@redhat.com>
2542             Ubicom Inc. <SupportDesk@ubicom.com>
2543
2544         * cpu/ip2k.cpu: New file.
2545         * cpu/ip2k.opc: Likewise.
2546
2547 2002-07-01  Hans-Peter Nilsson  <hp@axis.com>
2548
2549         * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2550
2551 2002-06-25  J"orn Rennecke <joern.rennecke@superh.com>
2552
2553         * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2554         * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2555         (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2556         (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2557         (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2558         (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2559         (-sthi-byte): If there is a single byte to store, store it at
2560         proper address.
2561         (sthil, sthiq): Fix big-endian behaviour.
2562         (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2563         (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2564         (saturate): Use Dimode to check if saturation operation is required.
2565         (usaturate): Likewise.
2566         (mpermw): Fix mask.
2567         (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2568         (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2569         (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2570         (msadubq): Fix subword index in second operand of first subtraction.
2571
2572 2002-06-20  Hans-Peter Nilsson  <hp@axis.com>
2573
2574         * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2575         code.
2576
2577 2002-06-18  Dave Brolley  <brolley@redhat.com>
2578
2579         * cpu/frv.cpu: New cpu description.
2580         * cpu/frv.opc: New cpu support code.
2581
2582 2002-05-21  Dave Brolley  <brolley@redhat.com>
2583
2584         * decode.scm (-opcode-slots): Don't consider bits beyond the
2585         length of the insn.
2586
2587 2002-05-17  Johan Rydberg  <jrydberg@rtmk.org>
2588
2589         * cpu/powerpc.cpu: New file.
2590
2591 2002-05-01  Graydon Hoare  <graydon@redhat.com>
2592
2593         * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2594
2595 2002-03-20  Hans-Peter Nilsson  <hp@axis.com>
2596
2597         * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2598         results are expanded recursively.
2599
2600 2002-03-19  Hans-Peter Nilsson  <hp@axis.com>
2601
2602         * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2603         call scan-symbol on it, to enable recursive macro-expansion.
2604
2605 2002-01-25  Frank Ch. Eigler  <fche@redhat.com>
2606
2607         * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2608         for multiple-isa configurations.
2609         * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2610
2611 2002-02-04  Ben Elliston  <bje@redhat.com>
2612
2613         * cpu/sh.cpu, cpu/sh.opc: New files.
2614         * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2615
2616 2002-01-29  Hans-Peter Nilsson  <hp@axis.com>
2617
2618         * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2619         (Enumerated constants): Mention that an ifield must not specify a
2620         multi-ifield.
2621         (Instruction operands): Ditto for index.
2622         (Expressions) <parallel>: Remove misplaced mention of local
2623         variables.
2624         <if>: Mention that mode must be specified and non-VOID when the
2625         result is used.
2626
2627 2002-01-28  Hans-Peter Nilsson  <hp@axis.com>
2628
2629         * doc/porting.texi: When referring to *.opc, mention they are in
2630         the cpu subdir.  Call top-level directory toplevel, not devo.
2631         Close string in define-normal-insn example.
2632
2633         * doc/pmacros.texi: Fix .substr typo to .substring.
2634         Mention that .sym expansions are not further expanded.
2635
2636 2002-01-22  Graydon Hoare  <graydon@redhat.com>
2637
2638         * desc-cpu.scm (ifld-number-cache): Add.
2639         (ifld-number): Add.
2640         (gen-maybe-multi-ifld-of-op): Add.
2641         (gen-maybe-multi-ifld): Add.
2642         (gen-multi-ifield-nodes): Add.
2643         (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2644
2645 2002-01-10  matthew green  <mrg@redhat.com>
2646
2647         * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2648         (gr-Rb-names): ... to this.
2649         (h-Rb): New hardware piece.
2650         (h-Rbj): Use gr-Rb-names.
2651         (Rb): Use h-Rb.
2652         (holdx): New instruction.
2653
2654 2002-01-07  Ben Elliston  <bje@redhat.com>
2655
2656         * utils.scm (package-cygnus-simulators): Rename from this ..
2657         (package-red-hat-simulators): .. to this.
2658         * opcodes.scm (option-set!): Use package-red-hat-simulators.
2659         * sid-cpu.scm (cgen-desc.h): Likewise.
2660         (cgen-cpu.h): Likewise.
2661         (cgen-defs.h): Likewise.
2662         (cgen-write.cxx): Likewise.
2663         (cgen-semantics.cxx): Likewise.
2664         (cgen-sem-switch.cxx): Likewise.
2665         * sid-decode.scm (cgen-decode.h): Likewise.
2666         (cgen-decode.cxx): Likewise.
2667         * sid-model.scm (cgen-model.cxx): Likewise.
2668         * sid.scm (option-set!): Likewise.
2669         * sim.scm (option-set!): Likewise.
2670
2671 2002-01-07  Ben Elliston  <bje@redhat.com>
2672
2673         * utils.scm (copyright-fsf): Add 2002.
2674         (copyright-cygnus): Rename to copyright-red-hat.
2675         (copyright-red-hat): Add 2002.
2676         (CURRENT-COPYRIGHT): Update comment.
2677         * opcodes.scm (option-set!): Update callers.
2678         * sid-model.scm (cgen-model.cxx): Likewise.
2679         * sid-cpu.scm: Likewise.
2680         * sid-decode.scm: Likewise.
2681         * sid.scm (option-set!): Handle "redhat" as an option for
2682         "copyright"; use copyright-red-hat.
2683         * sim.scm (option-set!): Likewise.
2684
2685 2002-01-03  Dave Brolley  <brolley@redhat.com>
2686
2687         * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2688         number of insns in the list.  Update the population count function to
2689         identify and prioritize 3 catgories of useful bits.
2690         (-population-top-few): Don't consider bits with a population count of
2691         zero.
2692         (-build-decode-table-entry): Don't call
2693         filter-harmlessly-ambiguous-insns.  Filter out non-specialized and
2694         identical insns at the next tree level.
2695         * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2696         this function is no longer used.
2697         (filter-non-specialized-ambiguous-insns): New function.
2698         (filter-identical-ambiguous-insns): New function.
2699         (find-identical-insn): New function.
2700         (filter-harmlessly-ambiguous-insns): Removed.
2701
2702 2001-11-26  Geoffrey Keating  <geoffk@redhat.com>
2703             matthew green  <mrg@redhat.com>
2704             Frank Ch. Eigler  <fche@redhat.com>
2705             Nick Clifton  <nickc@cambridge.redhat.com>
2706
2707         * cpu/xstormy16.cpu: New file.
2708         * cpu/xstormy16.opc: New file.
2709
2710 2001-11-26  Frank Ch. Eigler  <fche@redhat.com>
2711
2712         * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2713
2714 2001-11-14  Dave Brolley  <brolley@redhat.com>
2715
2716         * utils-gen.scm (-gen-extract-word): Correct computation of the length
2717         of the field being extracted.
2718
2719 2001-10-29  Johan Rydberg  <johan@rydberg.com>
2720
2721         * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2722         (cos ...) and (sin ..) rtx.
2723
2724 2001-10-13  Nick Clifton  <nickc@cambridge.redhat.com>
2725
2726         * desc-cpu.scm: Do not include ctype.h in generated desc
2727         files.  They will inherit safe-ctype.h instead.
2728
2729 2001-10-08  Nick Clifton  <nickc@cambridge.redhat.com>
2730
2731         * desc-cpu.scm: Add missing function prototypes (for generated
2732         C files).  Fix compile time warning messages about unused
2733         parameters (for generated C files).
2734         * opc-asmdis.scm: The same.
2735         * opc-ibld.c: The same.
2736         * opc-itab.scm: The same.
2737         * cpu/fr30.opc: The same.
2738         * cpu/m32r.opc: The same.
2739         * cpu/openrisc.opc: The same.
2740
2741 2001-09-17  graydon hoare  <graydon@redhat.com>
2742
2743         * insn.scm (syntax-break-out): Correct logic in handling escaped
2744         syntax characters.
2745
2746 2001-07-12  Jeff Johnston  <jjohnstn@redhat.com>
2747
2748         * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2749         call @arch@_cgen_build_insn_regex now that regex support is in
2750         libiberty.
2751
2752 2001-07-12  Frank Ch. Eigler  <fche@redhat.com>
2753
2754         * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2755         (mask-superset?): Look for strict supersets to allow rejection of
2756         duplicate insns.
2757
2758 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2759
2760         * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2761         (cgen-desc.h): Call it.
2762         * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2763         decode-size.
2764         * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2765         entire_insn for extraction, if it's shorter than base-insn-bitsize.
2766
2767 2001-07-11  Frank Ch. Eigler  <fche@redhat.com>
2768
2769         * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2770         mach->cpu insn-chunk-bitsize.
2771         (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2772         field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2773         * mach.scm (<cpu>): New field insn-chunk-bitsize.
2774         (-cpu-parse, -cpu-read): Parse/initialize it.
2775         * doc/rtl.texi (define-cpu): Document it.
2776
2777 2001-07-09  Geoffrey Keating  <geoffk@redhat.com>
2778
2779         * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2780
2781 2001-07-06  Ben Elliston  <bje@redhat.com>
2782
2783         * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2784
2785 2001-07-05  Ben Elliston  <bje@redhat.com>
2786
2787         * README: Update.
2788
2789         * read.scm (include): Include files from srcdir/cpu.
2790         (-cgen): Likewise for loading .cpu files.
2791         * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2792         * *.cpu: Move all cpu descriptions into cpu subdirectory.
2793         * *.opc: Likewise.
2794         * simplify.inc: Likewise.
2795
2796 2001-07-04  Ben Elliston  <bje@redhat.com>
2797
2798         * read.scm (include): Log "Including file" message at level 1,
2799         rather than outputting it with (display).
2800         (cpu-load): Log "Loading cpu description" and "Processing cpu
2801         description" messages at levels 1 and 2, respectively, rather than
2802         using (display).
2803
2804 2001-06-14  Geoffrey Keating  <geoffk@redhat.com>
2805
2806         * desc.scm (<keyword> 'gen-defn): Add extra zero into
2807         CGEN_KEYWORD_ENTRY initializers.
2808
2809         * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2810         (<operand> 'test-data): Involve both the index and the hardware
2811         in testcase generation.
2812         (<hw-indx> 'test-data): Generate test data from the underlying
2813         object.
2814         (<ifield> 'test-data): Generate test data by computing bit
2815         patterns for the field, then decoding them.
2816         (<hw-address> 'test-data): Allow for new calling convention.
2817         (<hw-iaddress> 'test-data): Likewise.
2818         (<keyword> 'test-data): Convert index values into keywords.
2819         (<hw-asm> 'test-data): Convert index values into integer strings.
2820
2821         * gas-test.scm (cgen-build.sh): Escape '.' as well.
2822
2823 2001-06-01  Frank Ch. Eigler  <fche@redhat.com>
2824
2825         * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2826         is required for multi-mode hw types (memory).
2827
2828 2001-05-11  Ben Elliston  <bje@redhat.com>
2829
2830         * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2831         when generating allinsn.d from objdump output. Without it, the
2832         testsuite will treat $ as the regular expression for end of line.
2833
2834 2001-05-09  Ben Elliston  <bje@redhat.com>
2835
2836         * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2837         with `cgen_cpu_open'; documentation had become out of date.
2838         * doc/rtl.texi (Instruction operands): Likewise.
2839
2840 2001-05-07  Frank Ch. Eigler  <fche@redhat.com>
2841
2842         * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2843         various-base-length instruction sets.
2844
2845 2001-04-02  Ben Elliston  <bje@redhat.com>
2846
2847         * sid-cpu.scm (-last-insn): New function.
2848         (-gen-sem-switch-engine): Loop through idesc while less than or
2849         equal to the last instruction enum, not less than the MAX enum.
2850         (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2851         * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2852         table's size to be the last instruction enum plus one, not
2853         @PREFIX@_INSN_MAX.
2854         * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2855         instruction onto the instruction list.
2856
2857         * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2858         using the size of the table and its elements.
2859         (-gen-decode-insn-globals): Define the idesc table's size to be
2860         the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2861         * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2862         last instruction enum plus one, not @CPU@_INSN_MAX.
2863
2864 2001-03-28  Ben Elliston  <bje@redhat.com>
2865
2866         * doc/version.texi (UPDATED, EDITION): Update.
2867         * doc/stamp-vti: Likewise.
2868
2869 2001-03-26  Ben Elliston  <bje@redhat.com>
2870
2871         * doc/credits.texi (Credits): Update.
2872
2873         * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2874         specified prefix and, if necessary, escape `$' in gas-build.sh to
2875         prevent unwanted shell variable expansion.
2876
2877 2001-03-24  Ben Elliston  <bje@redhat.com>
2878
2879         * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2880         (<keyword>,test-data): Likewise.
2881         (<hw-address>,test-data): Likewise.
2882         (<hw-iaddress>,test-data): Likewise.
2883         (-collate-test-set): New function.
2884         (build-test-set): Use it.
2885         (gen-gas-test): Generate five test cases per instruction.
2886         (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2887
2888         * read.scm: Load "slib/random" if random is not defined.
2889         * slib/random.scm: New file.
2890
2891         * utils.scm: Remove comments about the Hobbit compiler.
2892         (copyright-cygnus): Add 2001.
2893         (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2894         (package-gnu-simulators): Tidy.
2895
2896 2001-03-23  Ben Elliston  <bje@redhat.com>
2897
2898         * cgen-gas.scm: Inline documentation improvements.
2899
2900 2001-03-21  Ben Elliston  <bje@redhat.com>
2901
2902         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2903         given in a syntax string is undefined.
2904
2905         * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2906         name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2907
2908 2001-03-20  Patrick Macdonald  <patrickm@redhat.com>
2909
2910         * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2911         for arg_type CGEN_CPU_OPEN_BFDMACH.
2912
2913 2001-03-20  Ben Elliston  <bje@redhat.com>
2914
2915         * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2916         instruction onto the instruction list. Define MAX_INSNS to be the
2917         value of the last instruction enum plus one.
2918
2919 2001-03-14  Nick Clifton  <nickc@redhat.com>
2920
2921         * utils.scm (copyright-fsf): Add 2001.  Remove (C).
2922
2923 2001-03-05  Dave Brolley  <brolley@redhat.com>
2924
2925         * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2926         if the number of ifields is greater than zero.
2927
2928 2001-03-01  Frank Ch. Eigler  <fche@redhat.com>
2929
2930         * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2931         Emit LIKELY/UNLIKELY branch probability hints.
2932         * sid-decode.cpu (-gen-record-args): Ditto.
2933
2934 2001-02-02  Patrick Macdonald  <patrickm@redhat.com>
2935
2936         * desc-cpu.scm (-gen-hash-defines): Rename
2937         CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2938
2939 2001-01-26  Frank Ch. Eigler  <fche@redhat.com>
2940
2941         * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2942         writeback tracking.
2943         (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2944         * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2945         if unnecessary.
2946         * sid.scm (<operand> gen-write): Use unsigned long long expression
2947         for writeback.
2948         (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2949         (<unit> gen-profile-code): Ditto.
2950
2951 2001-01-23  Johan Rydberg  <jrydberg@opencores.org>
2952
2953         * doc/rtl.texi (Expressions): Document the (index-of ...) and
2954         (regno ...) rtx.
2955
2956 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2957
2958         * operand.scm (<operand> pretty-sem-name): New field.
2959         (<operand> make): Initialize it from hw-name.
2960         (op:set-pretty-sem-name!): New function.
2961         (<operand> gen-pretty-name): Default to fetching new field.
2962         * rtl.scm (hw): Copy hw-name to pretty-sem-name instead.  Restore
2963         sem-name setting from -rtx-hw-name.
2964
2965 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2966
2967         * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2968         its subsequent gen-pretty-name.
2969
2970         * read.scm: Increase thread working stack limit and backtrace
2971         depth limits.
2972
2973 2001-01-08  Frank Ch. Eigler  <fche@redhat.com>
2974
2975         * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2976
2977 2001-01-06  Johan Rydberg  <jrydberg@opencores.org>
2978
2979         * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2980         current insn plus 4.
2981         (h-delay-insn): New hardware register.
2982         (l-jal): Uses h-delay-insn instead of pc when setting link register.
2983         (l-jalr): Likewise.
2984         (l-bal): Likewise.
2985
2986         * openrisc.opc (parse_hi16): Sign extend value.
2987         (parse_lo16): Likewise.
2988
2989 2001-01-06  Ben Elliston  <bje@redhat.com>
2990
2991         * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2992         instead of @cpu@ and @CPU@ to generically prefix symbol names.
2993         * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2994         (-gen-semantic-fn-table): Likewise.
2995         (-gen-scache-semantic-fn): Likewise.
2996         (-gen-no-scache-semantic-fn): Likewise.
2997         (cgen-read.c): Likewise.
2998         (cgen-sem-switch.c): Likewise.
2999         * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3000         is a filename prefix.
3001         * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3002         (-gen-decode-insn-globals): Likewise.
3003         (-gen-idesc-decls): Likewise.
3004         (cgen-decode.h): Likewise.
3005         (cgen-decode.c): Likewise.
3006         * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3007         (gen-cpu-insn-enum): Likewise.
3008         (sim-finish!): Likewise.
3009
3010 2001-01-05  Johan Rydberg  <jrydberg@opencores.org>
3011
3012         * openrisc.cpu: New file.
3013         * openrisc.opc: Likewise.
3014
3015 2000-12-12  Ben Elliston  <bje@redhat.com>
3016
3017         * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3018
3019 2000-12-07  Ben Elliston  <bje@redhat.com>
3020
3021         * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3022         "insn" when there are zero ifields to extract.
3023
3024 2000-12-04  Frank Ch. Eigler  <fche@redhat.com>
3025
3026         * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3027         used by simple/non-scache simulators.
3028         * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3029         regardless of with-scache?.
3030         (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3031
3032 2000-12-03  Ben Elliston  <bje@redhat.com>
3033
3034         * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3035         (cgen-desc.c): Likewise.
3036
3037 2000-12-01  Greg McGary  <greg@mcgary.org>
3038
3039         * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3040
3041 2000-12-01  Ben Elliston  <bje@redhat.com>
3042
3043         * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3044         definitions if run without with-multipla-isa?.
3045         (cgen-defs.h): New function. Emit an ISA-specific defs file.
3046         * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3047
3048 2000-11-24  Ben Elliston  <bje@redhat.com>
3049
3050         * sim-cpu.scm (-gen-hardware-struct): New function.
3051         (-gen-hardware-types): If with-multiple-isa is specified, emit all
3052         hardware elements wich have share one or more ISAs with the ISAs
3053         being kept.
3054
3055         * sim.scm (-with-multiple-isa?): New symbol.
3056         (with-multiple-isa?): New function.
3057         (option-init!): Initialise -with-multiple-isa?.
3058         (option-set!): Handle with-multiple-isa option.
3059
3060 2000-11-21  Ben Elliston  <bje@redhat.com>
3061
3062         * utils.scm (copyright-fsf): Add the year 2000.
3063
3064 2000-11-20  Frank Ch. Eigler  <fche@redhat.com>
3065
3066         * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3067         unneeded "\n\n" from F() macro definition.
3068
3069 2000-11-15  Greg McGary  <greg@mcgary.org>
3070
3071         * utils-cgen.scm (gen-define-with-symcat): New function.
3072         * desc-cpu.scm (gen-ifld-defns): Use it.
3073         (gen-hw-table-defns): Use it.
3074         (-gen-hash-defines): Use it.
3075         (gen-operand-table): Use it.
3076         (gen-insn-table): Use it.  Remove spurious `#undef MNEM'.
3077         * opc-itab.scm (-gen-ifmt-table): Use it.
3078         (-gen-insn-opcode-table): Use it.
3079         (-gen-macro-insn-table): Use it.
3080         * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3081         * sim-cpu.scm (cgen-semantics.c): Use it.
3082         (cgen-sem-switch.c): Use it.
3083
3084 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3085
3086         * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3087         request to emit calls to insn extractors as functions rather than
3088         branches to inline blocks.
3089         (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3090         (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3091
3092         * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3093         to extractor clauses.
3094
3095 2000-11-10  Frank Ch. Eigler  <fche@redhat.com>
3096
3097         * decode.scm (-distinguishing-bit-population): Significantly
3098         improve popularity heuristic.  Renamed from
3099         (-mask-bit-population): Gone.
3100         (-population-above-threshold): Sort new bit numbers in order of
3101         popularity.
3102         (-population-top-few): Allow up to three more bits to be selected
3103         than requested.  Correct selection order to prefer better bits.
3104         Correct bug in fewer-than-requested case.  Keep threshold as
3105         floating-point.
3106         (decode-best-get-bits): Pass also the insn-values.
3107
3108         * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3109         future optimization.
3110
3111         * utils.scm (message): Format nested lists better.
3112
3113 2000-11-09  Doug Evans  <dje@casey.transmeta.com>
3114
3115         * dev.scm: Add srcdir to %load-path.
3116
3117         * rtx-funcs.scm (subword): Mode of argument can be different
3118         than mode of result, so don't use OP0 to specify argument's mode.
3119
3120 2000-11-02  Ben Elliston  <bje@redhat.com>
3121
3122         * doc/porting.texi (Building a GAS test suite): Document my change
3123         to gas-build.sh.
3124
3125 2000-11-01  Ben Elliston  <bje@redhat.com>
3126
3127         * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3128
3129 2000-10-31  Ben Elliston  <bje@redhat.com>
3130
3131         * gas-test.scm (cgen-build.sh): Allow the generated script to run
3132         with no command line arguments if the gas build directory can be
3133         determined.
3134
3135 2000-10-26  Doug Evans  <dje@casey.transmeta.com>
3136
3137         * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3138         op-ifld -> op-ifield.
3139
3140 2000-10-23  Frank Ch. Eigler  <fche@redhat.com>
3141
3142         * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3143
3144 2000-10-13  matthew green  <mrg@cygnus.com>
3145
3146         * utils-cgen.scm (get-ifetch): Move from here ...
3147         * sim.scm (get-ifetch): ... to here.
3148         * sid.scm (get-ifetch): Copy and port to c++.
3149
3150 2000-10-06  Dave Brolley  <brolley@redhat.com>
3151
3152         * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3153         ifld-start + ifld-word-offset.
3154         (gen-ifld-extract): Check adata-integral-insn? before checking whether
3155         the field is beyond the base number of bits.
3156         (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3157         (gen-extract-ifields): Ditto.
3158         * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3159         characters in the regular expression.
3160
3161 2000-10-02  Frank Ch. Eigler  <fche@redhat.com>
3162
3163         * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3164         preprocessor constant.
3165
3166 2000-09-21  Frank Ch. Eigler  <fche@redhat.com>
3167
3168         * slib/logical.scm: New file from slib.  Provides robust bitwise
3169         logical operations for large integers.
3170         * read.scm: maybe-load it.
3171
3172 2000-09-15  Frank Ch. Eigler  <fche@redhat.com>
3173
3174         * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3175         * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3176         single-isa predicate, but support keep-isa filtering.
3177
3178 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3179
3180         * rtl-c.scm (s-sequence): Handle nested c-calls in both
3181         statement-expression and comma-expression contexts.
3182         (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3183
3184 2000-09-08  Frank Ch. Eigler  <fche@redhat.com>
3185
3186         * decode.scm (-population-top-few): Signal error gracefully if
3187         decoding is about to become ambiguous.
3188
3189 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3190
3191         * doc/rtl.texi (decode-assist): Describe this field as optional.
3192
3193 2000-09-06  Frank Ch. Eigler  <fche@redhat.com>
3194
3195         * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3196         with decode proc.
3197
3198 2000-09-05  Dave Brolley  <brolley@redhat.com>
3199
3200         * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3201         @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3202
3203 2000-08-29  Dave Brolley  <brolley@redhat.com>
3204
3205         * utils-gen.scm (gen-ifld-extract): Pass total-len if
3206         adata-integral-insn is true for this architecture.
3207
3208 2000-08-24  Frank Ch. Eigler  <fche@redhat.com>
3209
3210         * hardware.scm (<hw-immediate> get-index-mode): Define method.
3211         * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3212         * rtl-c.scm (-c-rtl-get): Improve an error message.
3213         * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3214
3215 2000-08-22  Frank Ch. Eigler  <fche@redhat.com>
3216
3217         * Makefile.in (DIST_COMMON): Regenerated.
3218         * ifield.scm (<derived-ifield> needed-iflds): New method.
3219         * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3220         sfmts built from <derived-ifield>s.
3221         * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3222         type symbol 'derived-ifield, not an unparseable string.
3223         * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3224         (-sfmt-contents): Add tracing.
3225
3226         From Doug Evans <dje@transmeta.com>:
3227         * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3228         C code.
3229
3230 2000-08-20  Doug Evans  <dje@casey.transmeta.com>
3231
3232         * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3233         (rtl-c-expr-parsed,rtl-c-expr): New fns.
3234         (-rtl-c-get): Rename from rtl-c-get.
3235         (rtl-c-get): New fn for getter logging.
3236
3237 2000-07-28  Ben Elliston  <bje@redhat.com>
3238
3239         * NEWS: Update.
3240
3241 2000-07-25  Ben Elliston  <bje@redhat.com>
3242
3243         * doc/credits.texi (Credits): Add Frank Eigler.
3244
3245 2000-07-24  Dave Brolley  <brolley@redhat.com>
3246
3247         * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3248         fully.
3249         * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3250         (<keyword>): Initialize all elements fully.
3251         * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3252         fully.
3253         (-gen-mach-table-defns): Ditto.
3254         (-gen-ifld-defns): Ditto.
3255         (-gen-operand-table): Ditto.
3256         (-gen-insn-table): Ditto.
3257         (-gen-cpu-open): Nothing to do for the mach table.
3258
3259 2000-07-13  Ben Elliston  <bje@redhat.com>
3260
3261         * doc/version.texi (UPDATED): Update.
3262
3263 2000-07-05  Ben Elliston  <bje@redhat.com>
3264
3265         * configure.in (AC_PATH_PROG): Remove.
3266         * configure: Regenerate.
3267         * Makefile.am (GUILE): Locate guile dynamically.
3268         * Makefile.in: Regenerate.
3269         * doc/Makefile.in: Likewise.
3270
3271 2000-07-03  Ben Elliston  <bje@redhat.com>
3272
3273         * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3274         * opc-itab.scm (cgen-opc.c): Likewise.
3275
3276 2000-06-28  Frank Ch. Eigler  <fche@redhat.com>
3277
3278         * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3279         guile 1.4 compatibility.
3280         (rtx-env-dump): Comment out buggy display calls.
3281
3282 2000-06-15  matthew green  <mrg@redhat.com>
3283
3284         * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3285
3286 2000-06-14  Frank Ch. Eigler  <fche@redhat.com>
3287
3288         * Makefile.in: Regenerated.
3289
3290         * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3291         (gen-ifld-defns): Ditto.
3292         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3293         * rtl.c (rtl-finish!): Ditto.
3294         * opc-itab.scm (-gen-ifield-decls): Ditto.
3295         * opcodes.scm (gen-switch): Exclude derived operands.
3296         * operand.scm (op-iflds-used): Expand derived operands.
3297         (hw-index-derived): New dummy function to create dummy object.
3298         (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3299         constructor.  Set object's hw-name and index fields.
3300         (-anyof-merge-subchoices): Set instance object's index also.
3301         (-anyof-name): New helper function.
3302         (anyof-merge-semantics): Correct replacement of operand names in
3303         anyof instance.
3304         (op-ifield): Tolerate derived-operands and their funny indices better.
3305         * ifield.scm (ifld-known-values): Expand derived ifields.
3306         (non-multi-ifields, non-derived-ifields): New utility functions.
3307         (ifld-decode-mode): Tolerate objects with unbound decode field.
3308         * iformat.scm (compute-insn-length): Expand derived ifields.
3309         (compute-insn-base-mask): Ditto.
3310         * insn.scm (insn-base-ifields): Remove.
3311         (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3312         (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3313         * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3314         * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3315         (-frag-test-data): Ditto.
3316         * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3317         (-gen-sem-switch-engine); Ditto.
3318         * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3319         * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3320         (-gen-record-args): Tolerate unbound op-ifield.
3321         * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3322         (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3323         Exclude multi-insns.
3324         * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3325         * utils-sim.scm (op-extract?): Handle derived operands.
3326
3327         * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3328         * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3329         * hardware.scm (hardware-for-mode): New function.
3330
3331         * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3332         cleaning up decode tables.
3333         (mask-superset?): Little helper function for above.
3334         * decode.scm (-build-decode-table-entry): Call it.
3335         (-opcode-slots): Add some more tracing.
3336         * arm.cpu: Disable decode-splits construct due to implementation
3337         conflict with `filter-harmlessly-ambiguous-insns'
3338
3339         * decode.scm (-population-top-few): New function for better decode
3340         bit generation.  Includes minor helper functions.
3341         (decode-get-best-bits): Call it instead.
3342         (OLDdecode-get-best-bits): Renamed previous version of above.
3343
3344
3345 2000-06-13  Ben Elliston  <bje@redhat.com>
3346
3347         * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3348         for the Guile library directory.
3349         * configure: Regenerate.
3350         * Makefile.in, doc/Makefile.in: Regenerate.
3351
3352         * Makefile.in, doc/Makefile.in: Regenerate.
3353         * configure.in: Remove unnecessary tests. Move to version 1.0.
3354         * acconfig.h, config.in: Remove.
3355         * configure, aclocal.m4: Regenerate.
3356         * doc/stamp-vti, doc/version.texi: Likewise.
3357         * AUTHORS: New file.
3358
3359 2000-06-07 Ben Elliston  <bje@redhat.com>
3360
3361         * fixup.scm (symbol-bound?): Reduce debugging output.
3362
3363 2000-06-02  matthew green  <mrg@redhat.com>
3364
3365         * insn.scm (insn-base-ifields): Returns all the instruction fields for
3366         a given instruction, replacing derived fields with their subfields.
3367         (insn-value): Use `insn-base-ifields' to find all constant values.
3368         (multi-insn-instantiate!): Comment some debug messages.
3369
3370 2000-06-01  Ben Elliston  <bje@redhat.com>
3371
3372         * doc/rtl.texi (Expressions): Document a hazard with the choice of
3373         symbol names used in a (c-call ..) rtx.
3374
3375         * sim-test.scm (build-test-set): Return (()) for an instruction
3376         with no operands, so it too is included in the generated test set.
3377
3378 2000-05-31  Ben Elliston  <bje@redhat.com>
3379
3380         * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3381         (sim-test): Likewise.
3382         * Makefile.in: Regenerate.
3383
3384 2000-05-30  Frank Ch. Eigler  <fche@redhat.com>
3385
3386         * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3387         stack traceback, in an order that resembles gdb's `bt'.
3388
3389 2000-05-24  Frank Ch. Eigler  <fche@redhat.com>
3390
3391         * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3392         * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3393         * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3394         multi insns.
3395         * ifield.scm (multi-ifield): Define workable field-mask and field-value
3396         virtual functions.
3397         (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3398         * iformat.scm (ifmt-expanded-ifields): Gone.
3399         (ifields-base-ifields): New function.  Call ifld-base-ifields for real
3400         work.
3401         (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3402         ifmt entries.
3403
3404         * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3405         code.
3406
3407 2000-05-23  Frank Ch. Eigler  <fche@redhat.com>
3408
3409         * sid.scm (with-any-profile?): New function clone.
3410
3411 2000-05-19  Frank Ch. Eigler  <fche@redhat.com>
3412
3413         * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3414
3415 2000-05-18  Frank Ch. Eigler  <fche@redhat.com>
3416
3417         * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3418         (-multi-ifield-read): Parse them.
3419         (define-full-multi-ifield): Pass #f/#f as defaults for them.
3420         * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3421         (multi-ifield gen-extract): Add decode hook.
3422         * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3423
3424         * insn.scm (syntax-break-out): More correctly handle \-escaped
3425         syntax characters.
3426         (syntax-make-elements): Ditto.
3427         * opc-itab.scm (compute-syntax): Ditto.
3428
3429 2000-05-17  Ben Elliston  <bje@redhat.com>
3430
3431         * gas-test.scm (cgen-build.sh): Log the correct script filename.
3432
3433 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3434
3435         * gas-test.scm (build-test-set): Return (()) for an instruction
3436         with no operands, so it too is included in the generated test set.
3437
3438 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3439
3440         * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3441         IFMT_OPERANDS and SYNTAX_BYTES.
3442
3443 2000-05-15  Frank Ch. Eigler  <fche@redhat.com>
3444
3445         * sim.scm (with-any-profile?): New function.
3446         * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3447         to decide whether or not to include profiling counters.
3448
3449 2000-05-10  Frank Ch. Eigler  <fche@redhat.com>
3450
3451         Fuller derived-operand support for opcodes.
3452         * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3453         * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3454         Correctly compute ..._IFMT_OPERANDS.  Omit useless ..._INSN_OPERANDS.
3455         (gen-operand-table): Omit derived- and anyof- operands from table.
3456         (gen-insn-table): Omit multi-insns from table.
3457         * iformat.scm (ifmt-expanded-fields): New function to expand
3458         subfields of derived-ifields.
3459         (ifmt-compute!): Ignore remaining multi-insns.
3460         * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3461         multi-insns.
3462         * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3463         (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3464         * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3465         gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3466         (gen-switch): Omit anyof-operands.
3467         * operand.scm (-anyof-syntax): New function.
3468         (-anyof-merge-syntax): Call it.
3469         * utils.scm (collect): New idiomatic function.
3470
3471 2000-05-10  Ben Elliston  <bje@redhat.com>
3472
3473         * m68k.cpu: New file (work in progress).
3474
3475 2000-05-05  Frank Ch. Eigler  <fche@redhat.com>
3476
3477         * Makefile.am (all-local): New target.  Create stamp-cgen.
3478         * Makefile.in: Regenerated.
3479         * doc/Makefile.in: Regenerated.
3480
3481 2000-04-26  Frank Ch. Eigler  <fche@redhat.com>
3482
3483         * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3484         (-operand-parse-setter): Ditto.
3485         * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3486         for CACHE-ADDR operands.
3487         * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3488         trace entries.  Widen byte-wide values for printing.
3489         * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3490         Widen byte-wide values for printing.  Hexify memory addresses.
3491
3492 2000-04-23  matthew green  <mrg@redhat.com>
3493
3494         * m32r.cpu: Fix a typo.
3495
3496 Fri Apr 21 22:18:48 2000  Jim Wilson  <wilson@cygnus.com>
3497
3498         * ia64.cpu (define-model): Change merced to Itanium.
3499         (f-qp): Change quilifying to qualifying.
3500         (movbr_ph, movbr_pvec): Delete.
3501         (I-I21): Delete uses of movbr_ph and movbr_pvec.
3502
3503 2000-04-07  Ben Elliston  <bje@redhat.com>
3504
3505         * doc/porting.texi (Building a simulator test suite): Clarify
3506         where generated test cases are placed.
3507
3508 2000-04-07  Ben Elliston  <bje@redhat.com>
3509
3510         * Makefile.am (gas-test): Remove dependency on `cgen'.
3511         (sim-test): Ditto.
3512         * Makefile.in: Regenerate.
3513
3514 2000-04-04  Frank Ch. Eigler  <fche@redhat.com>
3515
3516         * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3517         * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3518         type reconfiguration.
3519         * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3520         with-profile?.
3521
3522 2000-03-30  Ben Elliston  <bje@redhat.com>
3523
3524         * doc/rtl.texi (Enumerated constants): Add concept index entries.
3525
3526 2000-03-24  Ben Elliston  <bje@redhat.com>
3527
3528         * Makefile.am (stamp-cgen): Reinstate target.
3529         * Makefile.in: Regenerate.
3530
3531 2000-03-22  Ben Elliston  <bje@redhat.com>
3532
3533         * slib/ppfile.scm: Remove; unused.
3534         * slib/defmacex.scm: Likewise.
3535
3536 2000-03-21  Ben Elliston  <bje@redhat.com>
3537
3538         * doc/internals.texi (Source file overview): Document.
3539
3540         * Makefile.am (GUILEDIR): Remove.
3541         (CGEN): Ditto. Callers use $(GUILE) instead.
3542         (GUILEFLAGS): Ditto.
3543         (CGENFILES): Ditto.
3544         (APPDESCFILES): Ditto.
3545         (OPCODESFILES): Ditto.
3546         (SIMFILES): Ditto.
3547         (pkgdata_SCRIPTS): Ditto.
3548         (stamp-cgen): Remove target.
3549         * Makefile.in: Regenerate.
3550
3551         * configure.in: Remove header and library tests.
3552         * configure: Regenerate.
3553         * config.in: Likewise.
3554
3555 2000-03-20  Ben Elliston  <bje@redhat.com>
3556
3557         * read.scm: Cease loading "hob-sup.scm".
3558         * utils.scm: Inherit the fastcall family of procedures (for now).
3559         * hob-sup.scm: Remove.
3560
3561 2000-03-20  Ben Elliston  <bje@redhat.com>
3562
3563         * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3564         * configure: Regenerate.
3565         * gdbinit.in: Remove.
3566
3567 2000-03-17  Ben Elliston  <bje@redhat.com>
3568
3569         * Makefile.am (CGEN): Use guile, not cgen.
3570         (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3571         (bin_PROGRAMS, cgen_SOURCES): Likewise.
3572         (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3573         (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3574         (HOB_OBJS): Likewise.
3575         (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3576         (CGENOBJS): Likewise.
3577         (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3578         (hobbit, hobbit.o, hobbit.c): Remove targets.
3579         (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3580         (CLEANFILES): Update.
3581         * acconfig.h (WITH_HOBBIT): Remove.
3582         * configure.in: Do not test for 3 arg scm_make_vector. Remove
3583         option --with-cgen-hobbit.
3584         * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3585         * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3586         * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3587         * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3588         * Makefile.in: Regenerate.
3589         * config.in: Likewise.
3590         * aclocal.m4: Likewise.
3591         * configure: Likewise.
3592         * README (Hobbit support): Remove.
3593         * doc/internals.texi (Conventions): Do not mention Hobbit.
3594         * doc/porting.texi (Supported Guile versions): Likewise.
3595
3596 2000-03-16  Frank Ch. Eigler  <fche@redhat.com>
3597
3598         * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3599         callback convention to new sid sidutil::basic_cpu code.
3600         (-gen-sfrag-engine-fn): Ditto.
3601         * sid.scm (-create-virtual-insns!): Ditto.
3602         (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3603         mode.
3604         (cxmake-skip): Implement properly for pbb mode.
3605
3606 2000-03-03  Ben Elliston  <bje@redhat.com>
3607
3608         * doc/internals.texi: New file.
3609
3610 2000-02-29  Ben Elliston  <bje@redhat.com>
3611
3612         * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3613         * doc/porting.texi: Formatting tweaks.
3614
3615 2000-02-25  Nick Clifton  <nickc@cygnus.com>
3616
3617         * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3618         field.
3619
3620 Thu Feb 24 14:09:01 2000  Doug Evans  <devans@seba.cygnus.com>
3621
3622         * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3623         mode.
3624
3625 2000-02-23  Andrew Haley  <aph@cygnus.com>
3626
3627         * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3628         instruction.
3629
3630 2000-02-24  Ben Elliston  <bje@redhat.com>
3631
3632         * doc/rtl.texi (Derived operands): Add some cindex entries.
3633
3634 2000-02-23  Ben Elliston  <bje@redhat.com>
3635
3636         * ia32.cpu (dndo): Move general purpose macro from here ..
3637         * simplify.inc (dndo): .. to here.
3638
3639 2000-02-18  Frank Ch. Eigler  <fche@redhat.com>
3640
3641         * arm.cpu (h-tbit): Add c-call setter function.
3642         (h-mbits): Ditto.
3643
3644 2000-02-17  Frank Ch. Eigler  <fche@redhat.com>
3645
3646         * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3647         (-frag-cost-compute!): Ditto.
3648         * utils.scm (copyright-cygnus): Add Y2K.
3649         * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3650
3651 2000-01-25  Nick Clifton  <nickc@cygnus.com>
3652
3653         * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3654         flags field of the CGEN_CPU_TABLE structure.
3655
3656 Sun Dec 12 14:20:36 1999  Doug Evans  <devans@seba.cygnus.com>
3657
3658         * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3659         All references updated.
3660
3661 Tue Nov 30 11:06:22 1999  Doug Evans  <devans@seba.cygnus.com>
3662
3663         * ia32.cpu: Rewrite addressing mode support.
3664
3665         * ifield.scm (<ifield>): New member `follows'.
3666         (ifld-known-values): New proc.
3667         (<ifield>): New method set-word-offset!.
3668         (ifld-set-word-offset!): New proc.
3669         (ifld-new-word-offset): New proc.
3670         (<ifield>): New method next-word.
3671         (<multi-ifield>): New method next-word.
3672         (ifld-next-word): New proc.
3673         (ifld-precedes?): New proc.
3674         (-ifield-parse): New args word-offset,word-length,follows.
3675         All callers updated.  Handle CISC-style vs RISC-style ifields.
3676         (-ifield-read): Recognize word-offset,word-length,follows specs.
3677         (-ifld-parse-follows): New proc.
3678         (-multi-ifield-make-default-insert): New proc.
3679         (-multi-ifield-make-default-extract): New proc.
3680         (-multi-ifield-parse): Provide default values for insert,extract
3681         handlers if not specified.
3682         (<derived-ifield>): New class.
3683         (derived-ifield?): New predicate.
3684         (ifld-derived-operand?): New predicate.
3685         (f-anyof): New global.
3686         (ifld-anyof?,ifld-anyof-operand?): New predicates.
3687         (f-derived,ifld-derived?): Delete.
3688         (ifield-builtin!): Delete init of f-derived.  Init f-anyof.
3689         * insn.scm (-sub-insn-ifields): New proc.
3690         (-sub-insn-make!): New proc.
3691         (multi-insn-instantiate!): Provide initial implementation.
3692         (-insn-parse): If insn contains "anyof" operands, create a
3693         <multi-insn> object instead of a plain <insn>.
3694         (-parse-insn-format-symbol): Rewrite derived operand handling.
3695         Add anyof operand handling.
3696         (-parse-insn-format-ifield-spec): Rewrite.
3697         (-parse-insn-format-operand-spec): Delete.
3698         (-parse-insn-format-list): Delete support for `(operand value)'.
3699         (anyof-operand-format?): Replaces derived-operand-format?.
3700         * operand.scm (-operand-parse-getter): Improve error messages.
3701         (-operand-parse-setter): Ditto.
3702         (<derived-operand>): New members args,syntax,base-ifield,encoding,
3703         ifield-assertion.
3704         (<anyof-operand>): Change baseclass from <derived-operand> to
3705         <operand>.  Delete member values.  New members base-ifield,choices.
3706         (anyof-operand?): New predicate.
3707         (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3708         (-derived-operand-parse): Rewrite.
3709         (-derived-operand-read): Rewrite.
3710         (-anyof-parse-choice): New proc.
3711         (-anyof-operand-parse): Rewrite.
3712         (-anyof-operand-read,define-anyof-operand): New procs.
3713         (<anyof-value>): Rewrite.
3714         (-anyof-initial-known): New proc.
3715         (anyof-satisfies-assertions?): New proc.
3716         (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3717         (-anyof-merge-getter,-anyof-merge-setter): New procs.
3718         (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3719         (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3720         (-anyof-value-from-derived): New proc.
3721         (-anyof-all-choices-1,anyof-all-choices): New procs.
3722         (operand-init!): Create define-anyof-operand reader command.
3723
3724         * insn (syntax-break-out): Take syntax as argument instead of insn.
3725         All callers updated.
3726         (syntax-make): Move here, from ???.
3727
3728         * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3729         bitrange-foo. All uses updated.
3730         (bitrange-next-word): New proc.
3731
3732         * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3733
3734         * rtl.scm (rtx-canonicalize): Provide initial implementation.
3735         (rtx-make-const,rtx-make-enum): New procs.
3736         (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12].  All callers updated.
3737         (rtx-mem-addr,rtx-mem-sel): New procs.
3738         (rtx-change-address): New proc.
3739         (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3740         (rtx-make-set,rtx-single-set?): New procs.
3741         (rtx-combine): New proc.
3742
3743         * rtl.scm (rtx-traverse): New arg `appstuff'.  All callers updated.
3744         (rtx-traverse-with-locals): Ditto.
3745         (-rtx-traverse,-rtx-traverse-*): Ditto.
3746
3747         * rtl.scm (define-subr): New proc.
3748         (rtl-init!): Create reader command `define-subr'.
3749
3750         * cos.c (_object_mi_p): Ensure argument is an object.
3751         (indent): New function.
3752         (_object_print_elms): Add pretty-printing support.
3753         (_object_print): Ditto.
3754
3755         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3756         (*floats-s->c-fun-table*): Ditto.
3757         * hobbit.c,hobbit.h: Rebuild.
3758         * hob-sup.c (fastcall7): New proc.
3759         * hob-sup.h (fastcall7): Declare.
3760         * hob-sup.scm (fastcall7): New macro.
3761
3762         * mach.scm (<arch>): New member subr-list.
3763         (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3764         (arch-finish!): Reverse recorded subr list.
3765
3766         * read.scm (debug-env): New global.
3767         (debug-var-names,debug-var,debug-repl-env): New procs.
3768         (debug-repl): Rewrite.  New arg `env-list'.  All callers updated.
3769         (debug-quit): Renamed from `continue'.
3770
3771         * simplify.inc (dsmf): New pmacro.
3772
3773         * utils.scm (plus-scan): New proc.
3774         (split-bits): Rewrite.
3775         (split-value): New proc.
3776
3777 1999-10-13  Doug Evans  <devans@casey.cygnus.com>
3778
3779         * doc/Makefile.am (DOCFILES): Add notes.texi.
3780         * doc/Makefile.in: Rebuild.
3781
3782 1999-10-11  Doug Evans  <devans@casey.cygnus.com>
3783
3784         * ifield.scm (ifld-derived?): New proc.
3785         (f-derived): New global.
3786         (ifield-builtin!): Create ifield f-derived.
3787         (<multi-insn>): New class.
3788         (multi-insn?): New predicate.
3789         (multi-insn-instantiate!): New proc.
3790         (-insn-parse): Create <multi-insn> objects for insns with derived
3791         ifields.
3792         (-parse-insn-format-symbol): Handle derived ifields.
3793         (-parse-insn-format-ifield-spec): New proc.
3794         (-parse-insn-format-operand-spec): New proc.
3795         (-parse-insn-format-list): Simplify.
3796         (-parse-insn-format): No longer allow (ifield-object value) spec.
3797         (derived-operand-format?): New proc.
3798         (insn-alias?): New proc.
3799         (non-alias-insns): Rewrite.
3800         (insn-real?): Renamed from real-insn?, all callers updated.
3801         (virutal-insns): Rewrite.
3802         (multi-insns): New proc.
3803         * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3804         * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3805         Return #f if operand doesn't have an index or if index is not an
3806         ifield.
3807         (hw-index-anyof): New proc.
3808         (-operand-parse): Allow integer indices.
3809         (<derived-operand>): New class.
3810         (derived-operand?): New predicate.
3811         (<anyof-operand>): New class.
3812         (<anyof-value>): New class.
3813         (-anyof-parse-value,-anyof-operand-parse): New procs.
3814         (-derived-operand-parse,-derived-operand-read): New procs.
3815         (define-derived-operand,define-full-derived-operand): New procs.
3816         (operand-init!): New reader command define-derived-operand.
3817
3818         * utils.scm (list-take): Handle negative amount.
3819         (element?): Rewrite.
3820
3821 1999-10-10  Doug Evans  <devans@casey.cygnus.com>
3822
3823         * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3824
3825 1999-10-04  Richard Henderson  <rth@cygnus.com>
3826
3827         * ia64.cpu: Checkpoint.
3828
3829 1999-09-29  Doug Evans  <devans@casey.cygnus.com>
3830
3831         * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3832
3833         * sim.scm (sim-finish!,x-invalid): Always set pc.  Set vpc based on
3834         default-insn-bitsize.  Pass vpc to sim_engine_invalid_insn.
3835
3836 Wed Sep 29 14:39:39 1999  Dave Brolley  <brolley@cygnus.com>
3837
3838         * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3839         PC returned by sim_engine_invalid_insn.
3840
3841 1999-09-28  Doug Evans  <devans@casey.cygnus.com>
3842
3843         * ia32.cpu: New file.
3844
3845 1999-09-25  Doug Evans  <devans@casey.cygnus.com>
3846
3847         * utils.scm (bit-set?): Fix off by one error.
3848
3849         * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3850
3851         * rtl.scm (hw): Check for valid hardware element before trying to
3852         get its mode.
3853
3854         * arm.cpu (arm7f cpu): Renamed from arm.  All users updated.
3855         * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3856         (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3857         * thumb.cpu (*): arm_compute_operand2_foo renamed to
3858         compute_operand2_foo.
3859
3860         * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3861         * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3862         Call delayed_branch/branch methods instead of assigning to `vpc'.
3863         (<hw-pc>,cxmake-skip): Call skip method.
3864         (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3865         (<pc>,cxmake-skip): Ditto.
3866         (-create-virtual-insns!): Ditto.
3867         (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3868         (op:write): Ditto.
3869         (op:record-profile): Specify #:output-language "c++".
3870         * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3871         @arch@_insn_attr.
3872         (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3873         Define enums here.
3874         (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3875         (gen-semantic-code): Ditto.
3876         (-gen-sem-case,-gen-sfrag-code): Ditto.
3877         (-gen-hardware-types): Delete class @cpu@_cpu_base.
3878         (cgen-cpu.h): File is now #included by main cpu class, rather than
3879         subclassing.
3880         (cgen-defs.h): New proc.
3881         (-gen-scache-semantic-fn): Change result type to sem_status.
3882         New local `status'.  Call done_cti_insn/done_insn method at end.
3883         (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3884         cgen-ops.h.
3885         (cgen-sem-switch.cxx): Ditto.
3886         * sid-decode.scm (-gen-idesc-decls): Update return type of
3887         @prefix@_sem_fn.
3888         (cgen-decode.h): Add using namespace @arch@.
3889         (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3890
3891         * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3892         (estate-output-language-c?,estate-output-language-c++?): New procs.
3893         (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3894         (estate-make-for-normal-rtl-c++): New proc.
3895         (rtl-c++-parsed,rtl-c++): New proc.
3896         (s-c-call): Invoke cpu class method if c++.
3897         (join): Use s-c-raw-call.
3898
3899         * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3900         (nop): Rewrite.
3901
3902         * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3903         * rtl.scm (<eval-state>): New member `modifiers'.
3904         (<eval-state>,vmake!): Handle #:modifiers.
3905         (estate-with-modifiers): New proc.
3906
3907         * rtl.scm (rtx-side-effects?): New proc.
3908         (rtx-canonical-bool): Don't change expr if it has side effects.
3909         * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3910         better.
3911
3912 1999-09-23  Doug Evans  <devans@casey.cygnus.com>
3913
3914         * sim.scm (gen-scache-type): Fix typo in last patch.
3915
3916 Tue Sep 21 17:12:55 1999  Dave Brolley  <brolley@cygnus.com>
3917
3918         * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3919
3920 1999-09-05  Doug Evans  <devans@casey.cygnus.com>
3921
3922         * sid.scm (<hw-pc>,cxmake-skip): New method.
3923         (<pc>,cxmake-skip): New method.
3924
3925         * decode.scm (decode-build-table): Delete args startbit,index-list.
3926         All callers updated.
3927         * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3928         All callers updated.
3929         * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3930         to decode-get-best-bits.
3931         * sid-decode.scm (-gen-decode-fn): Ditto.
3932
3933         * hardware.scm (hw-bits): New proc.
3934         (-hw-parse): New arg layout.  All callers updated.
3935         (define-full-hardware): New arg layout.  All callers updated.
3936         (-hw-validate-layout): New proc.
3937         (-hw-create-[gs]etter-from-layout): New procs.
3938         (<hw-register>,parse!): Handle layout spec.
3939         * types.scm (type-bits): New proc.
3940
3941         * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3942         UNARY, BINARY, TRINARY rtxs.
3943
3944         * attr.scm (<enum-attribute>,parse-value): Allow strings.
3945         * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3946         Support '- as "unused spot" indicator.
3947
3948 1999-09-03  Doug Evans  <devans@casey.cygnus.com>
3949
3950         * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3951
3952 1999-09-02  Doug Evans  <devans@casey.cygnus.com>
3953
3954         * rtx-funcs.scm (subword): Fix mode spec of `value'.
3955
3956         * rtl.scm (-rtx-traverse-operands): Fix debugging message
3957         construction.
3958         (tstate-make): New arg `depth'.  All callers updated.
3959         (tstate-depth,tstate-set-depth!): New procs.
3960         (tstate-incr-depth!,tstate-decr-depth!): New procs.
3961         (-rtx-traverse-operands): Indent debugging output by traversal depth.
3962         (-rtx-traverse): Ditto.  Keep track of traversal depth.
3963
3964 1999-09-01  Doug Evans  <devans@casey.cygnus.com>
3965
3966         * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3967         * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3968         * utils-sim.scm: Decoder generator support moved here.
3969         (-decode-equiv-entries?,-decode-sort-entries): New procs.
3970         (-gen-decoder-switch): Sort entries for more fall-throughs.
3971
3972         * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3973         * Makefile.in: Rebuild.
3974         * sim-test.scm (build-sim-testcase): Add logging message.
3975         * dev.scm (cload): Recognize SIM-TEST application.
3976         (load-stest): Set APPLICATION to SIM-TEST.
3977
3978         * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3979
3980         * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3981         * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3982         * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3983
3984         * insn.scm (syntax-break-out): Handle ${foo}.
3985
3986 Sun Aug 29 11:11:15 1999  Doug Evans  <devans@canuck.cygnus.com>
3987
3988         * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3989         (bin_PROGRAMS): Define.
3990         (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3991         (cgen-hob.c): Prepend $(srcdir)/ here.
3992         (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3993         (libcpu_a_SOURCES): Delete.
3994         (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3995         (CGEN_HOB_OBJ,CGENOBJS): New variables.
3996         * configure.in (LIBS): Replace -Wl,-rpath with -R.
3997         Add AC_CHECK_LIB(guile,main).
3998         * Makefile.in: Rebuild.
3999         * doc/Makefile.in: Rebuild.
4000         * aclocal.m4: Rebuild.
4001         * config.in: Rebuild.
4002         * configure: Rebuild.
4003
4004 1999-08-28  Doug Evans  <devans@casey.cygnus.com>
4005
4006         Rename rtx functions from name: to name, accept optional leading
4007         modifier and mode.
4008         VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4009         * attr.scm (-attr-eval): Update.
4010         * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4011         (<hw-register>,mode-ok?): Disallow VOID.
4012         (<hw-immediate>,mode-ok?): Disallow VOID.
4013         (<hw-address>,mode-ok?): Disallow VOID.
4014         * mode.scm (mode-name?): New proc.
4015         (VOID): Renamed from VM.
4016         (DFLT): Renamed from DM.
4017         (mode-builtin!): Update.
4018         * opcodes.scm (<ifield>,gen-insert): Update.
4019         (<ifield>,gen-extract): Update.
4020         (<multi-ifield>,gen-insert,gen-extract): Update.
4021         * operand.scm (op:mode): Update.
4022         (<pc>,make!): Update.
4023         (op:new-mode): Update.
4024         (-operand-read): Update.
4025         * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4026         NONVOIDMODE, DFLTMODE.  Rename VMMODE to VOIDMODE.
4027         (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4028         (-rtx-lazy-sem-mode): Renamed from -rtx-mode.  All callers updated.
4029         (rtx-make): Call -rtx-munge-mode&options.
4030         (rtx accessors): Rewrite.
4031         (rtx-pretty-name): Update.
4032         (-rtx-traverse-*): Update.
4033         (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4034         (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4035         (-rtx-make-traverse-table): Update.
4036         (-rtx-traverse-operands): Update.
4037         (-rtx-option?,-rtx-option-list?): New procs.
4038         (-rtx-munge-mode&options): New proc.
4039         (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4040         (-rtx-traverse): Update.
4041         (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4042         (rtx-compile-time-constant?): Update.
4043         (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4044         (rtx-value): Update.
4045         (hw,reg,mem): Renamed from foo:.  Update.  All callers updated.
4046         * rtx-funcs.scm (*): Update.
4047         * rtl-c.scm (rtl-c-get): Update.
4048         (rtl-c-set-quiet,rtl-c-set-trace): Update.
4049         (s-c-call,s-c-raw-call): Update.
4050         (s-boolifop,s-convop,s-if,s-cond): Update.
4051         (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4052         (-par-replace-set-dests,-par-replace-set-srcs): Update.
4053         (s-parallel,s-sequence): Update.
4054         (rtl-c-build-table): Update.
4055         * sem-frags.scm (-frag-hash-compute!): Update.
4056         (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4057         for temporary bug compatibility with previous version.
4058         (-frag-expr-locals,-frag-expr-stmts): Update.
4059         (-frag-compute-desired-frags,-frag-pick-best): Update.
4060         * semantics.scm (-simplify-expr-fn): Update.
4061         (rtx-simplify): Update.
4062         (-rtx-ref-type): Update.  Account for modifiers.
4063         (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4064         (-build-ifield-operand!): Update.
4065         (-build-known-values): Update.
4066         (semantic-compile): Update.
4067         (-gen-reg-access-defns): Update.
4068         (gen-semantic-code,-gen-sem-case): Update.
4069         (-gen-sfrag-code,-gen-sfrag-case): Update.
4070         * sim-cpu (gen-semantic-code): Update.
4071         * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4072         (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4073         (-hw-cxmake-get): Update.
4074         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4075         (<hw-index>,cxmake-get): Update.
4076         (<operand>,gen-type,gen-read,cxmake-get): Update.
4077         (<operand>,gen-set-quiet,gen-set-trace): Update.
4078         (<pc>,cxmake-get): Update.
4079         (sim-finish!): Update.
4080         * utils-gen.scm (-gen-ifld-extract-base): Update.
4081         (-gen-ifld-extract-beyond): Update.
4082         (gen-multi-ifld-extract): Update.
4083         * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4084         * sid.scm (<hw-pc>,gen-write): Update.
4085         (-gen-decode-insn-globals): Update.
4086         (-hw-cxmake-get): Update.
4087         (<hw-register>,cxmake-get-raw): Update.
4088         (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4089         (<hw-index>,cxmake-get): Update.
4090         (<operand>,gen-type,gen-read,cxmake-get): Update.
4091         (<operand>,gen-set-quiet,gen-set-trace): Update.
4092         (<pc>,cxmake-get): Update.
4093         (-create-virtual-insns!): Update.
4094         (-decode-split-build-assertion): Update.
4095         * *.cpu: Update.
4096         * simplify.inc: Update.
4097
4098 1999-08-20  Doug Evans  <devans@casey.cygnus.com>
4099
4100         * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4101         Prefix queue function name with sim_ instead of @cpu@_.
4102
4103         * sim.scm (-with-parallel-only?): New global.
4104         (option-init!): Initialize it.
4105         (option-set!): Set it.
4106         (with-parallel-only?): New proc.
4107         * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4108         and writeback markers if with-parallel-only.
4109         (-gen-idesc-init-fn): Update.
4110         * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4111         with-generic-write.
4112
4113 Wed Aug 18 15:04:30 1999  Doug Evans  <devans@canuck.cygnus.com>
4114
4115         * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4116         with the invalid insn handler.
4117
4118         * utils.scm (list-maybe-ref): New proc.
4119
4120         * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4121         define-arch.
4122         (-mach-parse): Signal error if mach wasn't specified in define-arch.
4123
4124         * i960.cpu (test*-*): Delete `expr' arg.
4125         (test-op,branch-op): Update.
4126
4127 1999-08-09  Doug Evans  <devans@casey.cygnus.com>
4128
4129         * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4130         (gen-reg-access-decl): Replace `name' arg with `hw'.  All callers
4131         updated.
4132         (gen-reg-access-defn): Ditto.
4133         (-gen-hw-addr): Rewrite.
4134         (-op-gen-queued-write): Rewrite.
4135         * sim-cpu.scm (-gen-cpu-reg-access-decls):
4136         (-gen-scache-semantic-fn): Handle with-generic-write.
4137         (-gen-no-scache-semantic-fn): Ditto.
4138
4139 1999-08-08  Doug Evans  <devans@casey.cygnus.com>
4140
4141         * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4142
4143         * sim.scm (-with-generic-write?): New global.
4144         (option-init!): Initialize it.
4145         (option-set!): Set it.
4146         (with-generic-write?): New proc.
4147         (-gen-hw-addr): New proc.
4148         (-op-gen-queued-write): New proc.
4149         (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4150
4151         * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4152         turned off.
4153         (-gen-sem-switch): Preserve existing with-parallel? value.
4154         (-gen-sem-parallel-switch): Ditto.
4155         (-gen-write-case): Add /indent support.
4156         (cgen-write.c): Rewrite.
4157
4158         * utils.scm (-current-print-state): New global.
4159         (make-print-state): New proc.
4160         (pstate-indent,pstate-set-indent!): New procs.
4161         (pstate-cmd?,pstate-cmd-do): New procs.
4162         (/indent): New global.
4163         (/indent-set,/indent-add): New procs.
4164         (string-write): Set -current-print-state.
4165         (-string-write): New arg pstate, all callers updated.
4166         Handle print-state commands.
4167         (-string-list-flatten): New proc.
4168         (string-list->string): Use it.
4169
4170         * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4171         (-gen-sem-fn-table-entry): New proc.
4172         (-gen-semantic-fn-table): New proc.
4173         (-gen-scache-semantic-fn): Make fn static.
4174         (-gen-no-scache-semantic-fn): Ditto.
4175         (cgen-semantics.c): Define macro SEM_FN_NAME.
4176         * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4177         FAST,FULL.  Update @cpu@_insn_sem contents.
4178         (-gen-semf-fn-name): Delete.
4179         (-gen-sem-fn-decls): Delete.
4180         (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4181         @cpu@_semf_init_idesc_table.
4182         (-gen-idesc-init-fn): Update.  Don't initialize pointers to semantic
4183         handlers here.
4184         (cgen-decode.h): Print sfmt enum.
4185         * sid-decode.scm (-gen-semf-fn-name): Delete.
4186         * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4187
4188         * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4189         (ifmt-compute!): Ditto.
4190         * sim-decode.scm (-gen-decoder-switch): Ditto.
4191         * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4192         (-gen-decoder-switch): Ditto.
4193
4194         * insn.scm (insn-virtual?): New proc.
4195
4196         * enum.scm (gen-enum-decl): Speed up, build string as list and then
4197         convert to string.
4198         * mach.scm (<arch>): attr-list is now a pair of lists.
4199         (current-attr-list): Rewrite.
4200         (current-attr-add!,current-attr-lookup): Rewrite.
4201         * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4202
4203 1999-08-06  Richard Henderson  <rth@cygnus.com>
4204
4205         * ia64.cpu: Initial checkpoint.
4206
4207 1999-08-06  Doug Evans  <devans@casey.cygnus.com>
4208
4209         * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4210         (pmacros-init!): Update .apply help string.
4211
4212 1999-08-03  Doug Evans  <devans@casey.cygnus.com>
4213
4214         * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4215         (<hw-pc>,cxmake-skip): New method.
4216         (<pc>,cxmake-skip): New method.
4217         (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4218         (gen-argbuf-type): New member `skip_count'.
4219         (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4220         * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4221
4222         * utils-sim.scm: New file.
4223         * dev.scm (load-sim): Load it.
4224         (load-sid): Load it.
4225         * cgen-sid.scm: Load it.
4226         * cgen-sim.scm: Load it.
4227         * iformat.scm (<sformat>): New member sbuf, not initialized by
4228         default make.
4229         * rtx-funcs.scm (skip): Rewrite.
4230         * rtl-c.scm (skip): Rewrite.
4231         * m32r.cpu (sc,snc): Update `skip' usage.
4232         * mode.scm (mode-real-mode): New proc.
4233         * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4234         Distinguish fragments by the <sformat-abuf> they use.
4235         * sim.scm (gen-profile-index-type): Delete.
4236         (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4237         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4238         (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4239         (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4240         (-gen-argbuf-elm): Rewrite.
4241         (-gen-argbuf-hw-elm): Delete.
4242         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4243         of each sfmt.
4244         (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4245         (sim-init!): Initialize them.
4246         (sim-analyze-insns!): Set them.
4247         (current-sbuf-list): New proc.
4248         * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4249         gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4250         * sim-model.scm (-gen-model-insn-fn): Ditto.
4251         * sim-decode.scm (-gen-extract-decls): Delete.
4252         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4253         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4254         sim.scm.
4255         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4256         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4257         (-gen-op-extract,-gen-op-trace-extract): New procs.
4258         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4259         gen-sfmt-argvars-foo and rewrite.
4260         (-gen-record-args): Rewrite.
4261         (-gen-extract-case): Tweak.
4262         * sid.scm (gen-profile-index-type): Delete.
4263         (ifield argbuf support): Move to utils-sim.scm.
4264         (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4265         (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4266         (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4267         (-sim-sformat-argbuf-list): New global.
4268         (sim-init!): Initialize it.
4269         (sim-analyze-insns!): Set it.
4270         (current-sbuf-list): New proc.
4271         * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4272         (-gen-argbuf-hw-elm): Delete.
4273         (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4274         of each sfmt.
4275         (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4276         (-gen-extract-decls): Delete.
4277         (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4278         sid.scm.
4279         (<hw-register,gen-extract,gen-trace-extract): Ditto.
4280         (<hw-address,gen-extract,gen-trace-extract): Ditto.
4281         (-gen-op-extract,-gen-op-trace-extract): New procs.
4282         (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4283         gen-sfmt-argvars-foo and rewrite.
4284         (-gen-record-args): Rewrite.
4285         (-gen-extract-case): Tweak.
4286
4287         * cgen-gh.c (gh_putc,gh_puts): New functions.
4288         * cgen-gh.h (gh_putc,gh_puts): Declare them.
4289         * cos.c (_object_print_elms,_object_print): Use them.
4290         * hob-sup.c (fastcall_print): Use them.
4291         * configure.in: Check for scm_gen_puts, scm_puts.
4292         * config.in: Rebuild.
4293         * configure: Rebuild.
4294         * aclocal.m4: Rebuild.
4295         * Makefile.in: Rebuild.
4296
4297         * dev.scm (load-opc): Use load instead of maybe-load.
4298         (load-gtest,load-sim,load-stest): Ditto.
4299         (load-sid): Ditto.
4300
4301 1999-07-23  Doug Evans  <devans@casey.cygnus.com>
4302
4303         * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4304         up to avoid g++ 'goto crosses initialization' warning.
4305         (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4306         (-gen-sfrag-case): Update use of NEXT_FRAG.
4307
4308 1999-07-22  Doug Evans  <devans@casey.cygnus.com>
4309
4310         * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4311
4312         * read.scm: Load sem-frags.scm.
4313         * sem-frags.scm (*): Lots rewritten.
4314         * sid.scm (-with-sem-frags?): New global
4315         (with-sem-frags?): New proc.
4316         (option-init!): Initialize -with-sem-frags?.
4317         (option-set!): Recognize with-sem-frags.
4318         (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4319         * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4320         if asked to.
4321         (-gen-sfrag-engine-decls): New proc.
4322         (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4323         (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4324         (-gen-sfrag-engine): New proc.
4325         (-gen-sem-case): Emit setup-semantics if specified.
4326         (-gen-sem-switch-engine): Update init/use of computed goto label.
4327         * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4328         from local vars.
4329         (-gen-idesc-decls): Replace sem_address with cgoto.
4330         (-gen-scache-decls): Rewrite definition of `execute' member.
4331         * arm.cpu (arm isa): Enable decode-splits.
4332         * arm7.cpu (multiply insns): Rename result to mul-result.
4333
4334         Rename decode-specialize to decode-split.
4335         * decode.scm (*): Update.
4336         * insn.scm (*): Update.
4337         * mach.scm (*): Update.
4338         * sid.scm (*): Update.
4339
4340 1999-07-19  Doug Evans  <devans@casey.cygnus.com>
4341
4342         Record objects as a smob.
4343         * cos.c (scm_tc16_object): New static global.
4344         (cos_init): Initialize it.
4345         (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4346         (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4347         (_object_tag): Delete.
4348         (_object_make_smob): New function.
4349         (_object_make_x,_object_make_with_values_x): Rewrite.
4350         (_object_elements,_object_class_desc): Rewrite.
4351         (_object_copy,object_p): Rewrite.
4352         (_object_specialize): Rewrite.
4353         (_object_print_elms,_object_print): New functions.
4354         (object_smob): New static global.
4355         (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4356
4357         * cos.c (_make_x_symbol): New static global.
4358         (object_make): Use it.
4359         (cos_init): Initialize it.
4360
4361 1999-07-15  Doug Evans  <devans@casey.cygnus.com>
4362
4363         * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4364         instead to determine whether to use FLD macro.
4365         (<rtl-c-eval-state>): New member ifield-var?.
4366         (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4367         * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4368         (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4369
4370         * rtl.scm (rtx-sequence-assq-locals): New proc.
4371
4372         * cos.scm (-object-error): Don't crash on non-objects.
4373
4374         * Makefile.am (CLEANFILES): Add hobbit.
4375         * Makefile.in: Rebuild.
4376
4377         * rtl-c.scm (s-c-call): Delete unnecessary code.
4378
4379 1999-07-14  Doug Evans  <devans@casey.cygnus.com>
4380
4381         * rtl-c.scm (ifield): Always reference value via `FLD'.
4382
4383         * cos.c (elm_bound_p): Return problem SCM boolean values.
4384
4385         * utils-cgen.scm (display-argv): New proc.
4386         * cgen-opc.scm (cgen): Call it.
4387         * cgen-sim.scm (cgen): Ditto.
4388         * cgen-gas.scm (cgen): Ditto.
4389         * cgen-stest.scm (cgen): Ditto.
4390         * cgen-sid.scm (cgen): Ditto.
4391
4392 1999-07-05  Doug Evans  <devans@casey.cygnus.com>
4393
4394         * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4395         * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4396         (-gen-extract-switch): Initialize result to 1.
4397         * opcodes.scm (gen-ifield-default-type): New proc.
4398         (gen-ifield-value-decl): Renamed from gen-ifield-type.  All callers
4399         updated.
4400         (<hw-index>,gen-insert): Handle non-ifield indices.
4401         (<hw-index>,gen-extract): Ditto.
4402         (<hw-asm>,gen-parse): Ditto.
4403         (<hw-asm>,gen-print): Ditto.
4404         (<keyword>,gen-parse): Ditto.
4405         (<keyword>,gen-print): Ditto.
4406         (<operand>,gen-fget): Ditto.
4407         (<operand>,gen-fset): Ditto.
4408
4409         * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4410         (-gen-hw-index): Ditto.
4411         * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4412         (-gen-hw-index): Ditto.
4413
4414         * sem-frags.scm: New file.
4415
4416         * attr.scm (attr-parse): Add better checking of input.
4417
4418         * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4419         All uses updated.
4420         (-hw-parse-setter): Renamed from -hw-parse-set.  All uses updated.
4421
4422         * ifield.scm (ifld-nil?): New proc.
4423
4424         * operand.scm (<operand>): New members getter,setter.
4425         (<operand>,make!): New args getter,setter.  All uses updated.
4426         (op:getter,op:setter): New procs.
4427         (<hw-index>,field-start): Return 0 for non-ifield indices.
4428         (<hw-index>,field-length): Return 0 for non-ifield indices.
4429         (-operand-parse-getter,-operand-parse-setter): New procs.
4430         (-operand-parse): New args getter,setter.  All callers updated.
4431         Always use hw-index-scalar for scalar operands.
4432         (-operand-read): Handle getter,setter.
4433         (define-full-operand): New args getter,setter.  All uses updated.
4434         * semantics.scm (-build-ifield-operand!): Update.
4435         (-build-index-of-operand!): Update.
4436         * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4437         * simplify.inc (define-normal-operand): Update.
4438
4439         * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4440         * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4441         (s-binop,s-cmpop,s-convop): Ditto.
4442         (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4443         * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4444         (fcc-tests): New insn-enum.
4445         (fcc-value): Rename from fcc-type.
4446         * sparcfpu.cpu: New file.  All fp support moved here.
4447
4448         * rtl.scm (<rtx-func>): New member class.
4449         (rtx-class-*?): New procs.
4450         (def-rtx-node): New arg class.  All callers updated.
4451         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4452         * rtx-funcs.scm (*): Specify class.
4453
4454         * utils-cgen.scm (context-make-reader): New proc.
4455
4456         * utils.scm (assert-fail-msg): New variable.
4457         (assert): Use it.
4458         (list-drop,list-tail-drop): New procs.
4459
4460 1999-06-22  Doug Evans  <devans@casey.cygnus.com>
4461
4462         * desc-cpu.scm (-gen-hash-defines): Restore generation of
4463         CGEN_MIN_INSN_SIZE deleted on March 22.
4464
4465         * ifield.scm (<ifield>,needed-iflds): New method.
4466         (<multi-ifield>,needed-iflds): New method.
4467         (ifld-needed-iflds): New proc.
4468         (multi-ifield?): New proc.
4469         * iformat.scm (<sfmt>): Delete member ifmt.  New members length,iflds.
4470         (-sfmt-search-key): Include insn length in key.
4471         (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4472         (<fmt-desc>): Delete members ifmt-key,sfmt-key.  New member used-iflds.
4473         (-ifmt-lookup-ifmt!): Compute key here.
4474         (-ifmt-lookup-sfmt!): Compute key here.  Delete arg ifmt.
4475         All callers updated.
4476         (ifmt-build): Delete arg desc.  New args search-key,iflds.
4477         All callers updated.
4478         (sfmt-build): Delete args desc,ifmt.  New args search-key,cti?,
4479         in-ops,out-ops,sorted-used-iflds.  All callers updated.
4480         * minsn.scm (minsn-make-alias): Use insn-set-ifmt!.  Update call
4481         to ifmt-build.
4482         * operand.scm (op-iflds-used): New proc.
4483         * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4484         and sim-cpu.scm.
4485         And from sid.scm,sid-cpu.scm as well.
4486         (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4487         (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4488         (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4489         (gen-extracted-ifld-value): Ditto.
4490         (-extract-chunk-specs): Ditto.
4491         (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4492         (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4493         (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4494         (-extract-insert-subfields): New function.
4495         * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4496         (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4497         * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4498         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4499         gen-extract-foo.
4500         (-gen-no-scache-semantic-fn): Ditto.
4501         (-gen-sem-case): Ditto.
4502         (-gen-read-case): Update calls to gen-define-ifields,
4503         gen-extract-ifields.
4504         * sim-decode.scm (-gen-record-args): Update.
4505         (-gen-sfmt-argvars-assigns): Update.
4506         (-gen-extract-case): Update.
4507         * sim-model.scm (-gen-model-insn-fn): Replace calls to
4508         gen-define-ifields with gen-define-ifmt-ifields.  Ditto for
4509         gen-extract-foo.
4510         * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4511         (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4512         (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4513         * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4514         gen-define-ifields, gen-extract-ifields.
4515         (-gen-record-args): Update.
4516         (gen-sfmt-argvars-assigns): Update.
4517         (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4518         with gen-define-ifields.  Ditto for gen-extract-foo.
4519         (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4520         procs rather than method calls.
4521
4522 1999-06-18  Doug Evans  <devans@casey.cygnus.com>
4523
4524         * sid.scm (-create-virtual-insns!): New local `context', pass it
4525         to insn-read.
4526
4527         * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4528         (operand name) not (operand object), (local name) not (local object).
4529         (rtx-traverse-with-locals): New proc.
4530         (-compile-expr-fn): New proc.
4531         (rtx-compile): Rewrite.
4532         * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4533         (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4534         (rtl-c-set-trace): Ditto.
4535         (operand define-fn): Recognize operand name argument.
4536         (local define-fn): Recognize sequence temp name argument.
4537         * rtx-funcs.scm (operand): Argument is operand name, not object,
4538         so call current-op-lookup.
4539         (local): Similarily, so call rtx-temp-lookup.
4540
4541         * rtl.scm (rtx-field?): Use rtx-name instead of car.
4542         (rtx-operand?): Ditto.
4543         (rtx-pretty-name): Ditto.
4544         (rtx-local-obj): Flag symbol argument as an error.
4545         (rtx-local-name): New proc.
4546         (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4547
4548         * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4549
4550         * read.scm (debug-repl): Renamed from -debug-repl.  All callers
4551         updated.
4552
4553         * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4554         (and: QI rd #xff).
4555
4556         * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4557         (*floats-s->c-fun-table*): Ditto.
4558         * hobbit.c,hobbit.h: Rebuild.
4559         * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4560         * semantics.scm (rtx-simplify): Use /fastcall-make.
4561
4562         * iformat.scm (-sfmt-search-key): Don't include memory modes.
4563
4564         * insn.scm (<insn>): Delete members condition, compiled-condition.
4565         (<insn>,make!): Update
4566         (<insn> getters,setters): Update.
4567         (-insn-parse,insn-read,define-full-insn): Update.
4568         * minsn.scm (minsn-make-alias): Update.
4569         * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4570         (ifmt-compute!): Ditto.
4571         * sim.scm (sim-finish!): Update.
4572         * simplify.inc: (define-normal-insn): Update.
4573         * sid-cpu.scm (gen-semantic-code): Update.
4574
4575         * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4576         (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4577         (ifmt-compute!): Ditto.
4578
4579 1999-06-16  Doug Evans  <devans@casey.cygnus.com>
4580
4581         * minsn.scm (minsn-compute-iflds): Print better error message for
4582         missing ifields.
4583
4584 1999-06-12  Doug Evans  <devans@casey.cygnus.com>
4585
4586         * rtl.scm (tstate->estate): Don't copy over expr-fn.
4587
4588         * Makefile.am (HOBFLAGS): New variable.
4589         (cgen-hob.c): Use it.
4590         (hobbit.c): Use it.
4591         (libcpu_a_SOURCES): Add hob-sup.c.
4592         (hob-sup.o): New rule.
4593         * Makefile.in: Rebuild.
4594         * cgen.c: #include hob-sup.h.
4595         (cgen_init_c): Call hobbit_init_support.
4596         * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4597         (*special-scm->c-functions*): Add them.
4598         (display-c-expression): Handle *c-symbol*.
4599         (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4600         (*floats-s->c-fun-table*): Ditto.
4601         (normalize): Recognize /fastcall-make.
4602         (normalize-fastcall-make): New proc.
4603         * hobbit.c,hobbit.h: Rebuild.
4604         * hob-sup.scm: New file.
4605         * hob-sup.c: New file.
4606         * hob-sup.h: New file.
4607         * read.scm: Load hob-sup.scm.
4608         * rtl.scm (-rtx-name-list): New variable.
4609         (rtx-name-list): New proc.
4610         (rtx-lookup): Try symbol first.
4611         (def-rtx-node): Add name to -rtx-name-list.
4612         (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4613         (-rtx-traverse-anymode): New proc.
4614         (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4615         (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4616         (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4617         (-rtx-traverse-{symornum,object}): New procs.
4618         (-rtx-make-traverse-table): Rewrite.
4619         (-rtx-traverse-operands): Rewrite arg-types handling.
4620         Handle #f result of traverser.
4621         (-rtx-traverse): Renamed from -rtx-traverse-normal.
4622         Move debug handling here.
4623         (-rtx-traverse-debug): Delete.
4624         (rtl-finish!): Change -rtx-traverse-table into list of handlers
4625         for each rtx.
4626         * semantics.scm (semantic-compile:process-expr!): Fix call to
4627         -rtx-traverse.
4628         * utils.scm (map1-improper): New proc.
4629
4630 1999-06-08  Doug Evans  <devans@casey.cygnus.com>
4631
4632         * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4633         (h-mbits): Ditto.
4634         * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4635         (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4636         (<operand>,cxmake-get): Tweak.
4637         (sim-finish!): Delete FUN-ACCESS attribute.  Create FUN-GET,FUN_SET.
4638
4639 1999-06-07  Doug Evans  <devans@casey.cygnus.com>
4640
4641         * thumb.cpu (dnti): Delete timing spec.
4642         (all insn): Update.
4643
4644         * arm.cpu (arm isa): New fields condition, setup-semantics.
4645         (thumb isa): New field setup-semantics.
4646         (h-gr): Add attribute CACHE-ADDR.
4647         * arm7.cpu (dnai): Delete condition.
4648         (eval-cond): Delete.
4649
4650         * mach.scm (<isa>): New member setup-semantics.
4651         (-isa-parse-setup-semantics): New proc.
4652         (-isa-parse): New arg setup-semantics.
4653         (-isa-read): Recognize setup-semantics.
4654
4655         * sid-cpu.scm (gen-extract-fields): Split into two:
4656         gen-extract-ifields, gen-extract-ifmt-ifields.
4657         (-gen-scache-semantic-fn): Delete `taken_p'.  Delete
4658         tracing begin/end messages (done by caller now).
4659         (-gen-sem-case): Delete `taken_p'.  Add npc,br_status.  Delete
4660         tracing begin/end messages (done by x-before,x-after virtual insns).
4661         (-gen-sem-switch-engine): Redo vpc initialization.  Save vpc at
4662         end so don't have to look it up again next time.
4663         * sid-decode.scm (-decode-expr-ifield-values): New proc.
4664         (-decode-expr-ifield-tracking-key): New proc.
4665         (-decode-expr-ifield-tracking): New proc.
4666         (-decode-expr-ifield-values-used): New proc.
4667         (-decode-expr-ifield-mark-used!): New proc.
4668         (-gen-decode-expr-set-itype): New proc.
4669         (-gen-decode-expr-entry): Rewrite.
4670         (-gen-decode-table-entry): New proc.
4671         (-gen-decoder-switch): Use it.
4672         (-gen-virtual-insn-finder): New proc.
4673         (-gen-argbuf-elm): Move here from sid.scm.
4674         (-gen-argbuf-hw-elm): Ditto.
4675         (-gen-argbuf-fields-union): Add entries for chain,before insns.
4676         (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4677         conditional-execution isas.
4678         (-gen-decode-fn): Record conditional-exec ifield.
4679         * sid.scm (-current-pbb-engine?): New global.
4680         (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4681         (<ifield>,gen-ifld-extract): New arg `indent'.
4682         (<multi-ifield>,gen-ifld-extract): Ditto.
4683         (-hw-gen-set-quiet-pc): Add pbb support.  Delete `taken_p'.
4684         (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4685         (-gen-arch-model-decls): Only scan real insns.
4686         (scache-engine-insns,pbb-engine-insns): New procs.
4687         (-create-virtual-insns!): New proc.
4688         (sim-finish!): Call it.
4689         (-decode-specialize-insn?): New proc.
4690         (-decode-specialize-build-assertion): New proc.
4691         (-decode-specialize-insn-1): New proc.
4692         (-decode-specialize-insn): New proc.
4693         (-fill-sim-insn-list!): New proc.
4694         (sim-analyze!): Create copies of insns to be specialized.
4695         * utils-cgen.scm (obj-set-name!): New proc.
4696
4697         * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4698         * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4699         semantic-attrs.
4700         (ifmt-compute!): Delete arg `arch'.  Result is list of iformats,
4701         sformats.
4702         * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4703         * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4704         Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4705         (attr): Rewrite test for insn owner.
4706         (member): New rtx function.
4707         * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4708         as separate function.
4709         (rtx-ifield?,rtx-ifield-name): New procs.
4710         (rtx-operand-obj): Rewrite.
4711         (rtx-operand-name): New proc.
4712         (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4713         (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4714         (tstate-make): New args owner, known.  All callers updated.
4715         (tstate-known-lookup): New proc.
4716         (rtx-traverse): New arg owner.  All callers updated.
4717         (rtx-make-bool): New proc.
4718         (rtl-find-ifields): Rewrite.
4719         (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4720         * semantics.scm: ... here.
4721         (rtx-const-equal,rtx-const-list-equal): New procs.
4722         (-build-known-values): New proc.
4723         (semantic-compile): New arg `insn'.  Call rtx-simplify.
4724         (semantic-attrs): Ditto.
4725         * rtx-funcs.scm (member,number-list): New rtx functions.
4726
4727         * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4728         Rewrite.  Delete arg `all-attrs'. All callers updated.
4729         (attr-remove-meta-attrs): Delete leading '-' in name.  All callers
4730         updated.
4731         * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4732
4733         * decode.scm (subdtable-add): Handle `expr' entries.
4734         (exprtable-entry-make): Use vector.  Record ifields refered to by expr.
4735         (exprtable-entry-*): Update.
4736         (exprtable-entry-iflds): New proc.
4737         (exprentry-cost): New proc.
4738         (exprtable-sort,-gen-exprtable-name): New procs.
4739         (exprtable-make): New arg `name'.  All callers updated.  use vector.
4740         (exprtable-*): Update.
4741         (-build-decode-table-entry): Don't issue collision warning if all are
4742         specialized insns.  Sort exprtable entries before building table.
4743
4744         * read.scm (-reader-process-expanded-1): Move pretty printing of
4745         input to logging level 4.
4746
4747         * utils.scm (string-list->string): New proc.
4748
4749         * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4750         semantics.
4751         (insn-read): Delete leading '-' in name.  All callers updated.
4752         (real-insn?): New proc.
4753         (real-insns): Rewrite.
4754         (insn-has-ifield?): New proc.
4755         (insn-builtin!): Create insn attribute SPECIALIZED.
4756
4757         * mach.scm (<arch>): Delete member app-data.
4758         (current-raw-insn-list): New proc.
4759         (insn-list-car,insn-list-splice!): New procs.
4760         (<decode-specialize>): New class.
4761         (-isa-parse-decode-specialize): New proc.
4762         (-isa-parse-decode-specializes): New proc.
4763         (<isa>): New members `condition', `decode-specializes'.
4764         (-isa-parse-condition): New proc.
4765         (-isa-parse): New args condition, decode-specializes.
4766         (-isa-read): Recognize condition, decode-specializes.
4767         (-isa-add-decode-specialize!): New proc.
4768         (modify-isa): New proc.
4769         (isa-conditional-exec?,state-conditional-exec?): New procs.
4770         (arch-init!): New reader command `modify-isa'.
4771
4772         * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4773         (mode-signed,mode-unsigned?): New procs.
4774
4775 Thu Jun  3 16:00:40 1999  Doug Evans  <devans@canuck.cygnus.com>
4776
4777         * types.scm (<array>): New method get-shape.
4778         * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4779         onto type.
4780         (hw-shape,hw-num-elms): New procs.
4781         * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4782         if there's more than 255 registers.
4783         * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4784
4785         * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4786         with get/set specs.
4787
4788 1999-05-21  Doug Evans  <devans@casey.cygnus.com>
4789
4790         * cgen-sid.scm (sim-arguments): Add -X.
4791         * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4792         (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4793         (-gen-sem-case): Use CASE/NEXT macros again.  Tweak indenting.
4794         Simplify by supporting pbb engine only.
4795         (-gen-sem-switch-init): New proc.
4796         (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4797         (cgen-sem-switch.cxx): New proc.
4798         * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4799         with with-pbb?.  Support dual scache/pbb engines.
4800         (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4801         Support dual scache/pbb engines.
4802         (cgen-decode.h): Generate semantic fn decls if with-scache?.
4803         * sid.scm (*) with-pbb? replaces with-sem-switch?.
4804         (sim-finish!): Create pbb support virtual insns if with-pbb?.
4805
4806 1999-05-10  Ben Elliston  <bje@cygnus.com>
4807
4808         * arm7.cpu: Remove coprocessor related fields, operands and insn
4809         definitions for now. Take the undefined instruction trap instead.
4810         (ldmda-wb): New instruction.
4811         (ldmib-wb): Likewise.
4812         (ldmdb-wb): Likewise.
4813         (stmdb-wb): Likewise.
4814         (stmib-wb): Likewise.
4815         (stmda-wb): Likewise.
4816
4817 1999-05-08  Doug Evans  <devans@casey.cygnus.com>
4818
4819         * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4820         (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4821
4822         * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4823         hobbit can't handle optional third arg.
4824
4825 1999-05-07  Doug Evans  <devans@casey.cygnus.com>
4826
4827         * arm.cpu (h-tbit): Delete set spec.
4828         (h-mbits): Don't call arm_mbits_set in set spec.
4829         * arm.sim: New file.
4830         * hardware.scm (modify-hardware): New proc.
4831         (hardware-init!): Add modify-hardware command.
4832         * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4833         (-hw-gen-set-quiet): Ditto.
4834         (sim-finish!): Call invalid_insn method.  Define FUN-ACCESS builtin
4835         hardware attribute.  Load $arch.sim file if present.
4836         * utils-cgen.scm (keyword-list?): New proc.
4837         (keyword-list->arg-list,arg-list-validate-name): New procs.
4838         (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4839
4840         * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4841
4842         * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4843         @cpu@_cpu_cgen.
4844
4845         * attr.scm (obj-prepend-atlist!): New proc.
4846
4847         * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4848
4849         * sid.scm (<operand>,profilable?): Use op:type.
4850         * sim.scm (<operand>,profilable?): Use op:type.
4851
4852 1999-05-04  Doug Evans  <devans@casey.cygnus.com>
4853
4854         * utils.scm (find-index,find): Be more stack friendly.
4855
4856         * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4857         (bic-imm): Ditto.
4858
4859 1999-05-01  Doug Evans  <devans@casey.cygnus.com>
4860
4861         * arm.cpu (h-gr-usr): New hardware element.
4862         (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4863         (arm-mode): New keyword.
4864         (h-mbits): Add set spec.
4865         (h-spsr): Implement get/set specs.
4866
4867         * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4868         (-reader-process-expanded-1): Pretty print logging output.
4869
4870         * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4871         (cgen-cpu.h): Print enums before hardware elements.
4872         (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4873         * sid-decode.scm (cgen-decode.cxx): Ditto.
4874         * sid-model.scm (cgen-model.cxx): Ditto.
4875
4876         * utils-cgen.scm (context-error): Accept variable number of
4877         trailing args.
4878
4879         * rtx-funcs.scm (error:): New rtx function.
4880         * rtl-c.scm (s-case-vm): New proc.
4881         (-gen-non-vm-case-get,s-case-non-vm): New procs.
4882         (s-case): Simplify, handle non-VM result.
4883         (error:): New rtx function.
4884
4885 1999-04-30  Doug Evans  <devans@casey.cygnus.com>
4886
4887         * arm.cpu (h-pc): Add set spec to zero bottom bits.
4888         (test-hi,test-ls): Fix cbit handling.
4889         (shift-type,h-operand2-shifttype): Move here ...
4890         * arm7.cpu: ... from here.
4891         (set-cond,set-cond-maybe,dnix): Delete, unused.
4892         (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4893         * arm.cpu: ... to here.
4894         * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4895         (alu-cmn): Use set-add-flags.
4896         (alu-tst): Use set-zn-flags.
4897         (alu-cmp): Use set-sub-flags.
4898         (lsl,lsr,asr): Set condition codes.
4899         (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4900         (alu-op): Split into three: alu-logical-op,alu-arith-op,
4901         alu-shift-op.
4902         (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4903         All callers updated.
4904         (sub-sp): Rename from add-sp-neg.
4905         (f-lbwl-offset): Delete.
4906         (f-lbwl-hi,f-lbwl-lo): New ifields.
4907         (lbwl-hi,lbwl-lo): Update.
4908         (bl-hi): Add 4 to pc.
4909         (push-reg,pop-reg): Simplify.
4910         (push,push-lr): Push registers in correct order.
4911         (pop,pop-pc): Pop registers in correct order.
4912         (save-reg-inc,load-reg-inc): Simplify.
4913         (ldmia): Save registers in correct order.
4914
4915 1999-04-30  Ben Elliston  <bje@cygnus.com>
4916
4917         * arm7.cpu (f-op-hdt): Remove; unused.
4918         (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4919         (f-ror-imm8): New multi-ifield.
4920         (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4921         callers updated.
4922         (f-uimm12): New field.
4923         (ror-imm8): New operand.
4924         (uimm12): Likewise.
4925         (hdt-offset8): Reinstate operand.
4926         (offset4-hi,offset4-lo): Remove.
4927         (set-cond): Remove macro; unused.
4928         (set-cond-maybe): Likewise.
4929         (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4930         (store-word/byte): Likewise.
4931         (load-halfword): Use hdt-offset8 multifield operand instead of two
4932         4-bit operands that are explicitly combined by semantic code.
4933         (do-halfword-store): Bug fix. Set address when not preindexing.
4934         (store-halfword): Also use hdt-offset8 operand.
4935         (arith-op): Avoid clobbering source registers when one of them is
4936         the destination register.
4937         (arith-imm-op): Likewise.
4938         (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4939         (teq-imm): Likewise.
4940         (ldm-p): Rename to ldmdb.
4941         (stm-pw): Rename to stmdb-wb.
4942         (multi-action): New macro; test reg-list bits and execute a
4943         semantic fn if the bit is set.
4944         (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4945         (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4946         (all insns): Use dnai entries for simplicity rather than dni.
4947         (*): Use short-form of (const ..).
4948
4949 1999-04-29  Doug Evans  <devans@casey.cygnus.com>
4950
4951         * rtl.scm (<rtx-func>): Rename member type to style.  Rename
4952         member eval to evaluator.
4953         (rtx-foo accessors): Rename from rtx:foo.  All callers updated.
4954         (tstate-make): Delete arg op-fn.  All callers updated.
4955         (tstate-op-fn,tstate-set-op-fn!): Delete.
4956         (rtx-traverse): Delete op-fn arg.  All callers updated.
4957         * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4958         split out of -simplify-for-compilation.
4959
4960         * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4961         (cgen_DEPENDENCIES): Add stamp-cgen.
4962         (stamp-cgen): New rule.
4963         * Makefile.in: Rebuild.
4964
4965         * rtl-c.scm (enum:): Define emitter for.
4966         * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4967         enums as well.
4968         (rtx-constant-value,rtx-enum-value): New procs.
4969         (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4970         (rtx-compile-time-constant?): Return #t for enums.
4971         (rtx-true?,rtx-false?): Handle enums.
4972         (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4973         building result by hand.
4974         (rtx-simplify-eq-attr-insn): Ditto.
4975         * rtx-funcs.scm (enum:,enum): New rtx functions.
4976
4977         * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4978         aliases-analyzed?.
4979         (arch-analyze-insns!): New proc.
4980         * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4981         of calling ifmt-compute! directly.
4982         * sid.scm (-sim-insns-analyzed?): Delete.
4983         (sim-analyze!): Call arch-analyze-insns! instead of calling
4984         ifmt-compute! directly.
4985         * sim.scm (-sim-insns-analyzed?): Delete.
4986         (sim-analyze!): Call arch-analyze-insns! instead of calling
4987         ifmt-compute! directly.
4988
4989         * utils.scm (string-take-with-filler): New proc.
4990         (string-take): Use it.
4991
4992         * pgmr-tools.scm: New file.
4993         * read.scm: Load it.
4994         * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4995
4996         * insn.scm (insn-base-mask): Renamed from insn:mask.
4997         All callers updated.
4998         (insn-base-mask-length): Renamed from insn:mask-length.
4999         All callers updated.
5000         (insn-foo): Renamed from insn:foo.  All callers updated.
5001         * minsn.scm (minsn-foo): Renamed from minsn:foo.  All callers updated.
5002         * iformat.scm (compute-insn-base-mask-length): Renamed from
5003         compute-insn-mask-length.  All callers updated.
5004         (compute-insn-base-mask): Renamed from compute-insn-mask.
5005         All callers updated.
5006
5007         * enum.scm (-enum-parse-prefix): New proc.
5008         (<enum>,make!): Don't parse enum values here.
5009         (-enum-parse): Do it here.  Call -enum-parse-prefix.
5010         (define-full-insn-enum): Ditto.
5011         (enum-vals-upcase): New proc.
5012         * hardware.scm (define-keyword): Make enum prefix uppercase.
5013         * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5014
5015         * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5016         (<ifield>,field-extract): New method.
5017         (<multi-ifield>,field-extract): New method.
5018         (ifld-extract): New proc.
5019         * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5020         (ifld-extract-fn-name): Renamed from ifld-extract.
5021
5022         * ifield.scm (ifld-new-value): Renamed from ifield-make.
5023         All callers updated.
5024
5025         * ifield.scm (ifld-lsb0?): New proc.
5026         (sort-ifield-list): New arg up?.  All callers updated.
5027         * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5028         rather than global state.
5029
5030 1999-04-27  Doug Evans  <devans@casey.cygnus.com>
5031
5032         * insn.scm (pretty-print-insn-format): New proc.
5033
5034         * Makefile.in: Rebuild.
5035         * aclocal.m4: Rebuild
5036         * configure: Rebuild.
5037
5038 Mon Apr 26 10:30:18 1999  Doug Evans  <devans@canuck.cygnus.com>
5039
5040         * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5041         * configure: Rebuild.
5042         * aclocal.m4: Rebuild.
5043         * Makefile.in: Rebuild.
5044         * doc/Makefile.in: Rebuild.
5045         * doc/version.texi: Rebuild.
5046
5047 1999-04-25  Doug Evans  <devans@casey.cygnus.com>
5048
5049         * utils.scm (bits->bools): New proc.
5050
5051 1999-04-23  Doug Evans  <devans@casey.cygnus.com>
5052
5053         * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5054         subfield's gen-ifld-extract-decl method.
5055
5056 1999-04-23  Ben Elliston  <bje@cygnus.com>
5057
5058         * arm7.cpu (ldrsh-pu): Remove.
5059         (do-halfword-load): New pmacro.
5060         (load-halfword): Likewise.
5061         (do-halfword-store): Likewise.
5062         (store-halfword): Likewise.
5063         (strh-*): New instructions.
5064         (ldrsb-*): Likewise.
5065         (ldrh-*): Likewise.
5066         (ldrsh-*): Likewise.
5067
5068 1999-04-22  Doug Evans  <devans@casey.cygnus.com>
5069
5070         * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5071         fields.
5072
5073         * arm7.cpu (do-word/byte-store): Fix typo.
5074
5075 1999-04-22  Ben Elliston  <bje@cygnus.com>
5076
5077         * arm7.cpu (do-word/byte-load): Handle cases where the destination
5078         register is the program counter (R15).
5079
5080         * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5081         (str-*): Implement using store-word-byte. Remove older versions.
5082         (bic): Use the `inv' rtx for obtaining bitwise complements.
5083         (bic-imm): Likewise.
5084         (mvn): Likewise.
5085         (mvn-imm): Likewise.
5086         (store-indev-reg): Remove crufty pmacro.
5087         (load-indiv-reg): Likewise.
5088         (ldm-p): Reverse the order of register processing for decrement.
5089         (stm-p): Likewise.
5090         (stbi): Remove; handled by the str-* insns.
5091
5092 1999-04-21  Doug Evans  <devans@casey.cygnus.com>
5093
5094         * thumb.cpu (cmp): Fix carry bit computation.
5095         (alu-cmp): Ditto.
5096
5097 1999-04-20  Doug Evans  <devans@casey.cygnus.com>
5098
5099         * arm.cpu (h-tbit): Specify set spec.
5100         (h-cpsr): Ditto.
5101         * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5102         (set-sub-flags): Interpret "carry bit" as a borrow.
5103         (all sub/cmp insns): Carry bit is actually a borrow bit.
5104         * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5105         (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete.  Use
5106         .pmacro instead.
5107         (hireg-add,hireg-cmp,hireg-move): Ditto.
5108
5109         * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5110         (-CGEN-LANG-VERSION): Ditto.
5111
5112 1999-04-18  Doug Evans  <devans@casey.cygnus.com>
5113
5114         * pmacros.scm (-pmacro-make): New arg `default-values',
5115         all callers updated.
5116         (-pmacro-default-values): New proc.
5117         (-pmacro-process-keyworded-args): New proc.
5118         (-pmacro-process-args): New proc.
5119         (-pmacro-invoke): Process arguments before expanding macro.
5120         (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5121         (define-pmacro): Handle default values specified in arg list.
5122         * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5123         (rtx-boolif-op-arg[01]): New procs.
5124         (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5125         (rtx-simplify): Handle not,orif,andif.
5126         * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5127         * utils.scm (alist-copy): New proc.
5128         * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5129         (ldr*): Rewrite.
5130         (swi): Explicitly set pc.
5131
5132         * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5133
5134 1999-04-17  Ben Elliston  <bje@cygnus.com>
5135
5136         * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5137         correctly adjusts the program counter now.
5138
5139         * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5140         (f-signed?): Rename from `f-hdt-signed?'.
5141         (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5142         (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5143         (f-hdt-offset8): Use new field names.
5144         (ldr): Use `imm12' field, not `offset12', since we do our own
5145         address arithmetic.
5146         (str, str-*): Likewise.
5147         (ldu-*): Remove most; better not implemented than broken.
5148         (ldrh*): Likewise.
5149         (ldrsh-pu): New insn.
5150         (stri): Likewise.
5151         (stri-p): Likewise.
5152         (stbi): Likewise.
5153         (ldm-p): Likewise; replace (load-indiv-reg) version.
5154
5155 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5156
5157         * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5158         * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5159         (*): Explicitly specify mode in c-call.
5160         (logical-op): Recognize sets of h-gr[15] as sets of pc.
5161         (arith-op): Ditto.
5162         (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5163         (arith-imm-op): New pmacro.
5164         (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5165         * thumb.cpu (bx-rs,bx-hs): Rewrite.
5166
5167 1999-04-14  Doug Evans  <devans@casey.cygnus.com>
5168
5169         * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5170
5171         * rtl.scm (rtl-find-ifields): Implement.
5172
5173         * utils-gen.scm: New file.
5174         * read.scm: Load it.
5175         * desc.scm: Move generic attribute code to utils-gen.scm.
5176         * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5177         * Makefile.in: Rebuild.
5178
5179         * arm7.cpu (R15-OFFSET): New attribute.
5180         (dnai): New pmacro.
5181         (logical-op): Delete arg `result?'.  All callers updated.  Use dnai.
5182         Delete use of eval-cond (dnai specifies it).  Specify R15-OFFSET of 12
5183         for reg-shift version.
5184         (arith-op): Ditto.
5185         (data processing insns): Reorganize.  Use dnai.
5186
5187         * attr.scm (attr-kind): New proc.
5188         (attr-list-enum-list): Rewrite.
5189         (-attr-sort): Split result into two lists, bools and non-bools.
5190         (current-attr-list-for): Update.
5191
5192         * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5193         * sid-cpu.scm (-gen-attr-decls): New proc.
5194         (-gen-insn-attr-decls): New proc.
5195         (cgen-desc.h): New proc.
5196         (cgen-cpu.h): Put everything in @cpu@ namespace.
5197         (gen-parallel-exec-type): Change prefix of parexec struct from
5198         @cpu@ to @prefix@.
5199         (-gen-trace-record-type): Ditto for trace_record struct.
5200         (-gen-write-case): Update.
5201         (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5202         @prefix@.  Update scache struct references.
5203         (-gen-sem-case): Update scache struct references.
5204         (-gen-sem-switch-fn): Update idesc struct reference.
5205         Update insn_type enum reference.
5206         (cgen-write.cxx): Update scache,argbuf references.
5207         (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5208         * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5209         from @cpu@ to @prefix@.
5210         (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5211         (-gen-decode-expr-entry): Ditto.  Change prefix of INSN_X_INVALID
5212         from @CPU@ to @PREFIX@.
5213         (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5214         from @CPU@ to @PREFIX@.
5215         (-gen-decode-insn-globals): Generate insn attributes.
5216         (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5217         (-gen-sem-fn-decls): Use -gen-sem-fn-name.  Add `using' for
5218         semantic fn typedef.
5219         (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5220         Change prefix of scache struct from @cpu@ to @prefix@.
5221         Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5222         Change prefix of idesc struct from @cpu@ to @prefix@.
5223         Change prefix of insn_type enum from @cpu@ to @prefix@.
5224         (-gen-argbuf-fields-union): Change prefix of sem_fields union
5225         from @cpu@ to @prefix@.
5226         (-gen-scache-decls): Change prefix of scache struct from
5227         @cpu@ to @prefix@.  Update idesc struct name.
5228         Update decode,execute methods.
5229         (-gen-extract-case): Update to type name changes.
5230         (-gen-decode-fn): Ditto.
5231         (cgen-decode.h): Put everything in @cpu@ namespace (except
5232         semantic fn decls).  Change prefix of insn_word from @cpu@ to @prefix@.
5233         (cgen-decode.cxx): Add using namespace @cpu@.
5234         * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5235         model_mark_get/set from @cpu@ to @prefix@.
5236         (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5237         @prefix@.
5238         (gen-model-fn-decls): Update idesc struct name.  Change prefix
5239         of model_insn_before/after from @cpu@ to @prefix@.
5240         (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5241         Update insn_word type name.
5242         (-gen-model-timing-table): Update INSN_TIMING struct name.
5243         (-gen-model-init-fn): Update MODEL_DATA struct name.
5244         (-gen-mach-defns): Update name of init_idesc_table fn.
5245         (cgen-model.cxx): Add using namespace @cpu@.
5246         * sid.scm (gen-cpu-class): Delete.
5247         (gen-attr-type): New proc.
5248         (gen-obj-attr-sid-defn): New proc.
5249         (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5250         (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5251         @CPU@ to @PREFIX@.
5252         (gen-cpu-insn-enum): Update name of insn enum.
5253         * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5254         (bx-hs): Ditto.
5255         (swi): Rename @cpu@_swi to @prefix@_swi.
5256
5257         * decode.scm (-build-decode-table-entry): Remove heuristic for
5258         distinguishing insns, and use insn ifield-assertion specs.
5259
5260         * desc-cpu.scm (gen-A-attr-mask): Simplify.
5261         (gen-ifld-defns): Boolean attributes begin at number 0 now.
5262         (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5263         * opc-itab.scm (-gen-macro-insn-table): Ditto.
5264         * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5265         all callers updated.
5266         (gen-attr-name): New proc
5267         (gen-attr-mask): Use it.  Boolean attributes start at 0 now.
5268         (gen-obj-attr-defn): Delete num_nonbools count.
5269
5270         * iformat.scm (ifmt-analyze): Handle insn-condition.
5271         (ifmt-compute!): Ditto.
5272         * insn.scm (<insn>): Specify default value for condition,
5273         post-cond-trap,compiled-condition,compiled-semantics.
5274         (<insn>,make!): New arg condition.
5275         (<insn>): Add getters for condition,compiled-condition.
5276         (-insn-parse): New arg condition, all callers updated.
5277         (-insn-read): Recognize condition spec.
5278         (define-full-insn): New arg condition.
5279         * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5280         * semantics.scm (semantic-compile): Change arg sem-code to
5281         sem-code-list.
5282         (semantic-attrs): Ditto.
5283         * sim.scm (sim-finish!): Update calls to define-full-insn.
5284         * simplify.inc (define-normal-insn): Update call to define-full-insn.
5285         * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5286         * sid.scm (sim-finish!): Update call to define-full-insn.
5287
5288 Tue Apr 13 17:04:34 1999  Doug Evans  <devans@canuck.cygnus.com>
5289
5290         * Makefile.am (sim-cpu): Allow specification of ISA.
5291         * Makefile.in: Rebuild.
5292
5293 Sun Apr 11 00:37:56 1999  Jim Wilson  <wilson@cygnus.com>
5294
5295         * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5296
5297 1999-04-10  Doug Evans  <devans@casey.cygnus.com>
5298
5299         * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5300
5301         * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5302
5303         * attr.scm (atlist?): New proc.
5304         (-attr-eval): Rewrite.
5305         (attr-parse): New proc.
5306         (atlist-parse): Use it.
5307
5308         * decode.scm (exprtable-entry-make): New proc.
5309         (exprtable-entry-insn,exprtable-entry-expr): New procs.
5310         (exprtable-make,exprtable-insns): New procs.
5311
5312         * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5313         All uses updated.
5314         (hardware-builtin!): Make h-memory a vector.
5315
5316         * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5317         All callers updated.
5318         (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5319
5320         * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5321         All uses updated.
5322         (-insn-parse): Set semantics to #f if not specified.
5323         (define-insn,define-full-insn): Take out code that ignores ALIAS's
5324         if simulator.
5325         (-parse-insn-format): Recognize `=' iformat spec.
5326
5327         * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5328         (isa-max-insn-bitsize): Ditto.
5329
5330         * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5331         rtl-c-with-alist.
5332         (<ifield>,gen-extract): Ditto.
5333         (<multi-ifield>,gen-insert,gen-extract): Ditto.
5334         * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5335         (gen-define-ifmt-ifields): New proc.
5336         (gen-semantic-code): Rewrite.
5337         * sid-decode.scm (-gen-decode-expr-entry): New proc.
5338         (-gen-decoder-switch): Handle expression tables.
5339         (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5340         gen-define-fields.
5341         * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5342         instead of gen-define-fields.
5343         * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5344         callers updated.
5345         (<multi-ifield,gen-ifld-extract-decl): Ditto.
5346         (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5347         (-gen-ifld-extract-beyond): Ditto.
5348         (<multi-ifield>,gen-ifld-extract): Ditto.
5349         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5350         rtl evaluation code.
5351         (op:read): Build an <eval-state> to pass to gen-read.
5352         (op:write): Build an <eval-state> to pass to gen-write.
5353         (op:record-profile): Build an <eval-state> to pass to
5354         gen-record-profile.
5355         * sim-cpu.scm (gen-semantic-code): Rewrite.
5356         * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5357         rtl-c-with-alist.
5358         (-gen-ifld-extract-beyond): Ditto.
5359         (<multi-ifield>,gen-ifld-extract): Ditto.
5360         (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5361         (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5362         rtl evaluation code.
5363         (op:read): Build an <eval-state> to pass to gen-read.
5364         (op:write): Build an <eval-state> to pass to gen-write.
5365         (op:record-profile): Build an <eval-state> to pass to
5366         gen-record-profile.
5367
5368         * operand.scm (<operand>): Give `selector' default value of #f.
5369         Give `num' default value of -1.  Give `cond?' default value of #f.
5370         (op:new-mode): Delete arg `set?', all uses updated.
5371
5372         * read.scm (reader-error): Handle #f return from port-filename.
5373         (-init-parse-cpu!): Call rtl-c-init!.
5374         (reader-install-builtin!): Call rtl-builtin!.
5375
5376         * rtl-c.scm: New file.
5377         * semantics.scm: New file.
5378         * read.scm: Load them.
5379         * rtl.scm: C generation moved to rtl-c.scm.  Semantic analysis moved
5380         to semantics.scm.
5381         (<rtx-func>): Delete members syntax?,macro,c,expr.  New members
5382         type,eval,num.
5383         (rtx-lookup): Renamed from -rtx-func-lookup.  All callers updated.
5384         (-rtx-num-text,-rtx-max-num): New globals.
5385         (def-rtx-operand-node,define-rtx-operand-node): New procs.
5386         (-rtx-macro-lookup): New proc.
5387         (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5388         (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5389         (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5390         (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5391         (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5392         (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5393         rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5394         rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5395         rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5396         (rtx-pretty-name): New proc.
5397         (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5398         (rtx-traverse-*): Rewrite rtx traversing.
5399         (rtx-eval-*): Rewrite rtx evaluation.
5400         (rtx-compile): New proc.
5401         (rtx-simplify): New proc.
5402         (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5403         * rtx-funcs.scm: C generation moved to rtl-c.scm.
5404         (ifield,index-of): Rewrite.
5405         (name): Renamed from `operand:'.
5406         (operand,xop,local): New rtx's.
5407         (current-insn): Rewrite.
5408         * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5409         (cgen-hob.h): Remove rule for.
5410         (cgen-hob.o): Depend on cgen-hob.c only.
5411         * Makefile.in: Rebuild.
5412
5413         * utils-cgen.scm (vmake): New proc.
5414         (<context>): New class.
5415         (context-make-prefix,context-error): New procs.
5416
5417 Fri Apr  9 19:26:28 1999  Jim Wilson  <wilson@cygnus.com>
5418
5419         * i960.cpu: Add some ??? comments.
5420         (xnor, ornot): New instructions.
5421         (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5422
5423 1999-04-08  Doug Evans  <devans@casey.cygnus.com>
5424
5425         * cos.scm (-object-error): Print better error message.
5426
5427         * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5428         (-pmacro-env-ref): Renamed from -env-ref.
5429
5430 1999-03-31  Doug Evans  <devans@casey.cygnus.com>
5431
5432         * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5433         (h-pc): Delete.
5434         (hardware-builtin!): Delete h-pc builtin.
5435         * arm.cpu (h-pc): Define.
5436         (h-gr): Delete get,set specs.  Make array of 16 regs again.
5437         * arm7.cpu (set-logical-cc-maybe): Delete.
5438         (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5439         (data processing insns): Rewrite.
5440         * m32r.cpu (h-pc): Define.
5441         * fr30.cpu (h-pc): Define.
5442         * i960.cpu (h-pc): Define.
5443         * sparc.cpu (h-pc): Define.
5444
5445         * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5446         (s-parallel): Replace do {...} while (0) with {...}.
5447         (s-sequence): Ditto.
5448
5449         * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5450         consistent.
5451         (-gen-write-case,-gen-sem-case): Ditto.
5452         (-gen-sem-case): Only specify `written' if profiling or
5453         parallel-write-back.
5454         (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5455         (-gen-sem-switch-fn): New proc.
5456         (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5457         based on with-sem-switch option.
5458         * sid-decode.scm (-gen-decode-insn-globals): Only define
5459         idesc_table_initialized_p if with-sem-switch.  Record semantic fn
5460         addresses in idesc_table if !with-sem-switch.
5461         (-gen-sem-fn-decls): Rewrite.
5462         (-gen-idesc-decls): Define @cpu@_sem_fn type.  Define `execute'
5463         member based on with-sem-switch.  Only define
5464         `idesc_table_initialized_p' member if with-sem-switch.
5465         (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5466         * sid.scm (-with-sem-switch?): New variable.
5467         (option-init!): Initialize it.
5468         (option-set!): Set it.
5469         (with-sem-switch?): New proc.
5470         (-op-gen-set-trace): Only emit `written' reference if profiling.
5471         (sim-finish!): Use h_pc_set to set pc.
5472
5473 1999-03-30  Doug Evans  <devans@casey.cygnus.com>
5474
5475         * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5476         All callers updated.
5477         (arith-carry-cc-binop): New arg set-flags.  All callers updated.
5478
5479         * sid.scm (gen-argbuf-type): Delete.
5480         (-gen-argbuf-fields-union): Move to ...
5481         * sid-decode.scm: ... here.
5482
5483         * read.scm (-reader-process-expanded-1): New proc.
5484         (-reader-process-expanded): Call it to catch nested begin's.
5485         (reader-process): Move `begin' handling to -reader-process-expanded.
5486
5487         * insn.scm (-insn-read): Fix name of `format' spec.
5488
5489         * pmacros.scm (.pmacro): New builtin.
5490         (scan-symbol): If procedure macro, return macro rather than its symbol.
5491         (check-macro): Don't do lookup, instead check if (car expr) is
5492         macro object.
5493         (scan-list): Handle .pmacro.
5494         (scan): No longer re-examine text for another macro invocation.
5495         (-pmacro-build-lambda): New proc.
5496         (define-pmacro): Rewrite.  If defining one pmacro to be an alias of
5497         another, fetch the other's value (rather than doing it during
5498         expansion).
5499
5500 1999-03-27  Doug Evans  <devans@casey.cygnus.com>
5501
5502         * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5503         * Makefile.in: Rebuild.
5504
5505         * decode.scm (decode-get-best-bits): Use memq instead of element?.
5506         (-fill-slot!): Simplify.
5507         (-build-slots): Simplify.
5508
5509         * dev.scm (load-sid): Don't load sid-arch.scm.
5510
5511         * sid-decode.scm: Replace computed goto decoder/extractor with plain
5512         switch's.
5513         * sim-decode.scm: Replace computed goto decoder/extractor with plain
5514         switch's.
5515
5516 1999-03-26  Doug Evans  <devans@casey.cygnus.com>
5517
5518         * sim-decode.scm: Clean up pass.  Move decoder computation into ...
5519         * decode.scm: ... here.  New file.
5520         * sid-decode.scm: Use decoder computation code in decode.scm.
5521         * read.scm: Load decode.scm.
5522
5523         * arm.cpu (arm710 model): Add u-exec function unit.
5524         (h-gr): Delete CACHE-ADDR for now.  Make array of 15, not 16 regs.
5525         Add get/set specs to redirect reg 15 to h-pc.
5526         (h-*): Indicate for both ARM and THUMB isas.
5527         (cbit,nbit,vbit,zbit): Ditto.
5528         (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5529         (h-cpsr): Make virtual.  Add get/set specs.
5530         (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5531         (h-spsr): New virtual reg.
5532         * arm7.cpu (shift-type): New explicitly defined keyword.
5533         (h-operand2-shifttype): Use it.
5534         (set-logical-cc-maybe): Delete carry-out arg.  New args arg1,arg2.
5535         All callers updated.  Don't set cbit.
5536         (logical-op): Add rm to ifield list.  Change case to case:.  Use
5537         shift-type enum as case choices.  Set cbit.
5538         (and,orr,eor,add-imm): Uncomment out.
5539         (undefined): Temporarily comment out.
5540         * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5541         (lda-pc,lda-sp): Ditto.
5542         (ldr-pc): Rename from ldr.
5543         (cbranch): Mark insns as being thumb insns.
5544
5545         * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5546
5547         * cgen-sid.scm: Don't load sid-arch.scm.
5548         (sim-arguments): Delete unused entries.
5549         * sid-arch.scm: Delete.
5550
5551         * insn.scm (<insn>,iflds): Renamed from flds.  All uses updated.
5552         (<insn>,ifld-assertions): New member.
5553         (<insn>,make!): New arg ifld-assertions, all callers updated.
5554         (<insn> accessors): Change insn:foo to insn-foo.  All callers updated.
5555         (insn:fields): Delete.
5556         (-insn-parse): New arg ifld-assertions.  All callers updated.
5557         (-insn-read,define-insn): New procs.
5558         (define-full-insn): New arg ifld-assertions.  All callers updated.
5559         (insn-init!): New comment define-insn.
5560
5561         * model.scm (-model-parse): Ensure at least one unit specified.
5562
5563         * rtl.scm (-rtx-traverse-operands): Recognize environments.
5564         (<c-expr-temp>,get-name): New method.
5565         (-rtx-make-current-closure,s-closure): New proc.
5566         (hw:): Wrap rtx indices in a closure.
5567         (-gen-case-prefix): New proc.
5568         (s-case): Simplify.
5569         * rtx-funcs.scm (case:): Fix call to s-case.
5570         (closure): New rtx func.
5571
5572         * hardware.scm (<hardware-base>): New member isas-cache.
5573         (<hardware-base>,get-isas): New method.
5574         (hardware-builtin): Indicate for all isas.
5575         * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5576         * mach.scm (current-arch-mach-name-list): Return list of names.
5577         (current-isa-mach-name-list): Ditto.
5578         (define-arch): Install builtin objects here.
5579         * read.scm (keep-atlist?): Only keep if both mach and isa are
5580         being kept.
5581         (keep-mach-atlist?): New proc.
5582         (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5583         (reader-install-builtin!): Renamed from -install-builtin!.
5584         * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5585         -gen-cpu-reg-access-defns.  Rewrite.
5586         (gen-reg-access-defn): Delete.
5587         (-gen-hardware-struct): New proc.
5588         (-gen-hardware-types): Simplify.  Add multiple-isa support.
5589         (gen-semantic-fn,-gen-all-semantics): Delete.
5590         (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5591         (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5592         (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5593         Call sem-analyze-insns!.
5594         (cgen-semantics.cxx): Add multiple-isa support.
5595         * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5596         (-gen-scache-decls,-gen-decode-fn): Ditto.
5597         (cgen-decode.h): Call sem-analyze-insns!.
5598         * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5599         * sid.scm (-with-multiple-isa?): New variable.
5600         (option-init!): Initialize it.
5601         (option-set!): Set it.
5602         (with-multiple-isa?): New proc.
5603         (gen-cpu-ref): New arg isas.  All callers updated.
5604         (gen-cpu-class): New proc.
5605         (*-get-macro,*-set-macro): Delete.
5606         (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5607         (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5608         (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5609         (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5610         (-sim-insns-analyzed): New global variable.
5611         (sim-init!): Reset it.
5612         (sim-analyze-insns!): New proc.
5613         (sim-analyze!): Don't do instruction analysis here.
5614         (sim-finish!): Specify isa of x-invalid insn.
5615         * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5616
5617 1999-03-22  Doug Evans  <devans@casey.cygnus.com>
5618
5619         * thumb.cpu (cpu,mach,model): Delete.
5620         (dntf): New pmacro.  Use it for all field definitions.
5621         (dntop): New pmacro.  Use it for all operand definitions.
5622         (asr): Correct field list.
5623         (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5624
5625         * utils-cgen.scm (define-getters): New macro to simplify
5626         writing class accessors.
5627         (define-setters): Ditto.
5628         (sanitize): Recognize isa elements.
5629
5630         * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5631         state-parallel-exec?.
5632         * sid-model.scm (*): Ditto.
5633         * sid-decode.scm (*): Ditto.  Replace cpu:decode-assist with
5634         state-decode-assist.
5635
5636         * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5637         (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5638         * sim-decode.scm (-gen-decode-switch): Ditto.
5639
5640         * sim-arch.scm (-regs-for-access-fns): Delete.
5641         (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5642         (-gen-arch-reg-access-defns): Delete.
5643
5644         * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5645         cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5646         with state-parallel=exec?.
5647         (cgen-*): Call sim-analyze-insns! here.
5648         * sim-decode.scm (cgen-*): Ditto.
5649         * sim-model.scm (cgen-*): Ditto.
5650         * sim.scm (-sim-insns-analyzed): New global variable.
5651         (sim-init!): Reset it.
5652         (sim-analyze-insns!): Renamed from sim-analyze!.  Keep track if we've
5653         already done the analysis.
5654
5655         * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5656         MACH struct.
5657
5658         * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5659         (arm arch): Update isa spec.
5660         (arm,thumb isas): Define.
5661         (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5662         (arm7tdmi mach): Add isa spec.
5663         * arm7.cpu (*): Replace subreg: with subword:.  Remove unnecessary
5664         `const' on word number.
5665         * fr30.cpu (fr30 arch): Update isa spec.
5666         (fr30 isa): Define.
5667         (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5668         moved to isa spec.
5669         * i960.cpu (i960 arch): Update isa spec.
5670         (i960 isa): Define.
5671         (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5672         liw-insns,parallel-insns moved to isas spec.
5673         * m32r.cpu (m32r arch): Update isas spec.
5674         (m32r isa): Define.
5675         (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5676         liw-insns,parallel-insns moved to isa spec.
5677         * sparc.cpu (sparc arch): Update isas spec.
5678         (sparc isa): Define.
5679         * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5680         decode-assist moved to isa spec.
5681         * sparc64.cpu (sparc64 cpu): Ditto.
5682         * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5683         * desc-cpu.scm (-gen-isa-table-defns): New proc.
5684         (-gen-mach-table-defns): Output mach table.
5685         (-gen-hash-defines): Delete insn size macros, except for
5686         CGEN_MAX_INSN_SIZE.
5687         (-cgen-cpu-open): Rewrite cpu_open handling.  Take stdarg list of args.
5688         (cgen-desc.h): Define MAX_ISAS.
5689         (cgen-desc.c): Include stdarg.h.  Call -gen-isa-table-defns.
5690         * mach.scm (<arch>): Rename arch-data to data.  New member isa-list.
5691         (arch-* accessors): Renamed from arch:*.  All callers updated.
5692         (current-arch-isa-name-list): New proc.
5693         (-arch-parse-isas): Renamed from -arch-parse-isa.
5694         (def-isa-attr!): Rewrite.
5695         (<iframe>): New class.
5696         (<itype>): New class.
5697         (<isa>): Rewrite.
5698         (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5699         (isa-integral-insn?,isa-parallel-exec?): New procs.
5700         (-isa-parse,-isa-read,define-isa): New proc.
5701         (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5702         liw-insns moved to <isa>.
5703         (cpu-* accessors): Renamed from cpu:*.  All callers updated.
5704         (-cpu-parse,-cpu-read): Update.
5705         (state-*): Renamed from state:*.  All callers updated.
5706         (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5707         not cpu.
5708         (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5709         (state-decode-assist): New proc.
5710         (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5711         (-adata-set-derived!): Rewrite.
5712         (adata-integral-insn?): Renamed from adata:integral-insn?.  All
5713         callers updated.
5714         (arch-init!): Add define-isa command.
5715         * read.scm (<reader>): Default keep-isa member to (all).
5716         (reader-* accessors): Renamed from reader:*.  All callers updated.
5717         (-keep-isa-set!): Call string->symbol on isa name list.
5718         (keep-isa-validate!): Rewrite.
5719         (current-isa): New proc.
5720         (keep-isa?): Recognize "all".
5721         (-init-parse-cpu!): New arg keep-isa.  All callers updated.
5722         Call -keep-isa-set!.
5723         (cmd-if): Recognize keep-isa?.
5724         (cpu-load): New arg keep-isa.  All callers updated.
5725         (-opt-spec-update): New proc.
5726         (common-arguments): First arg is string, not symbol.
5727         (-cgen): Call -opt-spec-update.  Rewrite argument parsing.
5728
5729         * rtl.scm (rtx-get): Default mode of string arg is INT.
5730
5731         * rtl.scm (s-subword): Renamed from s-subreg.  All uses updated.
5732
5733         * rtx-funcs.scm (join:): Pass cpu to handler.
5734
5735         * configure.in (guile_include_dir): Delete.
5736         * configure: Rebuild.
5737         * Makefile.in: Rebuild.
5738         * doc/Makefile.in: Rebuild.
5739
5740         * sid-cpu.scm (-extract-chunk-specs): New proc.
5741         (gen-define-fields): Use it.
5742         (-extract-chunk): New proc.
5743         (-gen-extract-beyond-var-list): Use it.
5744         (gen-extract-fields): Simplify.
5745
5746 1999-03-22  Ben Elliston  <bje@cygnus.com>
5747
5748         * arm7.cpu (ldri-p): New instruction.
5749         (swi): Do not vector through 0x8 yet--there is nothing there.
5750         (addi): Reinstate.
5751         (movi): Likewise.
5752         (all): Use (const x) in subreg expressions.
5753
5754 1999-03-19  Ben Elliston  <bje@cygnus.com>
5755
5756         * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5757         (smlal): Likewise.
5758
5759 1999-03-17  Doug Evans  <devans@casey.cygnus.com>
5760
5761         * fr30.cpu (define-arch): Specify "forced" default-alignment.
5762         * mach.scm (-parse-alignment): Recognize "forced" alignment.
5763         * sim-cpu.scm (-extract-chunk-specs): New proc.
5764         (gen-define-fields): Use it.
5765         (-extract-chunk): New proc.
5766         (-gen-extract-beyond-var-list): Use it.
5767         (gen-extract-fields): Simplify.
5768
5769         Port to guile 1.3.1.
5770         * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5771         (LIBIBERTY): New var.
5772         (HOB_OBJS): Add cgen-gh.o.
5773         (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5774         * Makefile.in: Rebuild.
5775         * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5776         * config.in: Rebuild.
5777         * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5778         libncurses, libtermcap.
5779         Add checks for needed functions in guile 1.2 not in guile 1.3,
5780         and vice versa.  Add test for 3 argument scm_make_vector.
5781         * configure: Rebuild.
5782         * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5783         definitions if guile doesn't have them.
5784         (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5785         (cgh_vector): Replace gh_vector with gh_make_vector.  Replace gh_vset
5786         with gh_vector_set_x.
5787         (cgh_qsort): Replace gh_list_length with gh_length.
5788         * cgen-gh.h: Add decls for added functions.
5789         (cgh_qsort): Don't declare if IN_HOBBIT.
5790         * cos.c: Include config.h.  Replace gh_vref with gh_vector_ref,
5791         gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5792         scm_make_vector with gh_make_vector.
5793         * cos.scm: Use vector-length instead of length on vectors.
5794         * dev.scm (cload): Make varargs proc with keyword/value args.
5795         * hobscmif.h: Include config.h, cgen-gh.h.  Undef make_vector and
5796         provide version that works with guile 1.2 or 1.3.
5797         Include private copy of scmhob.h.
5798         * scmhob.h: New file.  Keep our own copy for now.
5799
5800 Tue Mar 16 13:22:01 1999  Doug Evans  <devans@canuck.cygnus.com>
5801
5802         * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5803         plain text.
5804         (-rtx-traverse-operands): Dump cx temp stack if debugging.
5805         (-cx-temp-dump-stack): Pretty up output.
5806
5807         * arm.cpu: comment out thumb.cpu until isa support ready.
5808         * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5809         (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5810         * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5811
5812         * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5813
5814 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5815
5816         * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5817         (<hw-address>,mode-ok?): unsigned/signed are compatible.
5818
5819         * operand (op:new-mode): Improve error message.
5820
5821         * arm.cpu: Move arm isa into arm7.cpu.  Include arm7.cpu, thumb.cpu.
5822         * arm7.cpu: New file.
5823
5824 1999-03-12  Ben Elliston  <bje@cygnus.com>
5825
5826         * arm.cpu: Lots of minor fixes after desk checking.
5827
5828 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
5829
5830         * thumb.cpu: snapshot of current work
5831
5832         * rtl.scm (rtx-get): Tweak error message.
5833
5834 1999-03-10  Doug Evans  <devans@casey.cygnus.com>
5835
5836         * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5837         * Makefile.in: Rebuild.
5838
5839         * cos.c (cos_vector_copy): New function.
5840         (_object_copy): Use it.
5841
5842         * mode.scm (mode:eq?): Clean up.
5843         * rtl.scm (cx-new-mode): Copy attributes.
5844         (rtx-get): Don't make copy if <c-expr> with identical mode.
5845
5846         * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5847         add new isas spec.
5848         (gr-names): h-gr register names moved here.
5849         (h-gr): Update.
5850         (cr-names): h-cr register names moved here.
5851         (h-cr): update.
5852         (dr-names): h-dr register names moved here.
5853         (h-dr): update.
5854         (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5855         (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5856         * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5857         add new isas spec.
5858         * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5859         add new isas spec.
5860         (gr-names): h-gr register names moved here.
5861         (h-gr): Update.
5862         (cr-names): h-cr register names moved here.
5863         (h-cr): update.
5864         (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5865         (h-accums,h-psw): Ditto.
5866         * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5867         add new isas spec.
5868         (gr-names): h-gr register names moved here.
5869         (h-gr-indices): Delete.
5870         (sparc32 h-gr): Update.  Replace FUN-ACCESS with get/set specs.
5871         (sparc64 h-gr): Ditto.
5872         (h-y): Add get/set specs.
5873         (fp regs): Rewrite.
5874         (fp operands): Rewrite.
5875         * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5876         (h-tbr,h-cwp,h-wim): Ditto.
5877         * sparc64.cpu (h-fpsr): Add get/set specs.
5878         * sparccom.cpu (ldd-reg+reg): Load value all at once.
5879         (fp-ld-op): New arg `dest', all callers updated.
5880         (*): Replace `make-di' with `join'.
5881
5882         * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5883         present.
5884         (gen-semantic-code): Save/restore rtl generator state.
5885         (cgen-cpu.h): Call rtl-gen-init!.
5886         * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5887         (-gen-ifld-extract-beyond): Ditto.
5888         (<multi-ifield>,gen-ifld-extract): Ditto.
5889         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5890         `gstate'.
5891         (-hw-gen-set-quiet-pc): Ditto.
5892         (<hw-pc>,gen-write): Ditto.
5893         (-hw-cxmake-get): Ditto.  Call getter function if present.
5894         (<hw-register>,cxmake-get-raw): New method.
5895         (<hw-register>,gen-set-quiet-raw): New method.
5896         (-hw-gen-set-quiet): New arg `gstate'.
5897         (hw-fun-access?): Delete.
5898         (gen-reg-access-defn): Output function contents.
5899         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5900         invocation.
5901         (-gen-hw-index): Ditto.
5902         (op:read): Update gen-read invocation.
5903         (op:write): Update gen-write invocation.
5904         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5905         operands.
5906         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5907         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5908         (<unit>,gen-profile-code): Update to sim.scm version.
5909
5910         * sim-arch.scm (-regs-for-access-fns): New proc.
5911         (-biggest-reg-mode): New proc.
5912         (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5913         * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5914         virtual regs separately.
5915         (-gen-cpu-reg-access-defns): Replace fun-access? with new
5916         get/set specs.
5917         (gen-semantic-code): Save/restore rtl generator state.
5918         (cgen-cpu.h): Call rtl-gen-init!.
5919         (cgen-cpu.c): Ditto.  #include cgen-ops.h.
5920         * sim-model.scm: mach:cpu renamed to mach-cpu.  mach:bfd-name
5921         renamed to mach-bfd-name.
5922         * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5923         (-gen-ifld-extract-beyond): Ditto.
5924         (<multi-ifield>,gen-ifld-extract): Ditto.
5925         (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5926         (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5927         (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5928         `gstate'.
5929         (hw-fun-access?): Delete.
5930         (-hw-gen-set-quiet-pc): New arg `gstate'.
5931         (<hw-register>,gen-get-macro): Rewrite.
5932         (<hw-register>,gen-set-macro): Rewrite.
5933         (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5934         (-hw-cxmake-get): New arg `gstate'.  Rewrite.
5935         (<hw-register>,cxmake-get-raw): New method.
5936         (-hw-gen-set-quiet): New arg `gstate'.  Rewrite.
5937         (<hw-register>,gen-set-quiet-raw): New method.
5938         (-gen-hw-index-raw): Update call to rtx-c.  Update cxmake-get
5939         invocation.
5940         (-gen-hw-index): Ditto.
5941         (<hw-index>): New arg `gstate'.
5942         (-gen-hw-selector): Update call to rtx-c.
5943         (<pc>): New arg `gstate'.
5944         (op:read): Update gen-read invocation.
5945         (op:write): Update gen-write invocation.
5946         (<operand>,cxmake-get): Handle raw-reg.
5947         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5948         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5949         (<operand>,gen-set-quiet): Handle raw-reg.
5950         (<operand>,gen-set-trace): Handle raw-reg.
5951         (-gen-mach-data): mach:cpu renamed to mach-cpu.
5952
5953         * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5954         cgen_operand_type enum.
5955         (gen-operand-table): Add operand type enum.  Replace pointer to
5956         hardware element with its enum.  Null terminate table.
5957         (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5958         Build operand table.
5959         * ifield.scm (-ifield-parse): Recognize ISA attribute.
5960         * mach.scm (<arch-data>): New member `isas'.
5961         (adata-isas): New accessor.
5962         (<isa>): New class.
5963         (isa-default-insn-word-bitsize): New accessor.
5964         (isa-enum): New proc.
5965         (current-arch-default-insn-word-bitsize): Delete.
5966         (current-isa-list,current-isa-lookup): New procs.
5967         (-arch-parse-isa): New proc.
5968         (-arch-parse): Rewrite.
5969         (-arch-read): Recognize `isas'.  Delete `default-insn-word-bitsize'.
5970         (define-arch): Define ISA attribute.
5971         (def-isa-attr!,isa-supports?): New procs.
5972         (<mach>): New member `isas'.
5973         (mach-isas): New accessor.
5974         (-mach-parse): New arg `isas', all callers updated.
5975         (-mach-read): Recognize `isas'.
5976         (arch-finish!): Rewrite.
5977         * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5978         @arch@_cgen_get_{int,vma}_operand.
5979         (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5980         * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5981         of pointer to table entry.
5982         * opcodes.scm (gen-switch): Handle multiply defined operands.
5983         * operand.scm (op-sort): New proc.
5984
5985         * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5986         (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5987         (hw-enum): Accept symbol argument.
5988         (hardware-builtin!): Delete attribute FUN-ACCESS.
5989         * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5990
5991         * attr.scm (atlist-source-form): New proc.
5992         (attr-builtin!): New attr `PRIVATE'.
5993         * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5994         * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5995         if they have `PRIVATE' attribute.
5996         (gen-hw-table-defns): Output definitions of explicitly defined
5997         keyword tables.
5998         * hardware.scm (<keyword>): New member print-name.  Rename member
5999         `value' to `values', all uses updated.
6000         (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6001         (keyword-parse): Rewrite.
6002         (-keyword-read): New proc.
6003         (define-keyword): New proc.
6004         (-hw-parse-keyword): New proc.
6005         (-hw-parse-indices): Rewrite keyword handling, support new index spec
6006         `extern-keyword'.
6007         (-hw-parse-values): Ditto.
6008         (-hw-parse-get,-hw-parse-set): Rewrite.
6009         (hardware-init!): Add new comment define-keyword.
6010         * mach.scm (<arch>): New member `kw-list'.
6011         (arch:kw-list,arch_set-kw-list!): New accessors.
6012         (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6013
6014         * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6015         * mode.scm (mode-class-integral?): New proc.
6016         (mode-class-float?,mode-class-numeric?): New procs.
6017         (mode-integral?,mode-float?,mode-numeric?): New procs.
6018         (mode-compatible?): New proc.
6019         * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6020         rtx-c-with-alist.
6021         (<ifield>,gen-extract): Ditto.
6022         * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6023         (<gstate>): New class.
6024         (gstate-simulator?,gstate-set-simulator?!): New accessors.
6025         (gstate-context,gstate-set-context!): New accessors.
6026         (gstate-macro?,gstate-set-macro?!): New accessors.
6027         (gstate-make,gstate-copy): New procs.
6028         (-rtl-current-gstate): New global.
6029         (current-gstate-simulator?): New proc.
6030         (current-gstate-context,current-gstate-macro?): New procs.
6031         (current-gstate,current-gstate-set!): New procs.
6032         (rtl-gen-init!): Rewrite.
6033         (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6034         (tstate-make): New arg `gstate', all callers updated.
6035         (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6036         (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6037         (tstate-gstate,tstate-set-gstate!): New accessors.
6038         (tstate-copy): New proc.
6039         (tstate-new-cond?,tstate-new-set?): Rewrite.
6040         (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6041         (rtx-traverse): New arg `gstate', all callers updated.
6042         (rtx-strdump): New proc.
6043         (-simplify-for-compilation): New arg `gstate', all callers updated.
6044         (semantic-in-out-operands): Ditto.
6045         (semantic-attrs): Ditto.
6046         (rtx-eval): Rewrite.  New arg `gstate', all callers updated.
6047         (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6048         (rtx-value): Rewrite.
6049         (<c-expr>,gen-name): New method.
6050         (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6051         (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6052         (cx-new-mode): New proc.
6053         (-rtx-c-with-tstate): New proc.
6054         (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6055         callers updated.
6056         (-rtx-mode): Rewrite.
6057         (-rtx-mode-compatible?): New proc.
6058         (<c-expr-temp>): New member `value'.
6059         (cx-temp:value): New accessor.
6060         (<c-expr-temp>,make!): Override default method.
6061         (<c-expr-temp>,cxmake-get): Rewrite.
6062         (<c-expr-temp>,gen-set-quiet): Rewrite.
6063         (<c-expr-temp>,gen-set-trace): Rewrite.
6064         (gen-temp-defs): Use cx-temp:value.
6065         (record-temp!): New arg value, all callers updated.
6066         (cx-temp:cx:make): Delete.
6067         (-cx-temp-dump-stack): New proc.
6068         (rtx-get): New arg `gstate', all callers updated.  Do mode
6069         compatibility checks.  Ensure result has specified mode.
6070         (rtx-set-quiet): New arg `gstate', all callers updated.
6071         (rtx-set-trace): Ditto.
6072         (s-c-call): New arg `tstate', all callers updated.
6073         (s-c-raw-call): Ditto.
6074         (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6075         (s-cmpop,s-if,e-if): Ditto.
6076         (s-subreg): New proc.
6077         (-par-new-temp!): New proc.
6078         (-par-next-temp!): Rewrite.
6079         (-par-replace-set-dests): Use -par-new-temp!.
6080         (s-parallel): Rewrite temp handling.  Use -rtx-c-with-state.
6081         (s-sequence): Use -rtx-c-with-state.
6082         * rtx-funcs.scm (*): Update.
6083         (raw-reg:): New rtx function.
6084         (make-di): Delete.
6085         (join:,subreg:): New rtx functions.
6086
6087         * insn.scm (<insn>): New members pre-cond-trap, condition,
6088         post-cond-trap, compiled-condition.
6089
6090         * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6091
6092         * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6093
6094         * utils-cgen.scm (parse-symbol): New proc.
6095         (parse-string): New proc.
6096         (gen-get-macro,gen-set-macro): New arg `index-args'.
6097         (gen-set-macro2): Ditto.  Enclose code in do { } while (0).
6098         Prepend \ to newlines.
6099
6100         * utils.scm (alist-remove-duplicates): Delete.
6101
6102         * sid.scm (sim-init!): Delete private debugging code.
6103
6104 1999-03-10  Frank Ch. Eigler  <fche@cygnus.com>
6105
6106         * cgen-sid.scm: New file for C++ simulator application.
6107         * sid-arch.scm: Ditto.
6108         * sid-cpu.scm: Ditto.
6109         * sid-decode.scm: Ditto.
6110         * sid-model.scm: Ditto.
6111         * sid.scm: Ditto.
6112         * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6113
6114 1999-03-05  Ben Elliston  <bje@cygnus.com>
6115
6116         * arm.cpu: New file.
6117
6118 1999-03-03  Doug Evans  <devans@casey.cygnus.com>
6119
6120         * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6121         * Makefile.in: Rebuild.
6122
6123         * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6124         (-attr-parse): Validate default value.
6125
6126         * read.scm (-CGEN-VERSION): Change to 0.7.1.
6127         (-CGEN-LANG-VERSION): Ditto.
6128         (-keep-all-machs): Renamed from -keep-all, all uses updated.
6129         (<reader>): New member keep-isa plus accessors.
6130         (-keep-isa-set!,keep-isa-validate!): New procs.
6131         (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6132         (common-arguments): New variable.
6133         (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6134         (-debug-repl,continue): New procs.
6135         (-cgen,cgen): New procs.
6136         * cgen-gas.scm: Rewrite.
6137         * cgen-opc.scm: Rewrite.
6138         * cgen-sim.scm: Rewrite.
6139         * cgen-stest.scm: Rewrite.
6140
6141         * gas-test.scm (gas-test-init!): Call opcodes-init!.
6142         (gas-test-finish!): Call opcodes-finish!.
6143         (gas-test-analyze!): Call opcodes-analyze!.
6144         (<hw-asm>): New method test-data.
6145         (<operand>,testdata): Rewrite.
6146         * sim-test.scm (sim-test-init!): Call opcodes-init!.
6147         (sim-test-finish!): Call opcodes-finish!.
6148         (sim-test-analyze!): Call opcodes-analyze!.
6149         (<hw-asm>): New method test-data.
6150         (<operand>,testdata): Rewrite.
6151
6152 1999-03-01  Doug Evans  <devans@casey.cygnus.com>
6153
6154         * fixup.scm (reverse!): Define if missing.
6155         * *.scm: Use reverse! instead of list-reverse!.
6156
6157         * utils.scm (leading-id-char?): New proc.
6158         (id-char?): Rewrite.
6159         (chars-until-delimiter): New proc.
6160         * opc-itab.scm (extract-syntax-operands): Rewrite.
6161         (strip-mnemonic): Rewrite.
6162         (compute-syntax): Rewrite.
6163
6164         * pmacros.scm (-pmacro-substr): New proc.
6165         (pmacros-init!): Add builtin .substr.
6166
6167 1999-02-26  Doug Evans  <devans@casey.cygnus.com>
6168
6169         * thumb.cpu: New file.
6170
6171 1999-02-24  Doug Evans  <devans@casey.cygnus.com>
6172
6173         * Makefile.am (CGENCFLAGS): New variable.
6174         (WITH_HOBBIT): Use automake conditional.
6175         (CGEN_HOB_SRC): New variable.
6176         (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6177         (*.o): Compile with CGENCFLAGS.
6178         (cgen-hob.c): Simplify.
6179         (cgen-nohob.c): New rule.
6180         (hobbit): Renamed from hob.x.
6181         (CLEANFILES): Add cgen-nohob.c.
6182         * Makefile.in: Rebuild.
6183         * doc/Makefile.in: Rebuild.
6184         * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6185         (WITH_HOBBIT): Use AM_CONDITIONAL.
6186         * configure: Rebuild.
6187         * aclocal.m4: Rebuild.
6188
6189         * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6190         with string-write-map.
6191
6192         * sim-cpu.scm (hw-need-storage?): New proc.
6193         (-gen-hardware-types): Use it.
6194         (gen-parallel-exec-elm): Call op-save-index?.
6195
6196         * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6197
6198         * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6199         UNSIGNED attribute.
6200         (-gen-ifld-extract-beyond): Ditto.
6201         (<integer>): Delete all references.
6202         (<sim-hardware>): Delete.
6203         (hw-profilable?): New proc.
6204         (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6205         (<hw-register>): Rename method get-index-mode to save-index?.
6206         (<hw-register>): New methods gen-get-macro,gen-set-macro.
6207         (<hw-register>,gen-sym-decl): Make virtual.
6208         (<hw-memory>,gen-sym-decl): Make virtual.
6209         (<hw-memory>): Rename method get-index-mode to save-index?.
6210         (<hw-address>,gen-sym-decl): Make virtual.
6211         (<operand>): New method save-index?.
6212         (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6213
6214         * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6215         prefix added.  All uses updated.
6216
6217         * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6218         rather than pointer to table entry.
6219
6220         * opcodes.scm: Remove all attribute support, lives in desc.scm.
6221         Remove all hw-asm,op-asm support.
6222         (-gen-parse-number,-gen-parse-address): New procs.
6223         (<keyword>,gen-parse): Redo function name computation.
6224         (<keyword>,gen-print): Ditto.
6225         (<operand>,gen-function-name): Rewrite.
6226         (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6227         (opcodes-init!): Delete call to add-parser!.
6228
6229         * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6230         Define enum using hardware semantic name.
6231         (-gen-hw-decl,-gen-hw-defn): New procs.
6232         (gen-hw-table-decls): Use -gen-hw-decl.
6233         (gen-hw-table-defns): Use -gen-hw-defn.  Rewrite generation of
6234         CGEN_HW_ENTRY structs.
6235         (gen-operand-table): Output hw's enum, not pointer to table entry.
6236         (-gen-cpu-open): Build table of selected hardware elements.
6237
6238         * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6239         (<hardware> support): Delete.
6240         (<hw-asm>): Delete, moved to hardware.scm.
6241         (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6242         (<hw-asm>,gen-table-entry): New method.
6243         (<hw-asm>,parse!): Delete.
6244         (<keyword>,gen-table-entry): New method.
6245         (<keyword>,parse!): Delete.
6246         (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6247         for gen-decl,gen-defn,gen-ref,gen-init.
6248         (desc-init!): Don't create parser for operand asm specs.
6249
6250         * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6251         * ifield.scm (<ifield>): New member `mode'.
6252         (<ifield>,make!): New arg `mode'.
6253         (ifld-mode): Rewrite.
6254         (ifld-hw-type): Rewrite.
6255         (<ifield>,min-value): Rewrite.
6256         (<ifield>,max-value): Rewrite.
6257         (-ifield-parse): New arg `mode'.
6258         (-ifield-read): Update.
6259         (define-full-ifield): New arg `mode'.
6260         (define-full-multi-ifield): Ditto.
6261         (-multi-ifield-parse): Ditto.
6262         (-multi-ifield-read): Update.
6263         (define-full-multi-ifield): New arg `mode'.
6264         (ifield-builtin!): Update definition of f-nil.
6265         * simplify.inc (define-normal-ifield): Update call to
6266         define-full-ifield.
6267         (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6268         (define-normal-hardware): Delete arg asm.  New args indices, values,
6269         handlers.  Update call to define-full-hardware.
6270         (define-simple-hardware,dsh): New pmacros.
6271         (define-normal-operand): Update call to define-full-operand.
6272         * fr30.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6273         Specify INT/UINT mode instead.
6274         (h-gr,h-cr): Use "indices" instead of "asm".
6275         (h-dr,h-ps): Update keyword syntax.
6276         (h-r13,h-r14,h-r15): Ditto.
6277         (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6278         (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6279         (m4): Fix typo on HASH-PREFIX.  Use "handlers" instead of "asm".
6280         (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6281         * i960.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6282         Specify INT/UINT mode instead.
6283         (h-gr): Use "indices" instead of "asm".
6284         (h-cc): Update keyword syntax.
6285         * m32r.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6286         Specify INT/UINT mode instead.
6287         (h-hi16,h-slo16,h-ulo16): Update.
6288         (h-gr,h-cr): Use "indices" instead of "asm".
6289         (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6290         (h-accums): Update keyword syntax.
6291         (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6292         * sparc.cpu (f-*): Delete UNSIGNED attribute.  Default is now UNSIGNED.
6293         Specify INT/UINT mode instead.
6294         (h-gr-indices): New pmacro.
6295         (h-gr32,h-gr64): Split up from h-gr.
6296         (h-a): Update type spec.  Use values instead of asm spec.
6297         (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6298         (h-y,h-annul-p): Ditto.
6299         (h-asr): Update keyword spec.
6300         (h-lo10,h-lo13,h-hi22): Update.
6301         (get-freg-spec,set-freg-spec): New pmacros.
6302         (h-fr32,h-fr64): Split up from h-fr.
6303         (rdd): Comment out get/set specs.
6304         (lo10,lo13,hi22): Use "handlers" instead of "asm".
6305         * sparc32.cpu (h-psr): Use dsh instead of dnh.
6306         (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6307         * sparc64.cpu (f-*): Delete UNSIGNED attribute.  Default is now
6308         UNSIGNED.  Specify INT/UINT mode instead.
6309         (h-*): Use dsh instead of dnh where appropriate.
6310         (h-ixcc): Update type spec.  Use "values" instead of "asm".
6311         (h-p,h-membarmask): Ditto.
6312         (membarmask): Use "handlers" instead of "asm".
6313
6314         * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6315         values,handlers,getters,setters plus accessors.
6316         (hw-mode-ok?,hw-default-mode): New procs.
6317         (<hardware-base>): Rename method new-mode to mode-ok?
6318         (<hardware-base>): New method get-index-mode.
6319         (hw-index-mode): New proc.
6320         (pc?): Delete, moved to operand.scm.
6321         (address?): New proc.
6322         (<hardware>): Delete.
6323         (<hw-asm>): Definition moved here from desc.scm.
6324         (keyword-parse): New proc.
6325         (hardware-parsers): Delete.
6326         (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6327         (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6328         (-hw-parse-get,-hw-parse-set): New procs.
6329         (-hw-parse): Delete args aasm,profile,extra.  New args semantic-name,
6330         indices,values,handlers,get,set.  Rewrite.
6331         (-hw-read-extra): Delete.
6332         (-hw-read): Update.
6333         (define-hardware): Don't add object if not selected.
6334         (define-full-hardware): Ditto.
6335         (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6336         (<hw-register>): Member `type' moved to baseclass.  Delete member
6337         hw-asm.
6338         (<hw-register>,parse!): Rewrite.
6339         (<hw-register>): Delete methods get-rank,get-mode.
6340         (<hw-register>): Method new-mode renamed to mode-ok?
6341         (<hw-register>): New method get-index-mode.
6342         (<hw-pc>,parse!): Rewrite.
6343         (<hw-memory>): Member `type' moved to baseclass.  Delete member hw-asm.
6344         (<hw-memory>,parse!): Rewrite.
6345         (<hw-memory>): Delete methods get-rank,get-mode.
6346         (<hw-memory>): Method new-mode renamed to mode-ok?
6347         (<hw-memory>): New method get-index-mode.
6348         (<hw-immediate>): Member `type' moved to baseclass.  Delete member
6349         hw-asm.
6350         (<hw-immediate>,parse!): Rewrite.
6351         (<hw-immediate>): Delete methods get-rank,get-mode.
6352         (<hw-immediate>): Method new-mode renamed to mode-ok?
6353         (<hw-address>): Delete member hw-asm.
6354         (<hw-address>,parse!): Rewrite.
6355         (<hw-address>): Delete methods get-rank,get-mode.
6356         (<hw-address>): Method new-mode renamed to mode-ok?
6357         (hw-profilable?): Delete.
6358         (hardware-init!): Delete hardware-parsers reference.
6359         Update argument specs of command define-full-hardware.
6360         (hardware-builtin!): Update definitions of hardware builtins.
6361         * operand.scm (<operand>): New members hw-name,mode-name.
6362         Delete member op-asm.  New member handlers.
6363         (<operand>,make!): Update.
6364         (op:hw-name,op:mode-name,op:handlers): New procs.
6365         (op:type): Rewrite.
6366         (op:mode): Rewrite.
6367         (<operand>): New method get-index-mode.
6368         (<pc>,make!): Update.
6369         (op:new-mode): Rewrite.
6370         (operand-parsers): Delete.
6371         (-operand-parse): Rewrite.  Return #f if insn not selected.
6372         (-op-read-extra): Delete.
6373         (-operand-read): Update.
6374         (define-operand,define-full-operand): Update.
6375         (operand-init!): Delete operand-parsers reference.
6376         Update syntax of define-full-operand command.
6377
6378         * insn.scm (-insn-parse): Rewrite.  Return #f if insn not selected.
6379         (define-full-insn): Update.
6380         * minsn.scm (-minsn-parse): Rewrite.  Return #f if insn not selected.
6381         (define-full-minsn): Update.
6382
6383         * mode.scm (<mode>): New member class.
6384         (mode:class): New proc.
6385         (mode?): Rewrite.
6386         (-mode-parse): New arg class.
6387         (define-full-mode): Update.
6388         (mode-find): Rewrite.
6389         (mode-make-int,mode-make-uint): New procs.
6390         (mode-init!): Update syntax of define-full-mode command.
6391         (mode-builtin!): Update definitions of builtin modes.
6392
6393         * model.scm (<profile>): Delete.
6394
6395         * read.scm (keep-atlist?): New proc.
6396         (keep-multiple?): New proc.
6397         (<parser-list>): Delete.
6398         (add-parser!,parse-spec!): Delete.
6399
6400         * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6401         (def-rtx-syntax-node): Ditto.
6402         (-rtx-traverse-debug?): New variable.
6403         (tstate-make): New proc.
6404         (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6405         (tstate-new-cond?,tstate-new-set?): New procs.
6406         (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn.  New arg
6407         tstate.  All callers updated.
6408         (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6409         (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6410         (-build-operand!): Replace arg cond? with tstate.
6411         (-build-reg-operand!,-build-mem-operand!): Ditto.
6412         (-build-index-of-operand!): Update making of <operand> object.
6413         (s-ifield): New arg tstate.  All callers updated.
6414         (hw:): New arg tstate.  All callers updated.  Replace call to
6415         current-hw-lookup with current-hw-sem-lookup-1.
6416         (s-index-of): New arg tstate.  All callers updated.
6417         (reg:,mem:): Ditto.
6418         (-rtx-use-sem-fn?): New proc.
6419         (s-unop,s-binop,s-shop): Use it.  Only use semantic mode when using
6420         semantic cover fns.
6421         (s-convop): Only use semantic mode when using semantic cover fns.
6422         (s-cmpop): Call -rtx-use-sem-fn?.
6423         (s-cond,s-case): New arg tstate.  All callers updated.
6424         (s-parallel,s-sequence): Ditto.
6425
6426         * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6427
6428         * types.scm (<scalar>): Rewrite implementation.
6429         (<integer>): Delete.
6430         (parse-type): Rewrite.
6431
6432         * utils-cgen.scm (parse-handlers): New proc.
6433
6434         * utils.scm (!=): New proc.
6435
6436 Tue Feb 23 12:10:29 1999  Doug Evans  <devans@canuck.cygnus.com>
6437
6438         * pmacros.scm (-pmacro-expand): Fix typo.
6439
6440 1999-02-12  Doug Evans  <devans@casey.cygnus.com>
6441
6442         * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6443         (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6444         * i960.cpu (build-hex2): New pmacro.
6445         (insn-opcode): Simplify.
6446         (insn-opcode2): Ditto.
6447
6448         * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6449         * cgen-stest.scm (catch-with-backtrace): Ditto.
6450
6451 1999-02-11  Doug Evans  <devans@casey.cygnus.com>
6452
6453         * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6454         All callers updated.
6455         (-pmacro-invoke): New proc.
6456         (-pmacro-sym,-pmacro-str): New procs.
6457         (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6458         (pmacros-init!): Install builtins .iota, .map, .apply.
6459         * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6460         (h-fr): Simplify register name spec.
6461         * sparc64.cpu (cond-move-1): New arg mnemonic.  All callers updated.
6462         * utils.scm (num-args-ok?): New proc.
6463
6464 1999-02-10  Doug Evans  <devans@casey.cygnus.com>
6465
6466         * pmacros.scm (-pmacro-error): New proc.
6467         (-pmacro-expand): Use it.
6468         (-pmacro-splice): New proc.
6469         (pmacros-init!): Install new builtin .splice.
6470
6471         * sparc.cpu: Include sparc64.cpu when appropriate.
6472         (f-mmask,f-simm11): Moved to sparc64.cpu.
6473         (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6474         (ANNUL attribute): Delete.
6475         (test-* pmacros): New arg cc, all callers updated.
6476         (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6477         * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6478         atomic-opc.
6479         (ldstub,swap): Moved to sparccom.cpu.
6480         * sparc64.cpu: Add more insns.
6481
6482 1999-02-09  Doug Evans  <devans@casey.cygnus.com>
6483
6484         * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6485         CGEN_ATTR_VALUE.
6486         (cgen-sem-switch.c): Ditto.
6487         * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6488         moved to cgen-engine.h.
6489         (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6490         (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6491         global.  Cache attributes and insn length in IDESC.
6492         * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6493         @cpu@_opcode renamed to @cpu@_get_idata.
6494         (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6495         done later underneath sim_resume.
6496         (@mach@_mach): Record @cpu@_prepare_run.
6497         * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6498         updated.
6499         (-hw-gen-set-quiet-pc): Ditto.
6500         (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6501         (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6502         (<hw-addr>,cxmake-get): Ditto.
6503         (<hw-iaddr>,cxmake-get): Ditto.
6504         (<pc>,cxmake-get): Ditto.
6505         (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6506         (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6507         (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6508         (<hw-pc>,gen-write): Use hw-selector-default.
6509         (<hw-register>,gen-write): Ditto.
6510         (<hw-memory>,gen-write): Ditto.
6511         (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6512         (-gen-hw-selector): New proc.
6513
6514         * desc.scm: New file.
6515         * desc-cpu.scm: New file.
6516         * opcodes.scm: Split up into several smaller files.
6517         * opc-asmdis.scm: New file.
6518         * opc-ibld.scm: New file.
6519         * opc-itab.scm: New file.
6520         * opc-opinst.scm: New file.
6521         * Makefile.am (desc): New target.
6522         (opcodes): Update args to cgen-opc.scm.
6523         * Makefile.in: Rebuild.
6524         * aclocal.m4: Rebuild.
6525         * config.in: Rebuild.
6526         * configure.in: Update arg to AC_INIT.
6527         Update version number to 0.7.0.  Change AM_EXEEXT to AC_EXEEXT.
6528         Update AC_PREREG arg to 2.13.  Change AM_PROG_INSTALL to
6529         AC_PROG_INSTALL.
6530         * configure: Rebuild.
6531         * cgen-gas.scm: Update files to load.
6532         * cgen-opc.scm: Ditto.  Reorganize option letters.
6533         * cgen-sim.scm: Update files to load.
6534         * cgen-stest.scm: Ditto.
6535         * dev.scm (cload): New app "DESC".
6536         (load-opc): Update files to load.
6537         (load-gtest,load-sim,load-stest): Ditto.
6538
6539         * attr.scm (bool-attr?): New proc.
6540         (attr-list-enum-list): New proc.
6541         (-attr-sort): Rewrite.
6542         (attr-builtin!): Give ALIAS attribute a fixed index.
6543         * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6544         calculate attribute enum list.
6545         (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6546
6547         * insn.scm (-insn-parse): Renamed from parse-insn.
6548
6549         * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6550         (-hw-read): Ditto.
6551
6552         * mode.scm (-mode-parse): Renamed from parse-mode.
6553
6554         * operand.scm (<operand>): New member `selector'.
6555         (<operand>,make!): Use default selector.
6556         (hw-selector-default): New variable.
6557         (hw-selector-default?): New proc.
6558
6559         * pmacros.scm (pmacros-init!): New proc.
6560         (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6561         (-env-set!): Delete.
6562         (-pmacro-expand): New proc apply-macro.
6563         Use it in scan-list,scan.  Scan list first, then see if macro
6564         invocation.
6565         (define-pmacro): Rewrite.
6566         * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6567
6568         * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6569         selected if (current-mach) seen.
6570         (rtx?): Renamed from rtx-uneval?, all callers updated.
6571         (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6572         updated.
6573         (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6574         selector, all callers updated.
6575         (hw:): New arg selector, all callers updated.  Delete old comments
6576         and code.
6577         (reg:,mem:): Handle selectors
6578         * rtx-funcs.scm (reg:): Handle selectors.
6579
6580         * read.scm: Renamed from cpu.scm.
6581         (<command>): New class.
6582         (<reader>): New member commands.
6583         (reader-add-command!): New proc.
6584         (reader-lookup-command): New proc.
6585         (reader-error,-reader-process-expanded,reader-process): New procs.
6586         (reader-read-file!): New proc.
6587         (include): Call reader-read-file!.
6588         (cmd-if): New proc.
6589         (cpu-load): Call reader-read-file!.
6590         * utils.scm (num-args): New proc.
6591         * simplify.inc: New file.
6592         * *.scm: Delete def-foo procs.  Rewrite define-foo/define-full-foo
6593         procs.  Move define-normal-foo procs (and abbreviated forms) to
6594         simplify.inc.  Install define-foo/define-full-foo commands in foo-init!
6595         routines.
6596         * fr30.cpu: Include simplify.inc.
6597         * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6598         * i960.cpu: Include simplify.inc.
6599         * m32r.cpu: Include simplify.inc.
6600         * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6601         (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6602         * sparc.cpu: Include simplify.inc.
6603         * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6604         * utils-cgen.scm (parse-error): Moved to read.scm.
6605         (sanitize): Rewrite.
6606         (utils-init!): New proc.
6607
6608 1999-02-02  Doug Evans  <devans@casey.cygnus.com>
6609
6610         * sparc.cpu: New file.
6611         * sparc32.cpu: New file.
6612         * sparc64.cpu: New file.
6613         * sparccom.cpu: New file.
6614         * sparc.opc: New file.
6615
6616 1999-01-27  Frank Eigler  <fche@cygnus.com>
6617
6618         * utils.scm (gen-copyright): New proc.
6619
6620 1999-01-27  Doug Evans  <devans@casey.cygnus.com>
6621
6622         Parameterize rtl parsing, rather than having lots of little handlers.
6623         * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6624         Delete member traverse.
6625         (rtx:set-traverse!): Delete.
6626         (-rtx-valid-types,-rtx-valid-matches): New variables.
6627         (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6628         instead of expression.  All callers updated.
6629         (def-rtx-node): New args arg-types,arg-modes.
6630         (def-rtx-syntax-node): Ditto.
6631         (def-rtx-dual-mode): Ditto.
6632         (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6633         All callers updated.
6634         (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6635         All callers updated.
6636         (rtx-macro-expand): New proc.
6637         (-rtx-traverse-check-args): Delete.
6638         (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6639         an rtx specific traverser.
6640         (-rtx-any-mode?,-rtx-symornum?): New procs.
6641         (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6642         (-rtx-traverse-no-mode): Delete.
6643         (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6644         (-rtx-traverse-operands): Rewrite.
6645         (-rtx-traverse-expr): Rewrite.
6646         (rtx-traverse): Don't expand macros here, leave for caller to do.
6647         (rtx-simplify): Delete.
6648         (rtx-compile-time-constant?): Rewrite.  Handle FALSE/TRUE for boolean
6649         attributes.
6650         (rtx-true?,rtx-false?): Ditto.
6651         (-rtx-ref-type): Set dest is operand 1 now.
6652         (-simplify-for-compilation): New proc.
6653         (semantic-in-out-operands): Recognize regno as an alias for index-of.
6654         Expand macros before calling rtx-traverse.  Sort operands by name
6655         to avoid unnecessary semantic formats.
6656         (semantic-attrs): New proc.
6657         (rtx-uneval?): Handle (<rtx-func> ...).
6658         (s-boolifop): Delete arg mode.  All callers updated.
6659         * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6660         (eq-attr): New arg obj.
6661         (eq-attr:): Delete.
6662         * m32r.cpu (rach): Update calls to andif.
6663
6664         * minsn.scm (-minsn-parse-expansion): Renamed from
6665         parse-minsn-expansion.
6666         (-minsn-parse): Renamed from parse-minsn.
6667         (-minsn-read): Renamed from read-minsn.
6668         (def-minsn): Don't check APPLICATION here.
6669         (def-full-minsn): New proc.
6670         (define-macro-insn): Check APPLICATION here.  Expand macros.
6671         (define-normal-macro-insn): Ditto.
6672
6673         * utils.scm (word-value): New arg start-lsb?.
6674         (word-mask,word-extract): Ditto.
6675         (split-bits,powers-of-2): Use integer-expt instead of expt.
6676         (bit-set?): Handle 32 bit values (which are bignums).
6677         (cg-logand,cg-logxor): New functions.
6678         * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6679         (<ifield>,field-value): Update call to word-value.
6680         (<ifield>,min-value): Use integer-expt instead of expt.
6681         (<ifield>,max-value): Ditto.
6682
6683         * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6684
6685         * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6686
6687         Compute raw instruction format in addition to semantic based format.
6688         * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6689         (<iformat> accessors): Rename accessors to ifmt-*.
6690         (<sformat>): New class.
6691         (fmt-enum): Renamed from fmt:enum.
6692         (-ifmt-search-key): Rewrite.
6693         (-sfmt-search-key): New proc.
6694         (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6695         Compute iformat and sformat search keys.
6696         (ifmt-build): Update.
6697         (sfmt-build): New proc.
6698         (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6699         (ifmt-compute!): Compute instruction format <iformat> based on
6700         instruction fields alone.  Compute new semantic format <sformat>
6701         based on instruction fields and semantic information.
6702         (ifmt:lookup): Delete.
6703         * mach.scm (<arch>): New member sfmt-list, plus accessors.
6704         (current-sfmt-list): New proc.
6705         * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6706         Rename member fmt to ifmt.  New members fmt-desc, sfmt.
6707         (insn-length,insn-length-bytes): Update.
6708         (insn:mask-length,insn:mask): Update.
6709         (insn-lookup-op): Update.
6710         * gas-test.scm (gas-test-analyze!): Update.
6711         (gen-gas-test): Ditto.
6712         * sim-test.scm (sim-test-analyze!): Update.
6713         (gen-sim-test): Ditto.
6714         * opcodes.scm (gen-operand-instance-table): Update.
6715         (gen-operand-instance-ref): Ditto.
6716         (max-operand-instances): Use heuristic if semantics not parsed.
6717         (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6718         (opcodes-analyze!): Only scan semantics of building operand instance
6719         tables.
6720         * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6721         (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6722         * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6723         (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6724         (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6725         * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6726         * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6727
6728         * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6729         New arg lsb0?  All callers updated.
6730         (decode-bits): New arg lsb0?.  All callers updated.
6731         (opcode-slots): Update call to bit-set?.  Call integer-expt instead
6732         of expt.
6733         (-gen-decode-bits): New arg lsb0?.  All callers updated.
6734         (build-slots): Call integer-expt instead of expt.
6735         (build-decode-table-entry): Handle crossing word boundaries better.
6736         (-gen-decode-switch): New arg lsb0?.  All callers updated.
6737         (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6738
6739         * enum.scm (define-enum): Rewrite.
6740         (define-normal-enum): Ditto.
6741         (def-full-insn-enum): New proc.
6742         (define-normal-insn-enum): Rewrite.
6743
6744         * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6745         valid C.
6746         (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6747
6748         * dev.scm: Add sid support.
6749
6750         * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6751         (CLEANFILES): Add tmp-*.
6752         * Makefile.in: Rebuild.
6753
6754         * doc/Makefile.am: New file.
6755         * doc/Makefile.in: New file.
6756         * doc/cgen.texi: New file.
6757         * Makefile.am (SUBDIRS): Define.
6758         * Makefile.in: Rebuild.
6759         * configure.in: Create doc/Makefile.
6760         * configure: Rebuild.
6761
6762 1999-01-18  Doug Evans  <devans@casey.cygnus.com>
6763
6764         * insn.scm (insn:syn): Delete.
6765
6766 1999-01-15  Doug Evans  <devans@casey.cygnus.com>
6767
6768         * fr30.cpu (model fr30-1): Add state variables load-regs,
6769         load-regs-pending.  Delete h-gr.  Clean up operand names of all units.
6770         * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6771         (model m32rx): Ditto.
6772         (addi): Simplify function unit usage spec.
6773         (ld-plus): Rewrite operand names in function unit usage spec.
6774         (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6775         * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6776         overridden.  Allow operand to appear in input and output spec.
6777         (<insn>,gen-profile-code): string-append -> string-list.
6778
6779         * ifield.scm (define-ifield): Call pmacro-expand.
6780         (define-full-ifield,define-normal-ifield): Ditto.
6781         (define-multi-ifield,define-normal-multi-ifield): Ditto.
6782
6783         * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6784         with-scache and without-scache cases.
6785
6786 1999-01-14  Doug Evans  <devans@casey.cygnus.com>
6787
6788         * fr30.cpu (fr30-1): Add state variable h-gr.
6789         Add units u-cti, u-load, u-store, u-ldm, u-stm.
6790         (all insns): First pass at providing cycle counts.
6791         * sim.scm (<unit>,gen-profile-code): Only check for output operands
6792         when initializing unit output operands, ditto for input operands.
6793
6794         * insn.scm (insn-length,insn-length-bytes): New procs.
6795         * mach.scm (-adata-set-derived!): Use them.
6796         * sim-cpu.scm (-gen-sem-case): Ditto.
6797
6798         * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6799         (-gen-write-case): Ditto.
6800         (gen-semantic-fn): Ditto.  Split into two:
6801         -gen-scache-semantic-fn and -gen-no-scache-semantic-fn.  Fix bitrot
6802         in non-scache case.
6803         (-gen-all-semantic-fns): Renamed from -gen-all-semantics.  Handle
6804         scache/no-scache appropriately.  All callers updated.
6805         (-gen-sem-case): PCADDR->IADDR.
6806         * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6807
6808         * sim-decode.scm (*): Replace string-append,string-map with
6809         string-list,string-list-map where the result is sufficiently large.
6810         (-gen-decode-insn-table): Go back to simple version for non-scache
6811         case: just record IDESC in decoder tables and leave field extraction
6812         to the caller.
6813         (-gen-decode-switch): Ditto.
6814         (-gen-decode-fn): Ditto.
6815         (-gen-extract-decls): Only emit format enum if with-scache?.
6816         * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6817         non-scache case.
6818         (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6819         (-gen-insn-timing): Ditto.
6820         * sim.scm (gen-argbuf-type): Only output sem_fields union in
6821         with-scache case.
6822
6823         * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6824         (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6825
6826 1999-01-12  Doug Evans  <devans@casey.cygnus.com>
6827
6828         * cpu.scm (keep-mach-validate!): New proc.
6829         (include): New proc.
6830
6831         * mach.scm (current-arch-mach-name-list): New proc.
6832         (-parse-arch-machs): Always return canonical form.
6833         (def-arch): Validate user specified machs to be kept.
6834         (def-mach-attr!): Simplify.
6835
6836         * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6837         (option-init!): Initialize it.
6838         (option-set!): Set it.
6839         (gen-insn-table-entry): Emit 0 for operand instance ref if not
6840         output operand instance tables.
6841         (cgen-opc.in): Only output operand instance tables if asked to.
6842
6843         * sim.scm (option-init!,option-set!): Clarify returned value.
6844
6845         * sim.scm (gen-mach-bfd-name): Move from here.
6846         * utils-cgen.scm: To here.
6847
6848 1999-01-11  Doug Evans  <devans@casey.cygnus.com>
6849
6850         * fr30.cpu (ilm): Fix comment field.
6851         (cond-branch): Remove explicit setting of COND-CTI, let cgen
6852         compute it.
6853
6854         * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6855         (rtx-true?, rtx-false?): New procs.
6856         * rtx-funcs.scm (annul): Rename vpc to pc.
6857         (-rtx-traverse-if): Improve determination of whether then/else parts
6858         are conditionally executed.
6859
6860         * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6861         outer level.
6862         (gen-argbuf-type): Simplify generated definition (big sem_fields
6863         union moved outside).
6864
6865 1999-01-11  Ben Elliston  <bje@cygnus.com>
6866
6867         * doc/porting.texi: New file.
6868
6869         * doc/intro.texi: New file.
6870         (Layout): Use @example to insert preformatted ASCII text (such as
6871         diagrams). @code is inappropriate here.
6872
6873 1999-01-06  Doug Evans  <devans@casey.cygnus.com>
6874
6875         * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6876
6877         * m32r.opc (print_hash): Cast dis_info.
6878
6879         * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6880         * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6881         get/set macros.
6882
6883 1999-01-05  Doug Evans  <devans@casey.cygnus.com>
6884
6885         * i960.cpu (f-br-disp): Remove RELOC attribute.
6886         (f-ctrl-disp): Ditto.
6887         (callx-disp): set-quiet -> set for (reg h-gr 2).
6888         (callx-indirect,callx-indirect-offset): Ditto.
6889
6890         * Makefile.am (gas-test): Fix dependencies.
6891         * Makefile.in: Rebuild.
6892         * cgen-gas.asm: File creation args are -<uppercase-letter>.
6893         * gas-test.scm (break-out-syntax,make-file-name): Delete.
6894         (gas-test-analyze!): Use syntax-break-out.
6895         * sim-test.scm (break-out-syntax,make-file-name): Delete.
6896         (sim-test-analyze!): Use syntax-break-out.
6897         (cgen-build.sh): Use gen-file-name.
6898         (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6899         * insn.scm (syntax-break-out): New proc.
6900         * utils.scm (gen-file-name): New proc.
6901
6902         * fixup.scm (nil,<?,<=?,>?): Delete.
6903
6904         * utils.scm (count-true): Rewrite.
6905
6906         * slib/sort.scm: Move sort.scm to slib directory.
6907         * cpu.scm: Update.
6908
6909         * iformat.scm (ifmt-compute!): Record empty format.
6910
6911         * rtl.scm (semantic-in-out-operands): Simplify by moving several
6912         internal procs outside.  Handle expression register numbers.
6913         Handle index-of.
6914
6915         * rtx-funcs.scm (annul): Rename new_pc to vpc.
6916
6917         * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6918         every register.
6919         (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6920         (gen-semantic-fn,-gen-sem-case): Ditto.
6921         (cgen-cpu.c): Define WANT_CPU to @cpu@.
6922         (cgen-semantics.c): Ditto.
6923         * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6924         (gen-ifmt-argvars-defns): New proc.
6925         (gen-ifmt-argvars-assigns): New proc.
6926         (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6927         (-gen-decode-fn): Handle non-with-scache case.
6928         (cgen-decode.c): Define WANT_CPU to @cpu@.
6929         * sim-models.scm (-gen-mach-defns): Emit bfd name.
6930         (cgen-model.c): Define WANT_CPU to @cpu@.
6931         * sim.scm (gen-ifld-extract-argvar): New proc.
6932         (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6933         with FUN-ACCESS specified.
6934         (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6935         (<hw-register>,gen-extract): New arg local?.
6936         (<hw-address>,gen-extract): Ditto.
6937         (-hw-cxmake-get): Handle non-with-scache case.
6938         (-hw-gen-set-quiet): Ditto.
6939         (<hw-address>,cxmake-get): Handle non-with-scache case.
6940         (gen-op-extract-argvar): New proc.
6941         (<operand>,gen-record-profile): Rewrite.
6942         (<operand>,gen-profile-code): Rewrite.
6943         (<unit>,gen-profile-code): Use -gen-argfld-ref.
6944         (gen-argbuf-fields-union): New proc.
6945         (gen-argbuf-type): Use it.  Handle non-scache case.
6946
6947         * *.scm: class:foo procs renamed to class-foo.
6948         * attr.scm (<attribute>): New member `for'.
6949         (-attr-parse): New first value in list for default if
6950         none specified.
6951         (non-bool-attr-list,attr:add!): Delete.
6952         (def-attr): Use current-attr-add!.
6953         (atlist-attr-value-no-default): New proc.
6954         (attr-lookup-default): Handle boolean attributes.
6955         (gen-attr-enum): New proc.
6956         (-attr-remove-meta-attrs-alist): New proc.
6957         (attr-nub): New proc.
6958         (current-attr-list-for): New proc.
6959         (current-{ifld,hw,op,insn}-attr-list): New procs.
6960         (attr-builtin!): New proc.
6961         * cpu.scm (keep-obj?): Rewrite.
6962         (-init-parse-cpu!): Call arch-init!.
6963         (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6964         (-finish-parse-cpu!): Call arch-finish!.
6965         * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6966         (def-enum,def-full-enum): Use current-enum-add!.
6967         (gen-obj-list-enums): New proc.
6968         * hardware.scm (hw:add!,hw:lookup): Delete.
6969         (def-hardware,def-hardware-ext): Use current-hw-add!.
6970         (hw:std-attrs,hw:attr-list): Delete.
6971         (hardware-builtin!): Define builtin hardware attributes.
6972         * ifield.scm (ifld:add!,ifld:lookup): Delete.
6973         (def-ifield,def-full-ifield): Use current-ifld-add!.
6974         (ifld:std-attrs,ifld:attr-list): Delete.
6975         (ifield-builtin!): New proc.
6976         * insn.scm (insn:add!,insn:lookup): Delete.
6977         (def-full-insn): Use current-insn-add!.
6978         (insn:std-attrs): Delete.
6979         (insn-builtin!): New proc.
6980         * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6981         minsn-list.
6982         (<arch-data>): New member machs.
6983         (current-attr-list,current-enum-list): New procs.
6984         (current-op-list,current-minsn-list): New procs.
6985         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6986         (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6987         Ditto.
6988         (-parse-arch-machs): New proc.
6989         (-arch-parse): New arg machs, all callers updated.
6990         (-arch-read): Handle machs spec.
6991         (def-arch): Define MACH attribute here.
6992         (mach-init!,mach-finish!): Not here.
6993         (cpu:add!,cpu:lookup): Delete.
6994         (def-cpu): Use current-cpu-add!.
6995         (<mach>): New member bfd-name.
6996         (-mach-parse): New arg bfd-name, all callers updated.
6997         (-mach-read): Handle bfd-name spec.
6998         (mach:add!,mach:lookup): Delete.
6999         (def-mach): Use current-mach-add!.
7000         (def-mach-attr!): New proc.
7001         (arch-init!): New proc.
7002         (arch-finish!): New proc.  Reverse all object lists here.
7003         * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7004         (def-minsn): Use current-minsn-add!.  Ignore minsn if mach not kept.
7005         (define-normal-macro-insn): Ignore minsn if mach not kept.
7006         * mode.scm (mode-builtin!): New proc.
7007         * model.scm (model:add!,model:lookup): Delete.
7008         (def-model): Use current-model-add!.
7009         * opcodes.scm (insn:attr-list): Delete.
7010         (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7011         (gen-attr-table-defn): Emit value for default.
7012         (gen-attr-table-defns): Emit bool_attr.  Emit ifield attr table.
7013         (op:attr-list): Delete.
7014         (gen-operand-decls,gen-insn-decls): New proc.
7015         (compute-insn-attr-list): Delete.
7016         (cgen-opc.h): Reorganize and simplify.
7017         * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7018         (def-operand,def-full-operand): Use current-op-add!.
7019         (op:std-attrs): Delete.
7020         (operand-enum): Delete.
7021         (operand-builtin!): Define builtin operand attrs.
7022         * utils-cgen.scm (sanitize): Update calls to lookup procs.
7023         (gen-attr-enum-decl): Use gen-obj-list-enums.
7024         (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7025         Rewrite.
7026         * fr30.cpu (define-arch): Add machs spec.
7027         (f-i4): SIGNED attribute -> !UNSIGNED.
7028         (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7029         (HASH-PREFIX): Define operand attribute.
7030         (NOT-IN-DELAY-SLOT): Define insn attribute.
7031         * i960.cpu (define-arch): Add machs spec.
7032         * m32r.cpu (define-arch): Add machs spec.
7033         (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7034         (HASH-PREFIX): Define operand attribute.
7035         (FILL-SLOT): Define insn attribute.
7036
7037 Thu Dec 17 17:15:06 1998  Dave Brolley  <brolley@cygnus.com>
7038
7039         * fr30.cpu (stilm): Correct mask for and operation.
7040
7041 1998-12-17  Doug Evans  <devans@casey.cygnus.com>
7042
7043         * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7044         Replace START/EXIT with start/pass.
7045         (gen-sim-test): Delete ".text".
7046
7047 Wed Dec 16 16:16:39 1998  Dave Brolley  <brolley@cygnus.com>
7048
7049         * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7050
7051 Tue Dec 15 17:30:01 1998  Dave Brolley  <brolley@cygnus.com>
7052
7053         * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7054         (h-sbit): Make it FUN-ACCESS.
7055         (h-gr): Reorder so that general regs are always printed by number.
7056
7057 1998-12-14  James E Wilson  <wilson@wilson-pc.cygnus.com>
7058
7059         * i960.cpu (flushreg): Use nop.
7060
7061 1998-12-14  Doug Evans  <devans@casey.cygnus.com>
7062
7063         * m32r.cpu (default-alignment): Specify.
7064         * mach.scm (<arch-data>): New member default-alignment.
7065         (adata:default-alignment): New proc.
7066         (current-arch-default-alignment): New proc.
7067         (-arch-parse): New arg default-alignment.
7068         (parse-alignment): New proc.
7069         (-arch-read): Handle default-alignment spec.
7070
7071         * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7072
7073         * insn.scm (f-%): Delete.
7074         * sim-cpu.scm (gen-define-fields): Delete support for f-%.  Can
7075         be readded if proved useful.
7076         (gen-extract-fields): Ditto.  Use gen-ifetch.
7077         * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7078         (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7079
7080 Mon Dec 14 16:20:59 1998  Dave Brolley  <brolley@cygnus.com>
7081
7082         * fr30.cpu (div2): Set zbit properly when remainder not zero.
7083
7084 1998-12-14  Dave Brolley  <brolley@cygnus.com>
7085
7086         * fr30.cpu: Remove stub macros.
7087         (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7088         (div2): Don't use addc/subc.
7089
7090 1998-12-11  Doug Evans  <devans@casey.cygnus.com>
7091
7092         * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7093         if opcodes.
7094
7095 Thu Dec 10 18:37:34 1998  Dave Brolley  <brolley@cygnus.com>
7096
7097         * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7098
7099 Thu Dec 10 12:28:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7100
7101         * cpu.scm (keep-all?): New proc.
7102         (assert-keep-all): Use it.
7103         * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7104         * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7105         Check for spelling errors.
7106
7107 1998-12-09  Doug Evans  <devans@casey.cygnus.com>
7108
7109         * rtl.scm (s-convop): Call -rtx-sem-mode.
7110
7111 Tue Dec  8 10:58:38 1998  Doug Evans  <devans@canuck.cygnus.com>
7112
7113         * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7114         (-parse-hw-profile): Ditto.
7115         (<hw-register>, parse!): Return `void' result.
7116         (<hw-pc>, parse!): Ditto.
7117         (<hw-memory>, parse!): Ditto.
7118         (<hw-immediate>, parse!): Ditto.
7119         (<hw-address>, parse!): Ditto.
7120
7121         * ifield.scm (-ifield-parse): Validate encode/decode fields.
7122         (-ifld-parse-encode-decode): New proc.
7123         (-ifld-parse-encode,-ifld-parse-decode): New proc.
7124         (-multi-ifield-parse): Set encode/decode to #f.
7125         (ifld:decode-mode): New proc.
7126         * utils.scm (nub): Rewrite.
7127         * operand.scm (op-nub): Rewrite.
7128         * sim.scm (<ifield>, gen-type): Rewrite.
7129         (-gen-ifld-argbuf-defn): New proc.
7130         (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7131         (<sim-hardware>): Forward gen-trace-extract onto `type'.
7132         Ditto for needed-iflds.  gen-argbuf-defn renamed from gen-argbuf-elm.
7133         (<hardware-base>): New method needed-iflds.  gen-argbuf-defn
7134         renamed from gen-argbuf-elm, return "".  Rewrite gen-extract.
7135         New method gen-trace-extract.
7136         (<hw-register>): New method needed-iflds.  gen-argbuf-defn renamed
7137         from gen-argbuf-elm, return "" if not caching register address.
7138         Rewrite gen-extract.  New method gen-trace-extract.
7139         (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7140         gen-extract, gen-trace-extract, cxmake-get.
7141         (<hw-iaddress>): New method cxmake-get.
7142         (op-needed-iflds): New proc.
7143         (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7144         (-gen-op-argbuf-defn): New proc.
7145         (gen-op-extract): Renamed from op:extract.
7146         (gen-op-trace-extract): Renamed from op:trace-extract.
7147         (fmt-extractable-operands): Renamed from fmt-semantic-operands
7148         and rewritten.
7149         (gen-argbuf-elm): Rewrite.
7150         * sim-decode.scm (-gen-record-args): Update.
7151
7152         * sim.scm (c-cpu-macro): Renamed from cpu-deref.  All uses changed.
7153
7154         * pmacros.scm (-pmacro-expand): Handle procedural macros in
7155         argument position.  Flag symbolic macros in function position as
7156         an error.
7157         (define-pmacro): Handle quoting in definition of symbolic macros.
7158         (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7159
7160 Tue Dec  8 13:06:44 1998  Dave Brolley  <brolley@cygnus.com>
7161
7162         * fr30.opc (parse_register_list): Account for reverse masks
7163         for load and store.
7164         (print_register_list): Ditto.
7165         (parse_low_register_list_ld): New function.
7166         (parse_hi_register_list_ld): New function.
7167         (parse_low_register_list_st): New function.
7168         (parse_hi_register_list_st): New function.
7169         (print_hi_register_list_ld): New function.
7170         (print_hi_register_list_st): New function.
7171         (print_low_register_list_ld): New function.
7172         (print_low_register_list_st): New function.
7173         * fr30.cpu (ldr15dr): Implement workaround.
7174         (ldm0,ldm1,stm0,stm1): Implemented.
7175
7176 1998-12-08  Doug Evans  <devans@casey.cygnus.com>
7177
7178         * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7179         * configure: Regenerate.
7180         * Makefile.am (WITH_HOBBIT): Update.
7181         (cgen-hob.c): Remove Makefile dependency.
7182         (cgen.o): Depend on cgen-gh.h, config.h.
7183         * Makefile.in: Regenerate.
7184         * aclocal.m4: Regenerate.
7185
7186 1998-12-07  James E Wilson  <wilson@wilson-pc.cygnus.com>
7187
7188         * i960.cpu, i960.opc: New files.
7189
7190 Mon Dec  7 14:30:24 1998  Dave Brolley  <brolley@cygnus.com>
7191
7192         * fr30.opc (parse_register_number): New function.
7193         (parse_register_list): New function.
7194         (parse_low_register_list): Use parse_register_list.
7195         (parse_hi_register_list): Use parse_register_list.
7196         * fr30.cpu (sth): Fix assembler syntax. Implement more
7197         insns.
7198
7199 Fri Dec  4 16:07:13 1998  Doug Evans  <devans@canuck.cygnus.com>
7200
7201         * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7202         * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7203         * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7204         (-op-gen-set-trace-parallel): Ditto.
7205         (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7206
7207         * fr30.cpu (call,calld): Fix setting of pc.
7208         (f-op5): Fix start bit number.
7209
7210 Fri Dec  4 17:06:28 1998  Dave Brolley  <brolley@cygnus.com>
7211
7212         * fr30.cpu (st): Fix operand ordering. Implement more
7213         insns.
7214
7215 Thu Dec  3 23:59:40 1998  Doug Evans  <devans@canuck.cygnus.com>
7216
7217         * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7218         * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7219         (fmt-semantic-operands): Move to sim.scm.
7220         * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7221         * operand.scm (<hw-index>): New member `name'.  All builders updated.
7222         (<hw-index>): New method get-name.
7223         (op-profilable?): Moved to sim.scm.
7224         (op-nub): New proc.
7225         * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7226         (op-profilable?): Moved here from operand.scm.
7227         (gen-extract-type): Delete.
7228         (c-argfld-macro): Renamed from c-ifield-macro.  All uses updated.
7229         (-gen-argfld-ref): New proc.
7230         (-gen-ifld-argfld-name): New proc.
7231         (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref.  All uses updated.
7232         (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7233         (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7234         (<hardware-base>): Delete method gen-extract-type.  New method
7235         gen-argbuf-elm.
7236         (<hw-register): Ditto.  Update method gen-extract.
7237         (<operand>, method gen-argbuf-elm): Rewrite.
7238         * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7239         (s-cmpop): Fix handling of eq,ne for unsigned modes.
7240         * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7241
7242         * sim-decode.scm (-gen-record-args): Tweak.
7243
7244         * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7245
7246 Thu Dec  3 14:23:27 1998  Dave Brolley  <brolley@cygnus.com>
7247
7248         * doc/porting: Fix typo: gas->sim.
7249         * fr30.opc (print_m4): New function.
7250         * fr30.cpu: Implemented many insns.
7251
7252 Thu Dec  3 00:03:16 1998  Doug Evans  <devans@canuck.cygnus.com>
7253
7254         * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7255
7256         * fr30.cpu (f-rel9): Delete RELOC attribute.
7257         (f-rel12): Add PCREL-ADDR attribute.
7258         (label9): Make an h-iaddr, not h-uint.  Delete asm print spec.
7259         (label12): Delete PCREL-ADDR attribute.  Make an h-iaddr, not h-sint.
7260         * fr30.opc (print_label9): Delete.
7261
7262         * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7263         code for CTI indicators.
7264         * insn.scm (insn-cti?): Simplify.
7265         * utils-cgen.scm (atlist:cti?): New proc.
7266
7267 1998-11-30  Doug Evans  <devans@casey.cygnus.com>
7268
7269         * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7270         (f-i20-4,f-i20-16,f-i20): New fields.
7271         (i20): New operand.
7272         (ldi8): Implement.
7273         (ldi20): New insn.
7274         (ldi32m): Delete.
7275         (jmpd): Implement.
7276         * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7277         * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7278         * mach.scm (arch-data): Ditto.
7279         (current-arch-default-insn-word-bitsize): Renamed from
7280         current-arch-default-insn-bitsize [ya, that's a pretty long name].
7281         (-arch-read): Update.
7282
7283         * hardware.scm (hw:attr-list): Move here ...
7284         * opcodes.scm: ... from here.
7285
7286         * ifield.scm (fld:bitrange): Delete.
7287         (fld:word-offset,fld:word-length): New procs.
7288         (ifield?): Use class-instance.
7289         (<ifield>, method field-start): Rewrite.
7290         (ifld:enum): New proc.
7291         (<ifield>, methods field-mask,field-value): Rewrite.
7292         (-ifield-parse): Rewrite.
7293         (<multi-ifield> support): Rewrite.
7294         (ifld-beyond-base?): Rewrite.
7295         (ifld:std-attrs): New variable.
7296         (ifld:attr-list): New proc.
7297         * iformat.scm (-compute-insn-mask): Rewrite.
7298         * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7299         Simplify.
7300         (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7301         * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7302         onto type.
7303         (<operand>): Ditto.  Forward onto index instead.
7304         (gen-ifld-decls,gen-ifld-defns): New procs.
7305         (ifld:insert,ifld:extract): New procs.
7306         (<ifield>): New methods gen-insert, gen-extract.
7307         (<multi-ifield>): Ditto.
7308         (<hw-index>): Forward gen-insert,gen-extract onto value.
7309         (<hw-asm>): Delete insert/extract support.
7310         (<hw-register,hw-memory,hw-immediate>): Ditto.
7311         (gen-hash-defines): Use string-list.
7312         Define CGEN_MAX_IFMT_OPERANDS.
7313         (gen-switch): Use string-list,string-list-map.
7314         (gen-fget-switch,gen-fset-switch): Use string-list.
7315         (gen-parse-switch,gen-insert-switch): Ditto.
7316         (gen-extract-switch,gen-print-switch): Ditto.
7317         (gen-insert-switch,gen-extract-switch): New local `total_length'.
7318         (gen-ifmt-table-1,gen-ifmt-table): New procs.
7319         (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7320         (gen-ivalue-entry): New proc.
7321         (gen-insn-table-entry): Use string-list.  Update iformat,ivalue
7322         computation.  Use 0 for operand ref table if ALIAS insn.
7323         (gen-minsn-table-entry): Use string-list.
7324         (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7325         (gen-opcode-open): Record address of ifield table.
7326         (cgen-opc.h): Call gen-ifld-decls.
7327         (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7328         * types.scm (<bitrange>): New members word-offset,word-length.
7329         Delete member total-length.  Delete methods start,mask,value.
7330         (bitrange:word-offset,bitrange:word-length): New procs.
7331         * sim-cpu.scm (gen-define-fields): Simplify.
7332         (gen-extract-fields): Simplify.
7333         * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7334         (<ifield>): New methods gen-ifld-extract-decl.
7335         Delete method gen-ifld-extract-beyond.
7336         (<multi-ifield>): New methods gen-ifld-extract-decl.
7337         (<multi-ifield>, method gen-ifld-extract): Implement.
7338         (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7339         (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7340
7341         * rtl.scm (-rtx-traverse-no-mode): Process operands.
7342         (-rtx-traverse-syntax-no-mode): New proc.
7343         (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7344         (s-ifield): New proc.
7345         (s-shop): Don't prepend `unsigned' for unsigned modes.
7346         * rtx-funcs.scm (ifield): New rtx function.
7347         (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7348         (delay): New rtx function.
7349         * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7350
7351         * cos.scm (-elm-make-method-getter): Fix typo.
7352
7353         * utils.scm (backslash): Handle lists of strings.
7354
7355 Thu Nov 26 11:47:29 1998  Dave Brolley  <brolley@cygnus.com>
7356
7357         * fr30.cpu (f-rel9): Correct for pc+2.
7358         (label9): Use print_label9.
7359         * fr30.opc (print_label9): New function.
7360
7361 Tue Nov 24 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
7362
7363         * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7364         * fr30.opc (parse_low_register_list): Renamed.
7365         (parse_hi_register_list): Renamed.
7366         (print_hi_register_list): Renamed.
7367         (print_low_register_list): Renamed.
7368
7369 Mon Nov 23 18:26:36 1998  Dave Brolley  <brolley@cygnus.com>
7370
7371         * fr30.cpu (f-rel9): Now a pc relative offset.
7372
7373 1998-11-23  Doug Evans  <devans@casey.cygnus.com>
7374
7375         * opcodes.scm (op-asm): Move to here, from operands.scm.
7376         (<op-asm>, method parse!): Validate arguments.
7377         (<operand>, method gen-function-name): Fix thinko.
7378         * operand.scm (<operand>, method make!): Don't set op-asm here.
7379         * utils.scm (list-elements-ok?): New proc.
7380
7381         * opcodes.scm: Clean up pass.
7382
7383 1998-11-20  Doug Evans  <devans@tobor.to.cygnus.com>
7384
7385         * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7386         the fr30_int function.
7387         (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7388         (h-dr): Add FUN-ACCESS attribute.
7389
7390 1998-11-20  James E Wilson  <wilson@wilson-pc.cygnus.com>
7391
7392         * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7393         for C symbol for models array.
7394
7395 Thu Nov 19 15:57:45 1998  Dave Brolley  <brolley@cygnus.com>
7396
7397         * fr30.opc (parse_reglist_low): New function.
7398         (parse_reglist_hi): New function.
7399         (print_reglist_low): New function.
7400         (print_reglist_hi): New function.
7401         * fr30.cpu: Finish remaining insn stubs.
7402
7403 1998-11-19  Doug Evans  <devans@tobor.to.cygnus.com>
7404
7405         * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7406
7407         * fr30.cpu (ldi32m): Don't use for disassembly.
7408
7409 Wed Nov 18 21:34:41 1998  Dave Brolley  <brolley@cygnus.com>
7410
7411         * fr30.cpu (int): Implement it.
7412
7413 1998-11-18  Doug Evans  <devans@casey.cygnus.com>
7414
7415         * rtx-funcs.scm (nop): Fix C code.
7416
7417         * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7418
7419         * fr30.cpu (f-i32): New ifield.
7420         (i32): New operand.
7421         (ldi32): New insn.
7422         (ldi32m): New macro insn.
7423         (inte): Provide simple version for now.
7424
7425         * sim-arch.scm: New file.
7426         * sim.scm: Move architecture support generation to sim-arch.scm.
7427         * cgen-sim.scm: Load sim-arch.scm.
7428         * dev.scm: Ditto.
7429
7430         * hardware.scm (pc?) New proc.
7431         (class <hardware-base>): Rewrite method 'pc?.
7432         (class <hardware>): Forward 'pc? to the hardware type.
7433         (class <hw-pc>): New method 'pc?.
7434
7435         Add support for variable length ISAs.
7436         * ifield.scm (ifld-beyond-base?): New proc.
7437         * m32r.cpu: Remove integral-insn? spec.
7438         * mach.scm (arch:derived,arch:set-derived!): New procs.
7439         (arch:app-data,arch:set-app-data!): New procs.
7440         (class <arch>): New members derived, app-data.
7441         (class <cpu>): Delete member integral-insn?.
7442         (cpu:integral-insn?): Delete.
7443         (-cpu-parse): Delete arg integral-insn?.  All callers updated.
7444         (-cpu-read): Delete integral-insn? support.
7445         (state:decode-assist): Delete.
7446         (state:int-insn?): Delete.
7447         (<derived-arch-data>): New class.
7448         (-adata-set-derived!): New proc.
7449         (mach-finish!): Call it.
7450         * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7451         (gen-operand-instance): Add COND_REF support.
7452         (gen-operand-instance-table): Ditto.
7453         (gen-hash-defines): Update.
7454         (gen-extract-switch): Update type of `insn_value' arg.
7455         (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7456         * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?.  All callers
7457         updated.
7458         (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7459         * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7460         beyond the base insn (for large insns).
7461         (-gen-extract-beyond-var-list): New proc.
7462         (gen-extract-fields): Handle large insns.
7463         (-gen-write-case): Update sem_arg computation.
7464         Update initial vpc computation.
7465         (gen-semantic-fn): Ditto.  Update type of `insn'.
7466         (-gen-sem-case): Update sem_arg computation.
7467         Update initial vpc computation.
7468         * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7469         (-gen-extract-word): New proc.
7470         (<ifield>): New method gen-ifld-extract-beyond.
7471         (gen-ifld-extract-beyond): New proc.
7472         * types.scm (bitrange-overlap?): New proc.
7473
7474         * utils.scm (bits->bytes): New proc.
7475         (bytes->bits): New proc.
7476
7477         Move extraction support into decoder.
7478         * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7479         -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7480         support to sim-decode.scm.
7481         * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7482         be array of IDESC,FMT entries.  Make the array const.
7483         (-gen-gcc-label-table): Make array const.
7484         (-gen-decode-switch): Branch to extraction code after insn has been
7485         identified.
7486         (-gen-decode-insn-globals): Delete extract handler from
7487         @cpu@_insn_sem.
7488         (gen-decode-fn): Add extraction support.
7489         (-gen-sem-fn-decls): Delete extraction fn decls.
7490         (-gen-idesc-decls): Update @cpu@_decode decl.
7491         (-gen-idesc-init-fn): Delete extraction support.
7492         (-gen-extract-decls): New proc.
7493
7494         * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7495         (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7496
7497         * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7498         All callers updated.
7499         (table-entry:make): Record insn value as insn object, not name.
7500         All uses updated.
7501
7502         * hobbit.scm (path_basename): Renamed from `basename' to avoid
7503         collision with C function.
7504         (path_dirname): Similarily.
7505         * hobbit.c,hobbit.h: Rebuild.
7506
7507 Wed Nov 18 11:26:17 1998  Dave Brolley  <brolley@cygnus.com>
7508
7509         * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7510
7511 Mon Nov 16 19:19:50 1998  Dave Brolley  <brolley@cygnus.com>
7512
7513         * fr30.cpu: Implement more instruction stubs.
7514
7515 Thu Nov 12 19:20:28 1998  Dave Brolley  <brolley@cygnus.com>
7516
7517         * fr30.cpu: Implement more instruction stubs.
7518
7519 Tue Nov 10 10:53:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7520
7521         * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7522
7523         * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7524
7525         * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7526         (op:std-attrs): Ditto.
7527         * opcodes.scm (gen-operand-instance): Ditto.
7528         (gen-switch): Ditto.
7529         * m32r.cpu (condbit,accum): Update.
7530         * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7531
7532 Mon Nov  9 14:30:51 1998  Doug Evans  <devans@seba.cygnus.com>
7533
7534         * enum.scm (-enum-read): Fix typo.
7535
7536         * iformat.scm (-ifmt-search-key): Simplify a little.
7537
7538 Mon Nov  9 12:07:56 1998  Dave Brolley  <brolley@cygnus.com>
7539
7540         * doc/porting: semantics.c -> sem.c.
7541         * Makefile.in: Regenerate.
7542         * fr30.cpu (add): Change ADD to add. Add more registers and set
7543         status bits on 'add' instruction.
7544
7545 Fri Nov  6 18:15:05 1998  James E Wilson  <wilson@wilson-pc.cygnus.com>
7546
7547         * sim.scm (-gen-arch-model-decls):  Default MAX_UNITS to 1 instead
7548         of 0.
7549
7550 Fri Nov  6 17:43:16 1998  Doug Evans  <devans@seba.cygnus.com>
7551
7552         * minsn.scm (minsn:enum): Update, call current-arch-name.
7553
7554         * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7555
7556         * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7557         mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7558         (ARCH,CGEN,CGENFLAGS): New variables.
7559         (gas-test,sim-test): New rules.
7560         * Makefile.in: Rebuild.
7561         * configure.in (arch): Define.
7562         * configure: Rebuild.
7563
7564         * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7565         * All .scm files: Ditto.
7566
7567         * dev.scm: Fix gas-test call to cpu-load.
7568         * gas-test.scm: Clean up pass to remove bit-rot.
7569         * sim-test.scm: Ditto.
7570
7571         * enum.scm (read-enum): Fix typo in `vals' handling.
7572
7573         * hardware.scm (-parse-hw-type): Fix typo.
7574         (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7575         (def-hardware,define-normal-hardware): Ditto.
7576
7577         * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7578         (display-var): Use it.
7579         * hobbit.c: Rebuild.
7580         * hobbit.h: Rebuild.
7581
7582         * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7583         avoid hobbit problem.
7584         * mach.scm (-cpu-read): Rename local `parallel-insns' to
7585         `parallel-insns-' to avoid hobbit problem.
7586
7587 Fri Nov  6 17:19:12 1998  Doug Evans  <devans@canuck.cygnus.com>
7588
7589         * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7590         (parse_slo16,parse_ulo16): Ditto.
7591         * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7592
7593 Thu Nov  5 13:04:53 1998  Doug Evans  <devans@canuck.cygnus.com>
7594
7595         * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7596         (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7597         * Makefile.in: Rebuild.
7598         * insn.scm (define-normal-insn): Expand pmacros.
7599         * mode.scm (<mode>): New member `host?'.  All uses updated.
7600         (mode:host?): New proc.
7601         * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7602         (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7603         (define-rtx-dual-mode): Ditto.
7604         (s-index-of): New proc.
7605         (s-unop): Use plain C for host mode operations.
7606         (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7607         * rtx-funcs.scm (index-of): New rtx function.
7608         * sim.scm (<hw-index>): New method cxmake-get.
7609
7610 Wed Nov  4 23:58:08 1998  Doug Evans  <devans@seba.cygnus.com>
7611
7612         * sim-cpu.scm (-gen-engine-decls): Delete.
7613
7614 Wed Nov  4 18:40:47 1998  Dave Brolley  <brolley@cygnus.com>
7615
7616         * doc/rtl (Example): Correct Typo.
7617         * doc/porting: Add 'make dep' step to opcodes port instructions.
7618         * fr30.opc: New file.
7619         * fr30.cpu: New file.
7620
7621 Wed Oct 28 13:36:15 1998  Doug Evans  <devans@canuck.cygnus.com>
7622
7623         * configure.in: Handle guile $exec_prefix = $prefix/foo.
7624         * Makefile.am (GUILEINCDIR): New variable.
7625         (INCLUDES): Use it.
7626         * configure: Regenerate.
7627         * Makefile.in: Ditto.
7628         * aclocal.m4: Ditto.
7629
7630 Mon Oct 19 13:19:34 1998  Doug Evans  <devans@seba.cygnus.com>
7631
7632         * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7633         (cgen-semantics.c): Ditto.
7634         * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7635         * sim-model.scm (cgen-model.c): Ditto.
7636         * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7637         (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7638
7639         * opcodes.scm (read-cpu.opc): Handle empty file.
7640
7641         * cos.scm (-elm-make-method-setter): Fix typo.
7642
7643         * cpu.scm (-init-parse-cpu!): Call types-init!.
7644         (-finish-parse-cpu!): Call types-finish!.
7645         * ifield.scm (<ifield>): Delete members start,length.
7646         New member bitrange.
7647         (<ifield>, methods field-start,field-length): Update.
7648         (fld:start): New arg insn-len.  All callers updated.
7649         (<ifield>, methods field-mask,field-value): Update.
7650         (-ifield-parse): Update.
7651         (ifield-init!): Update.
7652         * iformat.scm (compute-insn-length): Simplify.
7653         (compute-insn-mask): Update.
7654         * insn.scm (insn:value): Update.
7655         * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7656         (current-arch-default-insn-bitsize): New proc.
7657         (current-arch-insn-lsb0?): New proc.
7658         (-arch-parse,-arch-read): Update.
7659         (<cpu>): New member file-transform.
7660         (-cpu-parse,-cpu-read): Update.
7661         * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7662         (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7663         (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7664         (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7665         (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7666         (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7667         * operand.scm (op:start): Update call to field-start method.
7668         * sim-decode.scm (opcode-slots): New arg lsb0?.
7669         (fill-slot!,build-slots): Ditto.
7670         (build-decode-table-entry,build-decode-table-guts): Ditto.
7671         (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7672         (gen-decode-fn): Ditto.
7673         (cgen-decode.c): Update call to gen-decode-fn.
7674         * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7675         (-gen-cpu-header,-gen-cpuall-includes): New procs.
7676         (cgen-cpuall.h): Call -gen-cpuall-includes.
7677         * types.scm (<bitrange>): New class.
7678         (types-init!,types-finish!): New procs.
7679         * utils-cgen.scm (parse-number): New proc.
7680         (parse-boolean): New proc.
7681         * utils.scm (word-value): Renamed from shift-bits, rewrite.
7682         (word-mask): Rewrite.
7683         * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7684         (m32rxf): New field `file-transform'.
7685         * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7686
7687         * hobbit.h: Fix include file name.
7688
7689 Fri Oct  9 16:58:10 1998  Doug Evans  <devans@seba.cygnus.com>
7690
7691         * slib: New directory of slib files used by cgen/hobbit.
7692         * hobbit.scm: New file.
7693         * hobbit.c: New file.
7694         * hobbit.h: New file.
7695         * hobscmif.h: New file.
7696         * hob-main.c: New file.
7697         * hobslib.scm: New file.
7698         * hob.sh: New file.
7699         * Makefile.am: Add support for compiling hobbit, and using compiled
7700         version of hobbit to compile cgen.
7701         * Makefile.in: Regenerate.
7702         * configure.in: Support --with-hobbit.
7703         * configure: Regenerate.
7704         * acconfig.h (WITH_HOBBIT): Add.
7705         * config.in: Regenerate.
7706
7707         * rtl.scm: New file, was cdl-c.scm.
7708         Definition of rtx funcs moved to rtx-funcs.scm.
7709         (semantic-in-out-operands): Rewrite to compute object form of
7710         semantic code.
7711         * rtx-funcs.scm: New file.
7712
7713         * cgen-gh.c: #include "config.h".
7714         (gh_cadddr,gh_cddddr): New fns.
7715         (cgh_vector_to_list): New fn.
7716         (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7717         (cgh_init): Prefix qsort procs with "cgh-".
7718         * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7719         * cgen.c: #include "config.h".
7720
7721         * attr.scm (bitset-attr?): New proc.
7722         (<bitset-attribute>, method parse-value): Value syntax changed from
7723         (val1 val2 ...) to val1,val2,....
7724         (<bitset-attribute>): New method gen-value.
7725         (<integer-attribute>): New method gen-value.
7726         (<enum-attribute>): New method gen-value.
7727         * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7728         (<reader>): New class.
7729         (CURRENT-ARCH,CURRENT-READER): New globals.
7730         (keep-mach?): Move here from mach.scm.
7731         * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7732         (<arch>): New class.
7733         (<arch-data>): New class.
7734         (<cpu>): Make subclass of <ident>.
7735         (*ENDIAN* variables): Delete.
7736         (process-state-vars): Delete.
7737         (mach-finish!): Add `base' value to MACH attribute.
7738         * hardware.scm (<hardware>): Make subclass of <ident>.
7739         (hw:std-attrs): New global.
7740         (hw-profilable?): New proc.
7741         * ifield.scm (<ifield>): Make subclass of <ident>.
7742         (sort-ifield-list): Move here from iformat.scm.
7743         * iformat.scm (<iformat>): Renamed from <insn-format>.
7744         Make subclass of <ident>.
7745         (-ifmt-search-key): Include cti? in categorization of formats.
7746         (ifmt-analyze): Compile semantics (turn to object form).
7747         * insn.scm (<insn>): Make subclass of <ident>.
7748         New member compiled-semantics.
7749         (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7750         * mode.scm (<mode>): Make subclass of <ident>.
7751         (UBI): Delete.
7752         * model.scm (<unit>): Make subclass of <ident>.
7753         New members inputs,outputs.
7754         (<model>): Make subclass of <ident>.  New member state.
7755         (-unit-parse): Parse inputs,outputs.
7756         (<iunit>): New class.
7757         (-insn-timing-parse-model): New proc.
7758         (parse-insn-timing): Function unit spec rewritten.
7759         * operand.scm (<operand>): Make subclass of <ident>.
7760         New members sem-name,num,cond?  New method gen-pretty-name.
7761         (hw-index-scalar): New global.
7762         (op-nub-hw): Move here from rtl.scm.
7763         (op:lookup-sem-name,op-profilable?): New procs.
7764         * pmacros.scm: Rewrite to pass through hobbit.
7765         * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7766         * utils.scm (logit): Make a macro.
7767         (bit-set?): Rewrite.
7768         (high-part): Rewrite.
7769
7770         * m32r.cpu (define-arch): Move to top of file.
7771         (cpu family m32rbf): Renamed from m32rb.
7772         (model m32r/d): Function unit spec rewritten.
7773         (all insns): Ditto.  Replace UBI with BI.
7774
7775         * opcodes.scm (gen-attr-table-decls): Declare
7776         @arch@_cgen_hw_attr_table.
7777         (gen-attr-table-defns): Generate hw attribute table.
7778
7779         * sim-cpu.scm (-gen-engine-decls): New proc.
7780         (-gen-model-decls): New proc.
7781         (gen-parallel-exec-type): Add new member `written' to struct parexec.
7782         (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7783         (-gen-record-profile-args): Simplify.
7784         (-gen-parallel-sem-case): Delete.
7785         (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7786         New local `written'.  Delete profiling code.
7787         (-gen-sem-case): Ditto.
7788         (-uncond-written-mask,-any-cond-written?): New procs.
7789         (cgen-sem-switch.c): Include duplicates of insns that can be executed
7790         parallelly or serially, and write-back handlers for all parallel insns.
7791         * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7792         support to initialization of struct insn_sem.
7793         (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7794         (-gen-insn-sem-type): Add parallel write-back support to struct
7795         insn_sem.
7796         (-gen-idesc-init-fn): Add support for virtual insns.
7797         Add parallel write-back support.
7798         * sim-model.scm (gen-model-profile-fn): Delete
7799         (-gen-model-fn-decls): New proc.
7800         (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7801         (-gen-model-init-fn): New proc.
7802         (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7803         members in @mach@_init_cpu.
7804         (cgen-model.c): Generate model handlers for each insn.
7805         * sim.scm (gen-define-field-macro): Cti insns handled differently.
7806         (<hw-pc>): New method gen-write.
7807         (<hw-register>, method gen-write): New arg `mode'.
7808         (<hw-register>): Delete method gen-record-profile!.
7809         New method gen-profile-index-type.
7810         (<hw-memory>, method gen-write): New arg `mode'.
7811         (<hw-address>, method gen-extract): Delete.
7812         (<hw-address>, method gen-write): New arg `mode'.
7813         (<hw-index>, method get-write-index): Rewrite.
7814         (<pc>, method cxmake-get-direct): Delete.
7815         (<pc>): New method cxmake-get.  Comment out methods
7816         gen-set-quiet,gen-set-trace.
7817         (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7818         gen-profile-index-type,gen-profile-code.
7819         Delete method gen-pretty-name.  Rewrite method gen-write.
7820         Delete method cxmake-get-direct.
7821         (-op-gen-set-trace): Update `written'.
7822         (-op-gen-set-trace-parallel): Ditto.
7823         (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7824         (gen-cpu-insn-enum-decl): Add extra entries for parallel
7825         insns and their write-back handlers.
7826         (insn-op-lookup): New proc.
7827         (<unit>): New method gen-profile-code.
7828         (<iunit>): New method gen-profile-code.
7829         (gen-argbuf-elm): Add profiling elements.
7830         (gen-argbuf-type): Define cti insns separately in their own struct.
7831         Add member `addr_cache' to this struct.  Add entries for pbb virtual
7832         insns.  Move semantic entries here from struct scache.
7833         Delete everything from struct scache except argbuf.
7834         (<insn>, method gen-profile-locals): Rewrite.
7835         (<insn>, method gen-profile-code): Rewrite.
7836         (sim-finish!): Create virtual pbb insns.
7837
7838 Tue Sep 15 15:22:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7839
7840         * m32r.cpu (h-cr): Add bbpc,bbpsw.
7841         (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7842         (h-psw,h-bpsw,h-bbpsw): Define.
7843         (rte,trap): Handle bbpc,bbpsw.
7844         * opcodes.scm (max-operand-instances): Fix typo.
7845         * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7846         hardware elements to be fun-access.
7847         (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7848
7849 Wed Sep  9 15:28:55 1998  Doug Evans  <devans@canuck.cygnus.com>
7850
7851         * m32r.cpu (trap): Pass `pc' to m32r_trap.
7852
7853 Mon Aug 10 14:29:33 1998  Doug Evans  <devans@canuck.cygnus.com>
7854
7855         * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7856
7857 Mon Aug  3 11:51:04 1998  Doug Evans  <devans@seba.cygnus.com>
7858
7859         * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7860         architecture name.
7861         (mach m32r): Update.
7862
7863         * mach.scm (mach:supports?): New proc.
7864         * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7865         gen-reg-access-{decls,defns}.
7866         * sim.scm (gen-reg-access-{decl,defn}): New procs.
7867         (gen-mach-bfd-name): New proc.
7868         (gen-arch-reg-access-{decls,defns}): New procs.
7869         (cgen-arch.[ch]): Output register access cover fns.
7870
7871         * hardware.scm (hardware-builtin!): Set print handlers for
7872         h-addr,h-iaddr.
7873         * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7874         `od'.
7875         (CGEN_PRINT_NORMAL,print_hash): Ditto.
7876         (my_print_insn): Ditto.  Delete args buf, buflen.
7877         * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7878         (-hw-asm-specs): Add `handlers' spec.
7879         (-parse-hw-asm): Lookup class at runtime.  If no asm-spec, use
7880         `normal-hw-asm'.
7881         (<hw-asm>): Renamed from <opval>.  New elements parse,insert,extract,
7882         print.
7883         (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7884         (<hw-asm>, parse!): New method.
7885         (gen-insn-table-entry): Print semantics.
7886         (gen-opcode-open): Renamed from gen-opcode-table.
7887
7888         * utils.scm (string-write): No longer a macro.
7889         (-string-write): Handle procedure args.
7890         * opcodes.scm: Update all calls to string-write.
7891         * sim-cpu.scm: Ditto.
7892         * sim-decode.scm: Ditto.
7893         * sim-model.scm: Ditto.
7894         * sim.scm: Ditto.
7895
7896 Fri Jul 31 14:40:38 1998  Doug Evans  <devans@seba.cygnus.com>
7897
7898         * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7899         (-gen-insn-builders,-gen-insn-builder): New procs.
7900
7901 Fri Jul 24 11:38:59 1998  Doug Evans  <devans@canuck.cygnus.com>
7902
7903         * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7904         (gen-opcode-table): Properly terminate comment.
7905
7906 Tue Jul 21 10:51:42 1998  Doug Evans  <devans@seba.cygnus.com>
7907
7908         * Version 0.6.0.
7909         Clean up pass over everything, so starting fresh.