1 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
4 Emit LIKELY/UNLIKELY branch probability hints.
5 * sid-decode.cpu (-gen-record-args): Ditto.
7 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
9 * desc-cpu.scm (-gen-hash-defines): Rename
10 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
12 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
14 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
16 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
17 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
19 * sid.scm (<operand> gen-write): Use unsigned long long expression
21 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
22 (<unit> gen-profile-code): Ditto.
24 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
26 * doc/rtl.texi (Expressions): Document the (index-of ...) and
29 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
31 * operand.scm (<operand> pretty-sem-name): New field.
32 (<operand> make): Initialize it from hw-name.
33 (op:set-pretty-sem-name!): New function.
34 (<operand> gen-pretty-name): Default to fetching new field.
35 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
36 sem-name setting from -rtx-hw-name.
38 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
40 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
41 its subsequent gen-pretty-name.
43 * read.scm: Increase thread working stack limit and backtrace
46 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
48 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
50 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
52 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
54 (h-delay-insn): New hardware register.
55 (l-jal): Uses h-delay-insn instead of pc when setting link register.
59 * openrisc.opc (parse_hi16): Sign extend value.
60 (parse_lo16): Likewise.
62 2001-01-06 Ben Elliston <bje@redhat.com>
64 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
65 instead of @cpu@ and @CPU@ to generically prefix symbol names.
66 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
67 (-gen-semantic-fn-table): Likewise.
68 (-gen-scache-semantic-fn): Likewise.
69 (-gen-no-scache-semantic-fn): Likewise.
70 (cgen-read.c): Likewise.
71 (cgen-sem-switch.c): Likewise.
72 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
74 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
75 (-gen-decode-insn-globals): Likewise.
76 (-gen-idesc-decls): Likewise.
77 (cgen-decode.h): Likewise.
78 (cgen-decode.c): Likewise.
79 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
80 (gen-cpu-insn-enum): Likewise.
81 (sim-finish!): Likewise.
83 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
85 * openrisc.cpu: New file.
86 * openrisc.opc: Likewise.
88 2000-12-12 Ben Elliston <bje@redhat.com>
90 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
92 2000-12-08 Ben Elliston <bje@redhat.com>
94 * dev.scm (load-sid): New function.
95 * cgen-sid.scm: New file.
96 * sid-cpu.scm: Likeiwse.
97 * sid-decode.scm: Likewise.
98 * sid-model.scm: Likewise.
101 2000-12-07 Ben Elliston <bje@redhat.com>
103 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
104 "insn" when there are zero ifields to extract.
106 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
108 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
109 used by simple/non-scache simulators.
110 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
111 regardless of with-scache?.
112 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
114 2000-12-03 Ben Elliston <bje@redhat.com>
116 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
117 (cgen-desc.c): Likewise.
119 2000-12-01 Greg McGary <greg@mcgary.org>
121 * desc.scm ((<keyword>,gen-defn): Prepend prefix to keyword names.
123 2000-12-01 Ben Elliston <bje@redhat.com>
125 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
126 definitions if run without with-multipla-isa?.
127 (cgen-defs.h): New function. Emit an ISA-specific defs file.
128 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
130 2000-11-24 Ben Elliston <bje@redhat.com>
132 * sim-cpu.scm (-gen-hardware-struct): New function.
133 (-gen-hardware-types): If with-multiple-isa is specified, emit all
134 hardware elements wich have share one or more ISAs with the ISAs
137 * sim.scm (-with-multiple-isa?): New symbol.
138 (with-multiple-isa?): New function.
139 (option-init!): Initialise -with-multiple-isa?.
140 (option-set!): Handle with-multiple-isa option.
142 2000-11-21 Ben Elliston <bje@redhat.com>
144 * utils.scm (copyright-fsf): Add the year 2000.
146 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
148 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
149 unneeded "\n\n" from F() macro definition.
151 2000-11-15 Greg McGary <greg@mcgary.org>
153 * utils-cgen.scm (gen-define-with-symcat): New function.
154 * desc-cpu.scm (gen-ifld-defns): Use it.
155 (gen-hw-table-defns): Use it.
156 (-gen-hash-defines): Use it.
157 (gen-operand-table): Use it.
158 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
159 * opc-itab.scm (-gen-ifmt-table): Use it.
160 (-gen-insn-opcode-table): Use it.
161 (-gen-macro-insn-table): Use it.
162 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
163 * sim-cpu.scm (cgen-semantics.c): Use it.
164 (cgen-sem-switch.c): Use it.
166 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
168 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
169 request to emit calls to insn extractors as functions rather than
170 branches to inline blocks.
171 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
172 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
174 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
175 to extractor clauses.
177 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
179 * decode.scm (-distinguishing-bit-population): Significantly
180 improve popularity heuristic. Renamed from
181 (-mask-bit-population): Gone.
182 (-population-above-threshold): Sort new bit numbers in order of
184 (-population-top-few): Allow up to three more bits to be selected
185 than requested. Correct selection order to prefer better bits.
186 Correct bug in fewer-than-requested case. Keep threshold as
188 (decode-best-get-bits): Pass also the insn-values.
190 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
193 * utils.scm (message): Format nested lists better.
195 2000-11-09 Doug Evans <dje@casey.transmeta.com>
197 * dev.scm: Add srcdir to %load-path.
199 * rtx-funcs.scm (subword): Mode of argument can be different
200 than mode of result, so don't use OP0 to specify argument's mode.
202 2000-11-01 Ben Elliston <bje@redhat.com>
204 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
206 2000-10-31 Ben Elliston <bje@redhat.com>
208 * gas-test.scm (cgen-build.sh): Allow the generated script to run
209 with no command line arguments if the gas build directory can be
212 2000-10-26 Doug Evans <dje@casey.transmeta.com>
214 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
215 op-ifld -> op-ifield.
217 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
219 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
221 2000-10-13 matthew green <mrg@cygnus.com>
223 * utils-cgen.scm (get-ifetch): Move from here ...
224 * sim.scm (get-ifetch): ... to here.
226 2000-10-06 Dave Brolley <brolley@redhat.com>
228 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
229 ifld-start + ifld-word-offset.
230 (gen-ifld-extract): Check adata-integral-insn? before checking whether
231 the field is beyond the base number of bits.
232 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
233 (gen-extract-ifields): Ditto.
234 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
235 characters in the regular expression.
237 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
239 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
240 preprocessor constant.
242 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
244 * slib/logical.scm: New file from slib. Provides robust bitwise
245 logical operations for large integers.
246 * read.scm: maybe-load it.
248 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
250 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
251 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
252 single-isa predicate, but support keep-isa filtering.
254 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
256 * rtl-c.scm (s-sequence): Handle nested c-calls in both
257 statement-expression and comma-expression contexts.
258 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
260 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
262 * decode.scm (-population-top-few): Signal error gracefully if
263 decoding is about to become ambiguous.
265 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
267 * doc/rtl.texi (decode-assist): Describe this field as optional.
269 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
271 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
274 2000-09-05 Dave Brolley <brolley@redhat.com>
276 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
277 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
279 2000-08-29 Dave Brolley <brolley@redhat.com>
281 * utils-gen.scm (gen-ifld-extract): Pass total-len if
282 adata-integral-insn is true for this architecture.
284 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
286 * hardware.scm (<hw-immediate> get-index-mode): Define method.
287 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
288 * rtl-c.scm (-c-rtl-get): Improve an error message.
289 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
291 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
293 * Makefile.in (DIST_COMMON): Regenerated.
294 * ifield.scm (<derived-ifield> needed-iflds): New method.
295 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
296 sfmts built from <derived-ifield>s.
297 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
298 type symbol 'derived-ifield, not an unparseable string.
299 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
300 (-sfmt-contents): Add tracing.
302 From Doug Evans <dje@transmeta.com>:
303 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
306 2000-08-20 Doug Evans <dje@casey.transmeta.com>
308 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
309 (rtl-c-expr-parsed,rtl-c-expr): New fns.
310 (-rtl-c-get): Rename from rtl-c-get.
311 (rtl-c-get): New fn for getter logging.
313 2000-07-28 Ben Elliston <bje@redhat.com>
317 2000-07-25 Ben Elliston <bje@redhat.com>
319 * doc/credits.texi (Credits): Add Frank Eigler.
321 2000-07-24 Dave Brolley <brolley@redhat.com>
323 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
325 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
326 (<keyword>): Initialize all elements fully.
327 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
329 (-gen-mach-table-defns): Ditto.
330 (-gen-ifld-defns): Ditto.
331 (-gen-operand-table): Ditto.
332 (-gen-insn-table): Ditto.
333 (-gen-cpu-open): Nothing to do for the mach table.
335 2000-07-13 Ben Elliston <bje@redhat.com>
337 * doc/version.texi (UPDATED): Update.
339 2000-07-05 Ben Elliston <bje@redhat.com>
341 * configure.in (AC_PATH_PROG): Remove.
342 * configure: Regenerate.
343 * Makefile.am (GUILE): Locate guile dynamically.
344 * Makefile.in: Regenerate.
345 * doc/Makefile.in: Likewise.
347 2000-07-03 Ben Elliston <bje@redhat.com>
349 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
350 * opc-itab.scm (cgen-opc.c): Likewise.
352 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
354 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
355 guile 1.4 compatibility.
356 (rtx-env-dump): Comment out buggy display calls.
358 2000-06-15 matthew green <mrg@redhat.com>
360 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
362 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
364 * Makefile.in: Regenerated.
366 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
367 (gen-ifld-defns): Ditto.
368 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
369 * rtl.c (rtl-finish!): Ditto.
370 * opc-itab.scm (-gen-ifield-decls): Ditto.
371 * opcodes.scm (gen-switch): Exclude derived operands.
372 * operand.scm (op-iflds-used): Expand derived operands.
373 (hw-index-derived): New dummy function to create dummy object.
374 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
375 constructor. Set object's hw-name and index fields.
376 (-anyof-merge-subchoices): Set instance object's index also.
377 (-anyof-name): New helper function.
378 (anyof-merge-semantics): Correct replacement of operand names in
380 (op-ifield): Tolerate derived-operands and their funny indices better.
381 * ifield.scm (ifld-known-values): Expand derived ifields.
382 (non-multi-ifields, non-derived-ifields): New utility functions.
383 (ifld-decode-mode): Tolerate objects with unbound decode field.
384 * iformat.scm (compute-insn-length): Expand derived ifields.
385 (compute-insn-base-mask): Ditto.
386 * insn.scm (insn-base-ifields): Remove.
387 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
388 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
389 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
390 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
391 (-frag-test-data): Ditto.
392 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
393 * utils-sim.scm (op-extract?): Handle derived operands.
395 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
396 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
397 * hardware.scm (hardware-for-mode): New function.
399 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
400 cleaning up decode tables.
401 (mask-superset?): Little helper function for above.
402 * decode.scm (-build-decode-table-entry): Call it.
403 (-opcode-slots): Add some more tracing.
404 * arm.cpu: Disable decode-splits construct due to implementation
405 conflict with `filter-harmlessly-ambiguous-insns'
407 * decode.scm (-population-top-few): New function for better decode
408 bit generation. Includes minor helper functions.
409 (decode-get-best-bits): Call it instead.
410 (OLDdecode-get-best-bits): Renamed previous version of above.
413 2000-06-13 Ben Elliston <bje@redhat.com>
415 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
416 for the Guile library directory.
417 * configure: Regenerate.
418 * Makefile.in, doc/Makefile.in: Regenerate.
420 * Makefile.in, doc/Makefile.in: Regenerate.
421 * configure.in: Remove unnecessary tests. Move to version 1.0.
422 * acconfig.h, config.in: Remove.
423 * configure, aclocal.m4: Regenerate.
424 * doc/stamp-vti, doc/version.texi: Likewise.
427 2000-06-07 Ben Elliston <bje@redhat.com>
429 * fixup.scm (symbol-bound?): Reduce debugging output.
431 2000-06-02 matthew green <mrg@redhat.com>
433 * insn.scm (insn-base-ifields): Returns all the instruction fields for
434 a given instruction, replacing derived fields with their subfields.
435 (insn-value): Use `insn-base-ifields' to find all constant values.
436 (multi-insn-instantiate!): Comment some debug messages.
438 2000-06-01 Ben Elliston <bje@redhat.com>
440 * doc/rtl.texi (Expressions): Document a hazard with the choice of
441 symbol names used in a (c-call ..) rtx.
443 * sim-test.scm (build-test-set): Return (()) for an instruction
444 with no operands, so it too is included in the generated test set.
446 2000-05-31 Ben Elliston <bje@redhat.com>
448 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
449 (sim-test): Likewise.
450 * Makefile.in: Regenerate.
452 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
454 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
455 stack traceback, in an order that resembles gdb's `bt'.
457 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
459 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
460 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
461 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
463 * ifield.scm (multi-ifield): Define workable field-mask and field-value
465 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
466 * iformat.scm (ifmt-expanded-ifields): Gone.
467 (ifields-base-ifields): New function. Call ifld-base-ifields for real
469 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
472 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
475 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
477 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
479 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
481 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
482 (-multi-ifield-read): Parse them.
483 (define-full-multi-ifield): Pass #f/#f as defaults for them.
484 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
485 (multi-ifield gen-extract): Add decode hook.
486 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
488 * insn.scm (syntax-break-out): More correctly handle \-escaped
490 (syntax-make-elements): Ditto.
491 * opc-itab.scm (compute-syntax): Ditto.
494 2000-05-17 Ben Elliston <bje@redhat.com>
496 * gas-test.scm (cgen-build.sh): Log the correct script filename.
498 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
500 * gas-test.scm (build-test-set): Return (()) for an instruction
501 with no operands, so it too is included in the generated test set.
503 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
505 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
506 IFMT_OPERANDS and SYNTAX_BYTES.
509 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
511 * sim.scm (with-any-profile?): New function.
512 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
513 to decide whether or not to include profiling counters.
515 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
517 Fuller derived-operand support for opcodes.
518 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
519 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
520 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
521 (gen-operand-table): Omit derived- and anyof- operands from table.
522 (gen-insn-table): Omit multi-insns from table.
523 * iformat.scm (ifmt-expanded-fields): New function to expand
524 subfields of derived-ifields.
525 (ifmt-compute!): Ignore remaining multi-insns.
526 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
528 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
529 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
530 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
531 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
532 (gen-switch): Omit anyof-operands.
533 * operand.scm (-anyof-syntax): New function.
534 (-anyof-merge-syntax): Call it.
535 * utils.scm (collect): New idiomatic function.
537 2000-05-10 Ben Elliston <bje@redhat.com>
539 * m68k.cpu: New file (work in progress).
541 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
543 * Makefile.am (all-local): New target. Create stamp-cgen.
544 * Makefile.in: Regenerated.
545 * doc/Makefile.in: Regenerated.
547 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
549 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
550 (-operand-parse-setter): Ditto.
551 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
552 for CACHE-ADDR operands.
555 2000-04-23 matthew green <mrg@redhat.com>
557 * m32r.cpu: Fix a typo.
559 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
561 * ia64.cpu (define-model): Change merced to Itanium.
562 (f-qp): Change quilifying to qualifying.
563 (movbr_ph, movbr_pvec): Delete.
564 (I-I21): Delete uses of movbr_ph and movbr_pvec.
566 2000-04-07 Ben Elliston <bje@redhat.com>
568 * doc/porting.texi (Building a simulator test suite): Clarify
569 where generated test cases are placed.
571 2000-04-07 Ben Elliston <bje@redhat.com>
573 * Makefile.am (gas-test): Remove dependency on `cgen'.
575 * Makefile.in: Regenerate.
577 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
579 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
580 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
581 type reconfiguration.
582 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
585 2000-03-30 Ben Elliston <bje@redhat.com>
587 * doc/rtl.texi (Enumerated constants): Add concept index entries.
589 2000-03-24 Ben Elliston <bje@redhat.com>
591 * Makefile.am (stamp-cgen): Reinstate target.
592 * Makefile.in: Regenerate.
594 2000-03-22 Ben Elliston <bje@redhat.com>
596 * slib/ppfile.scm: Remove; unused.
597 * slib/defmacex.scm: Likewise.
599 2000-03-21 Ben Elliston <bje@redhat.com>
601 * doc/internals.texi (Source file overview): Document.
603 * Makefile.am (GUILEDIR): Remove.
604 (CGEN): Ditto. Callers use $(GUILE) instead.
607 (APPDESCFILES): Ditto.
608 (OPCODESFILES): Ditto.
610 (pkgdata_SCRIPTS): Ditto.
611 (stamp-cgen): Remove target.
612 * Makefile.in: Regenerate.
614 * configure.in: Remove header and library tests.
615 * configure: Regenerate.
616 * config.in: Likewise.
618 2000-03-20 Ben Elliston <bje@redhat.com>
620 * read.scm: Cease loading "hob-sup.scm".
621 * utils.scm: Inherit the fastcall family of procedures (for now).
622 * hob-sup.scm: Remove.
624 2000-03-20 Ben Elliston <bje@redhat.com>
626 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
627 * configure: Regenerate.
628 * gdbinit.in: Remove.
630 2000-03-17 Ben Elliston <bje@redhat.com>
632 * Makefile.am (CGEN): Use guile, not cgen.
633 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
634 (bin_PROGRAMS, cgen_SOURCES): Likewise.
635 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
636 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
637 (HOB_OBJS): Likewise.
638 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
639 (CGENOBJS): Likewise.
640 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
641 (hobbit, hobbit.o, hobbit.c): Remove targets.
642 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
643 (CLEANFILES): Update.
644 * acconfig.h (WITH_HOBBIT): Remove.
645 * configure.in: Do not test for 3 arg scm_make_vector. Remove
646 option --with-cgen-hobbit.
647 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
648 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
649 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
650 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
651 * Makefile.in: Regenerate.
652 * config.in: Likewise.
653 * aclocal.m4: Likewise.
654 * configure: Likewise.
655 * README (Hobbit support): Remove.
656 * doc/internals.texi (Conventions): Do not mention Hobbit.
657 * doc/porting.texi (Supported Guile versions): Likewise.
659 2000-03-03 Ben Elliston <bje@redhat.com>
661 * doc/internals.texi: New file.
663 2000-02-29 Ben Elliston <bje@redhat.com>
665 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
666 * doc/porting.texi: Formatting tweaks.
668 2000-02-25 Nick Clifton <nickc@cygnus.com>
670 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
673 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
675 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
678 2000-02-23 Andrew Haley <aph@cygnus.com>
680 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
683 2000-02-24 Ben Elliston <bje@redhat.com>
685 * doc/rtl.texi (Derived operands): Add some cindex entries.
687 2000-02-23 Ben Elliston <bje@redhat.com>
689 * ia32.cpu (dndo): Move general purpose macro from here ..
690 * simplify.inc (dndo): .. to here.
692 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
694 * arm.cpu (h-tbit): Add c-call setter function.
697 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
699 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
700 (-frag-cost-compute!): Ditto.
701 * utils.scm (copyright-cygnus): Add Y2K.
703 2000-01-25 Nick Clifton <nickc@cygnus.com>
705 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
706 flags field of the CGEN_CPU_TABLE structure.
708 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
710 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
711 All references updated.
713 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
715 * ia32.cpu: Rewrite addressing mode support.
717 * ifield.scm (<ifield>): New member `follows'.
718 (ifld-known-values): New proc.
719 (<ifield>): New method set-word-offset!.
720 (ifld-set-word-offset!): New proc.
721 (ifld-new-word-offset): New proc.
722 (<ifield>): New method next-word.
723 (<multi-ifield>): New method next-word.
724 (ifld-next-word): New proc.
725 (ifld-precedes?): New proc.
726 (-ifield-parse): New args word-offset,word-length,follows.
727 All callers updated. Handle CISC-style vs RISC-style ifields.
728 (-ifield-read): Recognize word-offset,word-length,follows specs.
729 (-ifld-parse-follows): New proc.
730 (-multi-ifield-make-default-insert): New proc.
731 (-multi-ifield-make-default-extract): New proc.
732 (-multi-ifield-parse): Provide default values for insert,extract
733 handlers if not specified.
734 (<derived-ifield>): New class.
735 (derived-ifield?): New predicate.
736 (ifld-derived-operand?): New predicate.
737 (f-anyof): New global.
738 (ifld-anyof?,ifld-anyof-operand?): New predicates.
739 (f-derived,ifld-derived?): Delete.
740 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
741 * insn.scm (-sub-insn-ifields): New proc.
742 (-sub-insn-make!): New proc.
743 (multi-insn-instantiate!): Provide initial implementation.
744 (-insn-parse): If insn contains "anyof" operands, create a
745 <multi-insn> object instead of a plain <insn>.
746 (-parse-insn-format-symbol): Rewrite derived operand handling.
747 Add anyof operand handling.
748 (-parse-insn-format-ifield-spec): Rewrite.
749 (-parse-insn-format-operand-spec): Delete.
750 (-parse-insn-format-list): Delete support for `(operand value)'.
751 (anyof-operand-format?): Replaces derived-operand-format?.
752 * operand.scm (-operand-parse-getter): Improve error messages.
753 (-operand-parse-setter): Ditto.
754 (<derived-operand>): New members args,syntax,base-ifield,encoding,
756 (<anyof-operand>): Change baseclass from <derived-operand> to
757 <operand>. Delete member values. New members base-ifield,choices.
758 (anyof-operand?): New predicate.
759 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
760 (-derived-operand-parse): Rewrite.
761 (-derived-operand-read): Rewrite.
762 (-anyof-parse-choice): New proc.
763 (-anyof-operand-parse): Rewrite.
764 (-anyof-operand-read,define-anyof-operand): New procs.
765 (<anyof-value>): Rewrite.
766 (-anyof-initial-known): New proc.
767 (anyof-satisfies-assertions?): New proc.
768 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
769 (-anyof-merge-getter,-anyof-merge-setter): New procs.
770 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
771 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
772 (-anyof-value-from-derived): New proc.
773 (-anyof-all-choices-1,anyof-all-choices): New procs.
774 (operand-init!): Create define-anyof-operand reader command.
776 * insn (syntax-break-out): Take syntax as argument instead of insn.
778 (syntax-make): Move here, from ???.
780 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
781 bitrange-foo. All uses updated.
782 (bitrange-next-word): New proc.
784 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
786 * rtl.scm (rtx-canonicalize): Provide initial implementation.
787 (rtx-make-const,rtx-make-enum): New procs.
788 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
789 (rtx-mem-addr,rtx-mem-sel): New procs.
790 (rtx-change-address): New proc.
791 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
792 (rtx-make-set,rtx-single-set?): New procs.
793 (rtx-combine): New proc.
795 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
796 (rtx-traverse-with-locals): Ditto.
797 (-rtx-traverse,-rtx-traverse-*): Ditto.
799 * rtl.scm (define-subr): New proc.
800 (rtl-init!): Create reader command `define-subr'.
802 * cos.c (_object_mi_p): Ensure argument is an object.
803 (indent): New function.
804 (_object_print_elms): Add pretty-printing support.
805 (_object_print): Ditto.
807 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
808 (*floats-s->c-fun-table*): Ditto.
809 * hobbit.c,hobbit.h: Rebuild.
810 * hob-sup.c (fastcall7): New proc.
811 * hob-sup.h (fastcall7): Declare.
812 * hob-sup.scm (fastcall7): New macro.
814 * mach.scm (<arch>): New member subr-list.
815 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
816 (arch-finish!): Reverse recorded subr list.
818 * read.scm (debug-env): New global.
819 (debug-var-names,debug-var,debug-repl-env): New procs.
820 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
821 (debug-quit): Renamed from `continue'.
823 * simplify.inc (dsmf): New pmacro.
825 * utils.scm (plus-scan): New proc.
826 (split-bits): Rewrite.
827 (split-value): New proc.
829 1999-10-13 Doug Evans <devans@casey.cygnus.com>
831 * doc/Makefile.am (DOCFILES): Add notes.texi.
832 * doc/Makefile.in: Rebuild.
834 1999-10-11 Doug Evans <devans@casey.cygnus.com>
836 * ifield.scm (ifld-derived?): New proc.
837 (f-derived): New global.
838 (ifield-builtin!): Create ifield f-derived.
839 (<multi-insn>): New class.
840 (multi-insn?): New predicate.
841 (multi-insn-instantiate!): New proc.
842 (-insn-parse): Create <multi-insn> objects for insns with derived
844 (-parse-insn-format-symbol): Handle derived ifields.
845 (-parse-insn-format-ifield-spec): New proc.
846 (-parse-insn-format-operand-spec): New proc.
847 (-parse-insn-format-list): Simplify.
848 (-parse-insn-format): No longer allow (ifield-object value) spec.
849 (derived-operand-format?): New proc.
850 (insn-alias?): New proc.
851 (non-alias-insns): Rewrite.
852 (insn-real?): Renamed from real-insn?, all callers updated.
853 (virutal-insns): Rewrite.
854 (multi-insns): New proc.
855 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
856 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
857 Return #f if operand doesn't have an index or if index is not an
859 (hw-index-anyof): New proc.
860 (-operand-parse): Allow integer indices.
861 (<derived-operand>): New class.
862 (derived-operand?): New predicate.
863 (<anyof-operand>): New class.
864 (<anyof-value>): New class.
865 (-anyof-parse-value,-anyof-operand-parse): New procs.
866 (-derived-operand-parse,-derived-operand-read): New procs.
867 (define-derived-operand,define-full-derived-operand): New procs.
868 (operand-init!): New reader command define-derived-operand.
870 * utils.scm (list-take): Handle negative amount.
873 1999-10-10 Doug Evans <devans@casey.cygnus.com>
875 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
877 1999-10-04 Richard Henderson <rth@cygnus.com>
879 * ia64.cpu: Checkpoint.
881 1999-09-29 Doug Evans <devans@casey.cygnus.com>
883 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
885 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
886 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
888 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
890 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
891 PC returned by sim_engine_invalid_insn.
893 1999-09-28 Doug Evans <devans@casey.cygnus.com>
895 * ia32.cpu: New file.
897 1999-09-25 Doug Evans <devans@casey.cygnus.com>
899 * utils.scm (bit-set?): Fix off by one error.
901 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
903 * rtl.scm (hw): Check for valid hardware element before trying to
906 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
907 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
908 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
909 * thumb.cpu (*): arm_compute_operand2_foo renamed to
910 compute_operand2_foo.
913 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
914 (estate-output-language-c?,estate-output-language-c++?): New procs.
915 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
916 (estate-make-for-normal-rtl-c++): New proc.
917 (rtl-c++-parsed,rtl-c++): New proc.
918 (s-c-call): Invoke cpu class method if c++.
919 (join): Use s-c-raw-call.
921 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
924 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
925 * rtl.scm (<eval-state>): New member `modifiers'.
926 (<eval-state>,vmake!): Handle #:modifiers.
927 (estate-with-modifiers): New proc.
929 * rtl.scm (rtx-side-effects?): New proc.
930 (rtx-canonical-bool): Don't change expr if it has side effects.
931 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
934 1999-09-23 Doug Evans <devans@casey.cygnus.com>
936 * sim.scm (gen-scache-type): Fix typo in last patch.
938 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
940 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
942 1999-09-05 Doug Evans <devans@casey.cygnus.com>
945 * decode.scm (decode-build-table): Delete args startbit,index-list.
947 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
949 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
950 to decode-get-best-bits.
952 * hardware.scm (hw-bits): New proc.
953 (-hw-parse): New arg layout. All callers updated.
954 (define-full-hardware): New arg layout. All callers updated.
955 (-hw-validate-layout): New proc.
956 (-hw-create-[gs]etter-from-layout): New procs.
957 (<hw-register>,parse!): Handle layout spec.
958 * types.scm (type-bits): New proc.
960 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
961 UNARY, BINARY, TRINARY rtxs.
963 * attr.scm (<enum-attribute>,parse-value): Allow strings.
964 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
965 Support '- as "unused spot" indicator.
967 1999-09-03 Doug Evans <devans@casey.cygnus.com>
969 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
971 1999-09-02 Doug Evans <devans@casey.cygnus.com>
973 * rtx-funcs.scm (subword): Fix mode spec of `value'.
975 * rtl.scm (-rtx-traverse-operands): Fix debugging message
977 (tstate-make): New arg `depth'. All callers updated.
978 (tstate-depth,tstate-set-depth!): New procs.
979 (tstate-incr-depth!,tstate-decr-depth!): New procs.
980 (-rtx-traverse-operands): Indent debugging output by traversal depth.
981 (-rtx-traverse): Ditto. Keep track of traversal depth.
983 1999-09-01 Doug Evans <devans@casey.cygnus.com>
985 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
986 * utils-sim.scm: Decoder generator support moved here.
987 (-decode-equiv-entries?,-decode-sort-entries): New procs.
988 (-gen-decoder-switch): Sort entries for more fall-throughs.
990 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
991 * Makefile.in: Rebuild.
992 * sim-test.scm (build-sim-testcase): Add logging message.
993 * dev.scm (cload): Recognize SIM-TEST application.
994 (load-stest): Set APPLICATION to SIM-TEST.
996 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
998 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
999 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
1000 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
1002 * insn.scm (syntax-break-out): Handle ${foo}.
1004 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
1006 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
1007 (bin_PROGRAMS): Define.
1008 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
1009 (cgen-hob.c): Prepend $(srcdir)/ here.
1010 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
1011 (libcpu_a_SOURCES): Delete.
1012 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
1013 (CGEN_HOB_OBJ,CGENOBJS): New variables.
1014 * configure.in (LIBS): Replace -Wl,-rpath with -R.
1015 Add AC_CHECK_LIB(guile,main).
1016 * Makefile.in: Rebuild.
1017 * doc/Makefile.in: Rebuild.
1018 * aclocal.m4: Rebuild.
1019 * config.in: Rebuild.
1020 * configure: Rebuild.
1022 1999-08-28 Doug Evans <devans@casey.cygnus.com>
1024 Rename rtx functions from name: to name, accept optional leading
1026 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
1027 * attr.scm (-attr-eval): Update.
1028 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
1029 (<hw-register>,mode-ok?): Disallow VOID.
1030 (<hw-immediate>,mode-ok?): Disallow VOID.
1031 (<hw-address>,mode-ok?): Disallow VOID.
1032 * mode.scm (mode-name?): New proc.
1033 (VOID): Renamed from VM.
1034 (DFLT): Renamed from DM.
1035 (mode-builtin!): Update.
1036 * opcodes.scm (<ifield>,gen-insert): Update.
1037 (<ifield>,gen-extract): Update.
1038 (<multi-ifield>,gen-insert,gen-extract): Update.
1039 * operand.scm (op:mode): Update.
1040 (<pc>,make!): Update.
1041 (op:new-mode): Update.
1042 (-operand-read): Update.
1043 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
1044 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
1045 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
1046 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
1047 (rtx-make): Call -rtx-munge-mode&options.
1048 (rtx accessors): Rewrite.
1049 (rtx-pretty-name): Update.
1050 (-rtx-traverse-*): Update.
1051 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
1052 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
1053 (-rtx-make-traverse-table): Update.
1054 (-rtx-traverse-operands): Update.
1055 (-rtx-option?,-rtx-option-list?): New procs.
1056 (-rtx-munge-mode&options): New proc.
1057 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
1058 (-rtx-traverse): Update.
1059 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
1060 (rtx-compile-time-constant?): Update.
1061 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
1062 (rtx-value): Update.
1063 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
1064 * rtx-funcs.scm (*): Update.
1065 * rtl-c.scm (rtl-c-get): Update.
1066 (rtl-c-set-quiet,rtl-c-set-trace): Update.
1067 (s-c-call,s-c-raw-call): Update.
1068 (s-boolifop,s-convop,s-if,s-cond): Update.
1069 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
1070 (-par-replace-set-dests,-par-replace-set-srcs): Update.
1071 (s-parallel,s-sequence): Update.
1072 (rtl-c-build-table): Update.
1073 * sem-frags.scm (-frag-hash-compute!): Update.
1074 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
1075 for temporary bug compatibility with previous version.
1076 (-frag-expr-locals,-frag-expr-stmts): Update.
1077 (-frag-compute-desired-frags,-frag-pick-best): Update.
1078 * semantics.scm (-simplify-expr-fn): Update.
1079 (rtx-simplify): Update.
1080 (-rtx-ref-type): Update. Account for modifiers.
1081 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
1082 (-build-ifield-operand!): Update.
1083 (-build-known-values): Update.
1084 (semantic-compile): Update.
1085 (-gen-reg-access-defns): Update.
1086 (gen-semantic-code,-gen-sem-case): Update.
1087 (-gen-sfrag-code,-gen-sfrag-case): Update.
1088 * sim-cpu (gen-semantic-code): Update.
1089 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
1090 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
1091 (-hw-cxmake-get): Update.
1092 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
1093 (<hw-index>,cxmake-get): Update.
1094 (<operand>,gen-type,gen-read,cxmake-get): Update.
1095 (<operand>,gen-set-quiet,gen-set-trace): Update.
1096 (<pc>,cxmake-get): Update.
1097 (sim-finish!): Update.
1098 * utils-gen.scm (-gen-ifld-extract-base): Update.
1099 (-gen-ifld-extract-beyond): Update.
1100 (gen-multi-ifld-extract): Update.
1102 * simplify.inc: Update.
1104 1999-08-20 Doug Evans <devans@casey.cygnus.com>
1106 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
1107 Prefix queue function name with sim_ instead of @cpu@_.
1109 * sim.scm (-with-parallel-only?): New global.
1110 (option-init!): Initialize it.
1111 (option-set!): Set it.
1112 (with-parallel-only?): New proc.
1113 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
1114 and writeback markers if with-parallel-only.
1115 (-gen-idesc-init-fn): Update.
1116 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
1119 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
1121 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
1122 with the invalid insn handler.
1124 * utils.scm (list-maybe-ref): New proc.
1126 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
1128 (-mach-parse): Signal error if mach wasn't specified in define-arch.
1130 * i960.cpu (test*-*): Delete `expr' arg.
1131 (test-op,branch-op): Update.
1133 1999-08-09 Doug Evans <devans@casey.cygnus.com>
1135 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
1136 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
1138 (gen-reg-access-defn): Ditto.
1139 (-gen-hw-addr): Rewrite.
1140 (-op-gen-queued-write): Rewrite.
1141 * sim-cpu.scm (-gen-cpu-reg-access-decls):
1142 (-gen-scache-semantic-fn): Handle with-generic-write.
1143 (-gen-no-scache-semantic-fn): Ditto.
1145 1999-08-08 Doug Evans <devans@casey.cygnus.com>
1147 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
1149 * sim.scm (-with-generic-write?): New global.
1150 (option-init!): Initialize it.
1151 (option-set!): Set it.
1152 (with-generic-write?): New proc.
1153 (-gen-hw-addr): New proc.
1154 (-op-gen-queued-write): New proc.
1155 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
1157 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
1159 (-gen-sem-switch): Preserve existing with-parallel? value.
1160 (-gen-sem-parallel-switch): Ditto.
1161 (-gen-write-case): Add /indent support.
1162 (cgen-write.c): Rewrite.
1164 * utils.scm (-current-print-state): New global.
1165 (make-print-state): New proc.
1166 (pstate-indent,pstate-set-indent!): New procs.
1167 (pstate-cmd?,pstate-cmd-do): New procs.
1168 (/indent): New global.
1169 (/indent-set,/indent-add): New procs.
1170 (string-write): Set -current-print-state.
1171 (-string-write): New arg pstate, all callers updated.
1172 Handle print-state commands.
1173 (-string-list-flatten): New proc.
1174 (string-list->string): Use it.
1176 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
1177 (-gen-sem-fn-table-entry): New proc.
1178 (-gen-semantic-fn-table): New proc.
1179 (-gen-scache-semantic-fn): Make fn static.
1180 (-gen-no-scache-semantic-fn): Ditto.
1181 (cgen-semantics.c): Define macro SEM_FN_NAME.
1182 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
1183 FAST,FULL. Update @cpu@_insn_sem contents.
1184 (-gen-semf-fn-name): Delete.
1185 (-gen-sem-fn-decls): Delete.
1186 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
1187 @cpu@_semf_init_idesc_table.
1188 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
1190 (cgen-decode.h): Print sfmt enum.
1191 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
1193 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
1194 (ifmt-compute!): Ditto.
1195 * sim-decode.scm (-gen-decoder-switch): Ditto.
1197 * insn.scm (insn-virtual?): New proc.
1199 * enum.scm (gen-enum-decl): Speed up, build string as list and then
1201 * mach.scm (<arch>): attr-list is now a pair of lists.
1202 (current-attr-list): Rewrite.
1203 (current-attr-add!,current-attr-lookup): Rewrite.
1204 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
1206 1999-08-06 Richard Henderson <rth@cygnus.com>
1208 * ia64.cpu: Initial checkpoint.
1210 1999-08-06 Doug Evans <devans@casey.cygnus.com>
1212 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
1213 (pmacros-init!): Update .apply help string.
1215 1999-08-03 Doug Evans <devans@casey.cygnus.com>
1217 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
1218 (<hw-pc>,cxmake-skip): New method.
1219 (<pc>,cxmake-skip): New method.
1220 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
1221 (gen-argbuf-type): New member `skip_count'.
1222 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
1223 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
1225 * utils-sim.scm: New file.
1226 * dev.scm (load-sim): Load it.
1227 * cgen-sim.scm: Load it.
1228 * iformat.scm (<sformat>): New member sbuf, not initialized by
1230 * rtx-funcs.scm (skip): Rewrite.
1231 * rtl-c.scm (skip): Rewrite.
1232 * m32r.cpu (sc,snc): Update `skip' usage.
1233 * mode.scm (mode-real-mode): New proc.
1234 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
1235 Distinguish fragments by the <sformat-abuf> they use.
1236 * sim.scm (gen-profile-index-type): Delete.
1237 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
1238 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
1239 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
1240 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
1241 (-gen-argbuf-elm): Rewrite.
1242 (-gen-argbuf-hw-elm): Delete.
1243 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
1245 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
1246 (sim-init!): Initialize them.
1247 (sim-analyze-insns!): Set them.
1248 (current-sbuf-list): New proc.
1249 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
1250 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
1251 * sim-model.scm (-gen-model-insn-fn): Ditto.
1252 * sim-decode.scm (-gen-extract-decls): Delete.
1253 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
1254 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
1256 (<hw-register,gen-extract,gen-trace-extract): Ditto.
1257 (<hw-address,gen-extract,gen-trace-extract): Ditto.
1258 (-gen-op-extract,-gen-op-trace-extract): New procs.
1259 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
1260 gen-sfmt-argvars-foo and rewrite.
1261 (-gen-record-args): Rewrite.
1262 (-gen-extract-case): Tweak.
1264 * cgen-gh.c (gh_putc,gh_puts): New functions.
1265 * cgen-gh.h (gh_putc,gh_puts): Declare them.
1266 * cos.c (_object_print_elms,_object_print): Use them.
1267 * hob-sup.c (fastcall_print): Use them.
1268 * configure.in: Check for scm_gen_puts, scm_puts.
1269 * config.in: Rebuild.
1270 * configure: Rebuild.
1271 * aclocal.m4: Rebuild.
1272 * Makefile.in: Rebuild.
1274 * dev.scm (load-opc): Use load instead of maybe-load.
1275 (load-gtest,load-sim,load-stest): Ditto.
1277 1999-07-23 Doug Evans <devans@casey.cygnus.com>
1280 1999-07-22 Doug Evans <devans@casey.cygnus.com>
1282 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
1284 * read.scm: Load sem-frags.scm.
1285 * sem-frags.scm (*): Lots rewritten.
1286 * arm.cpu (arm isa): Enable decode-splits.
1287 * arm7.cpu (multiply insns): Rename result to mul-result.
1289 Rename decode-specialize to decode-split.
1290 * decode.scm (*): Update.
1291 * insn.scm (*): Update.
1292 * mach.scm (*): Update.
1294 1999-07-19 Doug Evans <devans@casey.cygnus.com>
1296 Record objects as a smob.
1297 * cos.c (scm_tc16_object): New static global.
1298 (cos_init): Initialize it.
1299 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
1300 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
1301 (_object_tag): Delete.
1302 (_object_make_smob): New function.
1303 (_object_make_x,_object_make_with_values_x): Rewrite.
1304 (_object_elements,_object_class_desc): Rewrite.
1305 (_object_copy,object_p): Rewrite.
1306 (_object_specialize): Rewrite.
1307 (_object_print_elms,_object_print): New functions.
1308 (object_smob): New static global.
1309 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
1311 * cos.c (_make_x_symbol): New static global.
1312 (object_make): Use it.
1313 (cos_init): Initialize it.
1315 1999-07-16 Doug Evans <devans@casey.cygnus.com>
1317 * frv.opc (CGEN_DIS_HASH_SIZE): Change to 128.
1318 (CGEN_DIS_HASH): Hash on f-op ifield value.
1320 1999-07-15 Doug Evans <devans@casey.cygnus.com>
1322 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
1323 instead to determine whether to use FLD macro.
1324 (<rtl-c-eval-state>): New member ifield-var?.
1325 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
1326 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
1327 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
1329 * rtl.scm (rtx-sequence-assq-locals): New proc.
1331 * cos.scm (-object-error): Don't crash on non-objects.
1333 * Makefile.am (CLEANFILES): Add hobbit.
1334 * Makefile.in: Rebuild.
1336 * rtl-c.scm (s-c-call): Delete unnecessary code.
1338 1999-07-14 Doug Evans <devans@casey.cygnus.com>
1340 * rtl-c.scm (ifield): Always reference value via `FLD'.
1342 * cos.c (elm_bound_p): Return problem SCM boolean values.
1344 * utils-cgen.scm (display-argv): New proc.
1345 * cgen-opc.scm (cgen): Call it.
1346 * cgen-sim.scm (cgen): Ditto.
1347 * cgen-gas.scm (cgen): Ditto.
1348 * cgen-stest.scm (cgen): Ditto.
1350 1999-07-05 Doug Evans <devans@casey.cygnus.com>
1352 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
1353 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
1354 (-gen-extract-switch): Initialize result to 1.
1355 * opcodes.scm (gen-ifield-default-type): New proc.
1356 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
1358 (<hw-index>,gen-insert): Handle non-ifield indices.
1359 (<hw-index>,gen-extract): Ditto.
1360 (<hw-asm>,gen-parse): Ditto.
1361 (<hw-asm>,gen-print): Ditto.
1362 (<keyword>,gen-parse): Ditto.
1363 (<keyword>,gen-print): Ditto.
1364 (<operand>,gen-fget): Ditto.
1365 (<operand>,gen-fset): Ditto.
1367 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
1368 (-gen-hw-index): Ditto.
1370 * sem-frags.scm: New file.
1372 * attr.scm (attr-parse): Add better checking of input.
1374 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
1376 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
1378 * ifield.scm (ifld-nil?): New proc.
1380 * operand.scm (<operand>): New members getter,setter.
1381 (<operand>,make!): New args getter,setter. All uses updated.
1382 (op:getter,op:setter): New procs.
1383 (<hw-index>,field-start): Return 0 for non-ifield indices.
1384 (<hw-index>,field-length): Return 0 for non-ifield indices.
1385 (-operand-parse-getter,-operand-parse-setter): New procs.
1386 (-operand-parse): New args getter,setter. All callers updated.
1387 Always use hw-index-scalar for scalar operands.
1388 (-operand-read): Handle getter,setter.
1389 (define-full-operand): New args getter,setter. All uses updated.
1390 * semantics.scm (-build-ifield-operand!): Update.
1391 (-build-index-of-operand!): Update.
1392 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
1393 * simplify.inc (define-normal-operand): Update.
1395 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
1396 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
1397 (s-binop,s-cmpop,s-convop): Ditto.
1398 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
1399 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
1400 (fcc-tests): New insn-enum.
1401 (fcc-value): Rename from fcc-type.
1402 * sparcfpu.cpu: New file. All fp support moved here.
1404 * rtl.scm (<rtx-func>): New member class.
1405 (rtx-class-*?): New procs.
1406 (def-rtx-node): New arg class. All callers updated.
1407 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
1408 * rtx-funcs.scm (*): Specify class.
1410 * utils-cgen.scm (context-make-reader): New proc.
1412 * utils.scm (assert-fail-msg): New variable.
1414 (list-drop,list-tail-drop): New procs.
1416 1999-06-22 Doug Evans <devans@casey.cygnus.com>
1418 * desc-cpu.scm (-gen-hash-defines): Restore generation of
1419 CGEN_MIN_INSN_SIZE deleted on March 22.
1421 * ifield.scm (<ifield>,needed-iflds): New method.
1422 (<multi-ifield>,needed-iflds): New method.
1423 (ifld-needed-iflds): New proc.
1424 (multi-ifield?): New proc.
1425 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
1426 (-sfmt-search-key): Include insn length in key.
1427 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
1428 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
1429 (-ifmt-lookup-ifmt!): Compute key here.
1430 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
1431 All callers updated.
1432 (ifmt-build): Delete arg desc. New args search-key,iflds.
1433 All callers updated.
1434 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
1435 in-ops,out-ops,sorted-used-iflds. All callers updated.
1436 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
1438 * operand.scm (op-iflds-used): New proc.
1439 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
1441 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
1442 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
1443 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
1444 (gen-extracted-ifld-value): Ditto.
1445 (-extract-chunk-specs): Ditto.
1446 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
1447 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
1448 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
1449 (-extract-insert-subfields): New function.
1450 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
1451 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
1452 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
1453 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
1455 (-gen-no-scache-semantic-fn): Ditto.
1456 (-gen-sem-case): Ditto.
1457 (-gen-read-case): Update calls to gen-define-ifields,
1458 gen-extract-ifields.
1459 * sim-decode.scm (-gen-record-args): Update.
1460 (-gen-sfmt-argvars-assigns): Update.
1461 (-gen-extract-case): Update.
1462 * sim-model.scm (-gen-model-insn-fn): Replace calls to
1463 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
1466 1999-06-18 Doug Evans <devans@casey.cygnus.com>
1469 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
1470 (operand name) not (operand object), (local name) not (local object).
1471 (rtx-traverse-with-locals): New proc.
1472 (-compile-expr-fn): New proc.
1473 (rtx-compile): Rewrite.
1474 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
1475 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
1476 (rtl-c-set-trace): Ditto.
1477 (operand define-fn): Recognize operand name argument.
1478 (local define-fn): Recognize sequence temp name argument.
1479 * rtx-funcs.scm (operand): Argument is operand name, not object,
1480 so call current-op-lookup.
1481 (local): Similarily, so call rtx-temp-lookup.
1483 * rtl.scm (rtx-field?): Use rtx-name instead of car.
1484 (rtx-operand?): Ditto.
1485 (rtx-pretty-name): Ditto.
1486 (rtx-local-obj): Flag symbol argument as an error.
1487 (rtx-local-name): New proc.
1488 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
1490 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
1492 * read.scm (debug-repl): Renamed from -debug-repl. All callers
1495 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
1498 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
1499 (*floats-s->c-fun-table*): Ditto.
1500 * hobbit.c,hobbit.h: Rebuild.
1501 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
1502 * semantics.scm (rtx-simplify): Use /fastcall-make.
1504 * iformat.scm (-sfmt-search-key): Don't include memory modes.
1506 * insn.scm (<insn>): Delete members condition, compiled-condition.
1507 (<insn>,make!): Update
1508 (<insn> getters,setters): Update.
1509 (-insn-parse,insn-read,define-full-insn): Update.
1510 * minsn.scm (minsn-make-alias): Update.
1511 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
1512 (ifmt-compute!): Ditto.
1513 * sim.scm (sim-finish!): Update.
1514 * simplify.inc: (define-normal-insn): Update.
1516 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
1517 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
1518 (ifmt-compute!): Ditto.
1520 1999-06-16 Doug Evans <devans@casey.cygnus.com>
1522 * minsn.scm (minsn-compute-iflds): Print better error message for
1525 1999-06-12 Doug Evans <devans@casey.cygnus.com>
1527 * rtl.scm (tstate->estate): Don't copy over expr-fn.
1529 * Makefile.am (HOBFLAGS): New variable.
1530 (cgen-hob.c): Use it.
1532 (libcpu_a_SOURCES): Add hob-sup.c.
1533 (hob-sup.o): New rule.
1534 * Makefile.in: Rebuild.
1535 * cgen.c: #include hob-sup.h.
1536 (cgen_init_c): Call hobbit_init_support.
1537 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
1538 (*special-scm->c-functions*): Add them.
1539 (display-c-expression): Handle *c-symbol*.
1540 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
1541 (*floats-s->c-fun-table*): Ditto.
1542 (normalize): Recognize /fastcall-make.
1543 (normalize-fastcall-make): New proc.
1544 * hobbit.c,hobbit.h: Rebuild.
1545 * hob-sup.scm: New file.
1546 * hob-sup.c: New file.
1547 * hob-sup.h: New file.
1548 * read.scm: Load hob-sup.scm.
1549 * rtl.scm (-rtx-name-list): New variable.
1550 (rtx-name-list): New proc.
1551 (rtx-lookup): Try symbol first.
1552 (def-rtx-node): Add name to -rtx-name-list.
1553 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1554 (-rtx-traverse-anymode): New proc.
1555 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
1556 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
1557 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
1558 (-rtx-traverse-{symornum,object}): New procs.
1559 (-rtx-make-traverse-table): Rewrite.
1560 (-rtx-traverse-operands): Rewrite arg-types handling.
1561 Handle #f result of traverser.
1562 (-rtx-traverse): Renamed from -rtx-traverse-normal.
1563 Move debug handling here.
1564 (-rtx-traverse-debug): Delete.
1565 (rtl-finish!): Change -rtx-traverse-table into list of handlers
1567 * semantics.scm (semantic-compile:process-expr!): Fix call to
1569 * utils.scm (map1-improper): New proc.
1571 1999-06-08 Doug Evans <devans@casey.cygnus.com>
1573 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
1576 1999-06-07 Doug Evans <devans@casey.cygnus.com>
1578 * thumb.cpu (dnti): Delete timing spec.
1581 * arm.cpu (arm isa): New fields condition, setup-semantics.
1582 (thumb isa): New field setup-semantics.
1583 (h-gr): Add attribute CACHE-ADDR.
1584 * arm7.cpu (dnai): Delete condition.
1585 (eval-cond): Delete.
1587 * mach.scm (<isa>): New member setup-semantics.
1588 (-isa-parse-setup-semantics): New proc.
1589 (-isa-parse): New arg setup-semantics.
1590 (-isa-read): Recognize setup-semantics.
1592 * utils-cgen.scm (obj-set-name!): New proc.
1594 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
1595 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
1597 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
1599 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
1600 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
1601 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
1602 (attr): Rewrite test for insn owner.
1603 (member): New rtx function.
1604 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
1605 as separate function.
1606 (rtx-ifield?,rtx-ifield-name): New procs.
1607 (rtx-operand-obj): Rewrite.
1608 (rtx-operand-name): New proc.
1609 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
1610 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
1611 (tstate-make): New args owner, known. All callers updated.
1612 (tstate-known-lookup): New proc.
1613 (rtx-traverse): New arg owner. All callers updated.
1614 (rtx-make-bool): New proc.
1615 (rtl-find-ifields): Rewrite.
1616 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
1617 * semantics.scm: ... here.
1618 (rtx-const-equal,rtx-const-list-equal): New procs.
1619 (-build-known-values): New proc.
1620 (semantic-compile): New arg `insn'. Call rtx-simplify.
1621 (semantic-attrs): Ditto.
1622 * rtx-funcs.scm (member,number-list): New rtx functions.
1624 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
1625 Rewrite. Delete arg `all-attrs'. All callers updated.
1626 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
1628 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
1630 * decode.scm (subdtable-add): Handle `expr' entries.
1631 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
1632 (exprtable-entry-*): Update.
1633 (exprtable-entry-iflds): New proc.
1634 (exprentry-cost): New proc.
1635 (exprtable-sort,-gen-exprtable-name): New procs.
1636 (exprtable-make): New arg `name'. All callers updated. use vector.
1637 (exprtable-*): Update.
1638 (-build-decode-table-entry): Don't issue collision warning if all are
1639 specialized insns. Sort exprtable entries before building table.
1641 * read.scm (-reader-process-expanded-1): Move pretty printing of
1642 input to logging level 4.
1644 * utils.scm (string-list->string): New proc.
1646 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
1648 (insn-read): Delete leading '-' in name. All callers updated.
1649 (real-insn?): New proc.
1650 (real-insns): Rewrite.
1651 (insn-has-ifield?): New proc.
1652 (insn-builtin!): Create insn attribute SPECIALIZED.
1654 * mach.scm (<arch>): Delete member app-data.
1655 (current-raw-insn-list): New proc.
1656 (insn-list-car,insn-list-splice!): New procs.
1657 (<decode-specialize>): New class.
1658 (-isa-parse-decode-specialize): New proc.
1659 (-isa-parse-decode-specializes): New proc.
1660 (<isa>): New members `condition', `decode-specializes'.
1661 (-isa-parse-condition): New proc.
1662 (-isa-parse): New args condition, decode-specializes.
1663 (-isa-read): Recognize condition, decode-specializes.
1664 (-isa-add-decode-specialize!): New proc.
1665 (modify-isa): New proc.
1666 (isa-conditional-exec?,state-conditional-exec?): New procs.
1667 (arch-init!): New reader command `modify-isa'.
1669 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
1670 (mode-signed,mode-unsigned?): New procs.
1672 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
1674 * types.scm (<array>): New method get-shape.
1675 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
1677 (hw-shape,hw-num-elms): New procs.
1678 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
1679 if there's more than 255 registers.
1681 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
1684 1999-05-10 Ben Elliston <bje@cygnus.com>
1686 * arm7.cpu: Remove coprocessor related fields, operands and insn
1687 definitions for now. Take the undefined instruction trap instead.
1688 (ldmda-wb): New instruction.
1689 (ldmib-wb): Likewise.
1690 (ldmdb-wb): Likewise.
1691 (stmdb-wb): Likewise.
1692 (stmib-wb): Likewise.
1693 (stmda-wb): Likewise.
1695 1999-05-08 Doug Evans <devans@casey.cygnus.com>
1698 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
1699 hobbit can't handle optional third arg.
1701 1999-05-07 Doug Evans <devans@casey.cygnus.com>
1703 * arm.cpu (h-tbit): Delete set spec.
1704 (h-mbits): Don't call arm_mbits_set in set spec.
1705 * arm.sim: New file.
1706 * hardware.scm (modify-hardware): New proc.
1707 (hardware-init!): Add modify-hardware command.
1708 * utils-cgen.scm (keyword-list?): New proc.
1709 (keyword-list->arg-list,arg-list-validate-name): New procs.
1710 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
1712 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
1715 * attr.scm (obj-prepend-atlist!): New proc.
1717 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
1719 * sim.scm (<operand>,profilable?): Use op:type.
1721 1999-05-04 Doug Evans <devans@casey.cygnus.com>
1723 * utils.scm (find-index,find): Be more stack friendly.
1725 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
1728 1999-05-01 Doug Evans <devans@casey.cygnus.com>
1730 * arm.cpu (h-gr-usr): New hardware element.
1731 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
1732 (arm-mode): New keyword.
1733 (h-mbits): Add set spec.
1734 (h-spsr): Implement get/set specs.
1736 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
1737 (-reader-process-expanded-1): Pretty print logging output.
1740 * utils-cgen.scm (context-error): Accept variable number of
1743 * rtx-funcs.scm (error:): New rtx function.
1744 * rtl-c.scm (s-case-vm): New proc.
1745 (-gen-non-vm-case-get,s-case-non-vm): New procs.
1746 (s-case): Simplify, handle non-VM result.
1747 (error:): New rtx function.
1749 1999-04-30 Doug Evans <devans@casey.cygnus.com>
1751 * arm.cpu (h-pc): Add set spec to zero bottom bits.
1752 (test-hi,test-ls): Fix cbit handling.
1753 (shift-type,h-operand2-shifttype): Move here ...
1754 * arm7.cpu: ... from here.
1755 (set-cond,set-cond-maybe,dnix): Delete, unused.
1756 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
1757 * arm.cpu: ... to here.
1758 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
1759 (alu-cmn): Use set-add-flags.
1760 (alu-tst): Use set-zn-flags.
1761 (alu-cmp): Use set-sub-flags.
1762 (lsl,lsr,asr): Set condition codes.
1763 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
1764 (alu-op): Split into three: alu-logical-op,alu-arith-op,
1766 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
1767 All callers updated.
1768 (sub-sp): Rename from add-sp-neg.
1769 (f-lbwl-offset): Delete.
1770 (f-lbwl-hi,f-lbwl-lo): New ifields.
1771 (lbwl-hi,lbwl-lo): Update.
1772 (bl-hi): Add 4 to pc.
1773 (push-reg,pop-reg): Simplify.
1774 (push,push-lr): Push registers in correct order.
1775 (pop,pop-pc): Pop registers in correct order.
1776 (save-reg-inc,load-reg-inc): Simplify.
1777 (ldmia): Save registers in correct order.
1779 1999-04-30 Ben Elliston <bje@cygnus.com>
1781 * arm7.cpu (f-op-hdt): Remove; unused.
1782 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
1783 (f-ror-imm8): New multi-ifield.
1784 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
1786 (f-uimm12): New field.
1787 (ror-imm8): New operand.
1789 (hdt-offset8): Reinstate operand.
1790 (offset4-hi,offset4-lo): Remove.
1791 (set-cond): Remove macro; unused.
1792 (set-cond-maybe): Likewise.
1793 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
1794 (store-word/byte): Likewise.
1795 (load-halfword): Use hdt-offset8 multifield operand instead of two
1796 4-bit operands that are explicitly combined by semantic code.
1797 (do-halfword-store): Bug fix. Set address when not preindexing.
1798 (store-halfword): Also use hdt-offset8 operand.
1799 (arith-op): Avoid clobbering source registers when one of them is
1800 the destination register.
1801 (arith-imm-op): Likewise.
1802 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
1803 (teq-imm): Likewise.
1804 (ldm-p): Rename to ldmdb.
1805 (stm-pw): Rename to stmdb-wb.
1806 (multi-action): New macro; test reg-list bits and execute a
1807 semantic fn if the bit is set.
1808 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
1809 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
1810 (all insns): Use dnai entries for simplicity rather than dni.
1811 (*): Use short-form of (const ..).
1813 1999-04-29 Doug Evans <devans@casey.cygnus.com>
1815 * rtl.scm (<rtx-func>): Rename member type to style. Rename
1816 member eval to evaluator.
1817 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
1818 (tstate-make): Delete arg op-fn. All callers updated.
1819 (tstate-op-fn,tstate-set-op-fn!): Delete.
1820 (rtx-traverse): Delete op-fn arg. All callers updated.
1821 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
1822 split out of -simplify-for-compilation.
1824 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
1825 (cgen_DEPENDENCIES): Add stamp-cgen.
1826 (stamp-cgen): New rule.
1827 * Makefile.in: Rebuild.
1829 * rtl-c.scm (enum:): Define emitter for.
1830 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
1832 (rtx-constant-value,rtx-enum-value): New procs.
1833 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
1834 (rtx-compile-time-constant?): Return #t for enums.
1835 (rtx-true?,rtx-false?): Handle enums.
1836 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
1837 building result by hand.
1838 (rtx-simplify-eq-attr-insn): Ditto.
1839 * rtx-funcs.scm (enum:,enum): New rtx functions.
1841 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
1843 (arch-analyze-insns!): New proc.
1844 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
1845 of calling ifmt-compute! directly.
1846 * sim.scm (-sim-insns-analyzed?): Delete.
1847 (sim-analyze!): Call arch-analyze-insns! instead of calling
1848 ifmt-compute! directly.
1850 * utils.scm (string-take-with-filler): New proc.
1851 (string-take): Use it.
1853 * pgmr-tools.scm: New file.
1854 * read.scm: Load it.
1855 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
1857 * insn.scm (insn-base-mask): Renamed from insn:mask.
1858 All callers updated.
1859 (insn-base-mask-length): Renamed from insn:mask-length.
1860 All callers updated.
1861 (insn-foo): Renamed from insn:foo. All callers updated.
1862 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
1863 * iformat.scm (compute-insn-base-mask-length): Renamed from
1864 compute-insn-mask-length. All callers updated.
1865 (compute-insn-base-mask): Renamed from compute-insn-mask.
1866 All callers updated.
1868 * enum.scm (-enum-parse-prefix): New proc.
1869 (<enum>,make!): Don't parse enum values here.
1870 (-enum-parse): Do it here. Call -enum-parse-prefix.
1871 (define-full-insn-enum): Ditto.
1872 (enum-vals-upcase): New proc.
1873 * hardware.scm (define-keyword): Make enum prefix uppercase.
1874 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
1876 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
1877 (<ifield>,field-extract): New method.
1878 (<multi-ifield>,field-extract): New method.
1879 (ifld-extract): New proc.
1880 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
1881 (ifld-extract-fn-name): Renamed from ifld-extract.
1883 * ifield.scm (ifld-new-value): Renamed from ifield-make.
1884 All callers updated.
1886 * ifield.scm (ifld-lsb0?): New proc.
1887 (sort-ifield-list): New arg up?. All callers updated.
1888 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
1889 rather than global state.
1891 1999-04-27 Doug Evans <devans@casey.cygnus.com>
1893 * insn.scm (pretty-print-insn-format): New proc.
1895 * Makefile.in: Rebuild.
1896 * aclocal.m4: Rebuild
1897 * configure: Rebuild.
1899 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
1901 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
1902 * configure: Rebuild.
1903 * aclocal.m4: Rebuild.
1904 * Makefile.in: Rebuild.
1905 * doc/Makefile.in: Rebuild.
1906 * doc/version.texi: Rebuild.
1908 1999-04-25 Doug Evans <devans@casey.cygnus.com>
1910 * utils.scm (bits->bools): New proc.
1912 1999-04-23 Ben Elliston <bje@cygnus.com>
1914 * arm7.cpu (ldrsh-pu): Remove.
1915 (do-halfword-load): New pmacro.
1916 (load-halfword): Likewise.
1917 (do-halfword-store): Likewise.
1918 (store-halfword): Likewise.
1919 (strh-*): New instructions.
1920 (ldrsb-*): Likewise.
1922 (ldrsh-*): Likewise.
1924 1999-04-22 Doug Evans <devans@casey.cygnus.com>
1926 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
1929 * arm7.cpu (do-word/byte-store): Fix typo.
1931 1999-04-22 Ben Elliston <bje@cygnus.com>
1933 * arm7.cpu (do-word/byte-load): Handle cases where the destination
1934 register is the program counter (R15).
1936 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
1937 (str-*): Implement using store-word-byte. Remove older versions.
1938 (bic): Use the `inv' rtx for obtaining bitwise complements.
1939 (bic-imm): Likewise.
1941 (mvn-imm): Likewise.
1942 (store-indev-reg): Remove crufty pmacro.
1943 (load-indiv-reg): Likewise.
1944 (ldm-p): Reverse the order of register processing for decrement.
1946 (stbi): Remove; handled by the str-* insns.
1948 1999-04-21 Doug Evans <devans@casey.cygnus.com>
1950 * thumb.cpu (cmp): Fix carry bit computation.
1953 1999-04-20 Doug Evans <devans@casey.cygnus.com>
1955 * arm.cpu (h-tbit): Specify set spec.
1957 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
1958 (set-sub-flags): Interpret "carry bit" as a borrow.
1959 (all sub/cmp insns): Carry bit is actually a borrow bit.
1960 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
1961 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
1963 (hireg-add,hireg-cmp,hireg-move): Ditto.
1965 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
1966 (-CGEN-LANG-VERSION): Ditto.
1968 1999-04-18 Doug Evans <devans@casey.cygnus.com>
1970 * pmacros.scm (-pmacro-make): New arg `default-values',
1971 all callers updated.
1972 (-pmacro-default-values): New proc.
1973 (-pmacro-process-keyworded-args): New proc.
1974 (-pmacro-process-args): New proc.
1975 (-pmacro-invoke): Process arguments before expanding macro.
1976 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
1977 (define-pmacro): Handle default values specified in arg list.
1978 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
1979 (rtx-boolif-op-arg[01]): New procs.
1980 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
1981 (rtx-simplify): Handle not,orif,andif.
1982 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
1983 * utils.scm (alist-copy): New proc.
1984 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
1986 (swi): Explicitly set pc.
1988 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
1990 1999-04-17 Ben Elliston <bje@cygnus.com>
1992 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
1993 correctly adjusts the program counter now.
1995 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
1996 (f-signed?): Rename from `f-hdt-signed?'.
1997 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
1998 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
1999 (f-hdt-offset8): Use new field names.
2000 (ldr): Use `imm12' field, not `offset12', since we do our own
2002 (str, str-*): Likewise.
2003 (ldu-*): Remove most; better not implemented than broken.
2005 (ldrsh-pu): New insn.
2009 (ldm-p): Likewise; replace (load-indiv-reg) version.
2011 1999-04-15 Doug Evans <devans@casey.cygnus.com>
2013 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
2014 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
2015 (*): Explicitly specify mode in c-call.
2016 (logical-op): Recognize sets of h-gr[15] as sets of pc.
2018 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
2019 (arith-imm-op): New pmacro.
2020 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
2021 * thumb.cpu (bx-rs,bx-hs): Rewrite.
2023 1999-04-14 Doug Evans <devans@casey.cygnus.com>
2025 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
2027 * rtl.scm (rtl-find-ifields): Implement.
2029 * utils-gen.scm: New file.
2030 * read.scm: Load it.
2031 * desc.scm: Move generic attribute code to utils-gen.scm.
2032 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
2033 * Makefile.in: Rebuild.
2035 * arm7.cpu (R15-OFFSET): New attribute.
2037 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
2038 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
2039 for reg-shift version.
2041 (data processing insns): Reorganize. Use dnai.
2043 * attr.scm (attr-kind): New proc.
2044 (attr-list-enum-list): Rewrite.
2045 (-attr-sort): Split result into two lists, bools and non-bools.
2046 (current-attr-list-for): Update.
2048 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
2050 (swi): Rename @cpu@_swi to @prefix@_swi.
2052 * decode.scm (-build-decode-table-entry): Remove heuristic for
2053 distinguishing insns, and use insn ifield-assertion specs.
2055 * desc-cpu.scm (gen-A-attr-mask): Simplify.
2056 (gen-ifld-defns): Boolean attributes begin at number 0 now.
2057 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
2058 * opc-itab.scm (-gen-macro-insn-table): Ditto.
2059 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
2060 all callers updated.
2061 (gen-attr-name): New proc
2062 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
2063 (gen-obj-attr-defn): Delete num_nonbools count.
2065 * iformat.scm (ifmt-analyze): Handle insn-condition.
2066 (ifmt-compute!): Ditto.
2067 * insn.scm (<insn>): Specify default value for condition,
2068 post-cond-trap,compiled-condition,compiled-semantics.
2069 (<insn>,make!): New arg condition.
2070 (<insn>): Add getters for condition,compiled-condition.
2071 (-insn-parse): New arg condition, all callers updated.
2072 (-insn-read): Recognize condition spec.
2073 (define-full-insn): New arg condition.
2074 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
2075 * semantics.scm (semantic-compile): Change arg sem-code to
2077 (semantic-attrs): Ditto.
2078 * sim.scm (sim-finish!): Update calls to define-full-insn.
2079 * simplify.inc (define-normal-insn): Update call to define-full-insn.
2081 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
2083 * Makefile.am (sim-cpu): Allow specification of ISA.
2084 * Makefile.in: Rebuild.
2086 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
2088 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
2090 1999-04-10 Doug Evans <devans@casey.cygnus.com>
2092 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
2094 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
2096 * attr.scm (atlist?): New proc.
2097 (-attr-eval): Rewrite.
2098 (attr-parse): New proc.
2099 (atlist-parse): Use it.
2101 * decode.scm (exprtable-entry-make): New proc.
2102 (exprtable-entry-insn,exprtable-entry-expr): New procs.
2103 (exprtable-make,exprtable-insns): New procs.
2105 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
2107 (hardware-builtin!): Make h-memory a vector.
2109 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
2110 All callers updated.
2111 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
2113 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
2115 (-insn-parse): Set semantics to #f if not specified.
2116 (define-insn,define-full-insn): Take out code that ignores ALIAS's
2118 (-parse-insn-format): Recognize `=' iformat spec.
2120 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
2121 (isa-max-insn-bitsize): Ditto.
2123 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
2125 (<ifield>,gen-extract): Ditto.
2126 (<multi-ifield>,gen-insert,gen-extract): Ditto.
2127 * sim-cpu.scm (gen-semantic-code): Rewrite.
2128 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
2130 (-gen-ifld-extract-beyond): Ditto.
2131 (<multi-ifield>,gen-ifld-extract): Ditto.
2132 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
2133 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
2134 rtl evaluation code.
2135 (op:read): Build an <eval-state> to pass to gen-read.
2136 (op:write): Build an <eval-state> to pass to gen-write.
2137 (op:record-profile): Build an <eval-state> to pass to
2140 * operand.scm (<operand>): Give `selector' default value of #f.
2141 Give `num' default value of -1. Give `cond?' default value of #f.
2142 (op:new-mode): Delete arg `set?', all uses updated.
2144 * read.scm (reader-error): Handle #f return from port-filename.
2145 (-init-parse-cpu!): Call rtl-c-init!.
2146 (reader-install-builtin!): Call rtl-builtin!.
2148 * rtl-c.scm: New file.
2149 * semantics.scm: New file.
2150 * read.scm: Load them.
2151 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
2153 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
2155 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
2156 (-rtx-num-text,-rtx-max-num): New globals.
2157 (def-rtx-operand-node,define-rtx-operand-node): New procs.
2158 (-rtx-macro-lookup): New proc.
2159 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
2160 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
2161 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
2162 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
2163 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
2164 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
2165 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
2166 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
2167 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
2168 (rtx-pretty-name): New proc.
2169 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
2170 (rtx-traverse-*): Rewrite rtx traversing.
2171 (rtx-eval-*): Rewrite rtx evaluation.
2172 (rtx-compile): New proc.
2173 (rtx-simplify): New proc.
2174 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
2175 * rtx-funcs.scm: C generation moved to rtl-c.scm.
2176 (ifield,index-of): Rewrite.
2177 (name): Renamed from `operand:'.
2178 (operand,xop,local): New rtx's.
2179 (current-insn): Rewrite.
2180 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
2181 (cgen-hob.h): Remove rule for.
2182 (cgen-hob.o): Depend on cgen-hob.c only.
2183 * Makefile.in: Rebuild.
2185 * utils-cgen.scm (vmake): New proc.
2186 (<context>): New class.
2187 (context-make-prefix,context-error): New procs.
2189 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
2191 * i960.cpu: Add some ??? comments.
2192 (xnor, ornot): New instructions.
2193 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
2195 1999-04-08 Doug Evans <devans@casey.cygnus.com>
2197 * cos.scm (-object-error): Print better error message.
2199 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
2200 (-pmacro-env-ref): Renamed from -env-ref.
2202 1999-03-31 Doug Evans <devans@casey.cygnus.com>
2204 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
2206 (hardware-builtin!): Delete h-pc builtin.
2207 * arm.cpu (h-pc): Define.
2208 (h-gr): Delete get,set specs. Make array of 16 regs again.
2209 * arm7.cpu (set-logical-cc-maybe): Delete.
2210 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
2211 (data processing insns): Rewrite.
2212 * m32r.cpu (h-pc): Define.
2213 * fr30.cpu (h-pc): Define.
2214 * i960.cpu (h-pc): Define.
2215 * sparc.cpu (h-pc): Define.
2217 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
2218 (s-parallel): Replace do {...} while (0) with {...}.
2219 (s-sequence): Ditto.
2222 1999-03-30 Doug Evans <devans@casey.cygnus.com>
2224 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
2225 All callers updated.
2226 (arith-carry-cc-binop): New arg set-flags. All callers updated.
2229 * read.scm (-reader-process-expanded-1): New proc.
2230 (-reader-process-expanded): Call it to catch nested begin's.
2231 (reader-process): Move `begin' handling to -reader-process-expanded.
2233 * insn.scm (-insn-read): Fix name of `format' spec.
2235 * pmacros.scm (.pmacro): New builtin.
2236 (scan-symbol): If procedure macro, return macro rather than its symbol.
2237 (check-macro): Don't do lookup, instead check if (car expr) is
2239 (scan-list): Handle .pmacro.
2240 (scan): No longer re-examine text for another macro invocation.
2241 (-pmacro-build-lambda): New proc.
2242 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
2243 another, fetch the other's value (rather than doing it during
2246 1999-03-27 Doug Evans <devans@casey.cygnus.com>
2248 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
2249 * Makefile.in: Rebuild.
2251 * decode.scm (decode-get-best-bits): Use memq instead of element?.
2252 (-fill-slot!): Simplify.
2253 (-build-slots): Simplify.
2255 * sim-decode.scm: Replace computed goto decoder/extractor with plain
2258 1999-03-26 Doug Evans <devans@casey.cygnus.com>
2260 * sim-decode.scm: Clean up pass. Move decoder computation into ...
2261 * decode.scm: ... here. New file.
2262 * read.scm: Load decode.scm.
2264 * arm.cpu (arm710 model): Add u-exec function unit.
2265 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
2266 Add get/set specs to redirect reg 15 to h-pc.
2267 (h-*): Indicate for both ARM and THUMB isas.
2268 (cbit,nbit,vbit,zbit): Ditto.
2269 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
2270 (h-cpsr): Make virtual. Add get/set specs.
2271 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
2272 (h-spsr): New virtual reg.
2273 * arm7.cpu (shift-type): New explicitly defined keyword.
2274 (h-operand2-shifttype): Use it.
2275 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
2276 All callers updated. Don't set cbit.
2277 (logical-op): Add rm to ifield list. Change case to case:. Use
2278 shift-type enum as case choices. Set cbit.
2279 (and,orr,eor,add-imm): Uncomment out.
2280 (undefined): Temporarily comment out.
2281 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
2282 (lda-pc,lda-sp): Ditto.
2283 (ldr-pc): Rename from ldr.
2284 (cbranch): Mark insns as being thumb insns.
2286 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
2289 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
2290 (<insn>,ifld-assertions): New member.
2291 (<insn>,make!): New arg ifld-assertions, all callers updated.
2292 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
2293 (insn:fields): Delete.
2294 (-insn-parse): New arg ifld-assertions. All callers updated.
2295 (-insn-read,define-insn): New procs.
2296 (define-full-insn): New arg ifld-assertions. All callers updated.
2297 (insn-init!): New comment define-insn.
2299 * model.scm (-model-parse): Ensure at least one unit specified.
2301 * rtl.scm (-rtx-traverse-operands): Recognize environments.
2302 (<c-expr-temp>,get-name): New method.
2303 (-rtx-make-current-closure,s-closure): New proc.
2304 (hw:): Wrap rtx indices in a closure.
2305 (-gen-case-prefix): New proc.
2307 * rtx-funcs.scm (case:): Fix call to s-case.
2308 (closure): New rtx func.
2310 * hardware.scm (<hardware-base>): New member isas-cache.
2311 (<hardware-base>,get-isas): New method.
2312 (hardware-builtin): Indicate for all isas.
2313 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
2314 * mach.scm (current-arch-mach-name-list): Return list of names.
2315 (current-isa-mach-name-list): Ditto.
2316 (define-arch): Install builtin objects here.
2317 * read.scm (keep-atlist?): Only keep if both mach and isa are
2319 (keep-mach-atlist?): New proc.
2320 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
2321 (reader-install-builtin!): Renamed from -install-builtin!.
2322 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
2324 1999-03-22 Doug Evans <devans@casey.cygnus.com>
2326 * thumb.cpu (cpu,mach,model): Delete.
2327 (dntf): New pmacro. Use it for all field definitions.
2328 (dntop): New pmacro. Use it for all operand definitions.
2329 (asr): Correct field list.
2330 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
2332 * utils-cgen.scm (define-getters): New macro to simplify
2333 writing class accessors.
2334 (define-setters): Ditto.
2335 (sanitize): Recognize isa elements.
2337 * sim-decode.scm (-gen-decode-switch): Ditto.
2339 * sim-arch.scm (-regs-for-access-fns): Delete.
2340 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
2341 (-gen-arch-reg-access-defns): Delete.
2343 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
2344 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
2345 with state-parallel=exec?.
2346 (cgen-*): Call sim-analyze-insns! here.
2347 * sim-decode.scm (cgen-*): Ditto.
2348 * sim-model.scm (cgen-*): Ditto.
2349 * sim.scm (-sim-insns-analyzed): New global variable.
2350 (sim-init!): Reset it.
2351 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
2352 already done the analysis.
2354 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
2357 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
2358 (arm arch): Update isa spec.
2359 (arm,thumb isas): Define.
2360 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
2361 (arm7tdmi mach): Add isa spec.
2362 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
2363 `const' on word number.
2364 * fr30.cpu (fr30 arch): Update isa spec.
2366 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
2368 * i960.cpu (i960 arch): Update isa spec.
2370 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
2371 liw-insns,parallel-insns moved to isas spec.
2372 * m32r.cpu (m32r arch): Update isas spec.
2374 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
2375 liw-insns,parallel-insns moved to isa spec.
2376 * sparc.cpu (sparc arch): Update isas spec.
2377 (sparc isa): Define.
2378 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
2379 decode-assist moved to isa spec.
2380 * sparc64.cpu (sparc64 cpu): Ditto.
2381 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
2382 * desc-cpu.scm (-gen-isa-table-defns): New proc.
2383 (-gen-mach-table-defns): Output mach table.
2384 (-gen-hash-defines): Delete insn size macros, except for
2386 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
2387 (cgen-desc.h): Define MAX_ISAS.
2388 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
2389 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
2390 (arch-* accessors): Renamed from arch:*. All callers updated.
2391 (current-arch-isa-name-list): New proc.
2392 (-arch-parse-isas): Renamed from -arch-parse-isa.
2393 (def-isa-attr!): Rewrite.
2394 (<iframe>): New class.
2395 (<itype>): New class.
2397 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
2398 (isa-integral-insn?,isa-parallel-exec?): New procs.
2399 (-isa-parse,-isa-read,define-isa): New proc.
2400 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
2401 liw-insns moved to <isa>.
2402 (cpu-* accessors): Renamed from cpu:*. All callers updated.
2403 (-cpu-parse,-cpu-read): Update.
2404 (state-*): Renamed from state:*. All callers updated.
2405 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
2407 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
2408 (state-decode-assist): New proc.
2409 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
2410 (-adata-set-derived!): Rewrite.
2411 (adata-integral-insn?): Renamed from adata:integral-insn?. All
2413 (arch-init!): Add define-isa command.
2414 * read.scm (<reader>): Default keep-isa member to (all).
2415 (reader-* accessors): Renamed from reader:*. All callers updated.
2416 (-keep-isa-set!): Call string->symbol on isa name list.
2417 (keep-isa-validate!): Rewrite.
2418 (current-isa): New proc.
2419 (keep-isa?): Recognize "all".
2420 (-init-parse-cpu!): New arg keep-isa. All callers updated.
2421 Call -keep-isa-set!.
2422 (cmd-if): Recognize keep-isa?.
2423 (cpu-load): New arg keep-isa. All callers updated.
2424 (-opt-spec-update): New proc.
2425 (common-arguments): First arg is string, not symbol.
2426 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
2428 * rtl.scm (rtx-get): Default mode of string arg is INT.
2430 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
2432 * rtx-funcs.scm (join:): Pass cpu to handler.
2434 * configure.in (guile_include_dir): Delete.
2435 * configure: Rebuild.
2436 * Makefile.in: Rebuild.
2437 * doc/Makefile.in: Rebuild.
2440 1999-03-22 Ben Elliston <bje@cygnus.com>
2442 * arm7.cpu (ldri-p): New instruction.
2443 (swi): Do not vector through 0x8 yet--there is nothing there.
2446 (all): Use (const x) in subreg expressions.
2448 1999-03-19 Ben Elliston <bje@cygnus.com>
2450 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
2453 1999-03-17 Doug Evans <devans@casey.cygnus.com>
2455 * fr30.cpu (define-arch): Specify "forced" default-alignment.
2456 * mach.scm (-parse-alignment): Recognize "forced" alignment.
2457 * sim-cpu.scm (-extract-chunk-specs): New proc.
2458 (gen-define-fields): Use it.
2459 (-extract-chunk): New proc.
2460 (-gen-extract-beyond-var-list): Use it.
2461 (gen-extract-fields): Simplify.
2463 Port to guile 1.3.1.
2464 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
2465 (LIBIBERTY): New var.
2466 (HOB_OBJS): Add cgen-gh.o.
2467 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
2468 * Makefile.in: Rebuild.
2469 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
2470 * config.in: Rebuild.
2471 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
2472 libncurses, libtermcap.
2473 Add checks for needed functions in guile 1.2 not in guile 1.3,
2474 and vice versa. Add test for 3 argument scm_make_vector.
2475 * configure: Rebuild.
2476 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
2477 definitions if guile doesn't have them.
2478 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
2479 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
2480 with gh_vector_set_x.
2481 (cgh_qsort): Replace gh_list_length with gh_length.
2482 * cgen-gh.h: Add decls for added functions.
2483 (cgh_qsort): Don't declare if IN_HOBBIT.
2484 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
2485 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
2486 scm_make_vector with gh_make_vector.
2487 * cos.scm: Use vector-length instead of length on vectors.
2488 * dev.scm (cload): Make varargs proc with keyword/value args.
2489 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
2490 provide version that works with guile 1.2 or 1.3.
2491 Include private copy of scmhob.h.
2492 * scmhob.h: New file. Keep our own copy for now.
2494 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
2496 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
2498 (-rtx-traverse-operands): Dump cx temp stack if debugging.
2499 (-cx-temp-dump-stack): Pretty up output.
2501 * arm.cpu: comment out thumb.cpu until isa support ready.
2502 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
2503 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
2504 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
2507 1999-03-11 Doug Evans <devans@casey.cygnus.com>
2509 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
2510 (<hw-address>,mode-ok?): unsigned/signed are compatible.
2512 * operand (op:new-mode): Improve error message.
2514 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
2515 * arm7.cpu: New file.
2517 1999-03-12 Ben Elliston <bje@cygnus.com>
2519 * arm.cpu: Lots of minor fixes after desk checking.
2521 1999-03-11 Doug Evans <devans@casey.cygnus.com>
2523 * thumb.cpu: snapshot of current work
2525 * rtl.scm (rtx-get): Tweak error message.
2527 1999-03-10 Doug Evans <devans@casey.cygnus.com>
2529 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
2530 * Makefile.in: Rebuild.
2532 * cos.c (cos_vector_copy): New function.
2533 (_object_copy): Use it.
2535 * mode.scm (mode:eq?): Clean up.
2536 * rtl.scm (cx-new-mode): Copy attributes.
2537 (rtx-get): Don't make copy if <c-expr> with identical mode.
2539 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
2541 (gr-names): h-gr register names moved here.
2543 (cr-names): h-cr register names moved here.
2545 (dr-names): h-dr register names moved here.
2547 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
2548 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
2549 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
2551 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
2553 (gr-names): h-gr register names moved here.
2555 (cr-names): h-cr register names moved here.
2557 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
2558 (h-accums,h-psw): Ditto.
2559 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
2561 (gr-names): h-gr register names moved here.
2562 (h-gr-indices): Delete.
2563 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
2564 (sparc64 h-gr): Ditto.
2565 (h-y): Add get/set specs.
2567 (fp operands): Rewrite.
2568 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
2569 (h-tbr,h-cwp,h-wim): Ditto.
2570 * sparc64.cpu (h-fpsr): Add get/set specs.
2571 * sparccom.cpu (ldd-reg+reg): Load value all at once.
2572 (fp-ld-op): New arg `dest', all callers updated.
2573 (*): Replace `make-di' with `join'.
2576 * sim-arch.scm (-regs-for-access-fns): New proc.
2577 (-biggest-reg-mode): New proc.
2578 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
2579 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
2580 virtual regs separately.
2581 (-gen-cpu-reg-access-defns): Replace fun-access? with new
2583 (gen-semantic-code): Save/restore rtl generator state.
2584 (cgen-cpu.h): Call rtl-gen-init!.
2585 (cgen-cpu.c): Ditto. #include cgen-ops.h.
2586 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
2587 renamed to mach-bfd-name.
2588 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
2589 (-gen-ifld-extract-beyond): Ditto.
2590 (<multi-ifield>,gen-ifld-extract): Ditto.
2591 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
2592 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
2593 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
2595 (hw-fun-access?): Delete.
2596 (-hw-gen-set-quiet-pc): New arg `gstate'.
2597 (<hw-register>,gen-get-macro): Rewrite.
2598 (<hw-register>,gen-set-macro): Rewrite.
2599 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
2600 (-hw-cxmake-get): New arg `gstate'. Rewrite.
2601 (<hw-register>,cxmake-get-raw): New method.
2602 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
2603 (<hw-register>,gen-set-quiet-raw): New method.
2604 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
2606 (-gen-hw-index): Ditto.
2607 (<hw-index>): New arg `gstate'.
2608 (-gen-hw-selector): Update call to rtx-c.
2609 (<pc>): New arg `gstate'.
2610 (op:read): Update gen-read invocation.
2611 (op:write): Update gen-write invocation.
2612 (<operand>,cxmake-get): Handle raw-reg.
2613 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
2614 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
2615 (<operand>,gen-set-quiet): Handle raw-reg.
2616 (<operand>,gen-set-trace): Handle raw-reg.
2617 (-gen-mach-data): mach:cpu renamed to mach-cpu.
2619 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
2620 cgen_operand_type enum.
2621 (gen-operand-table): Add operand type enum. Replace pointer to
2622 hardware element with its enum. Null terminate table.
2623 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
2624 Build operand table.
2625 * ifield.scm (-ifield-parse): Recognize ISA attribute.
2626 * mach.scm (<arch-data>): New member `isas'.
2627 (adata-isas): New accessor.
2629 (isa-default-insn-word-bitsize): New accessor.
2630 (isa-enum): New proc.
2631 (current-arch-default-insn-word-bitsize): Delete.
2632 (current-isa-list,current-isa-lookup): New procs.
2633 (-arch-parse-isa): New proc.
2634 (-arch-parse): Rewrite.
2635 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
2636 (define-arch): Define ISA attribute.
2637 (def-isa-attr!,isa-supports?): New procs.
2638 (<mach>): New member `isas'.
2639 (mach-isas): New accessor.
2640 (-mach-parse): New arg `isas', all callers updated.
2641 (-mach-read): Recognize `isas'.
2642 (arch-finish!): Rewrite.
2643 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
2644 @arch@_cgen_get_{int,vma}_operand.
2645 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
2646 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
2647 of pointer to table entry.
2648 * opcodes.scm (gen-switch): Handle multiply defined operands.
2649 * operand.scm (op-sort): New proc.
2651 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
2652 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
2653 (hw-enum): Accept symbol argument.
2654 (hardware-builtin!): Delete attribute FUN-ACCESS.
2655 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
2657 * attr.scm (atlist-source-form): New proc.
2658 (attr-builtin!): New attr `PRIVATE'.
2659 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
2660 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
2661 if they have `PRIVATE' attribute.
2662 (gen-hw-table-defns): Output definitions of explicitly defined
2664 * hardware.scm (<keyword>): New member print-name. Rename member
2665 `value' to `values', all uses updated.
2666 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
2667 (keyword-parse): Rewrite.
2668 (-keyword-read): New proc.
2669 (define-keyword): New proc.
2670 (-hw-parse-keyword): New proc.
2671 (-hw-parse-indices): Rewrite keyword handling, support new index spec
2673 (-hw-parse-values): Ditto.
2674 (-hw-parse-get,-hw-parse-set): Rewrite.
2675 (hardware-init!): Add new comment define-keyword.
2676 * mach.scm (<arch>): New member `kw-list'.
2677 (arch:kw-list,arch_set-kw-list!): New accessors.
2678 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
2680 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
2681 * mode.scm (mode-class-integral?): New proc.
2682 (mode-class-float?,mode-class-numeric?): New procs.
2683 (mode-integral?,mode-float?,mode-numeric?): New procs.
2684 (mode-compatible?): New proc.
2685 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
2687 (<ifield>,gen-extract): Ditto.
2688 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
2689 (<gstate>): New class.
2690 (gstate-simulator?,gstate-set-simulator?!): New accessors.
2691 (gstate-context,gstate-set-context!): New accessors.
2692 (gstate-macro?,gstate-set-macro?!): New accessors.
2693 (gstate-make,gstate-copy): New procs.
2694 (-rtl-current-gstate): New global.
2695 (current-gstate-simulator?): New proc.
2696 (current-gstate-context,current-gstate-macro?): New procs.
2697 (current-gstate,current-gstate-set!): New procs.
2698 (rtl-gen-init!): Rewrite.
2699 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
2700 (tstate-make): New arg `gstate', all callers updated.
2701 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
2702 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
2703 (tstate-gstate,tstate-set-gstate!): New accessors.
2704 (tstate-copy): New proc.
2705 (tstate-new-cond?,tstate-new-set?): Rewrite.
2706 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
2707 (rtx-traverse): New arg `gstate', all callers updated.
2708 (rtx-strdump): New proc.
2709 (-simplify-for-compilation): New arg `gstate', all callers updated.
2710 (semantic-in-out-operands): Ditto.
2711 (semantic-attrs): Ditto.
2712 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
2713 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
2714 (rtx-value): Rewrite.
2715 (<c-expr>,gen-name): New method.
2716 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
2717 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
2718 (cx-new-mode): New proc.
2719 (-rtx-c-with-tstate): New proc.
2720 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
2722 (-rtx-mode): Rewrite.
2723 (-rtx-mode-compatible?): New proc.
2724 (<c-expr-temp>): New member `value'.
2725 (cx-temp:value): New accessor.
2726 (<c-expr-temp>,make!): Override default method.
2727 (<c-expr-temp>,cxmake-get): Rewrite.
2728 (<c-expr-temp>,gen-set-quiet): Rewrite.
2729 (<c-expr-temp>,gen-set-trace): Rewrite.
2730 (gen-temp-defs): Use cx-temp:value.
2731 (record-temp!): New arg value, all callers updated.
2732 (cx-temp:cx:make): Delete.
2733 (-cx-temp-dump-stack): New proc.
2734 (rtx-get): New arg `gstate', all callers updated. Do mode
2735 compatibility checks. Ensure result has specified mode.
2736 (rtx-set-quiet): New arg `gstate', all callers updated.
2737 (rtx-set-trace): Ditto.
2738 (s-c-call): New arg `tstate', all callers updated.
2739 (s-c-raw-call): Ditto.
2740 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
2741 (s-cmpop,s-if,e-if): Ditto.
2742 (s-subreg): New proc.
2743 (-par-new-temp!): New proc.
2744 (-par-next-temp!): Rewrite.
2745 (-par-replace-set-dests): Use -par-new-temp!.
2746 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
2747 (s-sequence): Use -rtx-c-with-state.
2748 * rtx-funcs.scm (*): Update.
2749 (raw-reg:): New rtx function.
2751 (join:,subreg:): New rtx functions.
2753 * insn.scm (<insn>): New members pre-cond-trap, condition,
2754 post-cond-trap, compiled-condition.
2756 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
2758 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
2760 * utils-cgen.scm (parse-symbol): New proc.
2761 (parse-string): New proc.
2762 (gen-get-macro,gen-set-macro): New arg `index-args'.
2763 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
2764 Prepend \ to newlines.
2766 * utils.scm (alist-remove-duplicates): Delete.
2769 1999-03-05 Ben Elliston <bje@cygnus.com>
2771 * arm.cpu: New file.
2773 1999-03-03 Doug Evans <devans@casey.cygnus.com>
2775 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
2776 * Makefile.in: Rebuild.
2778 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
2779 (-attr-parse): Validate default value.
2781 * read.scm (-CGEN-VERSION): Change to 0.7.1.
2782 (-CGEN-LANG-VERSION): Ditto.
2783 (-keep-all-machs): Renamed from -keep-all, all uses updated.
2784 (<reader>): New member keep-isa plus accessors.
2785 (-keep-isa-set!,keep-isa-validate!): New procs.
2786 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
2787 (common-arguments): New variable.
2788 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
2789 (-debug-repl,continue): New procs.
2790 (-cgen,cgen): New procs.
2791 * cgen-gas.scm: Rewrite.
2792 * cgen-opc.scm: Rewrite.
2793 * cgen-sim.scm: Rewrite.
2794 * cgen-stest.scm: Rewrite.
2796 * gas-test.scm (gas-test-init!): Call opcodes-init!.
2797 (gas-test-finish!): Call opcodes-finish!.
2798 (gas-test-analyze!): Call opcodes-analyze!.
2799 (<hw-asm>): New method test-data.
2800 (<operand>,testdata): Rewrite.
2801 * sim-test.scm (sim-test-init!): Call opcodes-init!.
2802 (sim-test-finish!): Call opcodes-finish!.
2803 (sim-test-analyze!): Call opcodes-analyze!.
2804 (<hw-asm>): New method test-data.
2805 (<operand>,testdata): Rewrite.
2807 1999-03-01 Doug Evans <devans@casey.cygnus.com>
2809 * fixup.scm (reverse!): Define if missing.
2810 * *.scm: Use reverse! instead of list-reverse!.
2812 * utils.scm (leading-id-char?): New proc.
2813 (id-char?): Rewrite.
2814 (chars-until-delimiter): New proc.
2815 * opc-itab.scm (extract-syntax-operands): Rewrite.
2816 (strip-mnemonic): Rewrite.
2817 (compute-syntax): Rewrite.
2819 * pmacros.scm (-pmacro-substr): New proc.
2820 (pmacros-init!): Add builtin .substr.
2822 1999-02-26 Doug Evans <devans@casey.cygnus.com>
2824 * thumb.cpu: New file.
2826 1999-02-24 Doug Evans <devans@casey.cygnus.com>
2828 * Makefile.am (CGENCFLAGS): New variable.
2829 (WITH_HOBBIT): Use automake conditional.
2830 (CGEN_HOB_SRC): New variable.
2831 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
2832 (*.o): Compile with CGENCFLAGS.
2833 (cgen-hob.c): Simplify.
2834 (cgen-nohob.c): New rule.
2835 (hobbit): Renamed from hob.x.
2836 (CLEANFILES): Add cgen-nohob.c.
2837 * Makefile.in: Rebuild.
2838 * doc/Makefile.in: Rebuild.
2839 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
2840 (WITH_HOBBIT): Use AM_CONDITIONAL.
2841 * configure: Rebuild.
2842 * aclocal.m4: Rebuild.
2844 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
2845 with string-write-map.
2847 * sim-cpu.scm (hw-need-storage?): New proc.
2848 (-gen-hardware-types): Use it.
2849 (gen-parallel-exec-elm): Call op-save-index?.
2851 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
2853 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
2855 (-gen-ifld-extract-beyond): Ditto.
2856 (<integer>): Delete all references.
2857 (<sim-hardware>): Delete.
2858 (hw-profilable?): New proc.
2859 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
2860 (<hw-register>): Rename method get-index-mode to save-index?.
2861 (<hw-register>): New methods gen-get-macro,gen-set-macro.
2862 (<hw-register>,gen-sym-decl): Make virtual.
2863 (<hw-memory>,gen-sym-decl): Make virtual.
2864 (<hw-memory>): Rename method get-index-mode to save-index?.
2865 (<hw-address>,gen-sym-decl): Make virtual.
2866 (<operand>): New method save-index?.
2867 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
2869 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
2870 prefix added. All uses updated.
2872 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
2873 rather than pointer to table entry.
2875 * opcodes.scm: Remove all attribute support, lives in desc.scm.
2876 Remove all hw-asm,op-asm support.
2877 (-gen-parse-number,-gen-parse-address): New procs.
2878 (<keyword>,gen-parse): Redo function name computation.
2879 (<keyword>,gen-print): Ditto.
2880 (<operand>,gen-function-name): Rewrite.
2881 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
2882 (opcodes-init!): Delete call to add-parser!.
2884 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
2885 Define enum using hardware semantic name.
2886 (-gen-hw-decl,-gen-hw-defn): New procs.
2887 (gen-hw-table-decls): Use -gen-hw-decl.
2888 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
2889 CGEN_HW_ENTRY structs.
2890 (gen-operand-table): Output hw's enum, not pointer to table entry.
2891 (-gen-cpu-open): Build table of selected hardware elements.
2893 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
2894 (<hardware> support): Delete.
2895 (<hw-asm>): Delete, moved to hardware.scm.
2896 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
2897 (<hw-asm>,gen-table-entry): New method.
2898 (<hw-asm>,parse!): Delete.
2899 (<keyword>,gen-table-entry): New method.
2900 (<keyword>,parse!): Delete.
2901 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
2902 for gen-decl,gen-defn,gen-ref,gen-init.
2903 (desc-init!): Don't create parser for operand asm specs.
2905 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
2906 * ifield.scm (<ifield>): New member `mode'.
2907 (<ifield>,make!): New arg `mode'.
2908 (ifld-mode): Rewrite.
2909 (ifld-hw-type): Rewrite.
2910 (<ifield>,min-value): Rewrite.
2911 (<ifield>,max-value): Rewrite.
2912 (-ifield-parse): New arg `mode'.
2913 (-ifield-read): Update.
2914 (define-full-ifield): New arg `mode'.
2915 (define-full-multi-ifield): Ditto.
2916 (-multi-ifield-parse): Ditto.
2917 (-multi-ifield-read): Update.
2918 (define-full-multi-ifield): New arg `mode'.
2919 (ifield-builtin!): Update definition of f-nil.
2920 * simplify.inc (define-normal-ifield): Update call to
2922 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
2923 (define-normal-hardware): Delete arg asm. New args indices, values,
2924 handlers. Update call to define-full-hardware.
2925 (define-simple-hardware,dsh): New pmacros.
2926 (define-normal-operand): Update call to define-full-operand.
2927 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
2928 Specify INT/UINT mode instead.
2929 (h-gr,h-cr): Use "indices" instead of "asm".
2930 (h-dr,h-ps): Update keyword syntax.
2931 (h-r13,h-r14,h-r15): Ditto.
2932 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
2933 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
2934 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
2935 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
2936 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
2937 Specify INT/UINT mode instead.
2938 (h-gr): Use "indices" instead of "asm".
2939 (h-cc): Update keyword syntax.
2940 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
2941 Specify INT/UINT mode instead.
2942 (h-hi16,h-slo16,h-ulo16): Update.
2943 (h-gr,h-cr): Use "indices" instead of "asm".
2944 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
2945 (h-accums): Update keyword syntax.
2946 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
2947 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
2948 Specify INT/UINT mode instead.
2949 (h-gr-indices): New pmacro.
2950 (h-gr32,h-gr64): Split up from h-gr.
2951 (h-a): Update type spec. Use values instead of asm spec.
2952 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
2953 (h-y,h-annul-p): Ditto.
2954 (h-asr): Update keyword spec.
2955 (h-lo10,h-lo13,h-hi22): Update.
2956 (get-freg-spec,set-freg-spec): New pmacros.
2957 (h-fr32,h-fr64): Split up from h-fr.
2958 (rdd): Comment out get/set specs.
2959 (lo10,lo13,hi22): Use "handlers" instead of "asm".
2960 * sparc32.cpu (h-psr): Use dsh instead of dnh.
2961 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
2962 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
2963 UNSIGNED. Specify INT/UINT mode instead.
2964 (h-*): Use dsh instead of dnh where appropriate.
2965 (h-ixcc): Update type spec. Use "values" instead of "asm".
2966 (h-p,h-membarmask): Ditto.
2967 (membarmask): Use "handlers" instead of "asm".
2969 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
2970 values,handlers,getters,setters plus accessors.
2971 (hw-mode-ok?,hw-default-mode): New procs.
2972 (<hardware-base>): Rename method new-mode to mode-ok?
2973 (<hardware-base>): New method get-index-mode.
2974 (hw-index-mode): New proc.
2975 (pc?): Delete, moved to operand.scm.
2976 (address?): New proc.
2977 (<hardware>): Delete.
2978 (<hw-asm>): Definition moved here from desc.scm.
2979 (keyword-parse): New proc.
2980 (hardware-parsers): Delete.
2981 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
2982 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
2983 (-hw-parse-get,-hw-parse-set): New procs.
2984 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
2985 indices,values,handlers,get,set. Rewrite.
2986 (-hw-read-extra): Delete.
2988 (define-hardware): Don't add object if not selected.
2989 (define-full-hardware): Ditto.
2990 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
2991 (<hw-register>): Member `type' moved to baseclass. Delete member
2993 (<hw-register>,parse!): Rewrite.
2994 (<hw-register>): Delete methods get-rank,get-mode.
2995 (<hw-register>): Method new-mode renamed to mode-ok?
2996 (<hw-register>): New method get-index-mode.
2997 (<hw-pc>,parse!): Rewrite.
2998 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
2999 (<hw-memory>,parse!): Rewrite.
3000 (<hw-memory>): Delete methods get-rank,get-mode.
3001 (<hw-memory>): Method new-mode renamed to mode-ok?
3002 (<hw-memory>): New method get-index-mode.
3003 (<hw-immediate>): Member `type' moved to baseclass. Delete member
3005 (<hw-immediate>,parse!): Rewrite.
3006 (<hw-immediate>): Delete methods get-rank,get-mode.
3007 (<hw-immediate>): Method new-mode renamed to mode-ok?
3008 (<hw-address>): Delete member hw-asm.
3009 (<hw-address>,parse!): Rewrite.
3010 (<hw-address>): Delete methods get-rank,get-mode.
3011 (<hw-address>): Method new-mode renamed to mode-ok?
3012 (hw-profilable?): Delete.
3013 (hardware-init!): Delete hardware-parsers reference.
3014 Update argument specs of command define-full-hardware.
3015 (hardware-builtin!): Update definitions of hardware builtins.
3016 * operand.scm (<operand>): New members hw-name,mode-name.
3017 Delete member op-asm. New member handlers.
3018 (<operand>,make!): Update.
3019 (op:hw-name,op:mode-name,op:handlers): New procs.
3022 (<operand>): New method get-index-mode.
3023 (<pc>,make!): Update.
3024 (op:new-mode): Rewrite.
3025 (operand-parsers): Delete.
3026 (-operand-parse): Rewrite. Return #f if insn not selected.
3027 (-op-read-extra): Delete.
3028 (-operand-read): Update.
3029 (define-operand,define-full-operand): Update.
3030 (operand-init!): Delete operand-parsers reference.
3031 Update syntax of define-full-operand command.
3033 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
3034 (define-full-insn): Update.
3035 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
3036 (define-full-minsn): Update.
3038 * mode.scm (<mode>): New member class.
3039 (mode:class): New proc.
3041 (-mode-parse): New arg class.
3042 (define-full-mode): Update.
3043 (mode-find): Rewrite.
3044 (mode-make-int,mode-make-uint): New procs.
3045 (mode-init!): Update syntax of define-full-mode command.
3046 (mode-builtin!): Update definitions of builtin modes.
3048 * model.scm (<profile>): Delete.
3050 * read.scm (keep-atlist?): New proc.
3051 (keep-multiple?): New proc.
3052 (<parser-list>): Delete.
3053 (add-parser!,parse-spec!): Delete.
3055 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
3056 (def-rtx-syntax-node): Ditto.
3057 (-rtx-traverse-debug?): New variable.
3058 (tstate-make): New proc.
3059 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
3060 (tstate-new-cond?,tstate-new-set?): New procs.
3061 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
3062 tstate. All callers updated.
3063 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
3064 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
3065 (-build-operand!): Replace arg cond? with tstate.
3066 (-build-reg-operand!,-build-mem-operand!): Ditto.
3067 (-build-index-of-operand!): Update making of <operand> object.
3068 (s-ifield): New arg tstate. All callers updated.
3069 (hw:): New arg tstate. All callers updated. Replace call to
3070 current-hw-lookup with current-hw-sem-lookup-1.
3071 (s-index-of): New arg tstate. All callers updated.
3073 (-rtx-use-sem-fn?): New proc.
3074 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
3076 (s-convop): Only use semantic mode when using semantic cover fns.
3077 (s-cmpop): Call -rtx-use-sem-fn?.
3078 (s-cond,s-case): New arg tstate. All callers updated.
3079 (s-parallel,s-sequence): Ditto.
3081 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
3083 * types.scm (<scalar>): Rewrite implementation.
3084 (<integer>): Delete.
3085 (parse-type): Rewrite.
3087 * utils-cgen.scm (parse-handlers): New proc.
3089 * utils.scm (!=): New proc.
3091 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
3093 * pmacros.scm (-pmacro-expand): Fix typo.
3095 1999-02-12 Doug Evans <devans@casey.cygnus.com>
3097 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
3098 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
3099 * i960.cpu (build-hex2): New pmacro.
3100 (insn-opcode): Simplify.
3101 (insn-opcode2): Ditto.
3103 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
3104 * cgen-stest.scm (catch-with-backtrace): Ditto.
3106 1999-02-11 Doug Evans <devans@casey.cygnus.com>
3108 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
3109 All callers updated.
3110 (-pmacro-invoke): New proc.
3111 (-pmacro-sym,-pmacro-str): New procs.
3112 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
3113 (pmacros-init!): Install builtins .iota, .map, .apply.
3114 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
3115 (h-fr): Simplify register name spec.
3116 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
3117 * utils.scm (num-args-ok?): New proc.
3119 1999-02-10 Doug Evans <devans@casey.cygnus.com>
3121 * pmacros.scm (-pmacro-error): New proc.
3122 (-pmacro-expand): Use it.
3123 (-pmacro-splice): New proc.
3124 (pmacros-init!): Install new builtin .splice.
3126 * sparc.cpu: Include sparc64.cpu when appropriate.
3127 (f-mmask,f-simm11): Moved to sparc64.cpu.
3128 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
3129 (ANNUL attribute): Delete.
3130 (test-* pmacros): New arg cc, all callers updated.
3131 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
3132 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
3134 (ldstub,swap): Moved to sparccom.cpu.
3135 * sparc64.cpu: Add more insns.
3137 1999-02-09 Doug Evans <devans@casey.cygnus.com>
3139 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
3141 (cgen-sem-switch.c): Ditto.
3142 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
3143 moved to cgen-engine.h.
3144 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
3145 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
3146 global. Cache attributes and insn length in IDESC.
3147 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
3148 @cpu@_opcode renamed to @cpu@_get_idata.
3149 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
3150 done later underneath sim_resume.
3151 (@mach@_mach): Record @cpu@_prepare_run.
3152 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
3154 (-hw-gen-set-quiet-pc): Ditto.
3155 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
3156 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
3157 (<hw-addr>,cxmake-get): Ditto.
3158 (<hw-iaddr>,cxmake-get): Ditto.
3159 (<pc>,cxmake-get): Ditto.
3160 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
3161 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
3162 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
3163 (<hw-pc>,gen-write): Use hw-selector-default.
3164 (<hw-register>,gen-write): Ditto.
3165 (<hw-memory>,gen-write): Ditto.
3166 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
3167 (-gen-hw-selector): New proc.
3169 * desc.scm: New file.
3170 * desc-cpu.scm: New file.
3171 * opcodes.scm: Split up into several smaller files.
3172 * opc-asmdis.scm: New file.
3173 * opc-ibld.scm: New file.
3174 * opc-itab.scm: New file.
3175 * opc-opinst.scm: New file.
3176 * Makefile.am (desc): New target.
3177 (opcodes): Update args to cgen-opc.scm.
3178 * Makefile.in: Rebuild.
3179 * aclocal.m4: Rebuild.
3180 * config.in: Rebuild.
3181 * configure.in: Update arg to AC_INIT.
3182 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
3183 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
3185 * configure: Rebuild.
3186 * cgen-gas.scm: Update files to load.
3187 * cgen-opc.scm: Ditto. Reorganize option letters.
3188 * cgen-sim.scm: Update files to load.
3189 * cgen-stest.scm: Ditto.
3190 * dev.scm (cload): New app "DESC".
3191 (load-opc): Update files to load.
3192 (load-gtest,load-sim,load-stest): Ditto.
3194 * attr.scm (bool-attr?): New proc.
3195 (attr-list-enum-list): New proc.
3196 (-attr-sort): Rewrite.
3197 (attr-builtin!): Give ALIAS attribute a fixed index.
3198 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
3199 calculate attribute enum list.
3200 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
3202 * insn.scm (-insn-parse): Renamed from parse-insn.
3204 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
3207 * mode.scm (-mode-parse): Renamed from parse-mode.
3209 * operand.scm (<operand>): New member `selector'.
3210 (<operand>,make!): Use default selector.
3211 (hw-selector-default): New variable.
3212 (hw-selector-default?): New proc.
3214 * pmacros.scm (pmacros-init!): New proc.
3215 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
3216 (-env-set!): Delete.
3217 (-pmacro-expand): New proc apply-macro.
3218 Use it in scan-list,scan. Scan list first, then see if macro
3220 (define-pmacro): Rewrite.
3221 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
3223 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
3224 selected if (current-mach) seen.
3225 (rtx?): Renamed from rtx-uneval?, all callers updated.
3226 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
3228 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
3229 selector, all callers updated.
3230 (hw:): New arg selector, all callers updated. Delete old comments
3232 (reg:,mem:): Handle selectors
3233 * rtx-funcs.scm (reg:): Handle selectors.
3235 * read.scm: Renamed from cpu.scm.
3236 (<command>): New class.
3237 (<reader>): New member commands.
3238 (reader-add-command!): New proc.
3239 (reader-lookup-command): New proc.
3240 (reader-error,-reader-process-expanded,reader-process): New procs.
3241 (reader-read-file!): New proc.
3242 (include): Call reader-read-file!.
3244 (cpu-load): Call reader-read-file!.
3245 * utils.scm (num-args): New proc.
3246 * simplify.inc: New file.
3247 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
3248 procs. Move define-normal-foo procs (and abbreviated forms) to
3249 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
3251 * fr30.cpu: Include simplify.inc.
3252 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
3253 * i960.cpu: Include simplify.inc.
3254 * m32r.cpu: Include simplify.inc.
3255 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
3256 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
3257 * sparc.cpu: Include simplify.inc.
3258 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
3259 * utils-cgen.scm (parse-error): Moved to read.scm.
3260 (sanitize): Rewrite.
3261 (utils-init!): New proc.
3263 1999-02-02 Doug Evans <devans@casey.cygnus.com>
3265 * sparc.cpu: New file.
3266 * sparc32.cpu: New file.
3267 * sparc64.cpu: New file.
3268 * sparccom.cpu: New file.
3269 * sparc.opc: New file.
3271 1999-01-27 Frank Eigler <fche@cygnus.com>
3273 * utils.scm (gen-copyright): New proc.
3275 1999-01-27 Doug Evans <devans@casey.cygnus.com>
3277 Parameterize rtl parsing, rather than having lots of little handlers.
3278 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
3279 Delete member traverse.
3280 (rtx:set-traverse!): Delete.
3281 (-rtx-valid-types,-rtx-valid-matches): New variables.
3282 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
3283 instead of expression. All callers updated.
3284 (def-rtx-node): New args arg-types,arg-modes.
3285 (def-rtx-syntax-node): Ditto.
3286 (def-rtx-dual-mode): Ditto.
3287 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
3288 All callers updated.
3289 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
3290 All callers updated.
3291 (rtx-macro-expand): New proc.
3292 (-rtx-traverse-check-args): Delete.
3293 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
3294 an rtx specific traverser.
3295 (-rtx-any-mode?,-rtx-symornum?): New procs.
3296 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
3297 (-rtx-traverse-no-mode): Delete.
3298 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
3299 (-rtx-traverse-operands): Rewrite.
3300 (-rtx-traverse-expr): Rewrite.
3301 (rtx-traverse): Don't expand macros here, leave for caller to do.
3302 (rtx-simplify): Delete.
3303 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
3305 (rtx-true?,rtx-false?): Ditto.
3306 (-rtx-ref-type): Set dest is operand 1 now.
3307 (-simplify-for-compilation): New proc.
3308 (semantic-in-out-operands): Recognize regno as an alias for index-of.
3309 Expand macros before calling rtx-traverse. Sort operands by name
3310 to avoid unnecessary semantic formats.
3311 (semantic-attrs): New proc.
3312 (rtx-uneval?): Handle (<rtx-func> ...).
3313 (s-boolifop): Delete arg mode. All callers updated.
3314 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
3315 (eq-attr): New arg obj.
3317 * m32r.cpu (rach): Update calls to andif.
3319 * minsn.scm (-minsn-parse-expansion): Renamed from
3320 parse-minsn-expansion.
3321 (-minsn-parse): Renamed from parse-minsn.
3322 (-minsn-read): Renamed from read-minsn.
3323 (def-minsn): Don't check APPLICATION here.
3324 (def-full-minsn): New proc.
3325 (define-macro-insn): Check APPLICATION here. Expand macros.
3326 (define-normal-macro-insn): Ditto.
3328 * utils.scm (word-value): New arg start-lsb?.
3329 (word-mask,word-extract): Ditto.
3330 (split-bits,powers-of-2): Use integer-expt instead of expt.
3331 (bit-set?): Handle 32 bit values (which are bignums).
3332 (cg-logand,cg-logxor): New functions.
3333 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
3334 (<ifield>,field-value): Update call to word-value.
3335 (<ifield>,min-value): Use integer-expt instead of expt.
3336 (<ifield>,max-value): Ditto.
3338 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
3340 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
3342 Compute raw instruction format in addition to semantic based format.
3343 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
3344 (<iformat> accessors): Rename accessors to ifmt-*.
3345 (<sformat>): New class.
3346 (fmt-enum): Renamed from fmt:enum.
3347 (-ifmt-search-key): Rewrite.
3348 (-sfmt-search-key): New proc.
3349 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
3350 Compute iformat and sformat search keys.
3351 (ifmt-build): Update.
3352 (sfmt-build): New proc.
3353 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
3354 (ifmt-compute!): Compute instruction format <iformat> based on
3355 instruction fields alone. Compute new semantic format <sformat>
3356 based on instruction fields and semantic information.
3357 (ifmt:lookup): Delete.
3358 * mach.scm (<arch>): New member sfmt-list, plus accessors.
3359 (current-sfmt-list): New proc.
3360 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
3361 Rename member fmt to ifmt. New members fmt-desc, sfmt.
3362 (insn-length,insn-length-bytes): Update.
3363 (insn:mask-length,insn:mask): Update.
3364 (insn-lookup-op): Update.
3365 * gas-test.scm (gas-test-analyze!): Update.
3366 (gen-gas-test): Ditto.
3367 * sim-test.scm (sim-test-analyze!): Update.
3368 (gen-sim-test): Ditto.
3369 * opcodes.scm (gen-operand-instance-table): Update.
3370 (gen-operand-instance-ref): Ditto.
3371 (max-operand-instances): Use heuristic if semantics not parsed.
3372 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
3373 (opcodes-analyze!): Only scan semantics of building operand instance
3375 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
3376 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
3377 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
3378 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
3379 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
3380 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
3381 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
3383 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
3384 New arg lsb0? All callers updated.
3385 (decode-bits): New arg lsb0?. All callers updated.
3386 (opcode-slots): Update call to bit-set?. Call integer-expt instead
3388 (-gen-decode-bits): New arg lsb0?. All callers updated.
3389 (build-slots): Call integer-expt instead of expt.
3390 (build-decode-table-entry): Handle crossing word boundaries better.
3391 (-gen-decode-switch): New arg lsb0?. All callers updated.
3392 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
3394 * enum.scm (define-enum): Rewrite.
3395 (define-normal-enum): Ditto.
3396 (def-full-insn-enum): New proc.
3397 (define-normal-insn-enum): Rewrite.
3399 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
3401 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
3404 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
3405 (CLEANFILES): Add tmp-*.
3406 * Makefile.in: Rebuild.
3408 * doc/Makefile.am: New file.
3409 * doc/Makefile.in: New file.
3410 * doc/cgen.texi: New file.
3411 * Makefile.am (SUBDIRS): Define.
3412 * Makefile.in: Rebuild.
3413 * configure.in: Create doc/Makefile.
3414 * configure: Rebuild.
3416 1999-01-18 Doug Evans <devans@casey.cygnus.com>
3418 * insn.scm (insn:syn): Delete.
3420 1999-01-15 Doug Evans <devans@casey.cygnus.com>
3422 * fr30.cpu (model fr30-1): Add state variables load-regs,
3423 load-regs-pending. Delete h-gr. Clean up operand names of all units.
3424 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
3425 (model m32rx): Ditto.
3426 (addi): Simplify function unit usage spec.
3427 (ld-plus): Rewrite operand names in function unit usage spec.
3428 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
3429 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
3430 overridden. Allow operand to appear in input and output spec.
3431 (<insn>,gen-profile-code): string-append -> string-list.
3433 * ifield.scm (define-ifield): Call pmacro-expand.
3434 (define-full-ifield,define-normal-ifield): Ditto.
3435 (define-multi-ifield,define-normal-multi-ifield): Ditto.
3437 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
3438 with-scache and without-scache cases.
3440 1999-01-14 Doug Evans <devans@casey.cygnus.com>
3442 * fr30.cpu (fr30-1): Add state variable h-gr.
3443 Add units u-cti, u-load, u-store, u-ldm, u-stm.
3444 (all insns): First pass at providing cycle counts.
3445 * sim.scm (<unit>,gen-profile-code): Only check for output operands
3446 when initializing unit output operands, ditto for input operands.
3448 * insn.scm (insn-length,insn-length-bytes): New procs.
3449 * mach.scm (-adata-set-derived!): Use them.
3450 * sim-cpu.scm (-gen-sem-case): Ditto.
3452 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
3453 (-gen-write-case): Ditto.
3454 (gen-semantic-fn): Ditto. Split into two:
3455 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
3457 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
3458 scache/no-scache appropriately. All callers updated.
3459 (-gen-sem-case): PCADDR->IADDR.
3460 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
3462 * sim-decode.scm (*): Replace string-append,string-map with
3463 string-list,string-list-map where the result is sufficiently large.
3464 (-gen-decode-insn-table): Go back to simple version for non-scache
3465 case: just record IDESC in decoder tables and leave field extraction
3467 (-gen-decode-switch): Ditto.
3468 (-gen-decode-fn): Ditto.
3469 (-gen-extract-decls): Only emit format enum if with-scache?.
3470 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
3472 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
3473 (-gen-insn-timing): Ditto.
3474 * sim.scm (gen-argbuf-type): Only output sem_fields union in
3477 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
3478 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
3480 1999-01-12 Doug Evans <devans@casey.cygnus.com>
3482 * cpu.scm (keep-mach-validate!): New proc.
3483 (include): New proc.
3485 * mach.scm (current-arch-mach-name-list): New proc.
3486 (-parse-arch-machs): Always return canonical form.
3487 (def-arch): Validate user specified machs to be kept.
3488 (def-mach-attr!): Simplify.
3490 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
3491 (option-init!): Initialize it.
3492 (option-set!): Set it.
3493 (gen-insn-table-entry): Emit 0 for operand instance ref if not
3494 output operand instance tables.
3495 (cgen-opc.in): Only output operand instance tables if asked to.
3497 * sim.scm (option-init!,option-set!): Clarify returned value.
3499 * sim.scm (gen-mach-bfd-name): Move from here.
3500 * utils-cgen.scm: To here.
3502 1999-01-11 Doug Evans <devans@casey.cygnus.com>
3504 * fr30.cpu (ilm): Fix comment field.
3505 (cond-branch): Remove explicit setting of COND-CTI, let cgen
3508 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
3509 (rtx-true?, rtx-false?): New procs.
3510 * rtx-funcs.scm (annul): Rename vpc to pc.
3511 (-rtx-traverse-if): Improve determination of whether then/else parts
3512 are conditionally executed.
3514 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
3516 (gen-argbuf-type): Simplify generated definition (big sem_fields
3517 union moved outside).
3519 1999-01-11 Ben Elliston <bje@cygnus.com>
3521 * doc/porting.texi: New file.
3523 * doc/intro.texi: New file.
3524 (Layout): Use @example to insert preformatted ASCII text (such as
3525 diagrams). @code is inappropriate here.
3527 1999-01-06 Doug Evans <devans@casey.cygnus.com>
3529 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
3531 * m32r.opc (print_hash): Cast dis_info.
3533 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
3534 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
3537 1999-01-05 Doug Evans <devans@casey.cygnus.com>
3539 * i960.cpu (f-br-disp): Remove RELOC attribute.
3540 (f-ctrl-disp): Ditto.
3541 (callx-disp): set-quiet -> set for (reg h-gr 2).
3542 (callx-indirect,callx-indirect-offset): Ditto.
3544 * Makefile.am (gas-test): Fix dependencies.
3545 * Makefile.in: Rebuild.
3546 * cgen-gas.asm: File creation args are -<uppercase-letter>.
3547 * gas-test.scm (break-out-syntax,make-file-name): Delete.
3548 (gas-test-analyze!): Use syntax-break-out.
3549 * sim-test.scm (break-out-syntax,make-file-name): Delete.
3550 (sim-test-analyze!): Use syntax-break-out.
3551 (cgen-build.sh): Use gen-file-name.
3552 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
3553 * insn.scm (syntax-break-out): New proc.
3554 * utils.scm (gen-file-name): New proc.
3556 * fixup.scm (nil,<?,<=?,>?): Delete.
3558 * utils.scm (count-true): Rewrite.
3560 * slib/sort.scm: Move sort.scm to slib directory.
3563 * iformat.scm (ifmt-compute!): Record empty format.
3565 * rtl.scm (semantic-in-out-operands): Simplify by moving several
3566 internal procs outside. Handle expression register numbers.
3569 * rtx-funcs.scm (annul): Rename new_pc to vpc.
3571 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
3573 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
3574 (gen-semantic-fn,-gen-sem-case): Ditto.
3575 (cgen-cpu.c): Define WANT_CPU to @cpu@.
3576 (cgen-semantics.c): Ditto.
3577 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
3578 (gen-ifmt-argvars-defns): New proc.
3579 (gen-ifmt-argvars-assigns): New proc.
3580 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
3581 (-gen-decode-fn): Handle non-with-scache case.
3582 (cgen-decode.c): Define WANT_CPU to @cpu@.
3583 * sim-models.scm (-gen-mach-defns): Emit bfd name.
3584 (cgen-model.c): Define WANT_CPU to @cpu@.
3585 * sim.scm (gen-ifld-extract-argvar): New proc.
3586 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
3587 with FUN-ACCESS specified.
3588 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
3589 (<hw-register>,gen-extract): New arg local?.
3590 (<hw-address>,gen-extract): Ditto.
3591 (-hw-cxmake-get): Handle non-with-scache case.
3592 (-hw-gen-set-quiet): Ditto.
3593 (<hw-address>,cxmake-get): Handle non-with-scache case.
3594 (gen-op-extract-argvar): New proc.
3595 (<operand>,gen-record-profile): Rewrite.
3596 (<operand>,gen-profile-code): Rewrite.
3597 (<unit>,gen-profile-code): Use -gen-argfld-ref.
3598 (gen-argbuf-fields-union): New proc.
3599 (gen-argbuf-type): Use it. Handle non-scache case.
3601 * *.scm: class:foo procs renamed to class-foo.
3602 * attr.scm (<attribute>): New member `for'.
3603 (-attr-parse): New first value in list for default if
3605 (non-bool-attr-list,attr:add!): Delete.
3606 (def-attr): Use current-attr-add!.
3607 (atlist-attr-value-no-default): New proc.
3608 (attr-lookup-default): Handle boolean attributes.
3609 (gen-attr-enum): New proc.
3610 (-attr-remove-meta-attrs-alist): New proc.
3611 (attr-nub): New proc.
3612 (current-attr-list-for): New proc.
3613 (current-{ifld,hw,op,insn}-attr-list): New procs.
3614 (attr-builtin!): New proc.
3615 * cpu.scm (keep-obj?): Rewrite.
3616 (-init-parse-cpu!): Call arch-init!.
3617 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
3618 (-finish-parse-cpu!): Call arch-finish!.
3619 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
3620 (def-enum,def-full-enum): Use current-enum-add!.
3621 (gen-obj-list-enums): New proc.
3622 * hardware.scm (hw:add!,hw:lookup): Delete.
3623 (def-hardware,def-hardware-ext): Use current-hw-add!.
3624 (hw:std-attrs,hw:attr-list): Delete.
3625 (hardware-builtin!): Define builtin hardware attributes.
3626 * ifield.scm (ifld:add!,ifld:lookup): Delete.
3627 (def-ifield,def-full-ifield): Use current-ifld-add!.
3628 (ifld:std-attrs,ifld:attr-list): Delete.
3629 (ifield-builtin!): New proc.
3630 * insn.scm (insn:add!,insn:lookup): Delete.
3631 (def-full-insn): Use current-insn-add!.
3632 (insn:std-attrs): Delete.
3633 (insn-builtin!): New proc.
3634 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
3636 (<arch-data>): New member machs.
3637 (current-attr-list,current-enum-list): New procs.
3638 (current-op-list,current-minsn-list): New procs.
3639 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
3640 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
3642 (-parse-arch-machs): New proc.
3643 (-arch-parse): New arg machs, all callers updated.
3644 (-arch-read): Handle machs spec.
3645 (def-arch): Define MACH attribute here.
3646 (mach-init!,mach-finish!): Not here.
3647 (cpu:add!,cpu:lookup): Delete.
3648 (def-cpu): Use current-cpu-add!.
3649 (<mach>): New member bfd-name.
3650 (-mach-parse): New arg bfd-name, all callers updated.
3651 (-mach-read): Handle bfd-name spec.
3652 (mach:add!,mach:lookup): Delete.
3653 (def-mach): Use current-mach-add!.
3654 (def-mach-attr!): New proc.
3655 (arch-init!): New proc.
3656 (arch-finish!): New proc. Reverse all object lists here.
3657 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
3658 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
3659 (define-normal-macro-insn): Ignore minsn if mach not kept.
3660 * mode.scm (mode-builtin!): New proc.
3661 * model.scm (model:add!,model:lookup): Delete.
3662 (def-model): Use current-model-add!.
3663 * opcodes.scm (insn:attr-list): Delete.
3664 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
3665 (gen-attr-table-defn): Emit value for default.
3666 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
3667 (op:attr-list): Delete.
3668 (gen-operand-decls,gen-insn-decls): New proc.
3669 (compute-insn-attr-list): Delete.
3670 (cgen-opc.h): Reorganize and simplify.
3671 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
3672 (def-operand,def-full-operand): Use current-op-add!.
3673 (op:std-attrs): Delete.
3674 (operand-enum): Delete.
3675 (operand-builtin!): Define builtin operand attrs.
3676 * utils-cgen.scm (sanitize): Update calls to lookup procs.
3677 (gen-attr-enum-decl): Use gen-obj-list-enums.
3678 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
3680 * fr30.cpu (define-arch): Add machs spec.
3681 (f-i4): SIGNED attribute -> !UNSIGNED.
3682 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
3683 (HASH-PREFIX): Define operand attribute.
3684 (NOT-IN-DELAY-SLOT): Define insn attribute.
3685 * i960.cpu (define-arch): Add machs spec.
3686 * m32r.cpu (define-arch): Add machs spec.
3687 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
3688 (HASH-PREFIX): Define operand attribute.
3689 (FILL-SLOT): Define insn attribute.
3691 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
3693 * fr30.cpu (stilm): Correct mask for and operation.
3695 1998-12-17 Doug Evans <devans@casey.cygnus.com>
3697 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
3698 Replace START/EXIT with start/pass.
3699 (gen-sim-test): Delete ".text".
3701 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
3703 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
3705 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
3707 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
3708 (h-sbit): Make it FUN-ACCESS.
3709 (h-gr): Reorder so that general regs are always printed by number.
3711 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
3713 * i960.cpu (flushreg): Use nop.
3715 1998-12-14 Doug Evans <devans@casey.cygnus.com>
3717 * m32r.cpu (default-alignment): Specify.
3718 * mach.scm (<arch-data>): New member default-alignment.
3719 (adata:default-alignment): New proc.
3720 (current-arch-default-alignment): New proc.
3721 (-arch-parse): New arg default-alignment.
3722 (parse-alignment): New proc.
3723 (-arch-read): Handle default-alignment spec.
3725 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
3727 * insn.scm (f-%): Delete.
3728 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
3729 be readded if proved useful.
3730 (gen-extract-fields): Ditto. Use gen-ifetch.
3731 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
3732 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
3734 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
3736 * fr30.cpu (div2): Set zbit properly when remainder not zero.
3738 1998-12-14 Dave Brolley <brolley@cygnus.com>
3740 * fr30.cpu: Remove stub macros.
3741 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
3742 (div2): Don't use addc/subc.
3744 1998-12-11 Doug Evans <devans@casey.cygnus.com>
3746 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
3749 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
3751 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
3753 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
3755 * cpu.scm (keep-all?): New proc.
3756 (assert-keep-all): Use it.
3757 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
3758 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
3759 Check for spelling errors.
3761 1998-12-09 Doug Evans <devans@casey.cygnus.com>
3763 * rtl.scm (s-convop): Call -rtx-sem-mode.
3765 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
3767 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
3768 (-parse-hw-profile): Ditto.
3769 (<hw-register>, parse!): Return `void' result.
3770 (<hw-pc>, parse!): Ditto.
3771 (<hw-memory>, parse!): Ditto.
3772 (<hw-immediate>, parse!): Ditto.
3773 (<hw-address>, parse!): Ditto.
3775 * ifield.scm (-ifield-parse): Validate encode/decode fields.
3776 (-ifld-parse-encode-decode): New proc.
3777 (-ifld-parse-encode,-ifld-parse-decode): New proc.
3778 (-multi-ifield-parse): Set encode/decode to #f.
3779 (ifld:decode-mode): New proc.
3780 * utils.scm (nub): Rewrite.
3781 * operand.scm (op-nub): Rewrite.
3782 * sim.scm (<ifield>, gen-type): Rewrite.
3783 (-gen-ifld-argbuf-defn): New proc.
3784 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
3785 (<sim-hardware>): Forward gen-trace-extract onto `type'.
3786 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
3787 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
3788 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
3789 New method gen-trace-extract.
3790 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
3791 from gen-argbuf-elm, return "" if not caching register address.
3792 Rewrite gen-extract. New method gen-trace-extract.
3793 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
3794 gen-extract, gen-trace-extract, cxmake-get.
3795 (<hw-iaddress>): New method cxmake-get.
3796 (op-needed-iflds): New proc.
3797 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
3798 (-gen-op-argbuf-defn): New proc.
3799 (gen-op-extract): Renamed from op:extract.
3800 (gen-op-trace-extract): Renamed from op:trace-extract.
3801 (fmt-extractable-operands): Renamed from fmt-semantic-operands
3803 (gen-argbuf-elm): Rewrite.
3804 * sim-decode.scm (-gen-record-args): Update.
3806 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
3808 * pmacros.scm (-pmacro-expand): Handle procedural macros in
3809 argument position. Flag symbolic macros in function position as
3811 (define-pmacro): Handle quoting in definition of symbolic macros.
3812 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
3814 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
3816 * fr30.opc (parse_register_list): Account for reverse masks
3818 (print_register_list): Ditto.
3819 (parse_low_register_list_ld): New function.
3820 (parse_hi_register_list_ld): New function.
3821 (parse_low_register_list_st): New function.
3822 (parse_hi_register_list_st): New function.
3823 (print_hi_register_list_ld): New function.
3824 (print_hi_register_list_st): New function.
3825 (print_low_register_list_ld): New function.
3826 (print_low_register_list_st): New function.
3827 * fr30.cpu (ldr15dr): Implement workaround.
3828 (ldm0,ldm1,stm0,stm1): Implemented.
3830 1998-12-08 Doug Evans <devans@casey.cygnus.com>
3832 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
3833 * configure: Regenerate.
3834 * Makefile.am (WITH_HOBBIT): Update.
3835 (cgen-hob.c): Remove Makefile dependency.
3836 (cgen.o): Depend on cgen-gh.h, config.h.
3837 * Makefile.in: Regenerate.
3838 * aclocal.m4: Regenerate.
3840 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
3842 * i960.cpu, i960.opc: New files.
3844 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
3846 * fr30.opc (parse_register_number): New function.
3847 (parse_register_list): New function.
3848 (parse_low_register_list): Use parse_register_list.
3849 (parse_hi_register_list): Use parse_register_list.
3850 * fr30.cpu (sth): Fix assembler syntax. Implement more
3853 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
3855 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
3856 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
3857 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
3858 (-op-gen-set-trace-parallel): Ditto.
3859 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
3861 * fr30.cpu (call,calld): Fix setting of pc.
3862 (f-op5): Fix start bit number.
3864 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
3866 * fr30.cpu (st): Fix operand ordering. Implement more
3869 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
3871 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
3872 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
3873 (fmt-semantic-operands): Move to sim.scm.
3874 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
3875 * operand.scm (<hw-index>): New member `name'. All builders updated.
3876 (<hw-index>): New method get-name.
3877 (op-profilable?): Moved to sim.scm.
3879 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
3880 (op-profilable?): Moved here from operand.scm.
3881 (gen-extract-type): Delete.
3882 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
3883 (-gen-argfld-ref): New proc.
3884 (-gen-ifld-argfld-name): New proc.
3885 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
3886 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
3887 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
3888 (<hardware-base>): Delete method gen-extract-type. New method
3890 (<hw-register): Ditto. Update method gen-extract.
3891 (<operand>, method gen-argbuf-elm): Rewrite.
3892 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
3893 (s-cmpop): Fix handling of eq,ne for unsigned modes.
3894 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
3896 * sim-decode.scm (-gen-record-args): Tweak.
3898 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
3900 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
3902 * doc/porting: Fix typo: gas->sim.
3903 * fr30.opc (print_m4): New function.
3904 * fr30.cpu: Implemented many insns.
3906 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
3908 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
3910 * fr30.cpu (f-rel9): Delete RELOC attribute.
3911 (f-rel12): Add PCREL-ADDR attribute.
3912 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
3913 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
3914 * fr30.opc (print_label9): Delete.
3916 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
3917 code for CTI indicators.
3918 * insn.scm (insn-cti?): Simplify.
3919 * utils-cgen.scm (atlist:cti?): New proc.
3921 1998-11-30 Doug Evans <devans@casey.cygnus.com>
3923 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
3924 (f-i20-4,f-i20-16,f-i20): New fields.
3930 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
3931 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
3932 * mach.scm (arch-data): Ditto.
3933 (current-arch-default-insn-word-bitsize): Renamed from
3934 current-arch-default-insn-bitsize [ya, that's a pretty long name].
3935 (-arch-read): Update.
3937 * hardware.scm (hw:attr-list): Move here ...
3938 * opcodes.scm: ... from here.
3940 * ifield.scm (fld:bitrange): Delete.
3941 (fld:word-offset,fld:word-length): New procs.
3942 (ifield?): Use class-instance.
3943 (<ifield>, method field-start): Rewrite.
3944 (ifld:enum): New proc.
3945 (<ifield>, methods field-mask,field-value): Rewrite.
3946 (-ifield-parse): Rewrite.
3947 (<multi-ifield> support): Rewrite.
3948 (ifld-beyond-base?): Rewrite.
3949 (ifld:std-attrs): New variable.
3950 (ifld:attr-list): New proc.
3951 * iformat.scm (-compute-insn-mask): Rewrite.
3952 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
3954 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
3955 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
3957 (<operand>): Ditto. Forward onto index instead.
3958 (gen-ifld-decls,gen-ifld-defns): New procs.
3959 (ifld:insert,ifld:extract): New procs.
3960 (<ifield>): New methods gen-insert, gen-extract.
3961 (<multi-ifield>): Ditto.
3962 (<hw-index>): Forward gen-insert,gen-extract onto value.
3963 (<hw-asm>): Delete insert/extract support.
3964 (<hw-register,hw-memory,hw-immediate>): Ditto.
3965 (gen-hash-defines): Use string-list.
3966 Define CGEN_MAX_IFMT_OPERANDS.
3967 (gen-switch): Use string-list,string-list-map.
3968 (gen-fget-switch,gen-fset-switch): Use string-list.
3969 (gen-parse-switch,gen-insert-switch): Ditto.
3970 (gen-extract-switch,gen-print-switch): Ditto.
3971 (gen-insert-switch,gen-extract-switch): New local `total_length'.
3972 (gen-ifmt-table-1,gen-ifmt-table): New procs.
3973 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
3974 (gen-ivalue-entry): New proc.
3975 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
3976 computation. Use 0 for operand ref table if ALIAS insn.
3977 (gen-minsn-table-entry): Use string-list.
3978 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
3979 (gen-opcode-open): Record address of ifield table.
3980 (cgen-opc.h): Call gen-ifld-decls.
3981 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
3982 * types.scm (<bitrange>): New members word-offset,word-length.
3983 Delete member total-length. Delete methods start,mask,value.
3984 (bitrange:word-offset,bitrange:word-length): New procs.
3985 * sim-cpu.scm (gen-define-fields): Simplify.
3986 (gen-extract-fields): Simplify.
3987 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
3988 (<ifield>): New methods gen-ifld-extract-decl.
3989 Delete method gen-ifld-extract-beyond.
3990 (<multi-ifield>): New methods gen-ifld-extract-decl.
3991 (<multi-ifield>, method gen-ifld-extract): Implement.
3992 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
3993 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
3995 * rtl.scm (-rtx-traverse-no-mode): Process operands.
3996 (-rtx-traverse-syntax-no-mode): New proc.
3997 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
3998 (s-ifield): New proc.
3999 (s-shop): Don't prepend `unsigned' for unsigned modes.
4000 * rtx-funcs.scm (ifield): New rtx function.
4001 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
4002 (delay): New rtx function.
4003 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
4005 * cos.scm (-elm-make-method-getter): Fix typo.
4007 * utils.scm (backslash): Handle lists of strings.
4009 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
4011 * fr30.cpu (f-rel9): Correct for pc+2.
4012 (label9): Use print_label9.
4013 * fr30.opc (print_label9): New function.
4015 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
4017 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
4018 * fr30.opc (parse_low_register_list): Renamed.
4019 (parse_hi_register_list): Renamed.
4020 (print_hi_register_list): Renamed.
4021 (print_low_register_list): Renamed.
4023 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
4025 * fr30.cpu (f-rel9): Now a pc relative offset.
4027 1998-11-23 Doug Evans <devans@casey.cygnus.com>
4029 * opcodes.scm (op-asm): Move to here, from operands.scm.
4030 (<op-asm>, method parse!): Validate arguments.
4031 (<operand>, method gen-function-name): Fix thinko.
4032 * operand.scm (<operand>, method make!): Don't set op-asm here.
4033 * utils.scm (list-elements-ok?): New proc.
4035 * opcodes.scm: Clean up pass.
4037 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
4039 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
4040 the fr30_int function.
4041 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
4042 (h-dr): Add FUN-ACCESS attribute.
4044 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
4046 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
4047 for C symbol for models array.
4049 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
4051 * fr30.opc (parse_reglist_low): New function.
4052 (parse_reglist_hi): New function.
4053 (print_reglist_low): New function.
4054 (print_reglist_hi): New function.
4055 * fr30.cpu: Finish remaining insn stubs.
4057 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
4059 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
4061 * fr30.cpu (ldi32m): Don't use for disassembly.
4063 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
4065 * fr30.cpu (int): Implement it.
4067 1998-11-18 Doug Evans <devans@casey.cygnus.com>
4069 * rtx-funcs.scm (nop): Fix C code.
4071 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
4073 * fr30.cpu (f-i32): New ifield.
4076 (ldi32m): New macro insn.
4077 (inte): Provide simple version for now.
4079 * sim-arch.scm: New file.
4080 * sim.scm: Move architecture support generation to sim-arch.scm.
4081 * cgen-sim.scm: Load sim-arch.scm.
4084 * hardware.scm (pc?) New proc.
4085 (class <hardware-base>): Rewrite method 'pc?.
4086 (class <hardware>): Forward 'pc? to the hardware type.
4087 (class <hw-pc>): New method 'pc?.
4089 Add support for variable length ISAs.
4090 * ifield.scm (ifld-beyond-base?): New proc.
4091 * m32r.cpu: Remove integral-insn? spec.
4092 * mach.scm (arch:derived,arch:set-derived!): New procs.
4093 (arch:app-data,arch:set-app-data!): New procs.
4094 (class <arch>): New members derived, app-data.
4095 (class <cpu>): Delete member integral-insn?.
4096 (cpu:integral-insn?): Delete.
4097 (-cpu-parse): Delete arg integral-insn?. All callers updated.
4098 (-cpu-read): Delete integral-insn? support.
4099 (state:decode-assist): Delete.
4100 (state:int-insn?): Delete.
4101 (<derived-arch-data>): New class.
4102 (-adata-set-derived!): New proc.
4103 (mach-finish!): Call it.
4104 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
4105 (gen-operand-instance): Add COND_REF support.
4106 (gen-operand-instance-table): Ditto.
4107 (gen-hash-defines): Update.
4108 (gen-extract-switch): Update type of `insn_value' arg.
4109 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
4110 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
4112 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
4113 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
4114 beyond the base insn (for large insns).
4115 (-gen-extract-beyond-var-list): New proc.
4116 (gen-extract-fields): Handle large insns.
4117 (-gen-write-case): Update sem_arg computation.
4118 Update initial vpc computation.
4119 (gen-semantic-fn): Ditto. Update type of `insn'.
4120 (-gen-sem-case): Update sem_arg computation.
4121 Update initial vpc computation.
4122 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
4123 (-gen-extract-word): New proc.
4124 (<ifield>): New method gen-ifld-extract-beyond.
4125 (gen-ifld-extract-beyond): New proc.
4126 * types.scm (bitrange-overlap?): New proc.
4128 * utils.scm (bits->bytes): New proc.
4129 (bytes->bits): New proc.
4131 Move extraction support into decoder.
4132 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
4133 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
4134 support to sim-decode.scm.
4135 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
4136 be array of IDESC,FMT entries. Make the array const.
4137 (-gen-gcc-label-table): Make array const.
4138 (-gen-decode-switch): Branch to extraction code after insn has been
4140 (-gen-decode-insn-globals): Delete extract handler from
4142 (gen-decode-fn): Add extraction support.
4143 (-gen-sem-fn-decls): Delete extraction fn decls.
4144 (-gen-idesc-decls): Update @cpu@_decode decl.
4145 (-gen-idesc-init-fn): Delete extraction support.
4146 (-gen-extract-decls): New proc.
4148 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
4149 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
4151 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
4152 All callers updated.
4153 (table-entry:make): Record insn value as insn object, not name.
4156 * hobbit.scm (path_basename): Renamed from `basename' to avoid
4157 collision with C function.
4158 (path_dirname): Similarily.
4159 * hobbit.c,hobbit.h: Rebuild.
4161 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
4163 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
4165 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
4167 * fr30.cpu: Implement more instruction stubs.
4169 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
4171 * fr30.cpu: Implement more instruction stubs.
4173 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
4175 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
4177 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
4179 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
4180 (op:std-attrs): Ditto.
4181 * opcodes.scm (gen-operand-instance): Ditto.
4182 (gen-switch): Ditto.
4183 * m32r.cpu (condbit,accum): Update.
4184 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
4186 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
4188 * enum.scm (-enum-read): Fix typo.
4190 * iformat.scm (-ifmt-search-key): Simplify a little.
4192 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
4194 * doc/porting: semantics.c -> sem.c.
4195 * Makefile.in: Regenerate.
4196 * fr30.cpu (add): Change ADD to add. Add more registers and set
4197 status bits on 'add' instruction.
4199 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
4201 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
4204 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
4206 * minsn.scm (minsn:enum): Update, call current-arch-name.
4208 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
4210 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
4211 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
4212 (ARCH,CGEN,CGENFLAGS): New variables.
4213 (gas-test,sim-test): New rules.
4214 * Makefile.in: Rebuild.
4215 * configure.in (arch): Define.
4216 * configure: Rebuild.
4218 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
4219 * All .scm files: Ditto.
4221 * dev.scm: Fix gas-test call to cpu-load.
4222 * gas-test.scm: Clean up pass to remove bit-rot.
4223 * sim-test.scm: Ditto.
4225 * enum.scm (read-enum): Fix typo in `vals' handling.
4227 * hardware.scm (-parse-hw-type): Fix typo.
4228 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
4229 (def-hardware,define-normal-hardware): Ditto.
4231 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
4232 (display-var): Use it.
4233 * hobbit.c: Rebuild.
4234 * hobbit.h: Rebuild.
4236 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
4237 avoid hobbit problem.
4238 * mach.scm (-cpu-read): Rename local `parallel-insns' to
4239 `parallel-insns-' to avoid hobbit problem.
4241 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
4243 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
4244 (parse_slo16,parse_ulo16): Ditto.
4245 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
4247 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
4249 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
4250 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
4251 * Makefile.in: Rebuild.
4252 * insn.scm (define-normal-insn): Expand pmacros.
4253 * mode.scm (<mode>): New member `host?'. All uses updated.
4254 (mode:host?): New proc.
4255 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
4256 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
4257 (define-rtx-dual-mode): Ditto.
4258 (s-index-of): New proc.
4259 (s-unop): Use plain C for host mode operations.
4260 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
4261 * rtx-funcs.scm (index-of): New rtx function.
4262 * sim.scm (<hw-index>): New method cxmake-get.
4264 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
4266 * sim-cpu.scm (-gen-engine-decls): Delete.
4268 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
4270 * doc/rtl (Example): Correct Typo.
4271 * doc/porting: Add 'make dep' step to opcodes port instructions.
4272 * fr30.opc: New file.
4273 * fr30.cpu: New file.
4275 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
4277 * configure.in: Handle guile $exec_prefix = $prefix/foo.
4278 * Makefile.am (GUILEINCDIR): New variable.
4280 * configure: Regenerate.
4281 * Makefile.in: Ditto.
4282 * aclocal.m4: Ditto.
4284 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
4286 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
4287 (cgen-semantics.c): Ditto.
4288 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
4289 * sim-model.scm (cgen-model.c): Ditto.
4290 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
4291 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
4293 * opcodes.scm (read-cpu.opc): Handle empty file.
4295 * cos.scm (-elm-make-method-setter): Fix typo.
4297 * cpu.scm (-init-parse-cpu!): Call types-init!.
4298 (-finish-parse-cpu!): Call types-finish!.
4299 * ifield.scm (<ifield>): Delete members start,length.
4300 New member bitrange.
4301 (<ifield>, methods field-start,field-length): Update.
4302 (fld:start): New arg insn-len. All callers updated.
4303 (<ifield>, methods field-mask,field-value): Update.
4304 (-ifield-parse): Update.
4305 (ifield-init!): Update.
4306 * iformat.scm (compute-insn-length): Simplify.
4307 (compute-insn-mask): Update.
4308 * insn.scm (insn:value): Update.
4309 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
4310 (current-arch-default-insn-bitsize): New proc.
4311 (current-arch-insn-lsb0?): New proc.
4312 (-arch-parse,-arch-read): Update.
4313 (<cpu>): New member file-transform.
4314 (-cpu-parse,-cpu-read): Update.
4315 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
4316 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
4317 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
4318 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
4319 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
4320 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
4321 * operand.scm (op:start): Update call to field-start method.
4322 * sim-decode.scm (opcode-slots): New arg lsb0?.
4323 (fill-slot!,build-slots): Ditto.
4324 (build-decode-table-entry,build-decode-table-guts): Ditto.
4325 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
4326 (gen-decode-fn): Ditto.
4327 (cgen-decode.c): Update call to gen-decode-fn.
4328 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
4329 (-gen-cpu-header,-gen-cpuall-includes): New procs.
4330 (cgen-cpuall.h): Call -gen-cpuall-includes.
4331 * types.scm (<bitrange>): New class.
4332 (types-init!,types-finish!): New procs.
4333 * utils-cgen.scm (parse-number): New proc.
4334 (parse-boolean): New proc.
4335 * utils.scm (word-value): Renamed from shift-bits, rewrite.
4336 (word-mask): Rewrite.
4337 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
4338 (m32rxf): New field `file-transform'.
4339 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
4341 * hobbit.h: Fix include file name.
4343 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
4345 * slib: New directory of slib files used by cgen/hobbit.
4346 * hobbit.scm: New file.
4347 * hobbit.c: New file.
4348 * hobbit.h: New file.
4349 * hobscmif.h: New file.
4350 * hob-main.c: New file.
4351 * hobslib.scm: New file.
4353 * Makefile.am: Add support for compiling hobbit, and using compiled
4354 version of hobbit to compile cgen.
4355 * Makefile.in: Regenerate.
4356 * configure.in: Support --with-hobbit.
4357 * configure: Regenerate.
4358 * acconfig.h (WITH_HOBBIT): Add.
4359 * config.in: Regenerate.
4361 * rtl.scm: New file, was cdl-c.scm.
4362 Definition of rtx funcs moved to rtx-funcs.scm.
4363 (semantic-in-out-operands): Rewrite to compute object form of
4365 * rtx-funcs.scm: New file.
4367 * cgen-gh.c: #include "config.h".
4368 (gh_cadddr,gh_cddddr): New fns.
4369 (cgh_vector_to_list): New fn.
4370 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
4371 (cgh_init): Prefix qsort procs with "cgh-".
4372 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
4373 * cgen.c: #include "config.h".
4375 * attr.scm (bitset-attr?): New proc.
4376 (<bitset-attribute>, method parse-value): Value syntax changed from
4377 (val1 val2 ...) to val1,val2,....
4378 (<bitset-attribute>): New method gen-value.
4379 (<integer-attribute>): New method gen-value.
4380 (<enum-attribute>): New method gen-value.
4381 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
4382 (<reader>): New class.
4383 (CURRENT-ARCH,CURRENT-READER): New globals.
4384 (keep-mach?): Move here from mach.scm.
4385 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
4386 (<arch>): New class.
4387 (<arch-data>): New class.
4388 (<cpu>): Make subclass of <ident>.
4389 (*ENDIAN* variables): Delete.
4390 (process-state-vars): Delete.
4391 (mach-finish!): Add `base' value to MACH attribute.
4392 * hardware.scm (<hardware>): Make subclass of <ident>.
4393 (hw:std-attrs): New global.
4394 (hw-profilable?): New proc.
4395 * ifield.scm (<ifield>): Make subclass of <ident>.
4396 (sort-ifield-list): Move here from iformat.scm.
4397 * iformat.scm (<iformat>): Renamed from <insn-format>.
4398 Make subclass of <ident>.
4399 (-ifmt-search-key): Include cti? in categorization of formats.
4400 (ifmt-analyze): Compile semantics (turn to object form).
4401 * insn.scm (<insn>): Make subclass of <ident>.
4402 New member compiled-semantics.
4403 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
4404 * mode.scm (<mode>): Make subclass of <ident>.
4406 * model.scm (<unit>): Make subclass of <ident>.
4407 New members inputs,outputs.
4408 (<model>): Make subclass of <ident>. New member state.
4409 (-unit-parse): Parse inputs,outputs.
4410 (<iunit>): New class.
4411 (-insn-timing-parse-model): New proc.
4412 (parse-insn-timing): Function unit spec rewritten.
4413 * operand.scm (<operand>): Make subclass of <ident>.
4414 New members sem-name,num,cond? New method gen-pretty-name.
4415 (hw-index-scalar): New global.
4416 (op-nub-hw): Move here from rtl.scm.
4417 (op:lookup-sem-name,op-profilable?): New procs.
4418 * pmacros.scm: Rewrite to pass through hobbit.
4419 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
4420 * utils.scm (logit): Make a macro.
4421 (bit-set?): Rewrite.
4422 (high-part): Rewrite.
4424 * m32r.cpu (define-arch): Move to top of file.
4425 (cpu family m32rbf): Renamed from m32rb.
4426 (model m32r/d): Function unit spec rewritten.
4427 (all insns): Ditto. Replace UBI with BI.
4429 * opcodes.scm (gen-attr-table-decls): Declare
4430 @arch@_cgen_hw_attr_table.
4431 (gen-attr-table-defns): Generate hw attribute table.
4433 * sim-cpu.scm (-gen-engine-decls): New proc.
4434 (-gen-model-decls): New proc.
4435 (gen-parallel-exec-type): Add new member `written' to struct parexec.
4436 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
4437 (-gen-record-profile-args): Simplify.
4438 (-gen-parallel-sem-case): Delete.
4439 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
4440 New local `written'. Delete profiling code.
4441 (-gen-sem-case): Ditto.
4442 (-uncond-written-mask,-any-cond-written?): New procs.
4443 (cgen-sem-switch.c): Include duplicates of insns that can be executed
4444 parallelly or serially, and write-back handlers for all parallel insns.
4445 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
4446 support to initialization of struct insn_sem.
4447 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
4448 (-gen-insn-sem-type): Add parallel write-back support to struct
4450 (-gen-idesc-init-fn): Add support for virtual insns.
4451 Add parallel write-back support.
4452 * sim-model.scm (gen-model-profile-fn): Delete
4453 (-gen-model-fn-decls): New proc.
4454 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
4455 (-gen-model-init-fn): New proc.
4456 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
4457 members in @mach@_init_cpu.
4458 (cgen-model.c): Generate model handlers for each insn.
4459 * sim.scm (gen-define-field-macro): Cti insns handled differently.
4460 (<hw-pc>): New method gen-write.
4461 (<hw-register>, method gen-write): New arg `mode'.
4462 (<hw-register>): Delete method gen-record-profile!.
4463 New method gen-profile-index-type.
4464 (<hw-memory>, method gen-write): New arg `mode'.
4465 (<hw-address>, method gen-extract): Delete.
4466 (<hw-address>, method gen-write): New arg `mode'.
4467 (<hw-index>, method get-write-index): Rewrite.
4468 (<pc>, method cxmake-get-direct): Delete.
4469 (<pc>): New method cxmake-get. Comment out methods
4470 gen-set-quiet,gen-set-trace.
4471 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
4472 gen-profile-index-type,gen-profile-code.
4473 Delete method gen-pretty-name. Rewrite method gen-write.
4474 Delete method cxmake-get-direct.
4475 (-op-gen-set-trace): Update `written'.
4476 (-op-gen-set-trace-parallel): Ditto.
4477 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
4478 (gen-cpu-insn-enum-decl): Add extra entries for parallel
4479 insns and their write-back handlers.
4480 (insn-op-lookup): New proc.
4481 (<unit>): New method gen-profile-code.
4482 (<iunit>): New method gen-profile-code.
4483 (gen-argbuf-elm): Add profiling elements.
4484 (gen-argbuf-type): Define cti insns separately in their own struct.
4485 Add member `addr_cache' to this struct. Add entries for pbb virtual
4486 insns. Move semantic entries here from struct scache.
4487 Delete everything from struct scache except argbuf.
4488 (<insn>, method gen-profile-locals): Rewrite.
4489 (<insn>, method gen-profile-code): Rewrite.
4490 (sim-finish!): Create virtual pbb insns.
4492 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
4494 * m32r.cpu (h-cr): Add bbpc,bbpsw.
4495 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
4496 (h-psw,h-bpsw,h-bbpsw): Define.
4497 (rte,trap): Handle bbpc,bbpsw.
4498 * opcodes.scm (max-operand-instances): Fix typo.
4499 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
4500 hardware elements to be fun-access.
4501 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
4503 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
4505 * m32r.cpu (trap): Pass `pc' to m32r_trap.
4507 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
4509 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
4511 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
4513 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
4515 (mach m32r): Update.
4517 * mach.scm (mach:supports?): New proc.
4518 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
4519 gen-reg-access-{decls,defns}.
4520 * sim.scm (gen-reg-access-{decl,defn}): New procs.
4521 (gen-mach-bfd-name): New proc.
4522 (gen-arch-reg-access-{decls,defns}): New procs.
4523 (cgen-arch.[ch]): Output register access cover fns.
4525 * hardware.scm (hardware-builtin!): Set print handlers for
4527 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
4529 (CGEN_PRINT_NORMAL,print_hash): Ditto.
4530 (my_print_insn): Ditto. Delete args buf, buflen.
4531 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
4532 (-hw-asm-specs): Add `handlers' spec.
4533 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
4535 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
4537 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
4538 (<hw-asm>, parse!): New method.
4539 (gen-insn-table-entry): Print semantics.
4540 (gen-opcode-open): Renamed from gen-opcode-table.
4542 * utils.scm (string-write): No longer a macro.
4543 (-string-write): Handle procedure args.
4544 * opcodes.scm: Update all calls to string-write.
4545 * sim-cpu.scm: Ditto.
4546 * sim-decode.scm: Ditto.
4547 * sim-model.scm: Ditto.
4550 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
4552 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
4553 (-gen-insn-builders,-gen-insn-builder): New procs.
4555 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
4557 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
4558 (gen-opcode-table): Properly terminate comment.
4560 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
4563 Clean up pass over everything, so starting fresh.