1 2009-08-07 Doug Evans <dje@sebabeach.org>
3 Add -t option for tracing things like commands, pmacro expansion.
4 * dev.scm (cload): New arg #:trace.
5 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
6 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
7 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
8 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
9 (-reader-process-expanded-1!): Trace commands if requested.
10 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
11 (-set-trace-options!): New function.
12 (-init-reader!): New function.
13 (cpu-load): New arg trace-options, all callers updated.
14 Call -init-reader! and -set-trace-options!.
15 (cgen-usage): Improve output formatting.
16 (common-arguments): New option -t.
18 * utils-cgen.scm (single-location->string): Renamed from
19 pretty-print-single-location. All callers updated.
20 (location->string): Renamed from pretty-print-location.
22 (source-properties-location->string): New function.
23 * doc/running.texi: Document -t.
25 2009-08-06 Doug Evans <dje@sebabeach.org>
27 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
28 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
29 * utils.scm: ... here.
31 2009-08-05 Doug Evans <dje@sebabeach.org>
33 Track source location better, for better error messages.
34 * pmacros.scm (-pmacro-eval): Delete, unused.
35 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
36 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
37 (scan-list, scan): Ditto.
38 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
39 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
40 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
41 (scan-list1): New function.
42 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
43 * read.scm (<reader>): New member `location'.
44 (-reader-lookup-command): Renamed from reader-lookup-command,
46 (reader-error): Rewrite to produce better source location info.
47 (current-reader-location): New function.
48 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
49 All callers updated. Record source location of expression.
50 (reader-process-expanded!): Renamed from reader-process-expanded.
52 (-reader-process!): Renamed from reader-process. New arg `loc'.
53 All callers updated. Record source location of define-pmacro.
54 * utils-cgen.scm (<location>): New class.
55 (single-location): New (pseudo) class.
56 (pretty-print-single-location, pretty-print-location): New functions.
57 (location-top, location-push-single, location-push): New functions.
58 (unspecified-location, current-input-location): New functions.
59 (location-property): New object property.
60 (location-property-set!): New function.
61 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
63 * testsuite/location-1.test: New testcase.
64 * testsuite/run-tests.sh: Fix fail count handling.
65 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
66 to expect cgen to fail.
68 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
70 * read.scm (-cmd-include): Renamed from include. All callers updated.
71 (-cmd-if): Renamed from cmd-if. All callers updated.
72 Use reader-process-expanded! on then/else clauses instead of eval1.
74 2009-07-22 Doug Evans <dje@sebabeach.org>
76 * modes.scm (TI,OI): New modes.
77 * types.scm (parse-type): Improve error checking. Don't hardwire
79 * utils.scm (non-negative-integer?): New function.
81 * pmacros.scm (-pmacro-builtin-find): New predicate.
82 (pmacros-init!): Add .find.
83 * doc/pmacros.tex: Document .find.
84 * testsuite/pmacros-1.test: Test .find.
86 2009-07-20 Doug Evans <dje@sebabeach.org>
88 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
89 commented out printfs.
90 * rtl.scm (rtl-finish!): Whitespace tweaks.
91 * model.scm (parse-insn-timing): Tweak logging message.
92 * operand.scm: Comment and whitespace tweaks.
93 (op:type): Tweak error message.
94 (op-ifield): Tweak logging message.
95 (-derived-operand-parse, anyof-merge-semantics): Ditto.
96 * read.scm: Whitespace cleanup.
97 * utils.scm: Whitespace cleanup.
99 2009-07-19 Doug Evans <dje@sebabeach.org>
101 Fix binding of nested pmacro parameters.
102 * pmacros.scm (-pmacro-env-make): New arg prev-env.
104 (-pmacro-bulid-lambda): Ditto.
105 * doc/pmacros.texi: Update.
106 * testsuite/pmacros-1.test: Add testcase.
108 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
110 (-multi-ifield-make-default-extract): Ditto.
112 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
113 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
114 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
116 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
117 * doc/rtl.texi: Update.
119 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
121 Rename builtin boolean pmacros, for consistency with rtl.
122 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
123 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
124 * doc/pmacros.texi: Update.
125 * testsuite/pmacros-1.test: Update.
127 2009-07-17 Doug Evans <dje@sebabeach.org>
129 Use hash tables to record ifields, operands, insns, macro-insns.
130 * attr.scm (attr-builtin!): Tweak some comments.
131 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
132 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
134 (<multi-ifield>): New constructor.
135 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
136 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
138 (-sub-insn-make!): Add hack to avoid differences in generated code.
139 (multi-insn-instantiate!): Add total number of multi-insns to
141 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
142 minsn-list to foo-table. New member next-ordinal.
143 Update getters/setters.
144 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
146 (-get-next-ordinal!, -get-lowest-ordinal): New function.
147 (-make-ident-object-table, -ident-object-table->list,
148 -ident-object-table-add!, -ident-object-table-lookup): New functions.
149 (current-ifld-list, current-ifld-add! current-ifld-lookup,
150 -ifld-already-defined?): Rewrite.
151 (current-op-list, current-op-add! current-op-lookup,
152 -op-already-defined?): Rewrite.
153 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
154 (current-insn-list, current-insn-add! current-insn-lookup,
155 -insn-already-defined?): Rewrite.
156 (current-minsn-list, current-minsn-add! current-minsn-lookup,
157 -minsn-already-defined?): Rewrite.
158 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
159 (MAX-VIRTUAL-INSNS): Define.
160 (arch-analyze-insns!): Add hack to avoid differences in generated code.
161 Update use of arch-insn-list.
162 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
163 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
165 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
166 <ident>. New constructor.
167 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
169 * sid.scm (-virtual-insn-add!): New function.
170 (-create-virtual-insns!): Call it.
171 (-fill-sim-insn-list!): Rewrite.
172 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
173 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
174 * utils-cgen.scm (<ordered-ident>): New class.
175 (obj-ordinal, obj-set-ordinal!): New functions.
176 (add-ident-methods!): Delete.
178 * model.scm (parse-insn-timing): Change logging message to level 3.
180 2009-07-16 Doug Evans <dje@sebabeach.org>
182 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
183 add a link to define-normal-insn-enum.
185 * doc/porting.texi (Conventions): Add docs on writing integers.
187 * cpu/simplify.inc (*): One line doc strings don't need \n.
188 (df): Invoke define-full-ifield instead of claiming it's an alias.
190 (dnop): Mark as deprecated.
192 * cpu/play.cpu: Add example of hardware `layout'.
193 * doc/porting.tex: Add docs on simplify.inc.
194 * doc/rtl.texi: Cleanup pass over "Simplification macros",
197 * ifield.scm: Whitespace/formatting cleanup.
199 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
201 * read.scm (parse-error): Don't print single entry args as a list.
202 (-reader-process-expanded-1): Convert symbol to string for
205 * insn.scm (multi-insn-instantiate!): Tweak logging message.
207 2009-07-15 Doug Evans <dje@sebabeach.org>
209 * cpu/simplify.inc (dno): New pmacro.
210 * doc/porting.texi: Add section on simplify.inc.
211 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
213 2009-07-15 Doug Evans <devans@sourceware.org>
215 * gen-all-doc: Generate index.html.
217 2009-07-13 Doug Evans <dje@sebabeach.org>
219 Extend pmacro language, add testsuite.
220 * Makefile.am (SUBDIRS): Add testsuite.
221 * Makefile.in: Regenerate.
222 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
223 testsuite/test-utils.sh.
224 * configure: Regenerate.
225 * dev.scm (cload): Handle testsuite app.
226 (load-testsuite): New function.
227 * pmacros.scm: (-pmacro-debug?): New global.
228 (-smacro-table): New global.
229 (-smacro-lookup, -smacro-set!): New functions.
230 (-pmacro-make): New argument `syntactic-form?', all callers updated.
231 (-pmacro-syntactic-form?): New function.
232 (-pmacro-expected-number, -pmacro-verify-number): New functions.
233 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
234 (-pmacro-expected-non-negative-integer): New function.
235 (-pmacro-verify-non-negative-integer): New function.
236 (-pmacro-expand-expr-list): New function.
237 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
238 (-pmacro-process-args): Renamed from -pmacro-invoke.
239 (-pmacro-apply, -smacro-apply): New functions.
240 (-pmacro-expand): Rewrite syntactic form processing.
241 (-pmacro-build-lambda): Reformat.
242 (define-pmacro): Watch for more errors in definition.
243 (pmacro-debug): New function.
244 (pmacro-trace): Set/reset -pmacro-debug?.
245 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
246 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
247 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
248 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
249 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
250 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
251 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
252 (pmacros-init!): Initialize -smacro-table.
253 Rewrite pmacro initialization.
254 * read.scm (reader-process-expanded): Renamed from
255 -reader-process-expanded. All callers updated.
256 Recognize () as a no-op.
257 (cpu-load): Tweak logging messages.
258 * utils.scm (message): Add comment.
259 * cpu/play.cpu: Add some instructions to play with .let.
260 * doc/cgenint.texi: Move some debugging related docs to here from
262 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
263 * testsuite/Makefile.am: New file.
264 * testsuite/Makefile.in: New file.
265 * testsuite/test-utils.sh.in: New file.
266 * testsuite/run-tests.sh: New file.
267 * testsuite/testsuite.cpu: New file.
268 * testsuite/pmacros-1.test: New file.
270 * decode.scm: Comment and formatting tweaks.
271 (-build-decode-table-guts): Add more data to logging message.
273 2009-07-12 Doug Evans <dje@sebabeach.org>
275 Delete files that now live in ../cpu.
276 * cpu/iq10.cpu: Delete.
277 * cpu/iq2000.cpu: Delete.
278 * cpu/iq2000.opc: Delete.
279 * cpu/iq2000m.cpu: Delete.
280 * cpu/m32r.cpu: Delete.
281 * cpu/m32r.opc: Delete.
283 2009-07-09 Doug Evans <dje@sebabeach.org>
285 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
286 All callers updated. Work around -ve shifts by referencing the
289 * utils.scm (message): Handle pairs.
291 2009-07-08 DJ Delorie <dj@redhat.com>
293 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
294 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
295 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
298 2009-07-07 Doug Evans <dje@sebabeach.org>
300 * cpu/play.cpu (add): Use (ifield enum) for one format element.
301 * cpu/play.opc: New file.
303 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
304 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
305 * doc/rtl.texi (Instructions): Update.
307 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
308 (opc-arguments, -OPC): Call set-opc-file-path!.
309 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
310 (set-opc-file-path!): New function.
311 * dev.scm: Mention set-opc-file-path!. Mention doc options.
313 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
314 before passing to gen-c-args.
316 2009-07-06 DJ Delorie <dj@redhat.com>
318 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
319 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
320 unspecified accesses to control registers.
322 2009-07-01 DJ Delorie <dj@redhat.com>
324 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
325 unspecified accesses to control registers.
327 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
328 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
330 2009-06-27 Doug Evans <dje@sebabeach.org>
332 * gen-all-intrinsics: New file.
334 2009-06-24 Doug Evans <dje@sebabeach.org>
336 * All *.scm files: Update copyright year.
337 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
339 2009-06-23 DJ Delorie <dj@redhat.com>
341 * intrinsics.scm: Updates to support IVC2.
342 (belongs-to-group?): Check IVC2 slots.
343 (-slots-attribute): New.
344 (targets::attributes): Add SLOTS.
345 (target:add-well-known-intrinsics): Add CPMOV.
346 (md-insn): Add CPTYPE and CRET?.
347 (add-md-insn): Likewise.
348 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
349 duplicate insns with different bit patterns.
350 (write-cgen-insn?): Add cret? support.
351 (intrinsics.h): Add vector types.
352 (runtime-op): Add vector support.
353 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
355 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
356 * cpu/mep-ivc2.cpu: Update all insns to include type information.
357 (h-cr-ivc2): Default to typeless.
358 (h-ccr-ivc2): Fix register width.
359 (SLOTS): Fix values and default.
360 (ivc2_*): Add control register names.
361 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
363 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
364 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
366 2009-06-22 Doug Evans <dje@sebabeach.org>
368 * semantics.scm (insn-build-known-values): Fix typo in comment.
370 2009-06-21 Doug Evans <dje@sebabeach.org>
372 * rtl-xform.scm (rtx-simplify-insn): New function.
373 * html.scm (gen-insn-docs): Call it.
374 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
375 * iformat.scm (ifmt-analyze): Minor simplification.
377 * semantics.scm (semantic-compile): Change arg sem-code-list to
379 (semantic-attrs): Ditto.
380 * iformat.scm (ifmt-analyze): Update.
381 (ifmt-compute!): Update.
382 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
384 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
385 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
386 * semantics.scm (rtx-simplify): Ditto.
387 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
388 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
389 (-simplify-expr-fn): Move to rtl-xform.scm.
390 (-solve-expr-fn, rtx-solve): Ditto.
391 * rtl-xform.c: New file.
394 * rtl-c.scm (delay): Add FIXME, tweak formatting.
395 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
396 (-rtx-traverse, rtx-traverse): Ditto.
398 2009-06-20 Doug Evans <dje@sebabeach.org>
400 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
402 * configure.in: Update version to 1.1.
403 * configure: Regenerate.
404 * read.scm (-CGEN-VERSION): Update to 1.1.0.
406 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
407 Doug Evans <dje@sebabeach.org>
409 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
410 (cgen-desc.c): Ditto.
411 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
412 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
413 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
414 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
415 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
416 (cgen-cpuall.h, cgen-ops.c): Ditto.
417 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
418 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
419 (cgen-sem-switch.c): Ditto.
420 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
421 * sim-model.c (cgen-model.c): Ditto.
423 2009-06-18 Doug Evans <dje@sebabeach.org>
425 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
427 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
429 * dev.scm (cload): Change #:arch argument to take the path to the
430 .cpu file instead of just the name of the architecture.
431 * read.scm (arch-path): Remove trailing '/'.
432 (cpu-load): Set `arch-path' to directory of .cpu file.
433 (-cgen): Don't set `arch-path' here.
435 * doc/porting.texi: Update.
437 2009-06-14 Doug Evans <dje@sebabeach.org>
439 * gen-all-doc: Use files in ../cpu where possible.
441 * Makefile.am (ARCHFILE): Fix path.
442 * Makefile.in: Regenerate.
443 * html.scm: Use "pre" instead of "plaintext".
445 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
446 * doc/app.texi: Cleanup pass.
447 * doc/cgen.texi: Cleanup pass.
448 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
449 * doc/intro.texi: Cleanup pass.
450 * doc/mdate-sh: New file.
451 * doc/opcodes.texi: Cleanup pass.
452 * doc/pmacros.texi: Cleanup pass.
453 * doc/porting.texi: Cleanup pass.
454 * doc/rtl.texi: Cleanup pass.
455 * doc/running.texi: Cleanup pass. Document more runtime options.
456 * doc/stamp-vti: Update.
457 * doc/version.texi: Update.
459 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
460 (GUILE): Fix definition.
461 * Makefile.in: Regenerate with automake 1.9.6.
462 * aclocal.m4: Regenerate with aclocal 1.9.6.
463 * configure.in (AC_PREREQ): Set to 2.59.
464 (GENINSRC_NEVER): Define.
465 * configure: Regenerate with autoconf 2.59.
466 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
467 (cgen.info,cgen.dvi): Delete.
468 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
469 (noinst_TEXINFOS): Add cgenint.texi.
470 (DOCFILES): Add missing files.
471 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
472 * doc/Makefile.in: Regenerate with automake 1.9.6.
474 * guile.scm: Add "." to %load-path if >= guile version 1.8.
476 * attr.scm: Removing trailing whitespace.
477 * cgen-intrinsics.scm: Ditto.
478 * cgen-sim.scm: Ditto.
484 2009-05-28 DJ Delorie <dj@redhat.com>
486 * cpu/mep.opc (parse_signed16_range): New.
487 (parse_unsigned16_range): New.
488 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
490 2009-05-26 DJ Delorie <dj@redhat.com>
492 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
494 (f-ivc2-ccrn-c3hi): New.
495 (f-ivc2-ccrn-c3lo): New.
496 (f-ivc2-ccrn-c3): New.
497 (ivc2c3ccrn): Use it.
499 2009-05-22 DJ Delorie <dj@redhat.com>
501 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
502 (mep_config_map): Regenerate.
504 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
507 (cmovc): move to after field definitions, use ivc2-specific
509 (cpmovi_b_P0S_P1): New.
511 2009-05-19 DJ Delorie <dj@redhat.com>
513 * cpu/mep.opc: Regenerate configuration.
514 (parse_cdisp10): Only check CPU flags, not COP flags.
515 (check_configured_mach): Likewise.
517 2009-05-13 DJ Delorie <dj@redhat.com>
519 * intrinsics.scm (insns.md): Add RTL predicates.
520 (intrinsics.h): Remove old C intrinsics.
522 2009-04-29 DJ Delorie <dj@redhat.com>
525 * mep-core.cpu: Regenerated. Add support for deferred register
527 (SLOT): Add IVC2 slot types.
528 (sim-syscall): Rename to something more appropriate.
529 * mep-ext-cop.cpu: Regenerate.
530 * mep.opc: Regenerate. Add "coprocessor supported" define area.
531 (print_slot_insn): New.
532 (mep_examine_ivc2_insns): New.
533 (mep_print_insn_set_ivc2_mode): New.
534 (mep_print_insn): Support IVC2 slotting.
536 2009-04-20 DJ Delorie <dj@redhat.com>
538 * intrinsics.scm (intrinsics-analyze!): Include aliases.
539 (guess-mode): Drop COP* syntax.
540 (need-insn): Add "--syscall--" to the list.
541 (enum-type): Drop COP* syntax.
542 (intrinsics.h): Likewise.
543 (intrinsic-protos.h): Change file header to allow it to be
546 2009-04-17 DJ Delorie <dj@redhat.com>
548 * cpu/mep-c5.cpu (f-12s20): Change to signed.
549 (lhucpm1): Limit to C5 mach.
550 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
551 * cpu/mep-core.cpu (extend-cdisp10): New.
552 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
554 2009-04-08 DJ Delorie <dj@redhat.com>
556 * cpu/mep-c5.cpu: New.
557 * cpu/mep-core.cpu: Add C5 support.
558 * cpu/mep.opc: Likewise.
560 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
562 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
563 about calling memset with a zero length.
565 2009-02-03 DJ Delorie <dj@redhat.com>
567 * cpu/mep-core.cpu: Update to new MeP configuration.
568 * cpu/mep-ext-cop.cpu: Likewise.
569 * cpu/mep.opc: Likewise.
571 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
573 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
575 2008-06-17 Dave Brolley <brolley@redhat.com>
577 * cpu/xstormy16.cpu (h-pc): Add a set handler.
580 2007-11-13 Dave Brolley <brolley@redhat.com>
582 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
584 2007-11-05 Dave Brolley <brolley@redhat.com>
586 * intrinsics.scm,cgen-intrinsics.scm: New application which
587 generates code to support intrinsic functions for insns in the
588 mep architecture in gcc.
590 2007-09-21 Dave Brolley <brolley@redhat.com>
592 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
593 (rn3us): CDATA attribute now LONG.
595 2007-08-21 Dave Brolley <brolley@redhat.com>
597 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
600 2007-07-05 Nick Clifton <nickc@redhat.com>
602 * utils.scm (copyright-fsf): Update copyright notice to refer to
605 2007-05-22 Nick Clifton <nickc@redhat.com>
607 * doc/cgen.texi: Use @copying around the copyright notice.
608 * doc/internals.texi: Likewise.
610 2007-02-05 Dave Brolley <brolley@redhat.com>
612 * *mep*: New cpu description for Toshiba Media Processor (MeP).
614 2007-02-05 Dave Brolley <brolley@redhat.com>
616 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
617 in the generated code for @arch@_cgen_init_asm if it is defined.
619 * Contribute the following changes:
620 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
622 * attr.scm (<string-attribute>): New attribute class.
623 (attr-kind): Handle <string-attribute>.
624 (parse-simple-attribute): New function.
625 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
626 (<bitset-attribute> 'parse-value): Likewise.
627 (<boolean-attribute> 'parse-value): Likewise.
628 (<enum-attribute> 'parse-value): Likewise.
629 (<string-attribute> 'parse-value): New function.
630 (-attr-parse): Handle <string-attribute>.
631 (-attr-read): Likewise.
632 (<string-attribute> 'gen-value-for-defn-raw): New function.
633 (<string-attribute> 'gen-value-for-defn): New function.
635 2006-11-07 Dave Brolley <brolley@redhat.com>
637 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
640 2006-10-18 Dave Brolley <brolley@redhat.com>
642 * Contribute the following changes:
644 2006-07-11 Dave Brolley <brolley@redhat.com>
646 * cpu/sh64-compact.cpu (movual, movual2): New insns.
648 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
649 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
650 hardware or memory mode which was used.
651 * sid-cpu.scm (hw-need-write-stack?): New function.
652 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
653 identify hardware which uses write stacks.
654 (useful-mode-names): Renamed to write-stack-memory-mode-names.
655 Initialized to an empty list.
656 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
657 hw-need-write-stack?.
658 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
659 (define-getters <hardware-base>): Define used-in-delay-rtl?.
660 (used-in-delay-rtl?): New method of <hardware-base>.
661 (hw-used-in-delay-rtl?): New function.
663 2006-06-20 Dave Brolley <brolley@redhat.com>
665 * sid.scm (gen-attr-type): Removed.
666 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
667 (SH2a-MACH): Add sh5.
668 (sh2a-nofpu-models): Add units for sh5.
669 (sh2a-fpu-models): Likewise.
671 2006-06-15 Dave Brolley <brolley@redhat.com>
673 * cpu/sh-sim.cpu: New file.
674 * cpu/sh-sid.cpu: New file.
675 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
676 (All fields): Remap for (insn-lsb0? #f)
677 (All insns): Add timing specs.
678 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
679 'xattrs' and .splice it in.
680 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
681 (h-frc,h-drc): Add PROFILE attribute.
683 (h-vbr): New hardware.
684 (All fields): Remap for (insn-lsb0? #f)
685 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
686 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
687 (fpscr): Use h-fpscr.
688 (fsdm,fsdn): Use h-fsd.
689 (dshci): Add xtiming argument and splice it in.
690 (dr,xd): pmacros removed.
691 (All insns): Add timing specs, *-MACH attribibutes,
692 SH4{A}-GROUP attributes.
693 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
694 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
695 we're being processed for sim or sid.
696 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
697 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
698 (define-isa compact): Add (isa-parallel-insns 2).
699 (define-isa media): Add (isa-parallel-insns 2). Add
700 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
701 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
703 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
704 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
705 (SH4al-MACH, SH5-MACH): New pmacros.
706 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
707 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
708 (sh5-media-fp-units, common-model, common-model-with-fp)
709 (sh3-model, sh3e-model): New pmacros.
710 (define-model sh2): New model.
711 (define-model sh2e): New model.
712 (define-model sh3): New model.
713 (define-model sh3e): New model.
714 (define-model sh2a-nofpu): New model.
715 (define-model sh2a-fpu): New model.
716 (define-model sh4-nofpu): New model.
717 (define-model sh4): New model.
718 (define-model sh4a-nofpu): New model.
719 (define-model sh4a): New model.
720 (define-model sh4al): New model.
721 (define-model sh5-media): New model.
722 (define-model sh5): Add all units.
723 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
724 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
725 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
726 (h-pc): Add PROFILE attribute.
729 (h-gr,h-grc): Likewise.
730 (h-cr): Set h-sr in setter.
731 (h-frbit): Get/Set h-fpscr.
732 (h-szbit,h-prbit): Likewise.
733 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
734 Add getter and setter.
735 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
736 Adjust getter and setter.
737 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
738 Adjust getter and setter.
739 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
740 (h-fsd,h-fmov): New hardware.
742 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
744 * doc/app.texi, doc/internals.texi, doc/intro.texi,
745 doc/notes.texi, doc/porting.texi, doc/running.texi,
746 doc/sim.texi: Fix some typos.
748 2006-07-14 Dave Brolley <brolley@redhat.com>
750 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
751 hardware or memory mode which was used.
752 * sid-cpu.scm (hw-need-write-stack?): New function.
753 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
754 identify hardware which uses write stacks.
755 (useful-mode-names): Renamed to write-stack-memory-mode-names.
756 Initialized to an empty list.
757 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
758 hw-need-write-stack?.
759 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
760 (define-getters <hardware-base>): Define used-in-delay-rtl?.
761 (used-in-delay-rtl?): New method of <hardware-base>.
762 (hw-used-in-delay-rtl?): New function.
764 2006-06-20 Dave Brolley <brolley@redhat.com>
766 * sid.scm (gen-attr-type): Removed.
768 2006-05-10 Dave Brolley <brolley@redhat.com>
770 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
771 support for (if (application-is? <appname>) (...) (...)).
772 (-cgen): Add trailing "/" to arch-path.
773 * utils.scm (dirname): Removed. dirname is a primitive function.
775 2006-05-09 Dave Brolley <brolley@redhat.com>
777 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
778 'entire_insn' not 'base_insn'.
779 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
781 * sim.scm (-gen-arch-model-decls): Likewise.
782 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
783 abuf->written if profiling.
784 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
785 object->string om the mode.
786 (-hw-gen-write-stack-decl): Likewise.
787 * read.scm (include): Use arch-path as file location.
788 (arch-path): Define it with a default setting.
789 (-cgen): Update arch-path when "-a" option is specified.
790 * utils.scm (dirname): New function.
792 2006-05-05 Steve Ellcey <sje@cup.hp.com>
794 * configure.in: Remove AC_ARG_PROGRAM.
795 * configure: Regenerate with autoconf 2.59.
797 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
799 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
802 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
804 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
805 or an error message otherwise.
806 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
807 Fix up comments to correctly describe the functions.
809 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
810 Anil Paranjape <anilp1@kpitcummins.com>
811 Shilin Shakti <shilins@kpitcummins.com>
813 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
815 * cpu/xc16x.opc: New file containing supporting XC16C routines.
817 2006-02-10 Nick Clifton <nickc@redhat.com>
819 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
821 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
823 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
825 (-hw-gen-write-stack-decl): Likewise.
827 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
829 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
830 non-(adata-integral-insn? CURRENT-ARCH) case.
832 2005-10-28 Dave Brolley <brolley@redhat.com>
834 Contribute the following changes:
835 2005-09-19 Dave Brolley <brolley@redhat.com>
837 * attr.scm (gen-value-for-defn-raw): New methods.
838 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
839 gen-value-for-defn-raw.
840 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
842 2002-12-13 Dave Brolley <brolley@redhat.com>
844 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
845 (-gen-attr-accessors): New function.
846 (gen-obj-attr-defn): Update terminating initializer.
847 (gen-obj-attr-end-defn): New function.
848 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
849 * sid-cpu.scm (cgen-desc.h): Generate code to include
850 "opcode/cgen-bitset.h"
851 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
853 * desc.scm ('gen-defn): Update terminating initializer.
854 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
855 terminatinig initializer.
856 (gen-hw-decls): Ditto.
857 (gen-operand-decls): Ditto.
858 (gen-insn-decls): Ditto.
859 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
860 (gen-insn-table): Update terminating initializer.
861 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
862 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
863 * attr.scm (charmask-bytes): New function.
864 (bitset-attr->charmask): New function.
865 (<bitset-attribute>): Handle isa-attributes specially. Also handle
866 differences for SID-SIMULATOR.
867 (<integer-attribute>): Handle differences for SID-SIMULATOR.
868 (<enum-attribute>): Ditto.
870 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
872 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
874 2005-10-24 DJ Delorie <dj@redhat.com>
876 * operand.scm (-anyof-merge-syntax): Print a more useful error
879 2005-10-19 Nick Clifton <nickc@redhat.com>
881 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
884 2005-10-18 Andreas Schwab <schwab@suse.de>
886 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
888 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
890 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
893 2005-08-02 Dave Brolley <brolley@redhat.com>
895 * rtl-c.scm (s-unop): Don't dereference
896 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
897 (s-binop, s-convop, s-cmpop): Likewise.
899 2005-07-29 Dave Brolley <brolley@redhat.com>
901 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
902 if with-profile or with-parallel-write.
903 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
904 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
907 2005-07-15 Alan Modra <amodra@bigpond.net.au>
909 * cpu/fr30.opc (print_register_list): Correct format strings.
910 * cpu/ip2k.opc: Likewise.
912 2005-07-05 Nick Clifton <nickc@redhat.com>
914 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
915 unsigned in order to avoid compile time warnings about sign
918 2005-07-01 Nick Clifton <nickc@redhat.com>
920 * desc-cpu.scm: Update to ISO C90 function declaration style.
921 * opc-asmdis.scm: Likewise.
922 * opc-ibld.scm: Likewise.
923 * opc-itab.scm: Likewise.
924 * cpu/fr30.opc: Likewise.
925 * cpu/i960.opc: Likewise.
926 * cpu/ip2k.opc: Likewise.
927 * cpu/iq2000.opc: Likewise.
928 * cpu/m32r.opc: Likewise.
929 * cpu/openrisc.opc: Likewise.
930 * cpu/sh.opc: Likewise.
931 * cpu/sparc.opc: Likewise.
932 * cpu/xstormy16.opc: Likewise.
934 2005-06-15 Dave Brolley <brolley@redhat.com>
936 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
937 (cgen-cpu.h): Call it.
939 Contributed on behalf of Graydon Hoare
940 2001-06-05 graydon hoare <graydon@redhat.com>
942 * utils.scm (foldl): Define.
946 (intersection): Simplify.
947 * sid.scm : Set APPLICATION to SID-SIMULATOR.
948 (-op-gen-delayed-set-maybe-trace): Define.
949 (<operand> 'gen-set-{quiet,trace}): Delegate to
950 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
951 up and needs cleaning.
952 (-with-parallel?): Hardwire with-parallel to #t.
953 (<operand> 'cxmake-get): Replace with lookahead-aware code
954 * sid-decode.scm: Remove per-insn writeback fns.
955 (-gen-idesc-decls): Redefine sem_fn type.
956 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
957 with write stack stuff.
958 (cgen-write.cxx): Replace per-insn writebacks with single write
959 stack writeback. Add write stack reset function.
960 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
962 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
963 estate attribute set.
964 (delay): Set #:delayed attribute to calculated delay, update
965 maximum delay of cpu, check (delay ...) usage.
966 * operand.scm (<operand>): Add delayed slot to <operand>.
967 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
968 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
969 * doc/rtl.texi (Expressions): Add section on (delay ...).
971 2005-06-13 Jim Blandy <jimb@redhat.com>
973 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
976 2005-06-07 Zack Weinberg <zack@codesourcery.com>
978 * doc/porting.texi: Change all mention of md_apply_fix3 and
979 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
982 2005-05-18 Dave Brolley <brolley@redhat.com>
984 * utils-sim.scm (-gen-decode-default-entry): New function.
985 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
986 code to check that all opcodes bits match.
987 (-gen-decoder-switch): Use -gen-decode-default-entry.
989 2005-05-16 Jim Blandy <jimb@redhat.com>
991 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
992 fetched by one of our GETIMEM* methods.
993 * utils-gen.scm (-extract-chunk-specs): Always fetch full
994 base-insn-sized chunks.
996 2005-05-10 Nick Clifton <nickc@redhat.com>
998 * Update the address and phone number of the FSF organization in
999 the GPL notices in the following files:
1000 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1001 cpu/powerpc.cpu, slib/random.scm
1003 2005-05-06 Jim Blandy <jimb@redhat.com>
1005 * pprint.scm, cos-pprint.scm: Add documentation.
1007 * pprint.scm (pprint): Don't wipe out elide-table after each call.
1009 * pprint.scm, cos-pprint.scm: New files.
1011 2005-04-04 Nick Clifton <nickc@redhat.com>
1013 * opcodes.scm (-gen-parse-address): Initialise value to zero to
1014 avoid a compile time warning.
1016 2005-03-18 Nick Clifton <nickc@redhat.com>
1018 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1019 "percent-operand" from "%operand" as the latter confuses xgettext
1020 into thinking that it is a C printf formating directive, which
1021 prevents proper translation.
1023 2005-02-23 Nick Clifton <nickc@redhat.com>
1025 * opcodes.scm (gen-parse-number): Add a cast to the desired
1026 pointer signed'ness in order to prevent compile time warnings.
1027 * cpu/ip2k.opc: Fixed compile time warnings about differing
1028 signed'ness of pointers passed to functions.
1029 * cpu/iq2000.opc: Likewise.
1030 * cpu/m32r.opc: Likewise.
1031 * cpu/openrisc.opc: Likewise.
1032 * cpu/xstormy16.opc: Likewise.
1034 2005-02-22 Alan Modra <amodra@bigpond.net.au>
1036 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1037 (cgen-desc.h): ..to here, after opcode/cgen.h include.
1039 2005-02-16 Dave Brolley <brolley@redhat.com>
1041 * utils.scm: Update copyright years.
1042 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1043 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1044 * operand.scm (-derived-operand-parse): Move logit message from level 1
1047 2005-02-15 Nick Clifton <nickc@redhat.com>
1049 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1050 prevent compile time warning messages.
1051 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1052 * utils-gen.scm (attr-int-gen-defn): Likewise.
1053 (attr-gen-defn): Likewise.
1054 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1055 (print_dollarhex16): Remove unused function.
1057 2005-02-15 Jim Blandy <jimb@redhat.com>
1059 * guile.scm (cgen-call-with-debugging): Doc fix.
1061 Make backtraces work more reliably.
1062 * guile.scm: Set up debugging parameters, and enable debugging and
1063 source positions while loading.
1064 (cgen-call-with-debugging, cgen-debugging-stack-start): New
1066 * read.scm: Don't set debugging parameters here.
1067 (catch-with-backtrace): Function deleted.
1068 (-cgen): Simply note the presence or absence of the -b option.
1069 Pass the flag to cgen-call-with-debugging, so debugging is turned
1070 off here if the user didn't request it, for faster computation.
1071 (cgen): Call cgen-debugging-stack-start here, instead of
1072 catch-with-backtrace.
1074 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1076 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1077 Don't write out the trailing -s here.
1078 * Makefile.in: Regenerated.
1079 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1080 fixup.scm here; let the caller decide which Scheme's customization
1082 * dev.scm: Load guile.scm, not fixup.scm.
1083 * fixup.scm: Deleted; contents have all moved to guile.scm.
1086 * guile.scm (debug-write): New function.
1088 2005-02-14 Jim Blandy <jimb@redhat.com>
1090 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1091 transformer procedure, not eval. Transformer procedures take one
1094 2005-02-11 Nick Clifton <nickc@redhat.com>
1096 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1097 to 'bfd_vma *' in order avoid compile time warning message.
1099 2005-02-09 Jim Blandy <jimb@redhat.com>
1101 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
1102 corresponding change in the sim/common directory.)
1104 2005-02-07 Jim Blandy <jimb@redhat.com>
1106 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
1107 changes in the opcodes directory.)
1109 * guile.scm: New file, containing Guile-specific definitions and
1110 adaptations. This is loaded by the app-specific shell scripts.
1111 Initially identical to fixup.scm.
1112 * cgen-sid.scm: Don't load fixup.scm here.
1114 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1117 2005-01-27 Jim Blandy <jimb@redhat.com>
1119 * utils.scm (string/symbol->append): Renamed from 'concat'.
1120 * opcodes.scm (gen-switch): Use new name.
1121 * insn.scm (-sub-insn-make!): Same.
1122 * rtl.scm (rtx-dump): Same.
1123 * semantics.scm (semantic-compile): Same.
1125 2005-01-20 Jim Blandy <jimb@redhat.com>
1127 * opcodes.scm (gen-switch): Use concat instead of string-map.
1129 * utils.scm (concat): New function.
1130 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1131 * rtl.scm (rtx-dump): Same.
1132 * semantics.scm (semantic-compile): Same.
1134 2004-12-16 Jim Blandy <jimb@redhat.com>
1136 * utils-cgen.scm (parse-name): Don't assume that string-map can be
1137 applied to symbols. Process everything as strings, and then
1138 convert to a symbol at the end.
1140 * read.scm (debug-repl): Temporarily redirect input and output to
1141 /dev/tty while we debug, so we don't interfere with whatever CGEN
1142 is reading or writing.
1143 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1146 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
1148 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1149 will work with newer versions of guile.
1151 2004-10-27 Nick Clifton <nickc@redhat.com>
1153 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1154 * cpu/iq2000.cpu: Likewise.
1156 2004-07-21 DJ Delorie <dj@redhat.com>
1158 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1160 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
1162 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1163 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1165 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1167 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1169 2004-03-22 Dave Brolley <brolley@redhat.com>
1171 * utils.scm (copyright-fsf): Update copyright years.
1172 (copyright-red-hat): Ditto.
1173 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1175 (-op-gen-set-trace-parallel): Ditto.
1177 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
1179 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1180 disassembling codes for 0x*2 addresses.
1182 2004-01-29 Dave Brolley <brolley@redhat.com>
1184 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1185 zeroes in the extra bit positions and generate 'opcode-mask' with ones
1186 in the extra bit positions.
1188 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1190 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1192 2003-12-04 Alan Modra <amodra@bigpond.net.au>
1194 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1195 "short" being 16 bit.
1196 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
1197 internationalize error message.
1198 (parse_lo16): Likewise. Remove useless code.
1200 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1202 * cpu/m32r.cpu : Add new model m32r2.
1203 Add new instructions.
1204 Replace occurrances of 'Mitsubishi' with 'Renesas'.
1205 Changed PIPE attr of push from O to OS.
1206 Care for Little-endian of M32R.
1207 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1208 Care for Little-endian of M32R.
1209 (parse_slo16): signed extension for value.
1211 2003-10-26 Dave Brolley <brolley@redhat.com>
1213 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1214 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1215 (-gen-extract-fn): Call -gen-record-profile-args.
1217 2003-10-21 Dave Brolley <brolley@redhat.com>
1219 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1221 * decode.scm (-opcode-slots): Correct typo in logit call.
1223 2003-10-09 Jim Blandy <jimb@redhat.com>
1225 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1226 for @arch@_cgen_hw_table. GDB needs to be able to find this.
1228 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1230 2003-10-06 Dave Brolley <brolley@redhat.com>
1232 * gen-all-doc: Add fr550.
1234 2003-09-11 Doug Evans <dje@sebabeach.org>
1236 * Makefile.am (ARCHFILE): New var.
1237 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1238 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1239 * Makefile.in: Regenerate.
1241 2003-09-08 Dave Brolley <brolley@redhat.com>
1243 On behalf of Doug Evans <dje@sebabeach.org>
1244 Pass in paths to input files, instead of assuming they live in
1245 $srcdir/cpu. Plus misc. option processing cleanup.
1246 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1247 Add pre-process pass to all options.
1248 * cgen-gas.scm (gas-arguments): Ditto.
1249 * cgen-sid.scm (sim-arguments): Ditto.
1250 * cgen-sim.scm (sim-arguments): Ditto.
1251 * cgen-stest.scm (stest-arguments): Ditto.
1252 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
1253 (-opc-file-path): New global.
1254 (opc-file-path): New fn.
1255 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1256 All callers updated.
1257 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1258 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1259 Replace srcdir arg with opc-file. All callers updated.
1260 * read.scm (-opt-spec-update): Delete.
1261 (opt-get-first-pass,opt-get-second-pass): New fns.
1262 (-cgen): Process application-specific arguments in two passes.
1264 2003-08-29 Dave Brolley <brolley@redhat.com>
1266 * cpu/frv.cpu: Removed.
1267 * cpu/frv.opc: Removed.
1269 2003-08-21 Nick Clifton <nickc@redhat.com>
1271 * cpu/frv.cpu (mbtoh): Replace input parameter to
1272 u-media-dual-expand and u-media-dual-btoh with output parameter.
1273 (cmbtoh): Add profiling hack.
1275 2003-08-19 Michael Snyder <msnyder@redhat.com>
1277 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1279 2003-08-07 Michael Meissner <gnu@the-meissners.org>
1281 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1282 the elements for the END record of CGEN_OPINST, silencing warnings.
1284 2003-07-15 Doug Evans <dje@sebabeach.org>
1286 Add guile 1.6.4 support.
1287 - empty list must be quoted
1288 - string functions have stricter type checking
1289 - eval now takes a second argument
1290 - symbol-bound? is deprecated
1291 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1292 (bitset-attr->list): Ensure arg to string-cut is a string.
1293 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1294 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1295 * cos.scm (-class-list): Must quote empty list.
1296 (-class-parent-classes,-class-compute-class-desc): Ditto.
1297 (class-make,make,object-reset!): Ditto.
1298 (method-make-make!): Call eval1 instead of eval.
1299 (method-make-forward!,method-make-virtual-forward!): Ditto.
1300 * decode.scm (subdtable-add): Use stringsym-append instead of
1302 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1303 (-build-decode-table-entry): Fetch string name of insn.
1304 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1305 (-gen-mach-table-defns): Ditto for mach.
1306 (gen-ifld-defns): Ditto for ifld.
1307 (gen-hw-table-defns): Ditto for hw.
1308 (gen-operand-table): Ditto for op.
1309 (gen-insn-table-entry): Ditto for insn.
1310 * desc.scm (gen-attr-table-defn): Ditto for attr.
1311 (<keyword>,gen-defn): Don't pass symbols to string-append.
1312 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1314 (enum-vals-upcase): Use symbol-upcase to build result.
1315 (-enum-parse): Use stringsym-append to build errtxt.
1316 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1317 (eval1): New function.
1318 (symbol-bound?): Provide own version if >= guile 1.6.
1319 * hardware.scm (define-keyword): Use string-append instead of
1321 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
1322 cgen.html,cgen-insn.html): Convert current-arch-name to a string
1324 (gen-list-entry): Handle either symbol or string `name' arg.
1325 (gen-obj-doc-header): Fetch string name of `o' arg.
1326 (define-cpu-intro): Ditto for cpu.
1327 (gen-mach-intro): Ditto for mach.
1328 (gen-model-intro): Ditto for model.
1329 (gen-isa-intro): Ditto for isa.
1330 (gen-machine-doc-1): Ditto for isa.
1331 (gen-reg-doc-1): Convert mach to string first.
1332 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
1333 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
1335 (gen-insn-categories): Fetch string name of mach. Convert
1336 enum-val-name to string first.
1337 (gen-insn-docs): Fetch string name of mach.
1338 * ifield.scm (ifld-ilk): Result is a string.
1339 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
1340 Fetch string name of ifld.
1341 (-sfmt-search-key): Similarily for ifld and op.
1342 * insn.scm (syntax-make): Fetch string name of syntax element.
1343 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
1344 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
1345 * mode.scm (mode:c-type): Result is a string.
1346 (mode:enum): Fetch string name of mode.
1347 (-mode-parse): Use stringsym-append to build errtxt.
1348 * model.scm (model:enum): Fetch string name of model.
1349 (-model-parse): Use stringsym-append to build errtxt.
1350 (parse-insn-timing): Must quote empty list.
1351 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
1352 (-gen-minsn-opcode-entry): Ditto.
1353 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
1355 (read-cpu.opc): Convert current-arch-name to a string before using.
1356 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
1357 (<derived-operand>): Must quote empty list.
1358 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
1359 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
1361 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
1362 (-pmacro-sym): Must convert symbols to strings before passing to
1364 (-pmacro-str): Ditto.
1365 (pmacros-init!): Use eval1 instead of eval.
1366 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
1367 (keep-isa-atlist?): Ditto.
1368 (cmd-if): Use eval1 instead of eval.
1369 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
1370 (-rtl-c-get): Fetch string name of src.
1371 (s-unop): Ditto for mode.
1372 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
1373 (-gen-par-temp-defns,subword): Ditto.
1374 (join): Use stringsym-append instead of string-append.
1375 * rtl-traverse.scm (rtx-option?): Convert option to string first.
1376 (rtx-traverse-debug): Fetch string name of rtx-obj.
1377 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
1378 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1379 (rtx-pretty-name): Result is a string.
1380 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
1381 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
1382 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
1384 (-gen-sfrag-case): Fetch string name of user.
1385 * sid-model.scm (unit:enum): Fetch string name of unit.
1386 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
1387 (<hw-memory>,gen-set-quiet): Ditto.
1388 (gen-mode-defs): Ditto.
1389 (sim-finish!): Convert current-arch-name to a string before using.
1390 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
1391 (-gen-no-scache-semantic-fn): Ditto.
1392 (cgen-defs.h): Fetch string name of isa.
1393 (cgen-read.c): Convert current-arch-name to a string before using.
1394 (cgen-write.c): Ditto.
1395 * sim-model.scm (unit:enum): Fetch string name of unit.
1396 (gen-model-fn-decls): Use stringsym-append instead of string-append.
1397 (-gen-model-timing-table): Fetch string name of model.
1398 (-gen-mach-model-table): Ditto.
1399 (-gen-mach-defns): Fetch string name of mach.
1400 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
1401 (<hw-memory>,cxmake-get): Fetch string name of mode.
1402 (<hw-memory>,gen-set-quiet): Ditto.
1403 (gen-mode-defs): Ditto.
1404 (sim-finish!): Must quote empty list.
1405 * utils-cgen.scm (<ident>): Must quote empty list.
1406 (obj:str-name): New fn.
1407 (parse-comment): Result is a string.
1408 (parse-symbol): Result is a symbol.
1409 (parse-string): Result is a string.
1410 (keyword-list?): Convert arg to string before calling string-ref.
1411 (keyword-list->arg-list): Ditto.
1412 (gen-attr-name): Convert attr-name to string first.
1413 (alpha-sort-obj-list): Use symbol<? instead of string<?.
1414 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
1415 (gen-define-ifmt-ifields): Ditto for fld.
1416 * utils.scm (gen-c-symbol): Ensure str is a string before calling
1418 (gen-file-name): Ditto.
1419 (symbol-downcase,symbol-upcase,symbol<?): New fns.
1420 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
1421 (reduce): Call eval1 instead of eval.
1422 * cpu/m32r.cpu (addi): Don't use `#.'.
1424 * gen-all-sim: Fix some typos.
1426 2003-07-08 Doug Evans <dje@sebabeach.org>
1428 * gen-all-doc: Ensure run from cgen src dir.
1429 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
1430 * gen-all-sid: Similarily, in ./tmp-sid.
1431 * gen-all-sim: Similarily, in ./tmp-sim.
1433 2003-06-20 Doug Evans <dje@sebabeach.org>
1435 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
1437 2003-06-19 Doug Evans <dje@sebabeach.org>
1439 * mach.scm (-ifld-already-defined?): New proc.
1440 (current-ifld-add!): Use it.
1441 (-op-already-defined?): New proc.
1442 (current-op-add!): Use it.
1443 (-insn-already-defined?): New proc.
1444 (current-insn-add!): Use it.
1445 (-minsn-already-defined?): New proc.
1446 (current-minsn-add!): Use it.
1447 (obj-isa-list): New proc.
1448 (isa-supports?): Use it.
1450 2003-06-10 Doug Evans <dje@sebabeach.org>
1452 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
1453 * cpu/m32r.cpu (all insns): Ditto.
1455 * mach.scm (current-*-add!): Disallow redefinition. Make result
1458 * gen-all-doc: Split arm and frv docs up a bit.
1460 * cpu/arm.cpu: Add IDOC attribute.
1461 * cpu/frv.cpu: Ditto.
1462 * cpu/i960.cpu: Ditto.
1463 * cpu/openrisc.cpu: Ditto.
1464 * cpu/xstormy16.cpu: Ditto.
1465 * cpu/m32r.cpu: Ditto.
1466 (all insns): Explicitly specify IDOC attribute.
1468 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
1469 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
1470 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
1471 * Makefile.in: Regenerate.
1472 * attr.scm (<integer-attribute>:parse-value-def): Implement.
1473 (-attr-read): Defer computing default value until we know the type.
1474 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
1475 (<attr-list>:attr-present?): New method.
1476 (atlist-attr-present?,obj-attr-present?): New fns.
1477 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
1478 (attr-builtin!): New insn attr IDOC.
1479 * cgen-doc.scm (doc-arguments): New args -I,-N.
1480 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
1481 Support comment as fourth element of enum value.
1482 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
1483 * html.scm (gen-html-header): New arg kind, all callers updated.
1484 (gen-table-of-contents): New arg insn-file, all callers updated.
1485 (gen-list-entry,gen-doc-header): New fn.
1486 (get-operands): Delete.
1487 (gen-iformat-table): Rewrite.
1488 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
1489 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
1490 (get-insn-properties,guess-insn-idoc-attr!): New fn.
1491 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
1492 (get-insns-for-category,gen-categories-insn-lists): New fns.
1493 (gen-insn-docs): Simplify each insn's semantics first.
1494 Print insn tables sorted by IDOC categories.
1495 (*insn-html-file-name*): New global.
1496 (cgen-insn.html): New fn.
1498 * insn.scm (<insn>): Create a setter for the `tmp' member.
1499 * semantics.scm (insn-build-known-values): Renamed from
1500 -build-known-values. All callers updated.
1502 * rtl.scm: Move traveral/evaluation support to ...
1503 * rtl-traverse.scm: New file.
1504 * read.scm: Maybe-load rtl-traverse.scm.
1506 * rtl.scm (-rtx-valid-types): Add SETRTX.
1508 * rtx-funcs.scm (nop,parallel): Fix mode.
1510 * utils.scm (eqv-lookup-index): New fn.
1511 (assq-lookup-index): Renamed from lookup-index. All callers updated.
1513 * dev.scm (load-doc): Set APPLICATION.
1515 2003-06-10 Dave Brolley <brolley@redhat.com>
1517 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
1518 * sid-decode.scm: Generate #include of config.h into
1519 @prefix@-decode.cxx.
1520 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
1522 2003-06-07 Doug Evans <dje@sebabeach.org>
1524 * gen-all-sid: New file.
1525 * gen-all-opcodes: New file.
1527 2003-06-05 Nick Clifton <nickc@redhat.com>
1529 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
1530 version of the FRinti operand.
1531 (FRintjeven): Likewise for FRintj.
1532 (FRintkeven): Likewise for FRintk.
1533 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
1534 media-quad-arith-sat-semantics, media-quad-arith-sat,
1535 conditional-media-quad-arith-sat, mdunpackh,
1536 media-quad-multiply-semantics, media-quad-multiply,
1537 conditional-media-quad-multiply, media-quad-complex-i,
1538 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
1539 conditional-media-quad-multiply-acc, munpackh,
1540 media-quad-multiply-cross-acc-semantics, mdpackh,
1541 media-quad-multiply-cross-acc, mbtoh-semantics,
1542 media-quad-cross-multiply-cross-acc-semantics,
1543 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
1544 media-quad-cross-multiply-acc-semantics, cmbtoh,
1545 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
1546 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
1547 cmhtob): Use new operands.
1548 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
1549 (parse_even_register): New function.
1551 2003-06-04 Doug Evans <dje@sebabeach.org>
1553 Better handling of 64 bit and mixed 32/64 bit architectures.
1554 * hardware.scm (hw-update-word-modes!): New fn.
1555 * mach.scm (define-cpu)): Call mode-set-word-modes!,
1556 hw-update-word-modes!.
1557 (state-word-bitsize): Replace FIXME with requested check.
1558 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
1559 * mode.scm (mode-find): Ignore INT,UINT.
1560 (-mode-word-sizes-kind): New global.
1561 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
1562 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
1563 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
1565 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
1566 unusable, correct values set later.
1567 (mode-finish!): Remove cruft.
1568 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
1569 * opcodes.scm (opcodes-init!): Ditto.
1570 * rtx-funcs.scm (annul): Fix mode of pc.
1571 * cpu/ia64.cpu: Remove cruft that sets word modes.
1572 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
1574 2003-06-03 Nick Clifton <nickc@redhat.com>
1576 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
1577 immediate value not unsigned.
1579 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
1581 * cpu/sh.cpu: Amend comments to refer to SuperH.
1582 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
1583 * cpu/sh64-media.cpu: Likewise.
1584 (Saturation): Update manual reference.
1586 2003-05-15 Doug Evans <dje@sebabeach.org>
1588 * Makefile.am (srcroot): New var.
1590 * Makefile.in: Regenerate.
1591 * cgen-doc.scm: New file.
1592 * html.scm: New file.
1593 * gen-all-doc: New file.
1594 * dev.scm (cload): Handle DOC application.
1596 * machs.scm (machs-for-cpu): New fn.
1597 * model.scm (models-for-cpu): New fn.
1598 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
1600 (iota): Rewrite to be identical to pmacro version. All uses updated.
1601 * utils-cgen.scm (alpha-sort-obj-list): New fn.
1603 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
1604 (-gen-decode-bits): Instead put in better fix here.
1606 * cpu/i960.cpu (index): Rename to indx. All uses updated.
1608 2003-05-01 DJ Delorie <dj@redhat.com>
1610 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
1612 (set-alignfix-mem): Likewise.
1614 2003-04-16 Dave Brolley <brolley@redhat.com>
1616 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
1617 * utils.scm (copyright-fsf): Update generate copyright years.
1618 (copyright-cygnus): Ditto.
1619 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
1621 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
1623 (<operand>'gen-profile-code): New parameter 'when'.
1624 (<iunit>'gen-profile-code): Ditto.
1625 (<insn>'gen-profile-code): Ditto.
1626 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
1627 'insn_reference' for the 'after' function.
1628 * model.scm (unit:enum): Moved to sim-model.scm.
1629 * sim-model.scm (unit:enum): Moved from model.scm.
1630 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
1631 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
1632 * sid-model.scm (unit:enum): New version for sid.
1633 (gen-model-class-name): New function.
1634 (gen-model-unit-fn-decl): New function.
1635 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
1636 (gen-model-unit-fn-name): New parameter 'when'.
1637 (-gen-model-insn-fn-name): Ditto.
1638 (-gen-model-insn-qualified-fn-name): New function.
1639 (-gen-model-insn-fn-decl): New function.
1640 (-gen-model-insn-fn-decls): New function.
1641 (-gen-model-insn-fn): New parameter 'when'. Call
1642 -gen-model-insn-qualified-fn-name.
1643 (-gen-model-insn-fns): Generate the constructor for the model. Generate
1644 functions for modelling insn before and after execution.
1645 (-gen-model-class-decls): New function.
1646 (" (gen-model-class-name model) "): New function.
1647 (gen-model-classes): New function.
1648 (-gen-insn-timing): Generate functions for modelling insn before and after
1650 (-gen-insn-unit-timing): Generate class-qualified names.
1651 (-gen-model-timing-table): Ditto.
1652 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
1653 not needed (yet) by sid.
1654 (cgen-model.h): New function.
1656 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
1658 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
1659 * cpu/sh64-compact.cpu: Likewise.
1660 * cpu/sh64-media.cpu: Likewise.
1662 2003-03-21 DJ Delorie <dj@redhat.com>
1664 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
1665 which indicates if the sign flag is set from bit 15 or 7.
1667 (set-psw): New argument ws, propogate it.
1668 (set-psw-nowrite): Likewise.
1669 (set-mem-psw): Likewise.
1670 (set-psw-carry): Likewise. Use temporaries to prevent
1671 prematurely overwriting needed inputs.
1672 (set-psw-rrotate17): Fix logic.
1673 (shrgrgr): Preserve carry for zero-bit shifts.
1674 (shrgrimm): Likewise.
1675 (shlgrgr): Likewise.
1676 (shlgrimm): Likewise.
1677 (asrgrgr): Likewise.
1678 (asrgrimm): Likewise.
1681 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
1683 * sid.scm: Set APPLICATION to SID-SIMULATOR.
1685 2002-03-05 DJ Delorie <dj@redhat.com>
1687 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
1688 prematurely overwriting needed inputs.
1689 (set-psw-sub): Likewise.
1691 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
1693 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
1695 2003-02-18 DJ Delorie <dj@redhat.com>
1697 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
1698 (movlmemimm): Just mask the address.
1699 (movhmemimm): Likewise.
1700 (movlmemgr): Likewise.
1701 (movhmemgr): Likewise.
1702 (set-psw): Always set the psw last.
1703 (set-psw-carry): Likewise.
1704 (set-psw-add): Likewise.
1705 (set-psw-sub): Likewise.
1707 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
1708 of 16 patterns from the set-psw-rotate17 function.
1709 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
1710 movgriipostincgr, movgriipredecgr): Set psw correctly.
1711 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
1712 movfgriipostincgr, movfgriipredecgr): Fix semantics.
1713 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
1715 2003-02-11 Dave Brolley <brolley@redhat.com>
1717 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
1718 @arch@_cgen-ifld_table.
1719 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
1720 @arch@_cgen-ifld_table.
1722 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
1724 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
1726 2003-01-09 Graydon Hoare <graydon@redhat.com>
1728 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
1731 2003-01-07 Graydon Hoare <graydon@redhat.com>
1733 * utils-gen.scm (attr-int-gen-defn): Define.
1735 2002-12-21 Doug Evans <dje@sebabeach.org>
1737 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
1738 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
1740 * dev.scm (cload): Update location of .cpu files.
1742 2002-12-19 Doug Evans <dje@sebabeach.org>
1744 * utils-sim.scm (gen-profile-sym): New fn.
1745 (<operand>,sbuf-profile-sym): New method.
1746 (<operand>,sbuf-profile-elm): Use it.
1747 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
1748 of hardcoding symbol name.
1749 (<operand>,gen-profile-code): Ditto.
1750 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
1753 * mode.scm (mode-sem-mode): New fn.
1754 * operand.scm (op:new-mode): Update. mode-name.
1755 (op-natural-mode?) New fn.
1756 * rtl.scm (hw): Set hw-name,mode-name.
1758 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
1760 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
1761 as size of IDESC-TABLE-VAR.
1762 (@prefix@_init_idesc_table): Ditto.
1763 * sim-model.scm (-gen-mach-defns): Ditto.
1764 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
1766 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
1768 * insn.scm (-parse-insn-format-symbol): Improve error message.
1769 (-parse-insn-format): Ditto.
1771 * gen-all-sim: New script.
1773 2002-12-16 DJ Delorie <dj@delorie.com>
1775 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
1777 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
1779 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
1780 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
1781 (parse_immediate16): Handle immediate16 values, which now include
1782 @hi(label) and @lo(label)
1784 2002-12-03 Alan Modra <amodra@bigpond.net.au>
1786 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
1787 Add braces and cast for union field.
1788 (gen-multi-ifield-nodes): Add braces and cast for union field.
1789 (cgen_operand_table): Similarly fix sentinel.
1790 (cgen_cpu_close): Constify "insns". Formatting.
1791 (cgen-desc.c): Include xregex.h.
1792 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
1794 <opc.c>: Include safe-ctype.h.
1795 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
1796 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
1797 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
1798 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
1799 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
1800 (parse_addr16): Correct type of "value". Formatting.
1801 (parse_addr16_p): Likewise.
1802 (parse_addr16_cjp): Likewise.
1803 (parse_lit8): Likewise.
1804 (parse_bit3): Formatting.
1805 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
1806 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
1807 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
1809 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
1810 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
1811 (print_dollarhex8): Likewise.
1812 (print_dollarhex16): Likewise.
1813 (print_dollarhex_addr16h): Likewise.
1814 (print_dollarhex_addr16l): Likewise.
1815 (print_dollarhex_p): Likewise.
1816 (print_dollarhex_cj): Likewise.
1817 (print_decimal): Likewise.
1818 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
1820 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
1822 * doc/rtl.texi (Model variants): Mention current limitations for
1823 unit inputs and outputs.
1824 (Hardware elements) <attribute PROFILE>: Be slightly more
1826 (Instructions) <timing>: input/output overrides have a direction
1829 2002-11-25 DJ Delorie <dj@redhat.com>
1831 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
1833 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
1835 * cpu/iq10.cpu: New file.
1836 * cpu/iq2000.cpu: Likewise.
1837 * cpu/iq2000.opc: Likewise.
1838 * cpu/iq2000m.cpu: Likewise.
1840 2002-11-19 DJ Delorie <dj@redhat.com>
1842 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
1844 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
1846 * dev.scm: Call getenv with a string, not a symbol.
1848 2002-10-08 Doug Evans <dje@transmeta.com>
1849 Hans-Peter Nilsson <hp@axis.com>
1851 * types.scm (bitrange-overlap?): Handle lsb0?.
1853 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
1855 From Robert Cragie <rcc@jennic.com>:
1856 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
1858 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
1859 Ben Elliston <bje@redhat.com>
1860 John Healy <jhealy@redhat.com>
1861 Jeff Johnston <jjohnstn@redhat.com>
1862 Alan Lehotsky <alehotsky@redhat.com>
1863 Ubicom Inc. <SupportDesk@ubicom.com>
1865 * cpu/ip2k.cpu: New file.
1866 * cpu/ip2k.opc: Likewise.
1868 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
1870 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
1872 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
1874 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
1875 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
1876 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
1877 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
1878 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
1879 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
1880 (-sthi-byte): If there is a single byte to store, store it at
1882 (sthil, sthiq): Fix big-endian behaviour.
1883 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
1884 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
1885 (saturate): Use Dimode to check if saturation operation is required.
1886 (usaturate): Likewise.
1888 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
1889 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
1890 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
1891 (msadubq): Fix subword index in second operand of first subtraction.
1893 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
1895 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
1898 2002-06-18 Dave Brolley <brolley@redhat.com>
1900 * cpu/frv.cpu: New cpu description.
1901 * cpu/frv.opc: New cpu support code.
1903 2002-05-21 Dave Brolley <brolley@redhat.com>
1905 * decode.scm (-opcode-slots): Don't consider bits beyond the
1908 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
1910 * cpu/powerpc.cpu: New file.
1912 2002-05-01 Graydon Hoare <graydon@redhat.com>
1914 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
1916 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
1918 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
1919 results are expanded recursively.
1921 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
1923 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
1924 call scan-symbol on it, to enable recursive macro-expansion.
1926 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
1928 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
1929 for multiple-isa configurations.
1930 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
1932 2002-02-04 Ben Elliston <bje@redhat.com>
1934 * cpu/sh.cpu, cpu/sh.opc: New files.
1935 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
1937 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
1939 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
1940 (Enumerated constants): Mention that an ifield must not specify a
1942 (Instruction operands): Ditto for index.
1943 (Expressions) <parallel>: Remove misplaced mention of local
1945 <if>: Mention that mode must be specified and non-VOID when the
1948 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
1950 * doc/porting.texi: When referring to *.opc, mention they are in
1951 the cpu subdir. Call top-level directory toplevel, not devo.
1952 Close string in define-normal-insn example.
1954 * doc/pmacros.texi: Fix .substr typo to .substring.
1955 Mention that .sym expansions are not further expanded.
1957 2002-01-22 Graydon Hoare <graydon@redhat.com>
1959 * desc-cpu.scm (ifld-number-cache): Add.
1961 (gen-maybe-multi-ifld-of-op): Add.
1962 (gen-maybe-multi-ifld): Add.
1963 (gen-multi-ifield-nodes): Add.
1964 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
1966 2002-01-10 matthew green <mrg@redhat.com>
1968 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
1969 (gr-Rb-names): ... to this.
1970 (h-Rb): New hardware piece.
1971 (h-Rbj): Use gr-Rb-names.
1973 (holdx): New instruction.
1975 2002-01-07 Ben Elliston <bje@redhat.com>
1977 * utils.scm (package-cygnus-simulators): Rename from this ..
1978 (package-red-hat-simulators): .. to this.
1979 * opcodes.scm (option-set!): Use package-red-hat-simulators.
1980 * sid-cpu.scm (cgen-desc.h): Likewise.
1981 (cgen-cpu.h): Likewise.
1982 (cgen-defs.h): Likewise.
1983 (cgen-write.cxx): Likewise.
1984 (cgen-semantics.cxx): Likewise.
1985 (cgen-sem-switch.cxx): Likewise.
1986 * sid-decode.scm (cgen-decode.h): Likewise.
1987 (cgen-decode.cxx): Likewise.
1988 * sid-model.scm (cgen-model.cxx): Likewise.
1989 * sid.scm (option-set!): Likewise.
1990 * sim.scm (option-set!): Likewise.
1992 2002-01-07 Ben Elliston <bje@redhat.com>
1994 * utils.scm (copyright-fsf): Add 2002.
1995 (copyright-cygnus): Rename to copyright-red-hat.
1996 (copyright-red-hat): Add 2002.
1997 (CURRENT-COPYRIGHT): Update comment.
1998 * opcodes.scm (option-set!): Update callers.
1999 * sid-model.scm (cgen-model.cxx): Likewise.
2000 * sid-cpu.scm: Likewise.
2001 * sid-decode.scm: Likewise.
2002 * sid.scm (option-set!): Handle "redhat" as an option for
2003 "copyright"; use copyright-red-hat.
2004 * sim.scm (option-set!): Likewise.
2006 2002-01-03 Dave Brolley <brolley@redhat.com>
2008 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2009 number of insns in the list. Update the population count function to
2010 identify and prioritize 3 catgories of useful bits.
2011 (-population-top-few): Don't consider bits with a population count of
2013 (-build-decode-table-entry): Don't call
2014 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
2015 identical insns at the next tree level.
2016 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2017 this function is no longer used.
2018 (filter-non-specialized-ambiguous-insns): New function.
2019 (filter-identical-ambiguous-insns): New function.
2020 (find-identical-insn): New function.
2021 (filter-harmlessly-ambiguous-insns): Removed.
2023 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
2024 matthew green <mrg@redhat.com>
2025 Frank Ch. Eigler <fche@redhat.com>
2026 Nick Clifton <nickc@cambridge.redhat.com>
2028 * cpu/xstormy16.cpu: New file.
2029 * cpu/xstormy16.opc: New file.
2031 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
2033 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2035 2001-11-14 Dave Brolley <brolley@redhat.com>
2037 * utils-gen.scm (-gen-extract-word): Correct computation of the length
2038 of the field being extracted.
2040 2001-10-29 Johan Rydberg <johan@rydberg.com>
2042 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2043 (cos ...) and (sin ..) rtx.
2045 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
2047 * desc-cpu.scm: Do not include ctype.h in generated desc
2048 files. They will inherit safe-ctype.h instead.
2050 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
2052 * desc-cpu.scm: Add missing function prototypes (for generated
2053 C files). Fix compile time warning messages about unused
2054 parameters (for generated C files).
2055 * opc-asmdis.scm: The same.
2056 * opc-ibld.c: The same.
2057 * opc-itab.scm: The same.
2058 * cpu/fr30.opc: The same.
2059 * cpu/m32r.opc: The same.
2060 * cpu/openrisc.opc: The same.
2062 2001-09-17 graydon hoare <graydon@redhat.com>
2064 * insn.scm (syntax-break-out): Correct logic in handling escaped
2067 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
2069 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2070 call @arch@_cgen_build_insn_regex now that regex support is in
2073 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
2075 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2076 (mask-superset?): Look for strict supersets to allow rejection of
2079 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2081 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2082 (cgen-desc.h): Call it.
2083 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2085 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2086 entire_insn for extraction, if it's shorter than base-insn-bitsize.
2088 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2090 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2091 mach->cpu insn-chunk-bitsize.
2092 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2093 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2094 * mach.scm (<cpu>): New field insn-chunk-bitsize.
2095 (-cpu-parse, -cpu-read): Parse/initialize it.
2096 * doc/rtl.texi (define-cpu): Document it.
2098 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
2100 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2102 2001-07-06 Ben Elliston <bje@redhat.com>
2104 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2106 2001-07-05 Ben Elliston <bje@redhat.com>
2110 * read.scm (include): Include files from srcdir/cpu.
2111 (-cgen): Likewise for loading .cpu files.
2112 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2113 * *.cpu: Move all cpu descriptions into cpu subdirectory.
2115 * simplify.inc: Likewise.
2117 2001-07-04 Ben Elliston <bje@redhat.com>
2119 * read.scm (include): Log "Including file" message at level 1,
2120 rather than outputting it with (display).
2121 (cpu-load): Log "Loading cpu description" and "Processing cpu
2122 description" messages at levels 1 and 2, respectively, rather than
2125 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
2127 * desc.scm (<keyword> 'gen-defn): Add extra zero into
2128 CGEN_KEYWORD_ENTRY initializers.
2130 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2131 (<operand> 'test-data): Involve both the index and the hardware
2132 in testcase generation.
2133 (<hw-indx> 'test-data): Generate test data from the underlying
2135 (<ifield> 'test-data): Generate test data by computing bit
2136 patterns for the field, then decoding them.
2137 (<hw-address> 'test-data): Allow for new calling convention.
2138 (<hw-iaddress> 'test-data): Likewise.
2139 (<keyword> 'test-data): Convert index values into keywords.
2140 (<hw-asm> 'test-data): Convert index values into integer strings.
2142 * gas-test.scm (cgen-build.sh): Escape '.' as well.
2144 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
2146 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2147 is required for multi-mode hw types (memory).
2149 2001-05-11 Ben Elliston <bje@redhat.com>
2151 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2152 when generating allinsn.d from objdump output. Without it, the
2153 testsuite will treat $ as the regular expression for end of line.
2155 2001-05-09 Ben Elliston <bje@redhat.com>
2157 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2158 with `cgen_cpu_open'; documentation had become out of date.
2159 * doc/rtl.texi (Instruction operands): Likewise.
2161 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
2163 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2164 various-base-length instruction sets.
2166 2001-04-02 Ben Elliston <bje@redhat.com>
2168 * sid-cpu.scm (-last-insn): New function.
2169 (-gen-sem-switch-engine): Loop through idesc while less than or
2170 equal to the last instruction enum, not less than the MAX enum.
2171 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2172 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2173 table's size to be the last instruction enum plus one, not
2175 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2176 instruction onto the instruction list.
2178 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2179 using the size of the table and its elements.
2180 (-gen-decode-insn-globals): Define the idesc table's size to be
2181 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2182 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2183 last instruction enum plus one, not @CPU@_INSN_MAX.
2185 2001-03-28 Ben Elliston <bje@redhat.com>
2187 * doc/version.texi (UPDATED, EDITION): Update.
2188 * doc/stamp-vti: Likewise.
2190 2001-03-26 Ben Elliston <bje@redhat.com>
2192 * doc/credits.texi (Credits): Update.
2194 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2195 specified prefix and, if necessary, escape `$' in gas-build.sh to
2196 prevent unwanted shell variable expansion.
2198 2001-03-24 Ben Elliston <bje@redhat.com>
2200 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2201 (<keyword>,test-data): Likewise.
2202 (<hw-address>,test-data): Likewise.
2203 (<hw-iaddress>,test-data): Likewise.
2204 (-collate-test-set): New function.
2205 (build-test-set): Use it.
2206 (gen-gas-test): Generate five test cases per instruction.
2207 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2209 * read.scm: Load "slib/random" if random is not defined.
2210 * slib/random.scm: New file.
2212 * utils.scm: Remove comments about the Hobbit compiler.
2213 (copyright-cygnus): Add 2001.
2214 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2215 (package-gnu-simulators): Tidy.
2217 2001-03-23 Ben Elliston <bje@redhat.com>
2219 * cgen-gas.scm: Inline documentation improvements.
2221 2001-03-21 Ben Elliston <bje@redhat.com>
2223 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2224 given in a syntax string is undefined.
2226 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2227 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2229 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
2231 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2232 for arg_type CGEN_CPU_OPEN_BFDMACH.
2234 2001-03-20 Ben Elliston <bje@redhat.com>
2236 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2237 instruction onto the instruction list. Define MAX_INSNS to be the
2238 value of the last instruction enum plus one.
2240 2001-03-14 Nick Clifton <nickc@redhat.com>
2242 * utils.scm (copyright-fsf): Add 2001. Remove (C).
2244 2001-03-05 Dave Brolley <brolley@redhat.com>
2246 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2247 if the number of ifields is greater than zero.
2249 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
2251 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2252 Emit LIKELY/UNLIKELY branch probability hints.
2253 * sid-decode.cpu (-gen-record-args): Ditto.
2255 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
2257 * desc-cpu.scm (-gen-hash-defines): Rename
2258 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2260 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
2262 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2264 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2265 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2267 * sid.scm (<operand> gen-write): Use unsigned long long expression
2269 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2270 (<unit> gen-profile-code): Ditto.
2272 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
2274 * doc/rtl.texi (Expressions): Document the (index-of ...) and
2277 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2279 * operand.scm (<operand> pretty-sem-name): New field.
2280 (<operand> make): Initialize it from hw-name.
2281 (op:set-pretty-sem-name!): New function.
2282 (<operand> gen-pretty-name): Default to fetching new field.
2283 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
2284 sem-name setting from -rtx-hw-name.
2286 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2288 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2289 its subsequent gen-pretty-name.
2291 * read.scm: Increase thread working stack limit and backtrace
2294 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2296 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2298 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
2300 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2301 current insn plus 4.
2302 (h-delay-insn): New hardware register.
2303 (l-jal): Uses h-delay-insn instead of pc when setting link register.
2307 * openrisc.opc (parse_hi16): Sign extend value.
2308 (parse_lo16): Likewise.
2310 2001-01-06 Ben Elliston <bje@redhat.com>
2312 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2313 instead of @cpu@ and @CPU@ to generically prefix symbol names.
2314 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2315 (-gen-semantic-fn-table): Likewise.
2316 (-gen-scache-semantic-fn): Likewise.
2317 (-gen-no-scache-semantic-fn): Likewise.
2318 (cgen-read.c): Likewise.
2319 (cgen-sem-switch.c): Likewise.
2320 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2321 is a filename prefix.
2322 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
2323 (-gen-decode-insn-globals): Likewise.
2324 (-gen-idesc-decls): Likewise.
2325 (cgen-decode.h): Likewise.
2326 (cgen-decode.c): Likewise.
2327 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
2328 (gen-cpu-insn-enum): Likewise.
2329 (sim-finish!): Likewise.
2331 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
2333 * openrisc.cpu: New file.
2334 * openrisc.opc: Likewise.
2336 2000-12-12 Ben Elliston <bje@redhat.com>
2338 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
2340 2000-12-07 Ben Elliston <bje@redhat.com>
2342 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
2343 "insn" when there are zero ifields to extract.
2345 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
2347 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
2348 used by simple/non-scache simulators.
2349 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
2350 regardless of with-scache?.
2351 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
2353 2000-12-03 Ben Elliston <bje@redhat.com>
2355 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
2356 (cgen-desc.c): Likewise.
2358 2000-12-01 Greg McGary <greg@mcgary.org>
2360 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
2362 2000-12-01 Ben Elliston <bje@redhat.com>
2364 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
2365 definitions if run without with-multipla-isa?.
2366 (cgen-defs.h): New function. Emit an ISA-specific defs file.
2367 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
2369 2000-11-24 Ben Elliston <bje@redhat.com>
2371 * sim-cpu.scm (-gen-hardware-struct): New function.
2372 (-gen-hardware-types): If with-multiple-isa is specified, emit all
2373 hardware elements wich have share one or more ISAs with the ISAs
2376 * sim.scm (-with-multiple-isa?): New symbol.
2377 (with-multiple-isa?): New function.
2378 (option-init!): Initialise -with-multiple-isa?.
2379 (option-set!): Handle with-multiple-isa option.
2381 2000-11-21 Ben Elliston <bje@redhat.com>
2383 * utils.scm (copyright-fsf): Add the year 2000.
2385 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
2387 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
2388 unneeded "\n\n" from F() macro definition.
2390 2000-11-15 Greg McGary <greg@mcgary.org>
2392 * utils-cgen.scm (gen-define-with-symcat): New function.
2393 * desc-cpu.scm (gen-ifld-defns): Use it.
2394 (gen-hw-table-defns): Use it.
2395 (-gen-hash-defines): Use it.
2396 (gen-operand-table): Use it.
2397 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
2398 * opc-itab.scm (-gen-ifmt-table): Use it.
2399 (-gen-insn-opcode-table): Use it.
2400 (-gen-macro-insn-table): Use it.
2401 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
2402 * sim-cpu.scm (cgen-semantics.c): Use it.
2403 (cgen-sem-switch.c): Use it.
2405 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2407 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
2408 request to emit calls to insn extractors as functions rather than
2409 branches to inline blocks.
2410 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
2411 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
2413 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
2414 to extractor clauses.
2416 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2418 * decode.scm (-distinguishing-bit-population): Significantly
2419 improve popularity heuristic. Renamed from
2420 (-mask-bit-population): Gone.
2421 (-population-above-threshold): Sort new bit numbers in order of
2423 (-population-top-few): Allow up to three more bits to be selected
2424 than requested. Correct selection order to prefer better bits.
2425 Correct bug in fewer-than-requested case. Keep threshold as
2427 (decode-best-get-bits): Pass also the insn-values.
2429 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
2430 future optimization.
2432 * utils.scm (message): Format nested lists better.
2434 2000-11-09 Doug Evans <dje@casey.transmeta.com>
2436 * dev.scm: Add srcdir to %load-path.
2438 * rtx-funcs.scm (subword): Mode of argument can be different
2439 than mode of result, so don't use OP0 to specify argument's mode.
2441 2000-11-02 Ben Elliston <bje@redhat.com>
2443 * doc/porting.texi (Building a GAS test suite): Document my change
2446 2000-11-01 Ben Elliston <bje@redhat.com>
2448 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
2450 2000-10-31 Ben Elliston <bje@redhat.com>
2452 * gas-test.scm (cgen-build.sh): Allow the generated script to run
2453 with no command line arguments if the gas build directory can be
2456 2000-10-26 Doug Evans <dje@casey.transmeta.com>
2458 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
2459 op-ifld -> op-ifield.
2461 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
2463 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
2465 2000-10-13 matthew green <mrg@cygnus.com>
2467 * utils-cgen.scm (get-ifetch): Move from here ...
2468 * sim.scm (get-ifetch): ... to here.
2469 * sid.scm (get-ifetch): Copy and port to c++.
2471 2000-10-06 Dave Brolley <brolley@redhat.com>
2473 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
2474 ifld-start + ifld-word-offset.
2475 (gen-ifld-extract): Check adata-integral-insn? before checking whether
2476 the field is beyond the base number of bits.
2477 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
2478 (gen-extract-ifields): Ditto.
2479 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
2480 characters in the regular expression.
2482 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
2484 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
2485 preprocessor constant.
2487 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
2489 * slib/logical.scm: New file from slib. Provides robust bitwise
2490 logical operations for large integers.
2491 * read.scm: maybe-load it.
2493 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
2495 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
2496 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
2497 single-isa predicate, but support keep-isa filtering.
2499 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2501 * rtl-c.scm (s-sequence): Handle nested c-calls in both
2502 statement-expression and comma-expression contexts.
2503 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
2505 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2507 * decode.scm (-population-top-few): Signal error gracefully if
2508 decoding is about to become ambiguous.
2510 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2512 * doc/rtl.texi (decode-assist): Describe this field as optional.
2514 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2516 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
2519 2000-09-05 Dave Brolley <brolley@redhat.com>
2521 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
2522 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
2524 2000-08-29 Dave Brolley <brolley@redhat.com>
2526 * utils-gen.scm (gen-ifld-extract): Pass total-len if
2527 adata-integral-insn is true for this architecture.
2529 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
2531 * hardware.scm (<hw-immediate> get-index-mode): Define method.
2532 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
2533 * rtl-c.scm (-c-rtl-get): Improve an error message.
2534 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
2536 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
2538 * Makefile.in (DIST_COMMON): Regenerated.
2539 * ifield.scm (<derived-ifield> needed-iflds): New method.
2540 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
2541 sfmts built from <derived-ifield>s.
2542 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
2543 type symbol 'derived-ifield, not an unparseable string.
2544 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
2545 (-sfmt-contents): Add tracing.
2547 From Doug Evans <dje@transmeta.com>:
2548 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
2551 2000-08-20 Doug Evans <dje@casey.transmeta.com>
2553 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
2554 (rtl-c-expr-parsed,rtl-c-expr): New fns.
2555 (-rtl-c-get): Rename from rtl-c-get.
2556 (rtl-c-get): New fn for getter logging.
2558 2000-07-28 Ben Elliston <bje@redhat.com>
2562 2000-07-25 Ben Elliston <bje@redhat.com>
2564 * doc/credits.texi (Credits): Add Frank Eigler.
2566 2000-07-24 Dave Brolley <brolley@redhat.com>
2568 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
2570 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
2571 (<keyword>): Initialize all elements fully.
2572 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
2574 (-gen-mach-table-defns): Ditto.
2575 (-gen-ifld-defns): Ditto.
2576 (-gen-operand-table): Ditto.
2577 (-gen-insn-table): Ditto.
2578 (-gen-cpu-open): Nothing to do for the mach table.
2580 2000-07-13 Ben Elliston <bje@redhat.com>
2582 * doc/version.texi (UPDATED): Update.
2584 2000-07-05 Ben Elliston <bje@redhat.com>
2586 * configure.in (AC_PATH_PROG): Remove.
2587 * configure: Regenerate.
2588 * Makefile.am (GUILE): Locate guile dynamically.
2589 * Makefile.in: Regenerate.
2590 * doc/Makefile.in: Likewise.
2592 2000-07-03 Ben Elliston <bje@redhat.com>
2594 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
2595 * opc-itab.scm (cgen-opc.c): Likewise.
2597 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
2599 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
2600 guile 1.4 compatibility.
2601 (rtx-env-dump): Comment out buggy display calls.
2603 2000-06-15 matthew green <mrg@redhat.com>
2605 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
2607 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
2609 * Makefile.in: Regenerated.
2611 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
2612 (gen-ifld-defns): Ditto.
2613 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
2614 * rtl.c (rtl-finish!): Ditto.
2615 * opc-itab.scm (-gen-ifield-decls): Ditto.
2616 * opcodes.scm (gen-switch): Exclude derived operands.
2617 * operand.scm (op-iflds-used): Expand derived operands.
2618 (hw-index-derived): New dummy function to create dummy object.
2619 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
2620 constructor. Set object's hw-name and index fields.
2621 (-anyof-merge-subchoices): Set instance object's index also.
2622 (-anyof-name): New helper function.
2623 (anyof-merge-semantics): Correct replacement of operand names in
2625 (op-ifield): Tolerate derived-operands and their funny indices better.
2626 * ifield.scm (ifld-known-values): Expand derived ifields.
2627 (non-multi-ifields, non-derived-ifields): New utility functions.
2628 (ifld-decode-mode): Tolerate objects with unbound decode field.
2629 * iformat.scm (compute-insn-length): Expand derived ifields.
2630 (compute-insn-base-mask): Ditto.
2631 * insn.scm (insn-base-ifields): Remove.
2632 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
2633 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
2634 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
2635 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
2636 (-frag-test-data): Ditto.
2637 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
2638 (-gen-sem-switch-engine); Ditto.
2639 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
2640 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
2641 (-gen-record-args): Tolerate unbound op-ifield.
2642 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
2643 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
2644 Exclude multi-insns.
2645 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
2646 * utils-sim.scm (op-extract?): Handle derived operands.
2648 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
2649 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
2650 * hardware.scm (hardware-for-mode): New function.
2652 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
2653 cleaning up decode tables.
2654 (mask-superset?): Little helper function for above.
2655 * decode.scm (-build-decode-table-entry): Call it.
2656 (-opcode-slots): Add some more tracing.
2657 * arm.cpu: Disable decode-splits construct due to implementation
2658 conflict with `filter-harmlessly-ambiguous-insns'
2660 * decode.scm (-population-top-few): New function for better decode
2661 bit generation. Includes minor helper functions.
2662 (decode-get-best-bits): Call it instead.
2663 (OLDdecode-get-best-bits): Renamed previous version of above.
2666 2000-06-13 Ben Elliston <bje@redhat.com>
2668 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
2669 for the Guile library directory.
2670 * configure: Regenerate.
2671 * Makefile.in, doc/Makefile.in: Regenerate.
2673 * Makefile.in, doc/Makefile.in: Regenerate.
2674 * configure.in: Remove unnecessary tests. Move to version 1.0.
2675 * acconfig.h, config.in: Remove.
2676 * configure, aclocal.m4: Regenerate.
2677 * doc/stamp-vti, doc/version.texi: Likewise.
2678 * AUTHORS: New file.
2680 2000-06-07 Ben Elliston <bje@redhat.com>
2682 * fixup.scm (symbol-bound?): Reduce debugging output.
2684 2000-06-02 matthew green <mrg@redhat.com>
2686 * insn.scm (insn-base-ifields): Returns all the instruction fields for
2687 a given instruction, replacing derived fields with their subfields.
2688 (insn-value): Use `insn-base-ifields' to find all constant values.
2689 (multi-insn-instantiate!): Comment some debug messages.
2691 2000-06-01 Ben Elliston <bje@redhat.com>
2693 * doc/rtl.texi (Expressions): Document a hazard with the choice of
2694 symbol names used in a (c-call ..) rtx.
2696 * sim-test.scm (build-test-set): Return (()) for an instruction
2697 with no operands, so it too is included in the generated test set.
2699 2000-05-31 Ben Elliston <bje@redhat.com>
2701 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
2702 (sim-test): Likewise.
2703 * Makefile.in: Regenerate.
2705 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
2707 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
2708 stack traceback, in an order that resembles gdb's `bt'.
2710 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
2712 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
2713 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
2714 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
2716 * ifield.scm (multi-ifield): Define workable field-mask and field-value
2718 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
2719 * iformat.scm (ifmt-expanded-ifields): Gone.
2720 (ifields-base-ifields): New function. Call ifld-base-ifields for real
2722 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
2725 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
2728 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
2730 * sid.scm (with-any-profile?): New function clone.
2732 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
2734 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
2736 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
2738 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
2739 (-multi-ifield-read): Parse them.
2740 (define-full-multi-ifield): Pass #f/#f as defaults for them.
2741 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
2742 (multi-ifield gen-extract): Add decode hook.
2743 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
2745 * insn.scm (syntax-break-out): More correctly handle \-escaped
2747 (syntax-make-elements): Ditto.
2748 * opc-itab.scm (compute-syntax): Ditto.
2750 2000-05-17 Ben Elliston <bje@redhat.com>
2752 * gas-test.scm (cgen-build.sh): Log the correct script filename.
2754 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
2756 * gas-test.scm (build-test-set): Return (()) for an instruction
2757 with no operands, so it too is included in the generated test set.
2759 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
2761 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
2762 IFMT_OPERANDS and SYNTAX_BYTES.
2764 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
2766 * sim.scm (with-any-profile?): New function.
2767 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
2768 to decide whether or not to include profiling counters.
2770 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
2772 Fuller derived-operand support for opcodes.
2773 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
2774 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
2775 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
2776 (gen-operand-table): Omit derived- and anyof- operands from table.
2777 (gen-insn-table): Omit multi-insns from table.
2778 * iformat.scm (ifmt-expanded-fields): New function to expand
2779 subfields of derived-ifields.
2780 (ifmt-compute!): Ignore remaining multi-insns.
2781 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
2783 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
2784 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
2785 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
2786 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
2787 (gen-switch): Omit anyof-operands.
2788 * operand.scm (-anyof-syntax): New function.
2789 (-anyof-merge-syntax): Call it.
2790 * utils.scm (collect): New idiomatic function.
2792 2000-05-10 Ben Elliston <bje@redhat.com>
2794 * m68k.cpu: New file (work in progress).
2796 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
2798 * Makefile.am (all-local): New target. Create stamp-cgen.
2799 * Makefile.in: Regenerated.
2800 * doc/Makefile.in: Regenerated.
2802 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
2804 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
2805 (-operand-parse-setter): Ditto.
2806 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
2807 for CACHE-ADDR operands.
2808 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
2809 trace entries. Widen byte-wide values for printing.
2810 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
2811 Widen byte-wide values for printing. Hexify memory addresses.
2813 2000-04-23 matthew green <mrg@redhat.com>
2815 * m32r.cpu: Fix a typo.
2817 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
2819 * ia64.cpu (define-model): Change merced to Itanium.
2820 (f-qp): Change quilifying to qualifying.
2821 (movbr_ph, movbr_pvec): Delete.
2822 (I-I21): Delete uses of movbr_ph and movbr_pvec.
2824 2000-04-07 Ben Elliston <bje@redhat.com>
2826 * doc/porting.texi (Building a simulator test suite): Clarify
2827 where generated test cases are placed.
2829 2000-04-07 Ben Elliston <bje@redhat.com>
2831 * Makefile.am (gas-test): Remove dependency on `cgen'.
2833 * Makefile.in: Regenerate.
2835 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
2837 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
2838 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
2839 type reconfiguration.
2840 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
2843 2000-03-30 Ben Elliston <bje@redhat.com>
2845 * doc/rtl.texi (Enumerated constants): Add concept index entries.
2847 2000-03-24 Ben Elliston <bje@redhat.com>
2849 * Makefile.am (stamp-cgen): Reinstate target.
2850 * Makefile.in: Regenerate.
2852 2000-03-22 Ben Elliston <bje@redhat.com>
2854 * slib/ppfile.scm: Remove; unused.
2855 * slib/defmacex.scm: Likewise.
2857 2000-03-21 Ben Elliston <bje@redhat.com>
2859 * doc/internals.texi (Source file overview): Document.
2861 * Makefile.am (GUILEDIR): Remove.
2862 (CGEN): Ditto. Callers use $(GUILE) instead.
2863 (GUILEFLAGS): Ditto.
2865 (APPDESCFILES): Ditto.
2866 (OPCODESFILES): Ditto.
2868 (pkgdata_SCRIPTS): Ditto.
2869 (stamp-cgen): Remove target.
2870 * Makefile.in: Regenerate.
2872 * configure.in: Remove header and library tests.
2873 * configure: Regenerate.
2874 * config.in: Likewise.
2876 2000-03-20 Ben Elliston <bje@redhat.com>
2878 * read.scm: Cease loading "hob-sup.scm".
2879 * utils.scm: Inherit the fastcall family of procedures (for now).
2880 * hob-sup.scm: Remove.
2882 2000-03-20 Ben Elliston <bje@redhat.com>
2884 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
2885 * configure: Regenerate.
2886 * gdbinit.in: Remove.
2888 2000-03-17 Ben Elliston <bje@redhat.com>
2890 * Makefile.am (CGEN): Use guile, not cgen.
2891 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
2892 (bin_PROGRAMS, cgen_SOURCES): Likewise.
2893 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
2894 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
2895 (HOB_OBJS): Likewise.
2896 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
2897 (CGENOBJS): Likewise.
2898 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
2899 (hobbit, hobbit.o, hobbit.c): Remove targets.
2900 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
2901 (CLEANFILES): Update.
2902 * acconfig.h (WITH_HOBBIT): Remove.
2903 * configure.in: Do not test for 3 arg scm_make_vector. Remove
2904 option --with-cgen-hobbit.
2905 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
2906 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
2907 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
2908 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
2909 * Makefile.in: Regenerate.
2910 * config.in: Likewise.
2911 * aclocal.m4: Likewise.
2912 * configure: Likewise.
2913 * README (Hobbit support): Remove.
2914 * doc/internals.texi (Conventions): Do not mention Hobbit.
2915 * doc/porting.texi (Supported Guile versions): Likewise.
2917 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
2919 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
2920 callback convention to new sid sidutil::basic_cpu code.
2921 (-gen-sfrag-engine-fn): Ditto.
2922 * sid.scm (-create-virtual-insns!): Ditto.
2923 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
2925 (cxmake-skip): Implement properly for pbb mode.
2927 2000-03-03 Ben Elliston <bje@redhat.com>
2929 * doc/internals.texi: New file.
2931 2000-02-29 Ben Elliston <bje@redhat.com>
2933 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
2934 * doc/porting.texi: Formatting tweaks.
2936 2000-02-25 Nick Clifton <nickc@cygnus.com>
2938 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
2941 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
2943 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
2946 2000-02-23 Andrew Haley <aph@cygnus.com>
2948 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
2951 2000-02-24 Ben Elliston <bje@redhat.com>
2953 * doc/rtl.texi (Derived operands): Add some cindex entries.
2955 2000-02-23 Ben Elliston <bje@redhat.com>
2957 * ia32.cpu (dndo): Move general purpose macro from here ..
2958 * simplify.inc (dndo): .. to here.
2960 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
2962 * arm.cpu (h-tbit): Add c-call setter function.
2965 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
2967 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
2968 (-frag-cost-compute!): Ditto.
2969 * utils.scm (copyright-cygnus): Add Y2K.
2970 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
2972 2000-01-25 Nick Clifton <nickc@cygnus.com>
2974 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
2975 flags field of the CGEN_CPU_TABLE structure.
2977 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
2979 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
2980 All references updated.
2982 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
2984 * ia32.cpu: Rewrite addressing mode support.
2986 * ifield.scm (<ifield>): New member `follows'.
2987 (ifld-known-values): New proc.
2988 (<ifield>): New method set-word-offset!.
2989 (ifld-set-word-offset!): New proc.
2990 (ifld-new-word-offset): New proc.
2991 (<ifield>): New method next-word.
2992 (<multi-ifield>): New method next-word.
2993 (ifld-next-word): New proc.
2994 (ifld-precedes?): New proc.
2995 (-ifield-parse): New args word-offset,word-length,follows.
2996 All callers updated. Handle CISC-style vs RISC-style ifields.
2997 (-ifield-read): Recognize word-offset,word-length,follows specs.
2998 (-ifld-parse-follows): New proc.
2999 (-multi-ifield-make-default-insert): New proc.
3000 (-multi-ifield-make-default-extract): New proc.
3001 (-multi-ifield-parse): Provide default values for insert,extract
3002 handlers if not specified.
3003 (<derived-ifield>): New class.
3004 (derived-ifield?): New predicate.
3005 (ifld-derived-operand?): New predicate.
3006 (f-anyof): New global.
3007 (ifld-anyof?,ifld-anyof-operand?): New predicates.
3008 (f-derived,ifld-derived?): Delete.
3009 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
3010 * insn.scm (-sub-insn-ifields): New proc.
3011 (-sub-insn-make!): New proc.
3012 (multi-insn-instantiate!): Provide initial implementation.
3013 (-insn-parse): If insn contains "anyof" operands, create a
3014 <multi-insn> object instead of a plain <insn>.
3015 (-parse-insn-format-symbol): Rewrite derived operand handling.
3016 Add anyof operand handling.
3017 (-parse-insn-format-ifield-spec): Rewrite.
3018 (-parse-insn-format-operand-spec): Delete.
3019 (-parse-insn-format-list): Delete support for `(operand value)'.
3020 (anyof-operand-format?): Replaces derived-operand-format?.
3021 * operand.scm (-operand-parse-getter): Improve error messages.
3022 (-operand-parse-setter): Ditto.
3023 (<derived-operand>): New members args,syntax,base-ifield,encoding,
3025 (<anyof-operand>): Change baseclass from <derived-operand> to
3026 <operand>. Delete member values. New members base-ifield,choices.
3027 (anyof-operand?): New predicate.
3028 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3029 (-derived-operand-parse): Rewrite.
3030 (-derived-operand-read): Rewrite.
3031 (-anyof-parse-choice): New proc.
3032 (-anyof-operand-parse): Rewrite.
3033 (-anyof-operand-read,define-anyof-operand): New procs.
3034 (<anyof-value>): Rewrite.
3035 (-anyof-initial-known): New proc.
3036 (anyof-satisfies-assertions?): New proc.
3037 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3038 (-anyof-merge-getter,-anyof-merge-setter): New procs.
3039 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3040 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3041 (-anyof-value-from-derived): New proc.
3042 (-anyof-all-choices-1,anyof-all-choices): New procs.
3043 (operand-init!): Create define-anyof-operand reader command.
3045 * insn (syntax-break-out): Take syntax as argument instead of insn.
3046 All callers updated.
3047 (syntax-make): Move here, from ???.
3049 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3050 bitrange-foo. All uses updated.
3051 (bitrange-next-word): New proc.
3053 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3055 * rtl.scm (rtx-canonicalize): Provide initial implementation.
3056 (rtx-make-const,rtx-make-enum): New procs.
3057 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
3058 (rtx-mem-addr,rtx-mem-sel): New procs.
3059 (rtx-change-address): New proc.
3060 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3061 (rtx-make-set,rtx-single-set?): New procs.
3062 (rtx-combine): New proc.
3064 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
3065 (rtx-traverse-with-locals): Ditto.
3066 (-rtx-traverse,-rtx-traverse-*): Ditto.
3068 * rtl.scm (define-subr): New proc.
3069 (rtl-init!): Create reader command `define-subr'.
3071 * cos.c (_object_mi_p): Ensure argument is an object.
3072 (indent): New function.
3073 (_object_print_elms): Add pretty-printing support.
3074 (_object_print): Ditto.
3076 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3077 (*floats-s->c-fun-table*): Ditto.
3078 * hobbit.c,hobbit.h: Rebuild.
3079 * hob-sup.c (fastcall7): New proc.
3080 * hob-sup.h (fastcall7): Declare.
3081 * hob-sup.scm (fastcall7): New macro.
3083 * mach.scm (<arch>): New member subr-list.
3084 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3085 (arch-finish!): Reverse recorded subr list.
3087 * read.scm (debug-env): New global.
3088 (debug-var-names,debug-var,debug-repl-env): New procs.
3089 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
3090 (debug-quit): Renamed from `continue'.
3092 * simplify.inc (dsmf): New pmacro.
3094 * utils.scm (plus-scan): New proc.
3095 (split-bits): Rewrite.
3096 (split-value): New proc.
3098 1999-10-13 Doug Evans <devans@casey.cygnus.com>
3100 * doc/Makefile.am (DOCFILES): Add notes.texi.
3101 * doc/Makefile.in: Rebuild.
3103 1999-10-11 Doug Evans <devans@casey.cygnus.com>
3105 * ifield.scm (ifld-derived?): New proc.
3106 (f-derived): New global.
3107 (ifield-builtin!): Create ifield f-derived.
3108 (<multi-insn>): New class.
3109 (multi-insn?): New predicate.
3110 (multi-insn-instantiate!): New proc.
3111 (-insn-parse): Create <multi-insn> objects for insns with derived
3113 (-parse-insn-format-symbol): Handle derived ifields.
3114 (-parse-insn-format-ifield-spec): New proc.
3115 (-parse-insn-format-operand-spec): New proc.
3116 (-parse-insn-format-list): Simplify.
3117 (-parse-insn-format): No longer allow (ifield-object value) spec.
3118 (derived-operand-format?): New proc.
3119 (insn-alias?): New proc.
3120 (non-alias-insns): Rewrite.
3121 (insn-real?): Renamed from real-insn?, all callers updated.
3122 (virutal-insns): Rewrite.
3123 (multi-insns): New proc.
3124 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3125 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3126 Return #f if operand doesn't have an index or if index is not an
3128 (hw-index-anyof): New proc.
3129 (-operand-parse): Allow integer indices.
3130 (<derived-operand>): New class.
3131 (derived-operand?): New predicate.
3132 (<anyof-operand>): New class.
3133 (<anyof-value>): New class.
3134 (-anyof-parse-value,-anyof-operand-parse): New procs.
3135 (-derived-operand-parse,-derived-operand-read): New procs.
3136 (define-derived-operand,define-full-derived-operand): New procs.
3137 (operand-init!): New reader command define-derived-operand.
3139 * utils.scm (list-take): Handle negative amount.
3140 (element?): Rewrite.
3142 1999-10-10 Doug Evans <devans@casey.cygnus.com>
3144 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3146 1999-10-04 Richard Henderson <rth@cygnus.com>
3148 * ia64.cpu: Checkpoint.
3150 1999-09-29 Doug Evans <devans@casey.cygnus.com>
3152 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3154 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
3155 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
3157 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
3159 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3160 PC returned by sim_engine_invalid_insn.
3162 1999-09-28 Doug Evans <devans@casey.cygnus.com>
3164 * ia32.cpu: New file.
3166 1999-09-25 Doug Evans <devans@casey.cygnus.com>
3168 * utils.scm (bit-set?): Fix off by one error.
3170 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3172 * rtl.scm (hw): Check for valid hardware element before trying to
3175 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
3176 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3177 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3178 * thumb.cpu (*): arm_compute_operand2_foo renamed to
3179 compute_operand2_foo.
3181 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3182 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3183 Call delayed_branch/branch methods instead of assigning to `vpc'.
3184 (<hw-pc>,cxmake-skip): Call skip method.
3185 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3186 (<pc>,cxmake-skip): Ditto.
3187 (-create-virtual-insns!): Ditto.
3188 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3190 (op:record-profile): Specify #:output-language "c++".
3191 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3193 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3195 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3196 (gen-semantic-code): Ditto.
3197 (-gen-sem-case,-gen-sfrag-code): Ditto.
3198 (-gen-hardware-types): Delete class @cpu@_cpu_base.
3199 (cgen-cpu.h): File is now #included by main cpu class, rather than
3201 (cgen-defs.h): New proc.
3202 (-gen-scache-semantic-fn): Change result type to sem_status.
3203 New local `status'. Call done_cti_insn/done_insn method at end.
3204 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3206 (cgen-sem-switch.cxx): Ditto.
3207 * sid-decode.scm (-gen-idesc-decls): Update return type of
3209 (cgen-decode.h): Add using namespace @arch@.
3210 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3212 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3213 (estate-output-language-c?,estate-output-language-c++?): New procs.
3214 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3215 (estate-make-for-normal-rtl-c++): New proc.
3216 (rtl-c++-parsed,rtl-c++): New proc.
3217 (s-c-call): Invoke cpu class method if c++.
3218 (join): Use s-c-raw-call.
3220 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3223 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3224 * rtl.scm (<eval-state>): New member `modifiers'.
3225 (<eval-state>,vmake!): Handle #:modifiers.
3226 (estate-with-modifiers): New proc.
3228 * rtl.scm (rtx-side-effects?): New proc.
3229 (rtx-canonical-bool): Don't change expr if it has side effects.
3230 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3233 1999-09-23 Doug Evans <devans@casey.cygnus.com>
3235 * sim.scm (gen-scache-type): Fix typo in last patch.
3237 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
3239 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3241 1999-09-05 Doug Evans <devans@casey.cygnus.com>
3243 * sid.scm (<hw-pc>,cxmake-skip): New method.
3244 (<pc>,cxmake-skip): New method.
3246 * decode.scm (decode-build-table): Delete args startbit,index-list.
3247 All callers updated.
3248 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3249 All callers updated.
3250 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3251 to decode-get-best-bits.
3252 * sid-decode.scm (-gen-decode-fn): Ditto.
3254 * hardware.scm (hw-bits): New proc.
3255 (-hw-parse): New arg layout. All callers updated.
3256 (define-full-hardware): New arg layout. All callers updated.
3257 (-hw-validate-layout): New proc.
3258 (-hw-create-[gs]etter-from-layout): New procs.
3259 (<hw-register>,parse!): Handle layout spec.
3260 * types.scm (type-bits): New proc.
3262 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3263 UNARY, BINARY, TRINARY rtxs.
3265 * attr.scm (<enum-attribute>,parse-value): Allow strings.
3266 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3267 Support '- as "unused spot" indicator.
3269 1999-09-03 Doug Evans <devans@casey.cygnus.com>
3271 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3273 1999-09-02 Doug Evans <devans@casey.cygnus.com>
3275 * rtx-funcs.scm (subword): Fix mode spec of `value'.
3277 * rtl.scm (-rtx-traverse-operands): Fix debugging message
3279 (tstate-make): New arg `depth'. All callers updated.
3280 (tstate-depth,tstate-set-depth!): New procs.
3281 (tstate-incr-depth!,tstate-decr-depth!): New procs.
3282 (-rtx-traverse-operands): Indent debugging output by traversal depth.
3283 (-rtx-traverse): Ditto. Keep track of traversal depth.
3285 1999-09-01 Doug Evans <devans@casey.cygnus.com>
3287 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3288 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3289 * utils-sim.scm: Decoder generator support moved here.
3290 (-decode-equiv-entries?,-decode-sort-entries): New procs.
3291 (-gen-decoder-switch): Sort entries for more fall-throughs.
3293 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3294 * Makefile.in: Rebuild.
3295 * sim-test.scm (build-sim-testcase): Add logging message.
3296 * dev.scm (cload): Recognize SIM-TEST application.
3297 (load-stest): Set APPLICATION to SIM-TEST.
3299 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3301 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3302 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3303 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3305 * insn.scm (syntax-break-out): Handle ${foo}.
3307 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
3309 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3310 (bin_PROGRAMS): Define.
3311 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3312 (cgen-hob.c): Prepend $(srcdir)/ here.
3313 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3314 (libcpu_a_SOURCES): Delete.
3315 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3316 (CGEN_HOB_OBJ,CGENOBJS): New variables.
3317 * configure.in (LIBS): Replace -Wl,-rpath with -R.
3318 Add AC_CHECK_LIB(guile,main).
3319 * Makefile.in: Rebuild.
3320 * doc/Makefile.in: Rebuild.
3321 * aclocal.m4: Rebuild.
3322 * config.in: Rebuild.
3323 * configure: Rebuild.
3325 1999-08-28 Doug Evans <devans@casey.cygnus.com>
3327 Rename rtx functions from name: to name, accept optional leading
3329 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
3330 * attr.scm (-attr-eval): Update.
3331 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
3332 (<hw-register>,mode-ok?): Disallow VOID.
3333 (<hw-immediate>,mode-ok?): Disallow VOID.
3334 (<hw-address>,mode-ok?): Disallow VOID.
3335 * mode.scm (mode-name?): New proc.
3336 (VOID): Renamed from VM.
3337 (DFLT): Renamed from DM.
3338 (mode-builtin!): Update.
3339 * opcodes.scm (<ifield>,gen-insert): Update.
3340 (<ifield>,gen-extract): Update.
3341 (<multi-ifield>,gen-insert,gen-extract): Update.
3342 * operand.scm (op:mode): Update.
3343 (<pc>,make!): Update.
3344 (op:new-mode): Update.
3345 (-operand-read): Update.
3346 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
3347 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
3348 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
3349 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
3350 (rtx-make): Call -rtx-munge-mode&options.
3351 (rtx accessors): Rewrite.
3352 (rtx-pretty-name): Update.
3353 (-rtx-traverse-*): Update.
3354 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
3355 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
3356 (-rtx-make-traverse-table): Update.
3357 (-rtx-traverse-operands): Update.
3358 (-rtx-option?,-rtx-option-list?): New procs.
3359 (-rtx-munge-mode&options): New proc.
3360 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
3361 (-rtx-traverse): Update.
3362 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
3363 (rtx-compile-time-constant?): Update.
3364 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
3365 (rtx-value): Update.
3366 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
3367 * rtx-funcs.scm (*): Update.
3368 * rtl-c.scm (rtl-c-get): Update.
3369 (rtl-c-set-quiet,rtl-c-set-trace): Update.
3370 (s-c-call,s-c-raw-call): Update.
3371 (s-boolifop,s-convop,s-if,s-cond): Update.
3372 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
3373 (-par-replace-set-dests,-par-replace-set-srcs): Update.
3374 (s-parallel,s-sequence): Update.
3375 (rtl-c-build-table): Update.
3376 * sem-frags.scm (-frag-hash-compute!): Update.
3377 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
3378 for temporary bug compatibility with previous version.
3379 (-frag-expr-locals,-frag-expr-stmts): Update.
3380 (-frag-compute-desired-frags,-frag-pick-best): Update.
3381 * semantics.scm (-simplify-expr-fn): Update.
3382 (rtx-simplify): Update.
3383 (-rtx-ref-type): Update. Account for modifiers.
3384 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
3385 (-build-ifield-operand!): Update.
3386 (-build-known-values): Update.
3387 (semantic-compile): Update.
3388 (-gen-reg-access-defns): Update.
3389 (gen-semantic-code,-gen-sem-case): Update.
3390 (-gen-sfrag-code,-gen-sfrag-case): Update.
3391 * sim-cpu (gen-semantic-code): Update.
3392 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
3393 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
3394 (-hw-cxmake-get): Update.
3395 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3396 (<hw-index>,cxmake-get): Update.
3397 (<operand>,gen-type,gen-read,cxmake-get): Update.
3398 (<operand>,gen-set-quiet,gen-set-trace): Update.
3399 (<pc>,cxmake-get): Update.
3400 (sim-finish!): Update.
3401 * utils-gen.scm (-gen-ifld-extract-base): Update.
3402 (-gen-ifld-extract-beyond): Update.
3403 (gen-multi-ifld-extract): Update.
3404 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
3405 * sid.scm (<hw-pc>,gen-write): Update.
3406 (-gen-decode-insn-globals): Update.
3407 (-hw-cxmake-get): Update.
3408 (<hw-register>,cxmake-get-raw): Update.
3409 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3410 (<hw-index>,cxmake-get): Update.
3411 (<operand>,gen-type,gen-read,cxmake-get): Update.
3412 (<operand>,gen-set-quiet,gen-set-trace): Update.
3413 (<pc>,cxmake-get): Update.
3414 (-create-virtual-insns!): Update.
3415 (-decode-split-build-assertion): Update.
3417 * simplify.inc: Update.
3419 1999-08-20 Doug Evans <devans@casey.cygnus.com>
3421 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
3422 Prefix queue function name with sim_ instead of @cpu@_.
3424 * sim.scm (-with-parallel-only?): New global.
3425 (option-init!): Initialize it.
3426 (option-set!): Set it.
3427 (with-parallel-only?): New proc.
3428 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
3429 and writeback markers if with-parallel-only.
3430 (-gen-idesc-init-fn): Update.
3431 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
3434 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
3436 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
3437 with the invalid insn handler.
3439 * utils.scm (list-maybe-ref): New proc.
3441 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
3443 (-mach-parse): Signal error if mach wasn't specified in define-arch.
3445 * i960.cpu (test*-*): Delete `expr' arg.
3446 (test-op,branch-op): Update.
3448 1999-08-09 Doug Evans <devans@casey.cygnus.com>
3450 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
3451 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
3453 (gen-reg-access-defn): Ditto.
3454 (-gen-hw-addr): Rewrite.
3455 (-op-gen-queued-write): Rewrite.
3456 * sim-cpu.scm (-gen-cpu-reg-access-decls):
3457 (-gen-scache-semantic-fn): Handle with-generic-write.
3458 (-gen-no-scache-semantic-fn): Ditto.
3460 1999-08-08 Doug Evans <devans@casey.cygnus.com>
3462 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
3464 * sim.scm (-with-generic-write?): New global.
3465 (option-init!): Initialize it.
3466 (option-set!): Set it.
3467 (with-generic-write?): New proc.
3468 (-gen-hw-addr): New proc.
3469 (-op-gen-queued-write): New proc.
3470 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
3472 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
3474 (-gen-sem-switch): Preserve existing with-parallel? value.
3475 (-gen-sem-parallel-switch): Ditto.
3476 (-gen-write-case): Add /indent support.
3477 (cgen-write.c): Rewrite.
3479 * utils.scm (-current-print-state): New global.
3480 (make-print-state): New proc.
3481 (pstate-indent,pstate-set-indent!): New procs.
3482 (pstate-cmd?,pstate-cmd-do): New procs.
3483 (/indent): New global.
3484 (/indent-set,/indent-add): New procs.
3485 (string-write): Set -current-print-state.
3486 (-string-write): New arg pstate, all callers updated.
3487 Handle print-state commands.
3488 (-string-list-flatten): New proc.
3489 (string-list->string): Use it.
3491 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
3492 (-gen-sem-fn-table-entry): New proc.
3493 (-gen-semantic-fn-table): New proc.
3494 (-gen-scache-semantic-fn): Make fn static.
3495 (-gen-no-scache-semantic-fn): Ditto.
3496 (cgen-semantics.c): Define macro SEM_FN_NAME.
3497 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
3498 FAST,FULL. Update @cpu@_insn_sem contents.
3499 (-gen-semf-fn-name): Delete.
3500 (-gen-sem-fn-decls): Delete.
3501 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
3502 @cpu@_semf_init_idesc_table.
3503 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
3505 (cgen-decode.h): Print sfmt enum.
3506 * sid-decode.scm (-gen-semf-fn-name): Delete.
3507 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
3509 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
3510 (ifmt-compute!): Ditto.
3511 * sim-decode.scm (-gen-decoder-switch): Ditto.
3512 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
3513 (-gen-decoder-switch): Ditto.
3515 * insn.scm (insn-virtual?): New proc.
3517 * enum.scm (gen-enum-decl): Speed up, build string as list and then
3519 * mach.scm (<arch>): attr-list is now a pair of lists.
3520 (current-attr-list): Rewrite.
3521 (current-attr-add!,current-attr-lookup): Rewrite.
3522 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
3524 1999-08-06 Richard Henderson <rth@cygnus.com>
3526 * ia64.cpu: Initial checkpoint.
3528 1999-08-06 Doug Evans <devans@casey.cygnus.com>
3530 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
3531 (pmacros-init!): Update .apply help string.
3533 1999-08-03 Doug Evans <devans@casey.cygnus.com>
3535 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
3536 (<hw-pc>,cxmake-skip): New method.
3537 (<pc>,cxmake-skip): New method.
3538 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
3539 (gen-argbuf-type): New member `skip_count'.
3540 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
3541 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
3543 * utils-sim.scm: New file.
3544 * dev.scm (load-sim): Load it.
3545 (load-sid): Load it.
3546 * cgen-sid.scm: Load it.
3547 * cgen-sim.scm: Load it.
3548 * iformat.scm (<sformat>): New member sbuf, not initialized by
3550 * rtx-funcs.scm (skip): Rewrite.
3551 * rtl-c.scm (skip): Rewrite.
3552 * m32r.cpu (sc,snc): Update `skip' usage.
3553 * mode.scm (mode-real-mode): New proc.
3554 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
3555 Distinguish fragments by the <sformat-abuf> they use.
3556 * sim.scm (gen-profile-index-type): Delete.
3557 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
3558 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3559 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
3560 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
3561 (-gen-argbuf-elm): Rewrite.
3562 (-gen-argbuf-hw-elm): Delete.
3563 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
3565 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
3566 (sim-init!): Initialize them.
3567 (sim-analyze-insns!): Set them.
3568 (current-sbuf-list): New proc.
3569 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
3570 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
3571 * sim-model.scm (-gen-model-insn-fn): Ditto.
3572 * sim-decode.scm (-gen-extract-decls): Delete.
3573 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
3574 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
3576 (<hw-register,gen-extract,gen-trace-extract): Ditto.
3577 (<hw-address,gen-extract,gen-trace-extract): Ditto.
3578 (-gen-op-extract,-gen-op-trace-extract): New procs.
3579 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
3580 gen-sfmt-argvars-foo and rewrite.
3581 (-gen-record-args): Rewrite.
3582 (-gen-extract-case): Tweak.
3583 * sid.scm (gen-profile-index-type): Delete.
3584 (ifield argbuf support): Move to utils-sim.scm.
3585 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3586 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
3587 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
3588 (-sim-sformat-argbuf-list): New global.
3589 (sim-init!): Initialize it.
3590 (sim-analyze-insns!): Set it.
3591 (current-sbuf-list): New proc.
3592 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
3593 (-gen-argbuf-hw-elm): Delete.
3594 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
3596 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
3597 (-gen-extract-decls): Delete.
3598 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
3600 (<hw-register,gen-extract,gen-trace-extract): Ditto.
3601 (<hw-address,gen-extract,gen-trace-extract): Ditto.
3602 (-gen-op-extract,-gen-op-trace-extract): New procs.
3603 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
3604 gen-sfmt-argvars-foo and rewrite.
3605 (-gen-record-args): Rewrite.
3606 (-gen-extract-case): Tweak.
3608 * cgen-gh.c (gh_putc,gh_puts): New functions.
3609 * cgen-gh.h (gh_putc,gh_puts): Declare them.
3610 * cos.c (_object_print_elms,_object_print): Use them.
3611 * hob-sup.c (fastcall_print): Use them.
3612 * configure.in: Check for scm_gen_puts, scm_puts.
3613 * config.in: Rebuild.
3614 * configure: Rebuild.
3615 * aclocal.m4: Rebuild.
3616 * Makefile.in: Rebuild.
3618 * dev.scm (load-opc): Use load instead of maybe-load.
3619 (load-gtest,load-sim,load-stest): Ditto.
3622 1999-07-23 Doug Evans <devans@casey.cygnus.com>
3624 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
3625 up to avoid g++ 'goto crosses initialization' warning.
3626 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
3627 (-gen-sfrag-case): Update use of NEXT_FRAG.
3629 1999-07-22 Doug Evans <devans@casey.cygnus.com>
3631 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
3633 * read.scm: Load sem-frags.scm.
3634 * sem-frags.scm (*): Lots rewritten.
3635 * sid.scm (-with-sem-frags?): New global
3636 (with-sem-frags?): New proc.
3637 (option-init!): Initialize -with-sem-frags?.
3638 (option-set!): Recognize with-sem-frags.
3639 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
3640 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
3642 (-gen-sfrag-engine-decls): New proc.
3643 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
3644 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
3645 (-gen-sfrag-engine): New proc.
3646 (-gen-sem-case): Emit setup-semantics if specified.
3647 (-gen-sem-switch-engine): Update init/use of computed goto label.
3648 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
3650 (-gen-idesc-decls): Replace sem_address with cgoto.
3651 (-gen-scache-decls): Rewrite definition of `execute' member.
3652 * arm.cpu (arm isa): Enable decode-splits.
3653 * arm7.cpu (multiply insns): Rename result to mul-result.
3655 Rename decode-specialize to decode-split.
3656 * decode.scm (*): Update.
3657 * insn.scm (*): Update.
3658 * mach.scm (*): Update.
3659 * sid.scm (*): Update.
3661 1999-07-19 Doug Evans <devans@casey.cygnus.com>
3663 Record objects as a smob.
3664 * cos.c (scm_tc16_object): New static global.
3665 (cos_init): Initialize it.
3666 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
3667 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
3668 (_object_tag): Delete.
3669 (_object_make_smob): New function.
3670 (_object_make_x,_object_make_with_values_x): Rewrite.
3671 (_object_elements,_object_class_desc): Rewrite.
3672 (_object_copy,object_p): Rewrite.
3673 (_object_specialize): Rewrite.
3674 (_object_print_elms,_object_print): New functions.
3675 (object_smob): New static global.
3676 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
3678 * cos.c (_make_x_symbol): New static global.
3679 (object_make): Use it.
3680 (cos_init): Initialize it.
3682 1999-07-15 Doug Evans <devans@casey.cygnus.com>
3684 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
3685 instead to determine whether to use FLD macro.
3686 (<rtl-c-eval-state>): New member ifield-var?.
3687 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
3688 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
3689 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
3691 * rtl.scm (rtx-sequence-assq-locals): New proc.
3693 * cos.scm (-object-error): Don't crash on non-objects.
3695 * Makefile.am (CLEANFILES): Add hobbit.
3696 * Makefile.in: Rebuild.
3698 * rtl-c.scm (s-c-call): Delete unnecessary code.
3700 1999-07-14 Doug Evans <devans@casey.cygnus.com>
3702 * rtl-c.scm (ifield): Always reference value via `FLD'.
3704 * cos.c (elm_bound_p): Return problem SCM boolean values.
3706 * utils-cgen.scm (display-argv): New proc.
3707 * cgen-opc.scm (cgen): Call it.
3708 * cgen-sim.scm (cgen): Ditto.
3709 * cgen-gas.scm (cgen): Ditto.
3710 * cgen-stest.scm (cgen): Ditto.
3711 * cgen-sid.scm (cgen): Ditto.
3713 1999-07-05 Doug Evans <devans@casey.cygnus.com>
3715 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
3716 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
3717 (-gen-extract-switch): Initialize result to 1.
3718 * opcodes.scm (gen-ifield-default-type): New proc.
3719 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
3721 (<hw-index>,gen-insert): Handle non-ifield indices.
3722 (<hw-index>,gen-extract): Ditto.
3723 (<hw-asm>,gen-parse): Ditto.
3724 (<hw-asm>,gen-print): Ditto.
3725 (<keyword>,gen-parse): Ditto.
3726 (<keyword>,gen-print): Ditto.
3727 (<operand>,gen-fget): Ditto.
3728 (<operand>,gen-fset): Ditto.
3730 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
3731 (-gen-hw-index): Ditto.
3732 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
3733 (-gen-hw-index): Ditto.
3735 * sem-frags.scm: New file.
3737 * attr.scm (attr-parse): Add better checking of input.
3739 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
3741 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
3743 * ifield.scm (ifld-nil?): New proc.
3745 * operand.scm (<operand>): New members getter,setter.
3746 (<operand>,make!): New args getter,setter. All uses updated.
3747 (op:getter,op:setter): New procs.
3748 (<hw-index>,field-start): Return 0 for non-ifield indices.
3749 (<hw-index>,field-length): Return 0 for non-ifield indices.
3750 (-operand-parse-getter,-operand-parse-setter): New procs.
3751 (-operand-parse): New args getter,setter. All callers updated.
3752 Always use hw-index-scalar for scalar operands.
3753 (-operand-read): Handle getter,setter.
3754 (define-full-operand): New args getter,setter. All uses updated.
3755 * semantics.scm (-build-ifield-operand!): Update.
3756 (-build-index-of-operand!): Update.
3757 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
3758 * simplify.inc (define-normal-operand): Update.
3760 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
3761 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
3762 (s-binop,s-cmpop,s-convop): Ditto.
3763 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
3764 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
3765 (fcc-tests): New insn-enum.
3766 (fcc-value): Rename from fcc-type.
3767 * sparcfpu.cpu: New file. All fp support moved here.
3769 * rtl.scm (<rtx-func>): New member class.
3770 (rtx-class-*?): New procs.
3771 (def-rtx-node): New arg class. All callers updated.
3772 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
3773 * rtx-funcs.scm (*): Specify class.
3775 * utils-cgen.scm (context-make-reader): New proc.
3777 * utils.scm (assert-fail-msg): New variable.
3779 (list-drop,list-tail-drop): New procs.
3781 1999-06-22 Doug Evans <devans@casey.cygnus.com>
3783 * desc-cpu.scm (-gen-hash-defines): Restore generation of
3784 CGEN_MIN_INSN_SIZE deleted on March 22.
3786 * ifield.scm (<ifield>,needed-iflds): New method.
3787 (<multi-ifield>,needed-iflds): New method.
3788 (ifld-needed-iflds): New proc.
3789 (multi-ifield?): New proc.
3790 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
3791 (-sfmt-search-key): Include insn length in key.
3792 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
3793 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
3794 (-ifmt-lookup-ifmt!): Compute key here.
3795 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
3796 All callers updated.
3797 (ifmt-build): Delete arg desc. New args search-key,iflds.
3798 All callers updated.
3799 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
3800 in-ops,out-ops,sorted-used-iflds. All callers updated.
3801 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
3803 * operand.scm (op-iflds-used): New proc.
3804 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
3806 And from sid.scm,sid-cpu.scm as well.
3807 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
3808 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
3809 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
3810 (gen-extracted-ifld-value): Ditto.
3811 (-extract-chunk-specs): Ditto.
3812 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
3813 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
3814 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
3815 (-extract-insert-subfields): New function.
3816 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
3817 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
3818 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
3819 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
3821 (-gen-no-scache-semantic-fn): Ditto.
3822 (-gen-sem-case): Ditto.
3823 (-gen-read-case): Update calls to gen-define-ifields,
3824 gen-extract-ifields.
3825 * sim-decode.scm (-gen-record-args): Update.
3826 (-gen-sfmt-argvars-assigns): Update.
3827 (-gen-extract-case): Update.
3828 * sim-model.scm (-gen-model-insn-fn): Replace calls to
3829 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
3831 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
3832 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
3833 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
3834 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
3835 gen-define-ifields, gen-extract-ifields.
3836 (-gen-record-args): Update.
3837 (gen-sfmt-argvars-assigns): Update.
3838 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
3839 with gen-define-ifields. Ditto for gen-extract-foo.
3840 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
3841 procs rather than method calls.
3843 1999-06-18 Doug Evans <devans@casey.cygnus.com>
3845 * sid.scm (-create-virtual-insns!): New local `context', pass it
3848 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
3849 (operand name) not (operand object), (local name) not (local object).
3850 (rtx-traverse-with-locals): New proc.
3851 (-compile-expr-fn): New proc.
3852 (rtx-compile): Rewrite.
3853 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
3854 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
3855 (rtl-c-set-trace): Ditto.
3856 (operand define-fn): Recognize operand name argument.
3857 (local define-fn): Recognize sequence temp name argument.
3858 * rtx-funcs.scm (operand): Argument is operand name, not object,
3859 so call current-op-lookup.
3860 (local): Similarily, so call rtx-temp-lookup.
3862 * rtl.scm (rtx-field?): Use rtx-name instead of car.
3863 (rtx-operand?): Ditto.
3864 (rtx-pretty-name): Ditto.
3865 (rtx-local-obj): Flag symbol argument as an error.
3866 (rtx-local-name): New proc.
3867 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
3869 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
3871 * read.scm (debug-repl): Renamed from -debug-repl. All callers
3874 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
3877 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
3878 (*floats-s->c-fun-table*): Ditto.
3879 * hobbit.c,hobbit.h: Rebuild.
3880 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
3881 * semantics.scm (rtx-simplify): Use /fastcall-make.
3883 * iformat.scm (-sfmt-search-key): Don't include memory modes.
3885 * insn.scm (<insn>): Delete members condition, compiled-condition.
3886 (<insn>,make!): Update
3887 (<insn> getters,setters): Update.
3888 (-insn-parse,insn-read,define-full-insn): Update.
3889 * minsn.scm (minsn-make-alias): Update.
3890 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
3891 (ifmt-compute!): Ditto.
3892 * sim.scm (sim-finish!): Update.
3893 * simplify.inc: (define-normal-insn): Update.
3894 * sid-cpu.scm (gen-semantic-code): Update.
3896 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
3897 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
3898 (ifmt-compute!): Ditto.
3900 1999-06-16 Doug Evans <devans@casey.cygnus.com>
3902 * minsn.scm (minsn-compute-iflds): Print better error message for
3905 1999-06-12 Doug Evans <devans@casey.cygnus.com>
3907 * rtl.scm (tstate->estate): Don't copy over expr-fn.
3909 * Makefile.am (HOBFLAGS): New variable.
3910 (cgen-hob.c): Use it.
3912 (libcpu_a_SOURCES): Add hob-sup.c.
3913 (hob-sup.o): New rule.
3914 * Makefile.in: Rebuild.
3915 * cgen.c: #include hob-sup.h.
3916 (cgen_init_c): Call hobbit_init_support.
3917 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
3918 (*special-scm->c-functions*): Add them.
3919 (display-c-expression): Handle *c-symbol*.
3920 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
3921 (*floats-s->c-fun-table*): Ditto.
3922 (normalize): Recognize /fastcall-make.
3923 (normalize-fastcall-make): New proc.
3924 * hobbit.c,hobbit.h: Rebuild.
3925 * hob-sup.scm: New file.
3926 * hob-sup.c: New file.
3927 * hob-sup.h: New file.
3928 * read.scm: Load hob-sup.scm.
3929 * rtl.scm (-rtx-name-list): New variable.
3930 (rtx-name-list): New proc.
3931 (rtx-lookup): Try symbol first.
3932 (def-rtx-node): Add name to -rtx-name-list.
3933 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
3934 (-rtx-traverse-anymode): New proc.
3935 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
3936 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
3937 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
3938 (-rtx-traverse-{symornum,object}): New procs.
3939 (-rtx-make-traverse-table): Rewrite.
3940 (-rtx-traverse-operands): Rewrite arg-types handling.
3941 Handle #f result of traverser.
3942 (-rtx-traverse): Renamed from -rtx-traverse-normal.
3943 Move debug handling here.
3944 (-rtx-traverse-debug): Delete.
3945 (rtl-finish!): Change -rtx-traverse-table into list of handlers
3947 * semantics.scm (semantic-compile:process-expr!): Fix call to
3949 * utils.scm (map1-improper): New proc.
3951 1999-06-08 Doug Evans <devans@casey.cygnus.com>
3953 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
3955 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
3956 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
3957 (<operand>,cxmake-get): Tweak.
3958 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
3960 1999-06-07 Doug Evans <devans@casey.cygnus.com>
3962 * thumb.cpu (dnti): Delete timing spec.
3965 * arm.cpu (arm isa): New fields condition, setup-semantics.
3966 (thumb isa): New field setup-semantics.
3967 (h-gr): Add attribute CACHE-ADDR.
3968 * arm7.cpu (dnai): Delete condition.
3969 (eval-cond): Delete.
3971 * mach.scm (<isa>): New member setup-semantics.
3972 (-isa-parse-setup-semantics): New proc.
3973 (-isa-parse): New arg setup-semantics.
3974 (-isa-read): Recognize setup-semantics.
3976 * sid-cpu.scm (gen-extract-fields): Split into two:
3977 gen-extract-ifields, gen-extract-ifmt-ifields.
3978 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
3979 tracing begin/end messages (done by caller now).
3980 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
3981 tracing begin/end messages (done by x-before,x-after virtual insns).
3982 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
3983 end so don't have to look it up again next time.
3984 * sid-decode.scm (-decode-expr-ifield-values): New proc.
3985 (-decode-expr-ifield-tracking-key): New proc.
3986 (-decode-expr-ifield-tracking): New proc.
3987 (-decode-expr-ifield-values-used): New proc.
3988 (-decode-expr-ifield-mark-used!): New proc.
3989 (-gen-decode-expr-set-itype): New proc.
3990 (-gen-decode-expr-entry): Rewrite.
3991 (-gen-decode-table-entry): New proc.
3992 (-gen-decoder-switch): Use it.
3993 (-gen-virtual-insn-finder): New proc.
3994 (-gen-argbuf-elm): Move here from sid.scm.
3995 (-gen-argbuf-hw-elm): Ditto.
3996 (-gen-argbuf-fields-union): Add entries for chain,before insns.
3997 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
3998 conditional-execution isas.
3999 (-gen-decode-fn): Record conditional-exec ifield.
4000 * sid.scm (-current-pbb-engine?): New global.
4001 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4002 (<ifield>,gen-ifld-extract): New arg `indent'.
4003 (<multi-ifield>,gen-ifld-extract): Ditto.
4004 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
4005 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4006 (-gen-arch-model-decls): Only scan real insns.
4007 (scache-engine-insns,pbb-engine-insns): New procs.
4008 (-create-virtual-insns!): New proc.
4009 (sim-finish!): Call it.
4010 (-decode-specialize-insn?): New proc.
4011 (-decode-specialize-build-assertion): New proc.
4012 (-decode-specialize-insn-1): New proc.
4013 (-decode-specialize-insn): New proc.
4014 (-fill-sim-insn-list!): New proc.
4015 (sim-analyze!): Create copies of insns to be specialized.
4016 * utils-cgen.scm (obj-set-name!): New proc.
4018 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4019 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4021 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
4023 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4024 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4025 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4026 (attr): Rewrite test for insn owner.
4027 (member): New rtx function.
4028 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4029 as separate function.
4030 (rtx-ifield?,rtx-ifield-name): New procs.
4031 (rtx-operand-obj): Rewrite.
4032 (rtx-operand-name): New proc.
4033 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4034 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4035 (tstate-make): New args owner, known. All callers updated.
4036 (tstate-known-lookup): New proc.
4037 (rtx-traverse): New arg owner. All callers updated.
4038 (rtx-make-bool): New proc.
4039 (rtl-find-ifields): Rewrite.
4040 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4041 * semantics.scm: ... here.
4042 (rtx-const-equal,rtx-const-list-equal): New procs.
4043 (-build-known-values): New proc.
4044 (semantic-compile): New arg `insn'. Call rtx-simplify.
4045 (semantic-attrs): Ditto.
4046 * rtx-funcs.scm (member,number-list): New rtx functions.
4048 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4049 Rewrite. Delete arg `all-attrs'. All callers updated.
4050 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
4052 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4054 * decode.scm (subdtable-add): Handle `expr' entries.
4055 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
4056 (exprtable-entry-*): Update.
4057 (exprtable-entry-iflds): New proc.
4058 (exprentry-cost): New proc.
4059 (exprtable-sort,-gen-exprtable-name): New procs.
4060 (exprtable-make): New arg `name'. All callers updated. use vector.
4061 (exprtable-*): Update.
4062 (-build-decode-table-entry): Don't issue collision warning if all are
4063 specialized insns. Sort exprtable entries before building table.
4065 * read.scm (-reader-process-expanded-1): Move pretty printing of
4066 input to logging level 4.
4068 * utils.scm (string-list->string): New proc.
4070 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4072 (insn-read): Delete leading '-' in name. All callers updated.
4073 (real-insn?): New proc.
4074 (real-insns): Rewrite.
4075 (insn-has-ifield?): New proc.
4076 (insn-builtin!): Create insn attribute SPECIALIZED.
4078 * mach.scm (<arch>): Delete member app-data.
4079 (current-raw-insn-list): New proc.
4080 (insn-list-car,insn-list-splice!): New procs.
4081 (<decode-specialize>): New class.
4082 (-isa-parse-decode-specialize): New proc.
4083 (-isa-parse-decode-specializes): New proc.
4084 (<isa>): New members `condition', `decode-specializes'.
4085 (-isa-parse-condition): New proc.
4086 (-isa-parse): New args condition, decode-specializes.
4087 (-isa-read): Recognize condition, decode-specializes.
4088 (-isa-add-decode-specialize!): New proc.
4089 (modify-isa): New proc.
4090 (isa-conditional-exec?,state-conditional-exec?): New procs.
4091 (arch-init!): New reader command `modify-isa'.
4093 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4094 (mode-signed,mode-unsigned?): New procs.
4096 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
4098 * types.scm (<array>): New method get-shape.
4099 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4101 (hw-shape,hw-num-elms): New procs.
4102 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4103 if there's more than 255 registers.
4104 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4106 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4109 1999-05-21 Doug Evans <devans@casey.cygnus.com>
4111 * cgen-sid.scm (sim-arguments): Add -X.
4112 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4113 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4114 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
4115 Simplify by supporting pbb engine only.
4116 (-gen-sem-switch-init): New proc.
4117 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4118 (cgen-sem-switch.cxx): New proc.
4119 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4120 with with-pbb?. Support dual scache/pbb engines.
4121 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4122 Support dual scache/pbb engines.
4123 (cgen-decode.h): Generate semantic fn decls if with-scache?.
4124 * sid.scm (*) with-pbb? replaces with-sem-switch?.
4125 (sim-finish!): Create pbb support virtual insns if with-pbb?.
4127 1999-05-10 Ben Elliston <bje@cygnus.com>
4129 * arm7.cpu: Remove coprocessor related fields, operands and insn
4130 definitions for now. Take the undefined instruction trap instead.
4131 (ldmda-wb): New instruction.
4132 (ldmib-wb): Likewise.
4133 (ldmdb-wb): Likewise.
4134 (stmdb-wb): Likewise.
4135 (stmib-wb): Likewise.
4136 (stmda-wb): Likewise.
4138 1999-05-08 Doug Evans <devans@casey.cygnus.com>
4140 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4141 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4143 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4144 hobbit can't handle optional third arg.
4146 1999-05-07 Doug Evans <devans@casey.cygnus.com>
4148 * arm.cpu (h-tbit): Delete set spec.
4149 (h-mbits): Don't call arm_mbits_set in set spec.
4150 * arm.sim: New file.
4151 * hardware.scm (modify-hardware): New proc.
4152 (hardware-init!): Add modify-hardware command.
4153 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4154 (-hw-gen-set-quiet): Ditto.
4155 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
4156 hardware attribute. Load $arch.sim file if present.
4157 * utils-cgen.scm (keyword-list?): New proc.
4158 (keyword-list->arg-list,arg-list-validate-name): New procs.
4159 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4161 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4163 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4166 * attr.scm (obj-prepend-atlist!): New proc.
4168 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4170 * sid.scm (<operand>,profilable?): Use op:type.
4171 * sim.scm (<operand>,profilable?): Use op:type.
4173 1999-05-04 Doug Evans <devans@casey.cygnus.com>
4175 * utils.scm (find-index,find): Be more stack friendly.
4177 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4180 1999-05-01 Doug Evans <devans@casey.cygnus.com>
4182 * arm.cpu (h-gr-usr): New hardware element.
4183 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4184 (arm-mode): New keyword.
4185 (h-mbits): Add set spec.
4186 (h-spsr): Implement get/set specs.
4188 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4189 (-reader-process-expanded-1): Pretty print logging output.
4191 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4192 (cgen-cpu.h): Print enums before hardware elements.
4193 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4194 * sid-decode.scm (cgen-decode.cxx): Ditto.
4195 * sid-model.scm (cgen-model.cxx): Ditto.
4197 * utils-cgen.scm (context-error): Accept variable number of
4200 * rtx-funcs.scm (error:): New rtx function.
4201 * rtl-c.scm (s-case-vm): New proc.
4202 (-gen-non-vm-case-get,s-case-non-vm): New procs.
4203 (s-case): Simplify, handle non-VM result.
4204 (error:): New rtx function.
4206 1999-04-30 Doug Evans <devans@casey.cygnus.com>
4208 * arm.cpu (h-pc): Add set spec to zero bottom bits.
4209 (test-hi,test-ls): Fix cbit handling.
4210 (shift-type,h-operand2-shifttype): Move here ...
4211 * arm7.cpu: ... from here.
4212 (set-cond,set-cond-maybe,dnix): Delete, unused.
4213 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4214 * arm.cpu: ... to here.
4215 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4216 (alu-cmn): Use set-add-flags.
4217 (alu-tst): Use set-zn-flags.
4218 (alu-cmp): Use set-sub-flags.
4219 (lsl,lsr,asr): Set condition codes.
4220 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4221 (alu-op): Split into three: alu-logical-op,alu-arith-op,
4223 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4224 All callers updated.
4225 (sub-sp): Rename from add-sp-neg.
4226 (f-lbwl-offset): Delete.
4227 (f-lbwl-hi,f-lbwl-lo): New ifields.
4228 (lbwl-hi,lbwl-lo): Update.
4229 (bl-hi): Add 4 to pc.
4230 (push-reg,pop-reg): Simplify.
4231 (push,push-lr): Push registers in correct order.
4232 (pop,pop-pc): Pop registers in correct order.
4233 (save-reg-inc,load-reg-inc): Simplify.
4234 (ldmia): Save registers in correct order.
4236 1999-04-30 Ben Elliston <bje@cygnus.com>
4238 * arm7.cpu (f-op-hdt): Remove; unused.
4239 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4240 (f-ror-imm8): New multi-ifield.
4241 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4243 (f-uimm12): New field.
4244 (ror-imm8): New operand.
4246 (hdt-offset8): Reinstate operand.
4247 (offset4-hi,offset4-lo): Remove.
4248 (set-cond): Remove macro; unused.
4249 (set-cond-maybe): Likewise.
4250 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4251 (store-word/byte): Likewise.
4252 (load-halfword): Use hdt-offset8 multifield operand instead of two
4253 4-bit operands that are explicitly combined by semantic code.
4254 (do-halfword-store): Bug fix. Set address when not preindexing.
4255 (store-halfword): Also use hdt-offset8 operand.
4256 (arith-op): Avoid clobbering source registers when one of them is
4257 the destination register.
4258 (arith-imm-op): Likewise.
4259 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4260 (teq-imm): Likewise.
4261 (ldm-p): Rename to ldmdb.
4262 (stm-pw): Rename to stmdb-wb.
4263 (multi-action): New macro; test reg-list bits and execute a
4264 semantic fn if the bit is set.
4265 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4266 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4267 (all insns): Use dnai entries for simplicity rather than dni.
4268 (*): Use short-form of (const ..).
4270 1999-04-29 Doug Evans <devans@casey.cygnus.com>
4272 * rtl.scm (<rtx-func>): Rename member type to style. Rename
4273 member eval to evaluator.
4274 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
4275 (tstate-make): Delete arg op-fn. All callers updated.
4276 (tstate-op-fn,tstate-set-op-fn!): Delete.
4277 (rtx-traverse): Delete op-fn arg. All callers updated.
4278 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4279 split out of -simplify-for-compilation.
4281 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4282 (cgen_DEPENDENCIES): Add stamp-cgen.
4283 (stamp-cgen): New rule.
4284 * Makefile.in: Rebuild.
4286 * rtl-c.scm (enum:): Define emitter for.
4287 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4289 (rtx-constant-value,rtx-enum-value): New procs.
4290 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4291 (rtx-compile-time-constant?): Return #t for enums.
4292 (rtx-true?,rtx-false?): Handle enums.
4293 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4294 building result by hand.
4295 (rtx-simplify-eq-attr-insn): Ditto.
4296 * rtx-funcs.scm (enum:,enum): New rtx functions.
4298 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4300 (arch-analyze-insns!): New proc.
4301 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4302 of calling ifmt-compute! directly.
4303 * sid.scm (-sim-insns-analyzed?): Delete.
4304 (sim-analyze!): Call arch-analyze-insns! instead of calling
4305 ifmt-compute! directly.
4306 * sim.scm (-sim-insns-analyzed?): Delete.
4307 (sim-analyze!): Call arch-analyze-insns! instead of calling
4308 ifmt-compute! directly.
4310 * utils.scm (string-take-with-filler): New proc.
4311 (string-take): Use it.
4313 * pgmr-tools.scm: New file.
4314 * read.scm: Load it.
4315 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4317 * insn.scm (insn-base-mask): Renamed from insn:mask.
4318 All callers updated.
4319 (insn-base-mask-length): Renamed from insn:mask-length.
4320 All callers updated.
4321 (insn-foo): Renamed from insn:foo. All callers updated.
4322 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
4323 * iformat.scm (compute-insn-base-mask-length): Renamed from
4324 compute-insn-mask-length. All callers updated.
4325 (compute-insn-base-mask): Renamed from compute-insn-mask.
4326 All callers updated.
4328 * enum.scm (-enum-parse-prefix): New proc.
4329 (<enum>,make!): Don't parse enum values here.
4330 (-enum-parse): Do it here. Call -enum-parse-prefix.
4331 (define-full-insn-enum): Ditto.
4332 (enum-vals-upcase): New proc.
4333 * hardware.scm (define-keyword): Make enum prefix uppercase.
4334 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
4336 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
4337 (<ifield>,field-extract): New method.
4338 (<multi-ifield>,field-extract): New method.
4339 (ifld-extract): New proc.
4340 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
4341 (ifld-extract-fn-name): Renamed from ifld-extract.
4343 * ifield.scm (ifld-new-value): Renamed from ifield-make.
4344 All callers updated.
4346 * ifield.scm (ifld-lsb0?): New proc.
4347 (sort-ifield-list): New arg up?. All callers updated.
4348 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
4349 rather than global state.
4351 1999-04-27 Doug Evans <devans@casey.cygnus.com>
4353 * insn.scm (pretty-print-insn-format): New proc.
4355 * Makefile.in: Rebuild.
4356 * aclocal.m4: Rebuild
4357 * configure: Rebuild.
4359 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
4361 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
4362 * configure: Rebuild.
4363 * aclocal.m4: Rebuild.
4364 * Makefile.in: Rebuild.
4365 * doc/Makefile.in: Rebuild.
4366 * doc/version.texi: Rebuild.
4368 1999-04-25 Doug Evans <devans@casey.cygnus.com>
4370 * utils.scm (bits->bools): New proc.
4372 1999-04-23 Doug Evans <devans@casey.cygnus.com>
4374 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
4375 subfield's gen-ifld-extract-decl method.
4377 1999-04-23 Ben Elliston <bje@cygnus.com>
4379 * arm7.cpu (ldrsh-pu): Remove.
4380 (do-halfword-load): New pmacro.
4381 (load-halfword): Likewise.
4382 (do-halfword-store): Likewise.
4383 (store-halfword): Likewise.
4384 (strh-*): New instructions.
4385 (ldrsb-*): Likewise.
4387 (ldrsh-*): Likewise.
4389 1999-04-22 Doug Evans <devans@casey.cygnus.com>
4391 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
4394 * arm7.cpu (do-word/byte-store): Fix typo.
4396 1999-04-22 Ben Elliston <bje@cygnus.com>
4398 * arm7.cpu (do-word/byte-load): Handle cases where the destination
4399 register is the program counter (R15).
4401 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
4402 (str-*): Implement using store-word-byte. Remove older versions.
4403 (bic): Use the `inv' rtx for obtaining bitwise complements.
4404 (bic-imm): Likewise.
4406 (mvn-imm): Likewise.
4407 (store-indev-reg): Remove crufty pmacro.
4408 (load-indiv-reg): Likewise.
4409 (ldm-p): Reverse the order of register processing for decrement.
4411 (stbi): Remove; handled by the str-* insns.
4413 1999-04-21 Doug Evans <devans@casey.cygnus.com>
4415 * thumb.cpu (cmp): Fix carry bit computation.
4418 1999-04-20 Doug Evans <devans@casey.cygnus.com>
4420 * arm.cpu (h-tbit): Specify set spec.
4422 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
4423 (set-sub-flags): Interpret "carry bit" as a borrow.
4424 (all sub/cmp insns): Carry bit is actually a borrow bit.
4425 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
4426 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
4428 (hireg-add,hireg-cmp,hireg-move): Ditto.
4430 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
4431 (-CGEN-LANG-VERSION): Ditto.
4433 1999-04-18 Doug Evans <devans@casey.cygnus.com>
4435 * pmacros.scm (-pmacro-make): New arg `default-values',
4436 all callers updated.
4437 (-pmacro-default-values): New proc.
4438 (-pmacro-process-keyworded-args): New proc.
4439 (-pmacro-process-args): New proc.
4440 (-pmacro-invoke): Process arguments before expanding macro.
4441 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
4442 (define-pmacro): Handle default values specified in arg list.
4443 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
4444 (rtx-boolif-op-arg[01]): New procs.
4445 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
4446 (rtx-simplify): Handle not,orif,andif.
4447 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
4448 * utils.scm (alist-copy): New proc.
4449 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
4451 (swi): Explicitly set pc.
4453 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
4455 1999-04-17 Ben Elliston <bje@cygnus.com>
4457 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
4458 correctly adjusts the program counter now.
4460 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
4461 (f-signed?): Rename from `f-hdt-signed?'.
4462 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
4463 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
4464 (f-hdt-offset8): Use new field names.
4465 (ldr): Use `imm12' field, not `offset12', since we do our own
4467 (str, str-*): Likewise.
4468 (ldu-*): Remove most; better not implemented than broken.
4470 (ldrsh-pu): New insn.
4474 (ldm-p): Likewise; replace (load-indiv-reg) version.
4476 1999-04-15 Doug Evans <devans@casey.cygnus.com>
4478 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
4479 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
4480 (*): Explicitly specify mode in c-call.
4481 (logical-op): Recognize sets of h-gr[15] as sets of pc.
4483 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
4484 (arith-imm-op): New pmacro.
4485 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
4486 * thumb.cpu (bx-rs,bx-hs): Rewrite.
4488 1999-04-14 Doug Evans <devans@casey.cygnus.com>
4490 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
4492 * rtl.scm (rtl-find-ifields): Implement.
4494 * utils-gen.scm: New file.
4495 * read.scm: Load it.
4496 * desc.scm: Move generic attribute code to utils-gen.scm.
4497 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
4498 * Makefile.in: Rebuild.
4500 * arm7.cpu (R15-OFFSET): New attribute.
4502 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
4503 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
4504 for reg-shift version.
4506 (data processing insns): Reorganize. Use dnai.
4508 * attr.scm (attr-kind): New proc.
4509 (attr-list-enum-list): Rewrite.
4510 (-attr-sort): Split result into two lists, bools and non-bools.
4511 (current-attr-list-for): Update.
4513 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
4514 * sid-cpu.scm (-gen-attr-decls): New proc.
4515 (-gen-insn-attr-decls): New proc.
4516 (cgen-desc.h): New proc.
4517 (cgen-cpu.h): Put everything in @cpu@ namespace.
4518 (gen-parallel-exec-type): Change prefix of parexec struct from
4520 (-gen-trace-record-type): Ditto for trace_record struct.
4521 (-gen-write-case): Update.
4522 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
4523 @prefix@. Update scache struct references.
4524 (-gen-sem-case): Update scache struct references.
4525 (-gen-sem-switch-fn): Update idesc struct reference.
4526 Update insn_type enum reference.
4527 (cgen-write.cxx): Update scache,argbuf references.
4528 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
4529 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
4530 from @cpu@ to @prefix@.
4531 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
4532 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
4533 from @CPU@ to @PREFIX@.
4534 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
4535 from @CPU@ to @PREFIX@.
4536 (-gen-decode-insn-globals): Generate insn attributes.
4537 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
4538 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
4539 semantic fn typedef.
4540 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
4541 Change prefix of scache struct from @cpu@ to @prefix@.
4542 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
4543 Change prefix of idesc struct from @cpu@ to @prefix@.
4544 Change prefix of insn_type enum from @cpu@ to @prefix@.
4545 (-gen-argbuf-fields-union): Change prefix of sem_fields union
4546 from @cpu@ to @prefix@.
4547 (-gen-scache-decls): Change prefix of scache struct from
4548 @cpu@ to @prefix@. Update idesc struct name.
4549 Update decode,execute methods.
4550 (-gen-extract-case): Update to type name changes.
4551 (-gen-decode-fn): Ditto.
4552 (cgen-decode.h): Put everything in @cpu@ namespace (except
4553 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
4554 (cgen-decode.cxx): Add using namespace @cpu@.
4555 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
4556 model_mark_get/set from @cpu@ to @prefix@.
4557 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
4559 (gen-model-fn-decls): Update idesc struct name. Change prefix
4560 of model_insn_before/after from @cpu@ to @prefix@.
4561 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
4562 Update insn_word type name.
4563 (-gen-model-timing-table): Update INSN_TIMING struct name.
4564 (-gen-model-init-fn): Update MODEL_DATA struct name.
4565 (-gen-mach-defns): Update name of init_idesc_table fn.
4566 (cgen-model.cxx): Add using namespace @cpu@.
4567 * sid.scm (gen-cpu-class): Delete.
4568 (gen-attr-type): New proc.
4569 (gen-obj-attr-sid-defn): New proc.
4570 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
4571 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
4573 (gen-cpu-insn-enum): Update name of insn enum.
4574 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
4576 (swi): Rename @cpu@_swi to @prefix@_swi.
4578 * decode.scm (-build-decode-table-entry): Remove heuristic for
4579 distinguishing insns, and use insn ifield-assertion specs.
4581 * desc-cpu.scm (gen-A-attr-mask): Simplify.
4582 (gen-ifld-defns): Boolean attributes begin at number 0 now.
4583 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
4584 * opc-itab.scm (-gen-macro-insn-table): Ditto.
4585 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
4586 all callers updated.
4587 (gen-attr-name): New proc
4588 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
4589 (gen-obj-attr-defn): Delete num_nonbools count.
4591 * iformat.scm (ifmt-analyze): Handle insn-condition.
4592 (ifmt-compute!): Ditto.
4593 * insn.scm (<insn>): Specify default value for condition,
4594 post-cond-trap,compiled-condition,compiled-semantics.
4595 (<insn>,make!): New arg condition.
4596 (<insn>): Add getters for condition,compiled-condition.
4597 (-insn-parse): New arg condition, all callers updated.
4598 (-insn-read): Recognize condition spec.
4599 (define-full-insn): New arg condition.
4600 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
4601 * semantics.scm (semantic-compile): Change arg sem-code to
4603 (semantic-attrs): Ditto.
4604 * sim.scm (sim-finish!): Update calls to define-full-insn.
4605 * simplify.inc (define-normal-insn): Update call to define-full-insn.
4606 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
4607 * sid.scm (sim-finish!): Update call to define-full-insn.
4609 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
4611 * Makefile.am (sim-cpu): Allow specification of ISA.
4612 * Makefile.in: Rebuild.
4614 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
4616 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
4618 1999-04-10 Doug Evans <devans@casey.cygnus.com>
4620 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
4622 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
4624 * attr.scm (atlist?): New proc.
4625 (-attr-eval): Rewrite.
4626 (attr-parse): New proc.
4627 (atlist-parse): Use it.
4629 * decode.scm (exprtable-entry-make): New proc.
4630 (exprtable-entry-insn,exprtable-entry-expr): New procs.
4631 (exprtable-make,exprtable-insns): New procs.
4633 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
4635 (hardware-builtin!): Make h-memory a vector.
4637 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
4638 All callers updated.
4639 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
4641 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
4643 (-insn-parse): Set semantics to #f if not specified.
4644 (define-insn,define-full-insn): Take out code that ignores ALIAS's
4646 (-parse-insn-format): Recognize `=' iformat spec.
4648 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
4649 (isa-max-insn-bitsize): Ditto.
4651 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
4653 (<ifield>,gen-extract): Ditto.
4654 (<multi-ifield>,gen-insert,gen-extract): Ditto.
4655 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
4656 (gen-define-ifmt-ifields): New proc.
4657 (gen-semantic-code): Rewrite.
4658 * sid-decode.scm (-gen-decode-expr-entry): New proc.
4659 (-gen-decoder-switch): Handle expression tables.
4660 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
4662 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
4663 instead of gen-define-fields.
4664 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
4666 (<multi-ifield,gen-ifld-extract-decl): Ditto.
4667 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
4668 (-gen-ifld-extract-beyond): Ditto.
4669 (<multi-ifield>,gen-ifld-extract): Ditto.
4670 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
4671 rtl evaluation code.
4672 (op:read): Build an <eval-state> to pass to gen-read.
4673 (op:write): Build an <eval-state> to pass to gen-write.
4674 (op:record-profile): Build an <eval-state> to pass to
4676 * sim-cpu.scm (gen-semantic-code): Rewrite.
4677 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
4679 (-gen-ifld-extract-beyond): Ditto.
4680 (<multi-ifield>,gen-ifld-extract): Ditto.
4681 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
4682 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
4683 rtl evaluation code.
4684 (op:read): Build an <eval-state> to pass to gen-read.
4685 (op:write): Build an <eval-state> to pass to gen-write.
4686 (op:record-profile): Build an <eval-state> to pass to
4689 * operand.scm (<operand>): Give `selector' default value of #f.
4690 Give `num' default value of -1. Give `cond?' default value of #f.
4691 (op:new-mode): Delete arg `set?', all uses updated.
4693 * read.scm (reader-error): Handle #f return from port-filename.
4694 (-init-parse-cpu!): Call rtl-c-init!.
4695 (reader-install-builtin!): Call rtl-builtin!.
4697 * rtl-c.scm: New file.
4698 * semantics.scm: New file.
4699 * read.scm: Load them.
4700 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
4702 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
4704 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
4705 (-rtx-num-text,-rtx-max-num): New globals.
4706 (def-rtx-operand-node,define-rtx-operand-node): New procs.
4707 (-rtx-macro-lookup): New proc.
4708 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
4709 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
4710 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
4711 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
4712 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
4713 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
4714 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
4715 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
4716 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
4717 (rtx-pretty-name): New proc.
4718 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
4719 (rtx-traverse-*): Rewrite rtx traversing.
4720 (rtx-eval-*): Rewrite rtx evaluation.
4721 (rtx-compile): New proc.
4722 (rtx-simplify): New proc.
4723 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
4724 * rtx-funcs.scm: C generation moved to rtl-c.scm.
4725 (ifield,index-of): Rewrite.
4726 (name): Renamed from `operand:'.
4727 (operand,xop,local): New rtx's.
4728 (current-insn): Rewrite.
4729 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
4730 (cgen-hob.h): Remove rule for.
4731 (cgen-hob.o): Depend on cgen-hob.c only.
4732 * Makefile.in: Rebuild.
4734 * utils-cgen.scm (vmake): New proc.
4735 (<context>): New class.
4736 (context-make-prefix,context-error): New procs.
4738 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
4740 * i960.cpu: Add some ??? comments.
4741 (xnor, ornot): New instructions.
4742 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
4744 1999-04-08 Doug Evans <devans@casey.cygnus.com>
4746 * cos.scm (-object-error): Print better error message.
4748 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
4749 (-pmacro-env-ref): Renamed from -env-ref.
4751 1999-03-31 Doug Evans <devans@casey.cygnus.com>
4753 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
4755 (hardware-builtin!): Delete h-pc builtin.
4756 * arm.cpu (h-pc): Define.
4757 (h-gr): Delete get,set specs. Make array of 16 regs again.
4758 * arm7.cpu (set-logical-cc-maybe): Delete.
4759 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
4760 (data processing insns): Rewrite.
4761 * m32r.cpu (h-pc): Define.
4762 * fr30.cpu (h-pc): Define.
4763 * i960.cpu (h-pc): Define.
4764 * sparc.cpu (h-pc): Define.
4766 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
4767 (s-parallel): Replace do {...} while (0) with {...}.
4768 (s-sequence): Ditto.
4770 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
4772 (-gen-write-case,-gen-sem-case): Ditto.
4773 (-gen-sem-case): Only specify `written' if profiling or
4774 parallel-write-back.
4775 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
4776 (-gen-sem-switch-fn): New proc.
4777 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
4778 based on with-sem-switch option.
4779 * sid-decode.scm (-gen-decode-insn-globals): Only define
4780 idesc_table_initialized_p if with-sem-switch. Record semantic fn
4781 addresses in idesc_table if !with-sem-switch.
4782 (-gen-sem-fn-decls): Rewrite.
4783 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
4784 member based on with-sem-switch. Only define
4785 `idesc_table_initialized_p' member if with-sem-switch.
4786 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
4787 * sid.scm (-with-sem-switch?): New variable.
4788 (option-init!): Initialize it.
4789 (option-set!): Set it.
4790 (with-sem-switch?): New proc.
4791 (-op-gen-set-trace): Only emit `written' reference if profiling.
4792 (sim-finish!): Use h_pc_set to set pc.
4794 1999-03-30 Doug Evans <devans@casey.cygnus.com>
4796 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
4797 All callers updated.
4798 (arith-carry-cc-binop): New arg set-flags. All callers updated.
4800 * sid.scm (gen-argbuf-type): Delete.
4801 (-gen-argbuf-fields-union): Move to ...
4802 * sid-decode.scm: ... here.
4804 * read.scm (-reader-process-expanded-1): New proc.
4805 (-reader-process-expanded): Call it to catch nested begin's.
4806 (reader-process): Move `begin' handling to -reader-process-expanded.
4808 * insn.scm (-insn-read): Fix name of `format' spec.
4810 * pmacros.scm (.pmacro): New builtin.
4811 (scan-symbol): If procedure macro, return macro rather than its symbol.
4812 (check-macro): Don't do lookup, instead check if (car expr) is
4814 (scan-list): Handle .pmacro.
4815 (scan): No longer re-examine text for another macro invocation.
4816 (-pmacro-build-lambda): New proc.
4817 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
4818 another, fetch the other's value (rather than doing it during
4821 1999-03-27 Doug Evans <devans@casey.cygnus.com>
4823 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
4824 * Makefile.in: Rebuild.
4826 * decode.scm (decode-get-best-bits): Use memq instead of element?.
4827 (-fill-slot!): Simplify.
4828 (-build-slots): Simplify.
4830 * dev.scm (load-sid): Don't load sid-arch.scm.
4832 * sid-decode.scm: Replace computed goto decoder/extractor with plain
4834 * sim-decode.scm: Replace computed goto decoder/extractor with plain
4837 1999-03-26 Doug Evans <devans@casey.cygnus.com>
4839 * sim-decode.scm: Clean up pass. Move decoder computation into ...
4840 * decode.scm: ... here. New file.
4841 * sid-decode.scm: Use decoder computation code in decode.scm.
4842 * read.scm: Load decode.scm.
4844 * arm.cpu (arm710 model): Add u-exec function unit.
4845 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
4846 Add get/set specs to redirect reg 15 to h-pc.
4847 (h-*): Indicate for both ARM and THUMB isas.
4848 (cbit,nbit,vbit,zbit): Ditto.
4849 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
4850 (h-cpsr): Make virtual. Add get/set specs.
4851 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
4852 (h-spsr): New virtual reg.
4853 * arm7.cpu (shift-type): New explicitly defined keyword.
4854 (h-operand2-shifttype): Use it.
4855 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
4856 All callers updated. Don't set cbit.
4857 (logical-op): Add rm to ifield list. Change case to case:. Use
4858 shift-type enum as case choices. Set cbit.
4859 (and,orr,eor,add-imm): Uncomment out.
4860 (undefined): Temporarily comment out.
4861 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
4862 (lda-pc,lda-sp): Ditto.
4863 (ldr-pc): Rename from ldr.
4864 (cbranch): Mark insns as being thumb insns.
4866 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
4868 * cgen-sid.scm: Don't load sid-arch.scm.
4869 (sim-arguments): Delete unused entries.
4870 * sid-arch.scm: Delete.
4872 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
4873 (<insn>,ifld-assertions): New member.
4874 (<insn>,make!): New arg ifld-assertions, all callers updated.
4875 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
4876 (insn:fields): Delete.
4877 (-insn-parse): New arg ifld-assertions. All callers updated.
4878 (-insn-read,define-insn): New procs.
4879 (define-full-insn): New arg ifld-assertions. All callers updated.
4880 (insn-init!): New comment define-insn.
4882 * model.scm (-model-parse): Ensure at least one unit specified.
4884 * rtl.scm (-rtx-traverse-operands): Recognize environments.
4885 (<c-expr-temp>,get-name): New method.
4886 (-rtx-make-current-closure,s-closure): New proc.
4887 (hw:): Wrap rtx indices in a closure.
4888 (-gen-case-prefix): New proc.
4890 * rtx-funcs.scm (case:): Fix call to s-case.
4891 (closure): New rtx func.
4893 * hardware.scm (<hardware-base>): New member isas-cache.
4894 (<hardware-base>,get-isas): New method.
4895 (hardware-builtin): Indicate for all isas.
4896 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
4897 * mach.scm (current-arch-mach-name-list): Return list of names.
4898 (current-isa-mach-name-list): Ditto.
4899 (define-arch): Install builtin objects here.
4900 * read.scm (keep-atlist?): Only keep if both mach and isa are
4902 (keep-mach-atlist?): New proc.
4903 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
4904 (reader-install-builtin!): Renamed from -install-builtin!.
4905 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
4906 -gen-cpu-reg-access-defns. Rewrite.
4907 (gen-reg-access-defn): Delete.
4908 (-gen-hardware-struct): New proc.
4909 (-gen-hardware-types): Simplify. Add multiple-isa support.
4910 (gen-semantic-fn,-gen-all-semantics): Delete.
4911 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
4912 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
4913 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
4914 Call sem-analyze-insns!.
4915 (cgen-semantics.cxx): Add multiple-isa support.
4916 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
4917 (-gen-scache-decls,-gen-decode-fn): Ditto.
4918 (cgen-decode.h): Call sem-analyze-insns!.
4919 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
4920 * sid.scm (-with-multiple-isa?): New variable.
4921 (option-init!): Initialize it.
4922 (option-set!): Set it.
4923 (with-multiple-isa?): New proc.
4924 (gen-cpu-ref): New arg isas. All callers updated.
4925 (gen-cpu-class): New proc.
4926 (*-get-macro,*-set-macro): Delete.
4927 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
4928 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
4929 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
4930 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
4931 (-sim-insns-analyzed): New global variable.
4932 (sim-init!): Reset it.
4933 (sim-analyze-insns!): New proc.
4934 (sim-analyze!): Don't do instruction analysis here.
4935 (sim-finish!): Specify isa of x-invalid insn.
4936 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
4938 1999-03-22 Doug Evans <devans@casey.cygnus.com>
4940 * thumb.cpu (cpu,mach,model): Delete.
4941 (dntf): New pmacro. Use it for all field definitions.
4942 (dntop): New pmacro. Use it for all operand definitions.
4943 (asr): Correct field list.
4944 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
4946 * utils-cgen.scm (define-getters): New macro to simplify
4947 writing class accessors.
4948 (define-setters): Ditto.
4949 (sanitize): Recognize isa elements.
4951 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
4952 state-parallel-exec?.
4953 * sid-model.scm (*): Ditto.
4954 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
4955 state-decode-assist.
4957 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
4958 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
4959 * sim-decode.scm (-gen-decode-switch): Ditto.
4961 * sim-arch.scm (-regs-for-access-fns): Delete.
4962 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
4963 (-gen-arch-reg-access-defns): Delete.
4965 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
4966 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
4967 with state-parallel=exec?.
4968 (cgen-*): Call sim-analyze-insns! here.
4969 * sim-decode.scm (cgen-*): Ditto.
4970 * sim-model.scm (cgen-*): Ditto.
4971 * sim.scm (-sim-insns-analyzed): New global variable.
4972 (sim-init!): Reset it.
4973 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
4974 already done the analysis.
4976 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
4979 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
4980 (arm arch): Update isa spec.
4981 (arm,thumb isas): Define.
4982 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
4983 (arm7tdmi mach): Add isa spec.
4984 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
4985 `const' on word number.
4986 * fr30.cpu (fr30 arch): Update isa spec.
4988 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4990 * i960.cpu (i960 arch): Update isa spec.
4992 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4993 liw-insns,parallel-insns moved to isas spec.
4994 * m32r.cpu (m32r arch): Update isas spec.
4996 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
4997 liw-insns,parallel-insns moved to isa spec.
4998 * sparc.cpu (sparc arch): Update isas spec.
4999 (sparc isa): Define.
5000 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5001 decode-assist moved to isa spec.
5002 * sparc64.cpu (sparc64 cpu): Ditto.
5003 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5004 * desc-cpu.scm (-gen-isa-table-defns): New proc.
5005 (-gen-mach-table-defns): Output mach table.
5006 (-gen-hash-defines): Delete insn size macros, except for
5008 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
5009 (cgen-desc.h): Define MAX_ISAS.
5010 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
5011 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
5012 (arch-* accessors): Renamed from arch:*. All callers updated.
5013 (current-arch-isa-name-list): New proc.
5014 (-arch-parse-isas): Renamed from -arch-parse-isa.
5015 (def-isa-attr!): Rewrite.
5016 (<iframe>): New class.
5017 (<itype>): New class.
5019 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5020 (isa-integral-insn?,isa-parallel-exec?): New procs.
5021 (-isa-parse,-isa-read,define-isa): New proc.
5022 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5023 liw-insns moved to <isa>.
5024 (cpu-* accessors): Renamed from cpu:*. All callers updated.
5025 (-cpu-parse,-cpu-read): Update.
5026 (state-*): Renamed from state:*. All callers updated.
5027 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5029 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5030 (state-decode-assist): New proc.
5031 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5032 (-adata-set-derived!): Rewrite.
5033 (adata-integral-insn?): Renamed from adata:integral-insn?. All
5035 (arch-init!): Add define-isa command.
5036 * read.scm (<reader>): Default keep-isa member to (all).
5037 (reader-* accessors): Renamed from reader:*. All callers updated.
5038 (-keep-isa-set!): Call string->symbol on isa name list.
5039 (keep-isa-validate!): Rewrite.
5040 (current-isa): New proc.
5041 (keep-isa?): Recognize "all".
5042 (-init-parse-cpu!): New arg keep-isa. All callers updated.
5043 Call -keep-isa-set!.
5044 (cmd-if): Recognize keep-isa?.
5045 (cpu-load): New arg keep-isa. All callers updated.
5046 (-opt-spec-update): New proc.
5047 (common-arguments): First arg is string, not symbol.
5048 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
5050 * rtl.scm (rtx-get): Default mode of string arg is INT.
5052 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
5054 * rtx-funcs.scm (join:): Pass cpu to handler.
5056 * configure.in (guile_include_dir): Delete.
5057 * configure: Rebuild.
5058 * Makefile.in: Rebuild.
5059 * doc/Makefile.in: Rebuild.
5061 * sid-cpu.scm (-extract-chunk-specs): New proc.
5062 (gen-define-fields): Use it.
5063 (-extract-chunk): New proc.
5064 (-gen-extract-beyond-var-list): Use it.
5065 (gen-extract-fields): Simplify.
5067 1999-03-22 Ben Elliston <bje@cygnus.com>
5069 * arm7.cpu (ldri-p): New instruction.
5070 (swi): Do not vector through 0x8 yet--there is nothing there.
5073 (all): Use (const x) in subreg expressions.
5075 1999-03-19 Ben Elliston <bje@cygnus.com>
5077 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5080 1999-03-17 Doug Evans <devans@casey.cygnus.com>
5082 * fr30.cpu (define-arch): Specify "forced" default-alignment.
5083 * mach.scm (-parse-alignment): Recognize "forced" alignment.
5084 * sim-cpu.scm (-extract-chunk-specs): New proc.
5085 (gen-define-fields): Use it.
5086 (-extract-chunk): New proc.
5087 (-gen-extract-beyond-var-list): Use it.
5088 (gen-extract-fields): Simplify.
5090 Port to guile 1.3.1.
5091 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5092 (LIBIBERTY): New var.
5093 (HOB_OBJS): Add cgen-gh.o.
5094 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5095 * Makefile.in: Rebuild.
5096 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5097 * config.in: Rebuild.
5098 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5099 libncurses, libtermcap.
5100 Add checks for needed functions in guile 1.2 not in guile 1.3,
5101 and vice versa. Add test for 3 argument scm_make_vector.
5102 * configure: Rebuild.
5103 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5104 definitions if guile doesn't have them.
5105 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5106 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
5107 with gh_vector_set_x.
5108 (cgh_qsort): Replace gh_list_length with gh_length.
5109 * cgen-gh.h: Add decls for added functions.
5110 (cgh_qsort): Don't declare if IN_HOBBIT.
5111 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
5112 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5113 scm_make_vector with gh_make_vector.
5114 * cos.scm: Use vector-length instead of length on vectors.
5115 * dev.scm (cload): Make varargs proc with keyword/value args.
5116 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
5117 provide version that works with guile 1.2 or 1.3.
5118 Include private copy of scmhob.h.
5119 * scmhob.h: New file. Keep our own copy for now.
5121 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
5123 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5125 (-rtx-traverse-operands): Dump cx temp stack if debugging.
5126 (-cx-temp-dump-stack): Pretty up output.
5128 * arm.cpu: comment out thumb.cpu until isa support ready.
5129 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5130 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5131 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5133 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5135 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5137 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5138 (<hw-address>,mode-ok?): unsigned/signed are compatible.
5140 * operand (op:new-mode): Improve error message.
5142 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
5143 * arm7.cpu: New file.
5145 1999-03-12 Ben Elliston <bje@cygnus.com>
5147 * arm.cpu: Lots of minor fixes after desk checking.
5149 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5151 * thumb.cpu: snapshot of current work
5153 * rtl.scm (rtx-get): Tweak error message.
5155 1999-03-10 Doug Evans <devans@casey.cygnus.com>
5157 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5158 * Makefile.in: Rebuild.
5160 * cos.c (cos_vector_copy): New function.
5161 (_object_copy): Use it.
5163 * mode.scm (mode:eq?): Clean up.
5164 * rtl.scm (cx-new-mode): Copy attributes.
5165 (rtx-get): Don't make copy if <c-expr> with identical mode.
5167 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5169 (gr-names): h-gr register names moved here.
5171 (cr-names): h-cr register names moved here.
5173 (dr-names): h-dr register names moved here.
5175 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5176 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5177 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5179 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5181 (gr-names): h-gr register names moved here.
5183 (cr-names): h-cr register names moved here.
5185 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5186 (h-accums,h-psw): Ditto.
5187 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5189 (gr-names): h-gr register names moved here.
5190 (h-gr-indices): Delete.
5191 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
5192 (sparc64 h-gr): Ditto.
5193 (h-y): Add get/set specs.
5195 (fp operands): Rewrite.
5196 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5197 (h-tbr,h-cwp,h-wim): Ditto.
5198 * sparc64.cpu (h-fpsr): Add get/set specs.
5199 * sparccom.cpu (ldd-reg+reg): Load value all at once.
5200 (fp-ld-op): New arg `dest', all callers updated.
5201 (*): Replace `make-di' with `join'.
5203 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5205 (gen-semantic-code): Save/restore rtl generator state.
5206 (cgen-cpu.h): Call rtl-gen-init!.
5207 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5208 (-gen-ifld-extract-beyond): Ditto.
5209 (<multi-ifield>,gen-ifld-extract): Ditto.
5210 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5212 (-hw-gen-set-quiet-pc): Ditto.
5213 (<hw-pc>,gen-write): Ditto.
5214 (-hw-cxmake-get): Ditto. Call getter function if present.
5215 (<hw-register>,cxmake-get-raw): New method.
5216 (<hw-register>,gen-set-quiet-raw): New method.
5217 (-hw-gen-set-quiet): New arg `gstate'.
5218 (hw-fun-access?): Delete.
5219 (gen-reg-access-defn): Output function contents.
5220 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5222 (-gen-hw-index): Ditto.
5223 (op:read): Update gen-read invocation.
5224 (op:write): Update gen-write invocation.
5225 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5227 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5228 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5229 (<unit>,gen-profile-code): Update to sim.scm version.
5231 * sim-arch.scm (-regs-for-access-fns): New proc.
5232 (-biggest-reg-mode): New proc.
5233 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5234 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5235 virtual regs separately.
5236 (-gen-cpu-reg-access-defns): Replace fun-access? with new
5238 (gen-semantic-code): Save/restore rtl generator state.
5239 (cgen-cpu.h): Call rtl-gen-init!.
5240 (cgen-cpu.c): Ditto. #include cgen-ops.h.
5241 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
5242 renamed to mach-bfd-name.
5243 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5244 (-gen-ifld-extract-beyond): Ditto.
5245 (<multi-ifield>,gen-ifld-extract): Ditto.
5246 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5247 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5248 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5250 (hw-fun-access?): Delete.
5251 (-hw-gen-set-quiet-pc): New arg `gstate'.
5252 (<hw-register>,gen-get-macro): Rewrite.
5253 (<hw-register>,gen-set-macro): Rewrite.
5254 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5255 (-hw-cxmake-get): New arg `gstate'. Rewrite.
5256 (<hw-register>,cxmake-get-raw): New method.
5257 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
5258 (<hw-register>,gen-set-quiet-raw): New method.
5259 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5261 (-gen-hw-index): Ditto.
5262 (<hw-index>): New arg `gstate'.
5263 (-gen-hw-selector): Update call to rtx-c.
5264 (<pc>): New arg `gstate'.
5265 (op:read): Update gen-read invocation.
5266 (op:write): Update gen-write invocation.
5267 (<operand>,cxmake-get): Handle raw-reg.
5268 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5269 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5270 (<operand>,gen-set-quiet): Handle raw-reg.
5271 (<operand>,gen-set-trace): Handle raw-reg.
5272 (-gen-mach-data): mach:cpu renamed to mach-cpu.
5274 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5275 cgen_operand_type enum.
5276 (gen-operand-table): Add operand type enum. Replace pointer to
5277 hardware element with its enum. Null terminate table.
5278 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5279 Build operand table.
5280 * ifield.scm (-ifield-parse): Recognize ISA attribute.
5281 * mach.scm (<arch-data>): New member `isas'.
5282 (adata-isas): New accessor.
5284 (isa-default-insn-word-bitsize): New accessor.
5285 (isa-enum): New proc.
5286 (current-arch-default-insn-word-bitsize): Delete.
5287 (current-isa-list,current-isa-lookup): New procs.
5288 (-arch-parse-isa): New proc.
5289 (-arch-parse): Rewrite.
5290 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
5291 (define-arch): Define ISA attribute.
5292 (def-isa-attr!,isa-supports?): New procs.
5293 (<mach>): New member `isas'.
5294 (mach-isas): New accessor.
5295 (-mach-parse): New arg `isas', all callers updated.
5296 (-mach-read): Recognize `isas'.
5297 (arch-finish!): Rewrite.
5298 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5299 @arch@_cgen_get_{int,vma}_operand.
5300 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5301 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5302 of pointer to table entry.
5303 * opcodes.scm (gen-switch): Handle multiply defined operands.
5304 * operand.scm (op-sort): New proc.
5306 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5307 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5308 (hw-enum): Accept symbol argument.
5309 (hardware-builtin!): Delete attribute FUN-ACCESS.
5310 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5312 * attr.scm (atlist-source-form): New proc.
5313 (attr-builtin!): New attr `PRIVATE'.
5314 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5315 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5316 if they have `PRIVATE' attribute.
5317 (gen-hw-table-defns): Output definitions of explicitly defined
5319 * hardware.scm (<keyword>): New member print-name. Rename member
5320 `value' to `values', all uses updated.
5321 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
5322 (keyword-parse): Rewrite.
5323 (-keyword-read): New proc.
5324 (define-keyword): New proc.
5325 (-hw-parse-keyword): New proc.
5326 (-hw-parse-indices): Rewrite keyword handling, support new index spec
5328 (-hw-parse-values): Ditto.
5329 (-hw-parse-get,-hw-parse-set): Rewrite.
5330 (hardware-init!): Add new comment define-keyword.
5331 * mach.scm (<arch>): New member `kw-list'.
5332 (arch:kw-list,arch_set-kw-list!): New accessors.
5333 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
5335 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
5336 * mode.scm (mode-class-integral?): New proc.
5337 (mode-class-float?,mode-class-numeric?): New procs.
5338 (mode-integral?,mode-float?,mode-numeric?): New procs.
5339 (mode-compatible?): New proc.
5340 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
5342 (<ifield>,gen-extract): Ditto.
5343 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
5344 (<gstate>): New class.
5345 (gstate-simulator?,gstate-set-simulator?!): New accessors.
5346 (gstate-context,gstate-set-context!): New accessors.
5347 (gstate-macro?,gstate-set-macro?!): New accessors.
5348 (gstate-make,gstate-copy): New procs.
5349 (-rtl-current-gstate): New global.
5350 (current-gstate-simulator?): New proc.
5351 (current-gstate-context,current-gstate-macro?): New procs.
5352 (current-gstate,current-gstate-set!): New procs.
5353 (rtl-gen-init!): Rewrite.
5354 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
5355 (tstate-make): New arg `gstate', all callers updated.
5356 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
5357 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
5358 (tstate-gstate,tstate-set-gstate!): New accessors.
5359 (tstate-copy): New proc.
5360 (tstate-new-cond?,tstate-new-set?): Rewrite.
5361 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
5362 (rtx-traverse): New arg `gstate', all callers updated.
5363 (rtx-strdump): New proc.
5364 (-simplify-for-compilation): New arg `gstate', all callers updated.
5365 (semantic-in-out-operands): Ditto.
5366 (semantic-attrs): Ditto.
5367 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
5368 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
5369 (rtx-value): Rewrite.
5370 (<c-expr>,gen-name): New method.
5371 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
5372 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
5373 (cx-new-mode): New proc.
5374 (-rtx-c-with-tstate): New proc.
5375 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
5377 (-rtx-mode): Rewrite.
5378 (-rtx-mode-compatible?): New proc.
5379 (<c-expr-temp>): New member `value'.
5380 (cx-temp:value): New accessor.
5381 (<c-expr-temp>,make!): Override default method.
5382 (<c-expr-temp>,cxmake-get): Rewrite.
5383 (<c-expr-temp>,gen-set-quiet): Rewrite.
5384 (<c-expr-temp>,gen-set-trace): Rewrite.
5385 (gen-temp-defs): Use cx-temp:value.
5386 (record-temp!): New arg value, all callers updated.
5387 (cx-temp:cx:make): Delete.
5388 (-cx-temp-dump-stack): New proc.
5389 (rtx-get): New arg `gstate', all callers updated. Do mode
5390 compatibility checks. Ensure result has specified mode.
5391 (rtx-set-quiet): New arg `gstate', all callers updated.
5392 (rtx-set-trace): Ditto.
5393 (s-c-call): New arg `tstate', all callers updated.
5394 (s-c-raw-call): Ditto.
5395 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
5396 (s-cmpop,s-if,e-if): Ditto.
5397 (s-subreg): New proc.
5398 (-par-new-temp!): New proc.
5399 (-par-next-temp!): Rewrite.
5400 (-par-replace-set-dests): Use -par-new-temp!.
5401 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
5402 (s-sequence): Use -rtx-c-with-state.
5403 * rtx-funcs.scm (*): Update.
5404 (raw-reg:): New rtx function.
5406 (join:,subreg:): New rtx functions.
5408 * insn.scm (<insn>): New members pre-cond-trap, condition,
5409 post-cond-trap, compiled-condition.
5411 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
5413 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
5415 * utils-cgen.scm (parse-symbol): New proc.
5416 (parse-string): New proc.
5417 (gen-get-macro,gen-set-macro): New arg `index-args'.
5418 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
5419 Prepend \ to newlines.
5421 * utils.scm (alist-remove-duplicates): Delete.
5423 * sid.scm (sim-init!): Delete private debugging code.
5425 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
5427 * cgen-sid.scm: New file for C++ simulator application.
5428 * sid-arch.scm: Ditto.
5429 * sid-cpu.scm: Ditto.
5430 * sid-decode.scm: Ditto.
5431 * sid-model.scm: Ditto.
5433 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
5435 1999-03-05 Ben Elliston <bje@cygnus.com>
5437 * arm.cpu: New file.
5439 1999-03-03 Doug Evans <devans@casey.cygnus.com>
5441 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
5442 * Makefile.in: Rebuild.
5444 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
5445 (-attr-parse): Validate default value.
5447 * read.scm (-CGEN-VERSION): Change to 0.7.1.
5448 (-CGEN-LANG-VERSION): Ditto.
5449 (-keep-all-machs): Renamed from -keep-all, all uses updated.
5450 (<reader>): New member keep-isa plus accessors.
5451 (-keep-isa-set!,keep-isa-validate!): New procs.
5452 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
5453 (common-arguments): New variable.
5454 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
5455 (-debug-repl,continue): New procs.
5456 (-cgen,cgen): New procs.
5457 * cgen-gas.scm: Rewrite.
5458 * cgen-opc.scm: Rewrite.
5459 * cgen-sim.scm: Rewrite.
5460 * cgen-stest.scm: Rewrite.
5462 * gas-test.scm (gas-test-init!): Call opcodes-init!.
5463 (gas-test-finish!): Call opcodes-finish!.
5464 (gas-test-analyze!): Call opcodes-analyze!.
5465 (<hw-asm>): New method test-data.
5466 (<operand>,testdata): Rewrite.
5467 * sim-test.scm (sim-test-init!): Call opcodes-init!.
5468 (sim-test-finish!): Call opcodes-finish!.
5469 (sim-test-analyze!): Call opcodes-analyze!.
5470 (<hw-asm>): New method test-data.
5471 (<operand>,testdata): Rewrite.
5473 1999-03-01 Doug Evans <devans@casey.cygnus.com>
5475 * fixup.scm (reverse!): Define if missing.
5476 * *.scm: Use reverse! instead of list-reverse!.
5478 * utils.scm (leading-id-char?): New proc.
5479 (id-char?): Rewrite.
5480 (chars-until-delimiter): New proc.
5481 * opc-itab.scm (extract-syntax-operands): Rewrite.
5482 (strip-mnemonic): Rewrite.
5483 (compute-syntax): Rewrite.
5485 * pmacros.scm (-pmacro-substr): New proc.
5486 (pmacros-init!): Add builtin .substr.
5488 1999-02-26 Doug Evans <devans@casey.cygnus.com>
5490 * thumb.cpu: New file.
5492 1999-02-24 Doug Evans <devans@casey.cygnus.com>
5494 * Makefile.am (CGENCFLAGS): New variable.
5495 (WITH_HOBBIT): Use automake conditional.
5496 (CGEN_HOB_SRC): New variable.
5497 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
5498 (*.o): Compile with CGENCFLAGS.
5499 (cgen-hob.c): Simplify.
5500 (cgen-nohob.c): New rule.
5501 (hobbit): Renamed from hob.x.
5502 (CLEANFILES): Add cgen-nohob.c.
5503 * Makefile.in: Rebuild.
5504 * doc/Makefile.in: Rebuild.
5505 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
5506 (WITH_HOBBIT): Use AM_CONDITIONAL.
5507 * configure: Rebuild.
5508 * aclocal.m4: Rebuild.
5510 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
5511 with string-write-map.
5513 * sim-cpu.scm (hw-need-storage?): New proc.
5514 (-gen-hardware-types): Use it.
5515 (gen-parallel-exec-elm): Call op-save-index?.
5517 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5519 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
5521 (-gen-ifld-extract-beyond): Ditto.
5522 (<integer>): Delete all references.
5523 (<sim-hardware>): Delete.
5524 (hw-profilable?): New proc.
5525 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
5526 (<hw-register>): Rename method get-index-mode to save-index?.
5527 (<hw-register>): New methods gen-get-macro,gen-set-macro.
5528 (<hw-register>,gen-sym-decl): Make virtual.
5529 (<hw-memory>,gen-sym-decl): Make virtual.
5530 (<hw-memory>): Rename method get-index-mode to save-index?.
5531 (<hw-address>,gen-sym-decl): Make virtual.
5532 (<operand>): New method save-index?.
5533 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
5535 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
5536 prefix added. All uses updated.
5538 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
5539 rather than pointer to table entry.
5541 * opcodes.scm: Remove all attribute support, lives in desc.scm.
5542 Remove all hw-asm,op-asm support.
5543 (-gen-parse-number,-gen-parse-address): New procs.
5544 (<keyword>,gen-parse): Redo function name computation.
5545 (<keyword>,gen-print): Ditto.
5546 (<operand>,gen-function-name): Rewrite.
5547 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
5548 (opcodes-init!): Delete call to add-parser!.
5550 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
5551 Define enum using hardware semantic name.
5552 (-gen-hw-decl,-gen-hw-defn): New procs.
5553 (gen-hw-table-decls): Use -gen-hw-decl.
5554 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
5555 CGEN_HW_ENTRY structs.
5556 (gen-operand-table): Output hw's enum, not pointer to table entry.
5557 (-gen-cpu-open): Build table of selected hardware elements.
5559 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
5560 (<hardware> support): Delete.
5561 (<hw-asm>): Delete, moved to hardware.scm.
5562 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
5563 (<hw-asm>,gen-table-entry): New method.
5564 (<hw-asm>,parse!): Delete.
5565 (<keyword>,gen-table-entry): New method.
5566 (<keyword>,parse!): Delete.
5567 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
5568 for gen-decl,gen-defn,gen-ref,gen-init.
5569 (desc-init!): Don't create parser for operand asm specs.
5571 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
5572 * ifield.scm (<ifield>): New member `mode'.
5573 (<ifield>,make!): New arg `mode'.
5574 (ifld-mode): Rewrite.
5575 (ifld-hw-type): Rewrite.
5576 (<ifield>,min-value): Rewrite.
5577 (<ifield>,max-value): Rewrite.
5578 (-ifield-parse): New arg `mode'.
5579 (-ifield-read): Update.
5580 (define-full-ifield): New arg `mode'.
5581 (define-full-multi-ifield): Ditto.
5582 (-multi-ifield-parse): Ditto.
5583 (-multi-ifield-read): Update.
5584 (define-full-multi-ifield): New arg `mode'.
5585 (ifield-builtin!): Update definition of f-nil.
5586 * simplify.inc (define-normal-ifield): Update call to
5588 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
5589 (define-normal-hardware): Delete arg asm. New args indices, values,
5590 handlers. Update call to define-full-hardware.
5591 (define-simple-hardware,dsh): New pmacros.
5592 (define-normal-operand): Update call to define-full-operand.
5593 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5594 Specify INT/UINT mode instead.
5595 (h-gr,h-cr): Use "indices" instead of "asm".
5596 (h-dr,h-ps): Update keyword syntax.
5597 (h-r13,h-r14,h-r15): Ditto.
5598 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
5599 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
5600 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
5601 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
5602 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5603 Specify INT/UINT mode instead.
5604 (h-gr): Use "indices" instead of "asm".
5605 (h-cc): Update keyword syntax.
5606 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5607 Specify INT/UINT mode instead.
5608 (h-hi16,h-slo16,h-ulo16): Update.
5609 (h-gr,h-cr): Use "indices" instead of "asm".
5610 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
5611 (h-accums): Update keyword syntax.
5612 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
5613 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
5614 Specify INT/UINT mode instead.
5615 (h-gr-indices): New pmacro.
5616 (h-gr32,h-gr64): Split up from h-gr.
5617 (h-a): Update type spec. Use values instead of asm spec.
5618 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
5619 (h-y,h-annul-p): Ditto.
5620 (h-asr): Update keyword spec.
5621 (h-lo10,h-lo13,h-hi22): Update.
5622 (get-freg-spec,set-freg-spec): New pmacros.
5623 (h-fr32,h-fr64): Split up from h-fr.
5624 (rdd): Comment out get/set specs.
5625 (lo10,lo13,hi22): Use "handlers" instead of "asm".
5626 * sparc32.cpu (h-psr): Use dsh instead of dnh.
5627 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
5628 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
5629 UNSIGNED. Specify INT/UINT mode instead.
5630 (h-*): Use dsh instead of dnh where appropriate.
5631 (h-ixcc): Update type spec. Use "values" instead of "asm".
5632 (h-p,h-membarmask): Ditto.
5633 (membarmask): Use "handlers" instead of "asm".
5635 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
5636 values,handlers,getters,setters plus accessors.
5637 (hw-mode-ok?,hw-default-mode): New procs.
5638 (<hardware-base>): Rename method new-mode to mode-ok?
5639 (<hardware-base>): New method get-index-mode.
5640 (hw-index-mode): New proc.
5641 (pc?): Delete, moved to operand.scm.
5642 (address?): New proc.
5643 (<hardware>): Delete.
5644 (<hw-asm>): Definition moved here from desc.scm.
5645 (keyword-parse): New proc.
5646 (hardware-parsers): Delete.
5647 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
5648 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
5649 (-hw-parse-get,-hw-parse-set): New procs.
5650 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
5651 indices,values,handlers,get,set. Rewrite.
5652 (-hw-read-extra): Delete.
5654 (define-hardware): Don't add object if not selected.
5655 (define-full-hardware): Ditto.
5656 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
5657 (<hw-register>): Member `type' moved to baseclass. Delete member
5659 (<hw-register>,parse!): Rewrite.
5660 (<hw-register>): Delete methods get-rank,get-mode.
5661 (<hw-register>): Method new-mode renamed to mode-ok?
5662 (<hw-register>): New method get-index-mode.
5663 (<hw-pc>,parse!): Rewrite.
5664 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
5665 (<hw-memory>,parse!): Rewrite.
5666 (<hw-memory>): Delete methods get-rank,get-mode.
5667 (<hw-memory>): Method new-mode renamed to mode-ok?
5668 (<hw-memory>): New method get-index-mode.
5669 (<hw-immediate>): Member `type' moved to baseclass. Delete member
5671 (<hw-immediate>,parse!): Rewrite.
5672 (<hw-immediate>): Delete methods get-rank,get-mode.
5673 (<hw-immediate>): Method new-mode renamed to mode-ok?
5674 (<hw-address>): Delete member hw-asm.
5675 (<hw-address>,parse!): Rewrite.
5676 (<hw-address>): Delete methods get-rank,get-mode.
5677 (<hw-address>): Method new-mode renamed to mode-ok?
5678 (hw-profilable?): Delete.
5679 (hardware-init!): Delete hardware-parsers reference.
5680 Update argument specs of command define-full-hardware.
5681 (hardware-builtin!): Update definitions of hardware builtins.
5682 * operand.scm (<operand>): New members hw-name,mode-name.
5683 Delete member op-asm. New member handlers.
5684 (<operand>,make!): Update.
5685 (op:hw-name,op:mode-name,op:handlers): New procs.
5688 (<operand>): New method get-index-mode.
5689 (<pc>,make!): Update.
5690 (op:new-mode): Rewrite.
5691 (operand-parsers): Delete.
5692 (-operand-parse): Rewrite. Return #f if insn not selected.
5693 (-op-read-extra): Delete.
5694 (-operand-read): Update.
5695 (define-operand,define-full-operand): Update.
5696 (operand-init!): Delete operand-parsers reference.
5697 Update syntax of define-full-operand command.
5699 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
5700 (define-full-insn): Update.
5701 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
5702 (define-full-minsn): Update.
5704 * mode.scm (<mode>): New member class.
5705 (mode:class): New proc.
5707 (-mode-parse): New arg class.
5708 (define-full-mode): Update.
5709 (mode-find): Rewrite.
5710 (mode-make-int,mode-make-uint): New procs.
5711 (mode-init!): Update syntax of define-full-mode command.
5712 (mode-builtin!): Update definitions of builtin modes.
5714 * model.scm (<profile>): Delete.
5716 * read.scm (keep-atlist?): New proc.
5717 (keep-multiple?): New proc.
5718 (<parser-list>): Delete.
5719 (add-parser!,parse-spec!): Delete.
5721 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
5722 (def-rtx-syntax-node): Ditto.
5723 (-rtx-traverse-debug?): New variable.
5724 (tstate-make): New proc.
5725 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
5726 (tstate-new-cond?,tstate-new-set?): New procs.
5727 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
5728 tstate. All callers updated.
5729 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
5730 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
5731 (-build-operand!): Replace arg cond? with tstate.
5732 (-build-reg-operand!,-build-mem-operand!): Ditto.
5733 (-build-index-of-operand!): Update making of <operand> object.
5734 (s-ifield): New arg tstate. All callers updated.
5735 (hw:): New arg tstate. All callers updated. Replace call to
5736 current-hw-lookup with current-hw-sem-lookup-1.
5737 (s-index-of): New arg tstate. All callers updated.
5739 (-rtx-use-sem-fn?): New proc.
5740 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
5742 (s-convop): Only use semantic mode when using semantic cover fns.
5743 (s-cmpop): Call -rtx-use-sem-fn?.
5744 (s-cond,s-case): New arg tstate. All callers updated.
5745 (s-parallel,s-sequence): Ditto.
5747 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
5749 * types.scm (<scalar>): Rewrite implementation.
5750 (<integer>): Delete.
5751 (parse-type): Rewrite.
5753 * utils-cgen.scm (parse-handlers): New proc.
5755 * utils.scm (!=): New proc.
5757 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
5759 * pmacros.scm (-pmacro-expand): Fix typo.
5761 1999-02-12 Doug Evans <devans@casey.cygnus.com>
5763 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
5764 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
5765 * i960.cpu (build-hex2): New pmacro.
5766 (insn-opcode): Simplify.
5767 (insn-opcode2): Ditto.
5769 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
5770 * cgen-stest.scm (catch-with-backtrace): Ditto.
5772 1999-02-11 Doug Evans <devans@casey.cygnus.com>
5774 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
5775 All callers updated.
5776 (-pmacro-invoke): New proc.
5777 (-pmacro-sym,-pmacro-str): New procs.
5778 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
5779 (pmacros-init!): Install builtins .iota, .map, .apply.
5780 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
5781 (h-fr): Simplify register name spec.
5782 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
5783 * utils.scm (num-args-ok?): New proc.
5785 1999-02-10 Doug Evans <devans@casey.cygnus.com>
5787 * pmacros.scm (-pmacro-error): New proc.
5788 (-pmacro-expand): Use it.
5789 (-pmacro-splice): New proc.
5790 (pmacros-init!): Install new builtin .splice.
5792 * sparc.cpu: Include sparc64.cpu when appropriate.
5793 (f-mmask,f-simm11): Moved to sparc64.cpu.
5794 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
5795 (ANNUL attribute): Delete.
5796 (test-* pmacros): New arg cc, all callers updated.
5797 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
5798 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
5800 (ldstub,swap): Moved to sparccom.cpu.
5801 * sparc64.cpu: Add more insns.
5803 1999-02-09 Doug Evans <devans@casey.cygnus.com>
5805 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
5807 (cgen-sem-switch.c): Ditto.
5808 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
5809 moved to cgen-engine.h.
5810 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
5811 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
5812 global. Cache attributes and insn length in IDESC.
5813 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
5814 @cpu@_opcode renamed to @cpu@_get_idata.
5815 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
5816 done later underneath sim_resume.
5817 (@mach@_mach): Record @cpu@_prepare_run.
5818 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
5820 (-hw-gen-set-quiet-pc): Ditto.
5821 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
5822 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
5823 (<hw-addr>,cxmake-get): Ditto.
5824 (<hw-iaddr>,cxmake-get): Ditto.
5825 (<pc>,cxmake-get): Ditto.
5826 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
5827 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
5828 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5829 (<hw-pc>,gen-write): Use hw-selector-default.
5830 (<hw-register>,gen-write): Ditto.
5831 (<hw-memory>,gen-write): Ditto.
5832 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
5833 (-gen-hw-selector): New proc.
5835 * desc.scm: New file.
5836 * desc-cpu.scm: New file.
5837 * opcodes.scm: Split up into several smaller files.
5838 * opc-asmdis.scm: New file.
5839 * opc-ibld.scm: New file.
5840 * opc-itab.scm: New file.
5841 * opc-opinst.scm: New file.
5842 * Makefile.am (desc): New target.
5843 (opcodes): Update args to cgen-opc.scm.
5844 * Makefile.in: Rebuild.
5845 * aclocal.m4: Rebuild.
5846 * config.in: Rebuild.
5847 * configure.in: Update arg to AC_INIT.
5848 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
5849 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
5851 * configure: Rebuild.
5852 * cgen-gas.scm: Update files to load.
5853 * cgen-opc.scm: Ditto. Reorganize option letters.
5854 * cgen-sim.scm: Update files to load.
5855 * cgen-stest.scm: Ditto.
5856 * dev.scm (cload): New app "DESC".
5857 (load-opc): Update files to load.
5858 (load-gtest,load-sim,load-stest): Ditto.
5860 * attr.scm (bool-attr?): New proc.
5861 (attr-list-enum-list): New proc.
5862 (-attr-sort): Rewrite.
5863 (attr-builtin!): Give ALIAS attribute a fixed index.
5864 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
5865 calculate attribute enum list.
5866 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
5868 * insn.scm (-insn-parse): Renamed from parse-insn.
5870 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
5873 * mode.scm (-mode-parse): Renamed from parse-mode.
5875 * operand.scm (<operand>): New member `selector'.
5876 (<operand>,make!): Use default selector.
5877 (hw-selector-default): New variable.
5878 (hw-selector-default?): New proc.
5880 * pmacros.scm (pmacros-init!): New proc.
5881 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
5882 (-env-set!): Delete.
5883 (-pmacro-expand): New proc apply-macro.
5884 Use it in scan-list,scan. Scan list first, then see if macro
5886 (define-pmacro): Rewrite.
5887 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
5889 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
5890 selected if (current-mach) seen.
5891 (rtx?): Renamed from rtx-uneval?, all callers updated.
5892 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
5894 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
5895 selector, all callers updated.
5896 (hw:): New arg selector, all callers updated. Delete old comments
5898 (reg:,mem:): Handle selectors
5899 * rtx-funcs.scm (reg:): Handle selectors.
5901 * read.scm: Renamed from cpu.scm.
5902 (<command>): New class.
5903 (<reader>): New member commands.
5904 (reader-add-command!): New proc.
5905 (reader-lookup-command): New proc.
5906 (reader-error,-reader-process-expanded,reader-process): New procs.
5907 (reader-read-file!): New proc.
5908 (include): Call reader-read-file!.
5910 (cpu-load): Call reader-read-file!.
5911 * utils.scm (num-args): New proc.
5912 * simplify.inc: New file.
5913 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
5914 procs. Move define-normal-foo procs (and abbreviated forms) to
5915 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
5917 * fr30.cpu: Include simplify.inc.
5918 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5919 * i960.cpu: Include simplify.inc.
5920 * m32r.cpu: Include simplify.inc.
5921 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5922 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
5923 * sparc.cpu: Include simplify.inc.
5924 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
5925 * utils-cgen.scm (parse-error): Moved to read.scm.
5926 (sanitize): Rewrite.
5927 (utils-init!): New proc.
5929 1999-02-02 Doug Evans <devans@casey.cygnus.com>
5931 * sparc.cpu: New file.
5932 * sparc32.cpu: New file.
5933 * sparc64.cpu: New file.
5934 * sparccom.cpu: New file.
5935 * sparc.opc: New file.
5937 1999-01-27 Frank Eigler <fche@cygnus.com>
5939 * utils.scm (gen-copyright): New proc.
5941 1999-01-27 Doug Evans <devans@casey.cygnus.com>
5943 Parameterize rtl parsing, rather than having lots of little handlers.
5944 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
5945 Delete member traverse.
5946 (rtx:set-traverse!): Delete.
5947 (-rtx-valid-types,-rtx-valid-matches): New variables.
5948 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
5949 instead of expression. All callers updated.
5950 (def-rtx-node): New args arg-types,arg-modes.
5951 (def-rtx-syntax-node): Ditto.
5952 (def-rtx-dual-mode): Ditto.
5953 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
5954 All callers updated.
5955 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
5956 All callers updated.
5957 (rtx-macro-expand): New proc.
5958 (-rtx-traverse-check-args): Delete.
5959 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
5960 an rtx specific traverser.
5961 (-rtx-any-mode?,-rtx-symornum?): New procs.
5962 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
5963 (-rtx-traverse-no-mode): Delete.
5964 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
5965 (-rtx-traverse-operands): Rewrite.
5966 (-rtx-traverse-expr): Rewrite.
5967 (rtx-traverse): Don't expand macros here, leave for caller to do.
5968 (rtx-simplify): Delete.
5969 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
5971 (rtx-true?,rtx-false?): Ditto.
5972 (-rtx-ref-type): Set dest is operand 1 now.
5973 (-simplify-for-compilation): New proc.
5974 (semantic-in-out-operands): Recognize regno as an alias for index-of.
5975 Expand macros before calling rtx-traverse. Sort operands by name
5976 to avoid unnecessary semantic formats.
5977 (semantic-attrs): New proc.
5978 (rtx-uneval?): Handle (<rtx-func> ...).
5979 (s-boolifop): Delete arg mode. All callers updated.
5980 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
5981 (eq-attr): New arg obj.
5983 * m32r.cpu (rach): Update calls to andif.
5985 * minsn.scm (-minsn-parse-expansion): Renamed from
5986 parse-minsn-expansion.
5987 (-minsn-parse): Renamed from parse-minsn.
5988 (-minsn-read): Renamed from read-minsn.
5989 (def-minsn): Don't check APPLICATION here.
5990 (def-full-minsn): New proc.
5991 (define-macro-insn): Check APPLICATION here. Expand macros.
5992 (define-normal-macro-insn): Ditto.
5994 * utils.scm (word-value): New arg start-lsb?.
5995 (word-mask,word-extract): Ditto.
5996 (split-bits,powers-of-2): Use integer-expt instead of expt.
5997 (bit-set?): Handle 32 bit values (which are bignums).
5998 (cg-logand,cg-logxor): New functions.
5999 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6000 (<ifield>,field-value): Update call to word-value.
6001 (<ifield>,min-value): Use integer-expt instead of expt.
6002 (<ifield>,max-value): Ditto.
6004 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6006 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6008 Compute raw instruction format in addition to semantic based format.
6009 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6010 (<iformat> accessors): Rename accessors to ifmt-*.
6011 (<sformat>): New class.
6012 (fmt-enum): Renamed from fmt:enum.
6013 (-ifmt-search-key): Rewrite.
6014 (-sfmt-search-key): New proc.
6015 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6016 Compute iformat and sformat search keys.
6017 (ifmt-build): Update.
6018 (sfmt-build): New proc.
6019 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6020 (ifmt-compute!): Compute instruction format <iformat> based on
6021 instruction fields alone. Compute new semantic format <sformat>
6022 based on instruction fields and semantic information.
6023 (ifmt:lookup): Delete.
6024 * mach.scm (<arch>): New member sfmt-list, plus accessors.
6025 (current-sfmt-list): New proc.
6026 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6027 Rename member fmt to ifmt. New members fmt-desc, sfmt.
6028 (insn-length,insn-length-bytes): Update.
6029 (insn:mask-length,insn:mask): Update.
6030 (insn-lookup-op): Update.
6031 * gas-test.scm (gas-test-analyze!): Update.
6032 (gen-gas-test): Ditto.
6033 * sim-test.scm (sim-test-analyze!): Update.
6034 (gen-sim-test): Ditto.
6035 * opcodes.scm (gen-operand-instance-table): Update.
6036 (gen-operand-instance-ref): Ditto.
6037 (max-operand-instances): Use heuristic if semantics not parsed.
6038 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6039 (opcodes-analyze!): Only scan semantics of building operand instance
6041 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6042 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6043 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6044 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6045 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6046 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6047 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6049 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6050 New arg lsb0? All callers updated.
6051 (decode-bits): New arg lsb0?. All callers updated.
6052 (opcode-slots): Update call to bit-set?. Call integer-expt instead
6054 (-gen-decode-bits): New arg lsb0?. All callers updated.
6055 (build-slots): Call integer-expt instead of expt.
6056 (build-decode-table-entry): Handle crossing word boundaries better.
6057 (-gen-decode-switch): New arg lsb0?. All callers updated.
6058 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6060 * enum.scm (define-enum): Rewrite.
6061 (define-normal-enum): Ditto.
6062 (def-full-insn-enum): New proc.
6063 (define-normal-insn-enum): Rewrite.
6065 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6067 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6069 * dev.scm: Add sid support.
6071 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6072 (CLEANFILES): Add tmp-*.
6073 * Makefile.in: Rebuild.
6075 * doc/Makefile.am: New file.
6076 * doc/Makefile.in: New file.
6077 * doc/cgen.texi: New file.
6078 * Makefile.am (SUBDIRS): Define.
6079 * Makefile.in: Rebuild.
6080 * configure.in: Create doc/Makefile.
6081 * configure: Rebuild.
6083 1999-01-18 Doug Evans <devans@casey.cygnus.com>
6085 * insn.scm (insn:syn): Delete.
6087 1999-01-15 Doug Evans <devans@casey.cygnus.com>
6089 * fr30.cpu (model fr30-1): Add state variables load-regs,
6090 load-regs-pending. Delete h-gr. Clean up operand names of all units.
6091 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6092 (model m32rx): Ditto.
6093 (addi): Simplify function unit usage spec.
6094 (ld-plus): Rewrite operand names in function unit usage spec.
6095 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6096 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6097 overridden. Allow operand to appear in input and output spec.
6098 (<insn>,gen-profile-code): string-append -> string-list.
6100 * ifield.scm (define-ifield): Call pmacro-expand.
6101 (define-full-ifield,define-normal-ifield): Ditto.
6102 (define-multi-ifield,define-normal-multi-ifield): Ditto.
6104 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6105 with-scache and without-scache cases.
6107 1999-01-14 Doug Evans <devans@casey.cygnus.com>
6109 * fr30.cpu (fr30-1): Add state variable h-gr.
6110 Add units u-cti, u-load, u-store, u-ldm, u-stm.
6111 (all insns): First pass at providing cycle counts.
6112 * sim.scm (<unit>,gen-profile-code): Only check for output operands
6113 when initializing unit output operands, ditto for input operands.
6115 * insn.scm (insn-length,insn-length-bytes): New procs.
6116 * mach.scm (-adata-set-derived!): Use them.
6117 * sim-cpu.scm (-gen-sem-case): Ditto.
6119 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6120 (-gen-write-case): Ditto.
6121 (gen-semantic-fn): Ditto. Split into two:
6122 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
6124 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
6125 scache/no-scache appropriately. All callers updated.
6126 (-gen-sem-case): PCADDR->IADDR.
6127 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6129 * sim-decode.scm (*): Replace string-append,string-map with
6130 string-list,string-list-map where the result is sufficiently large.
6131 (-gen-decode-insn-table): Go back to simple version for non-scache
6132 case: just record IDESC in decoder tables and leave field extraction
6134 (-gen-decode-switch): Ditto.
6135 (-gen-decode-fn): Ditto.
6136 (-gen-extract-decls): Only emit format enum if with-scache?.
6137 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6139 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6140 (-gen-insn-timing): Ditto.
6141 * sim.scm (gen-argbuf-type): Only output sem_fields union in
6144 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6145 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6147 1999-01-12 Doug Evans <devans@casey.cygnus.com>
6149 * cpu.scm (keep-mach-validate!): New proc.
6150 (include): New proc.
6152 * mach.scm (current-arch-mach-name-list): New proc.
6153 (-parse-arch-machs): Always return canonical form.
6154 (def-arch): Validate user specified machs to be kept.
6155 (def-mach-attr!): Simplify.
6157 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6158 (option-init!): Initialize it.
6159 (option-set!): Set it.
6160 (gen-insn-table-entry): Emit 0 for operand instance ref if not
6161 output operand instance tables.
6162 (cgen-opc.in): Only output operand instance tables if asked to.
6164 * sim.scm (option-init!,option-set!): Clarify returned value.
6166 * sim.scm (gen-mach-bfd-name): Move from here.
6167 * utils-cgen.scm: To here.
6169 1999-01-11 Doug Evans <devans@casey.cygnus.com>
6171 * fr30.cpu (ilm): Fix comment field.
6172 (cond-branch): Remove explicit setting of COND-CTI, let cgen
6175 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6176 (rtx-true?, rtx-false?): New procs.
6177 * rtx-funcs.scm (annul): Rename vpc to pc.
6178 (-rtx-traverse-if): Improve determination of whether then/else parts
6179 are conditionally executed.
6181 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6183 (gen-argbuf-type): Simplify generated definition (big sem_fields
6184 union moved outside).
6186 1999-01-11 Ben Elliston <bje@cygnus.com>
6188 * doc/porting.texi: New file.
6190 * doc/intro.texi: New file.
6191 (Layout): Use @example to insert preformatted ASCII text (such as
6192 diagrams). @code is inappropriate here.
6194 1999-01-06 Doug Evans <devans@casey.cygnus.com>
6196 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6198 * m32r.opc (print_hash): Cast dis_info.
6200 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6201 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6204 1999-01-05 Doug Evans <devans@casey.cygnus.com>
6206 * i960.cpu (f-br-disp): Remove RELOC attribute.
6207 (f-ctrl-disp): Ditto.
6208 (callx-disp): set-quiet -> set for (reg h-gr 2).
6209 (callx-indirect,callx-indirect-offset): Ditto.
6211 * Makefile.am (gas-test): Fix dependencies.
6212 * Makefile.in: Rebuild.
6213 * cgen-gas.asm: File creation args are -<uppercase-letter>.
6214 * gas-test.scm (break-out-syntax,make-file-name): Delete.
6215 (gas-test-analyze!): Use syntax-break-out.
6216 * sim-test.scm (break-out-syntax,make-file-name): Delete.
6217 (sim-test-analyze!): Use syntax-break-out.
6218 (cgen-build.sh): Use gen-file-name.
6219 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6220 * insn.scm (syntax-break-out): New proc.
6221 * utils.scm (gen-file-name): New proc.
6223 * fixup.scm (nil,<?,<=?,>?): Delete.
6225 * utils.scm (count-true): Rewrite.
6227 * slib/sort.scm: Move sort.scm to slib directory.
6230 * iformat.scm (ifmt-compute!): Record empty format.
6232 * rtl.scm (semantic-in-out-operands): Simplify by moving several
6233 internal procs outside. Handle expression register numbers.
6236 * rtx-funcs.scm (annul): Rename new_pc to vpc.
6238 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6240 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6241 (gen-semantic-fn,-gen-sem-case): Ditto.
6242 (cgen-cpu.c): Define WANT_CPU to @cpu@.
6243 (cgen-semantics.c): Ditto.
6244 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6245 (gen-ifmt-argvars-defns): New proc.
6246 (gen-ifmt-argvars-assigns): New proc.
6247 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6248 (-gen-decode-fn): Handle non-with-scache case.
6249 (cgen-decode.c): Define WANT_CPU to @cpu@.
6250 * sim-models.scm (-gen-mach-defns): Emit bfd name.
6251 (cgen-model.c): Define WANT_CPU to @cpu@.
6252 * sim.scm (gen-ifld-extract-argvar): New proc.
6253 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6254 with FUN-ACCESS specified.
6255 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6256 (<hw-register>,gen-extract): New arg local?.
6257 (<hw-address>,gen-extract): Ditto.
6258 (-hw-cxmake-get): Handle non-with-scache case.
6259 (-hw-gen-set-quiet): Ditto.
6260 (<hw-address>,cxmake-get): Handle non-with-scache case.
6261 (gen-op-extract-argvar): New proc.
6262 (<operand>,gen-record-profile): Rewrite.
6263 (<operand>,gen-profile-code): Rewrite.
6264 (<unit>,gen-profile-code): Use -gen-argfld-ref.
6265 (gen-argbuf-fields-union): New proc.
6266 (gen-argbuf-type): Use it. Handle non-scache case.
6268 * *.scm: class:foo procs renamed to class-foo.
6269 * attr.scm (<attribute>): New member `for'.
6270 (-attr-parse): New first value in list for default if
6272 (non-bool-attr-list,attr:add!): Delete.
6273 (def-attr): Use current-attr-add!.
6274 (atlist-attr-value-no-default): New proc.
6275 (attr-lookup-default): Handle boolean attributes.
6276 (gen-attr-enum): New proc.
6277 (-attr-remove-meta-attrs-alist): New proc.
6278 (attr-nub): New proc.
6279 (current-attr-list-for): New proc.
6280 (current-{ifld,hw,op,insn}-attr-list): New procs.
6281 (attr-builtin!): New proc.
6282 * cpu.scm (keep-obj?): Rewrite.
6283 (-init-parse-cpu!): Call arch-init!.
6284 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6285 (-finish-parse-cpu!): Call arch-finish!.
6286 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6287 (def-enum,def-full-enum): Use current-enum-add!.
6288 (gen-obj-list-enums): New proc.
6289 * hardware.scm (hw:add!,hw:lookup): Delete.
6290 (def-hardware,def-hardware-ext): Use current-hw-add!.
6291 (hw:std-attrs,hw:attr-list): Delete.
6292 (hardware-builtin!): Define builtin hardware attributes.
6293 * ifield.scm (ifld:add!,ifld:lookup): Delete.
6294 (def-ifield,def-full-ifield): Use current-ifld-add!.
6295 (ifld:std-attrs,ifld:attr-list): Delete.
6296 (ifield-builtin!): New proc.
6297 * insn.scm (insn:add!,insn:lookup): Delete.
6298 (def-full-insn): Use current-insn-add!.
6299 (insn:std-attrs): Delete.
6300 (insn-builtin!): New proc.
6301 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6303 (<arch-data>): New member machs.
6304 (current-attr-list,current-enum-list): New procs.
6305 (current-op-list,current-minsn-list): New procs.
6306 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6307 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6309 (-parse-arch-machs): New proc.
6310 (-arch-parse): New arg machs, all callers updated.
6311 (-arch-read): Handle machs spec.
6312 (def-arch): Define MACH attribute here.
6313 (mach-init!,mach-finish!): Not here.
6314 (cpu:add!,cpu:lookup): Delete.
6315 (def-cpu): Use current-cpu-add!.
6316 (<mach>): New member bfd-name.
6317 (-mach-parse): New arg bfd-name, all callers updated.
6318 (-mach-read): Handle bfd-name spec.
6319 (mach:add!,mach:lookup): Delete.
6320 (def-mach): Use current-mach-add!.
6321 (def-mach-attr!): New proc.
6322 (arch-init!): New proc.
6323 (arch-finish!): New proc. Reverse all object lists here.
6324 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
6325 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
6326 (define-normal-macro-insn): Ignore minsn if mach not kept.
6327 * mode.scm (mode-builtin!): New proc.
6328 * model.scm (model:add!,model:lookup): Delete.
6329 (def-model): Use current-model-add!.
6330 * opcodes.scm (insn:attr-list): Delete.
6331 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
6332 (gen-attr-table-defn): Emit value for default.
6333 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
6334 (op:attr-list): Delete.
6335 (gen-operand-decls,gen-insn-decls): New proc.
6336 (compute-insn-attr-list): Delete.
6337 (cgen-opc.h): Reorganize and simplify.
6338 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
6339 (def-operand,def-full-operand): Use current-op-add!.
6340 (op:std-attrs): Delete.
6341 (operand-enum): Delete.
6342 (operand-builtin!): Define builtin operand attrs.
6343 * utils-cgen.scm (sanitize): Update calls to lookup procs.
6344 (gen-attr-enum-decl): Use gen-obj-list-enums.
6345 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
6347 * fr30.cpu (define-arch): Add machs spec.
6348 (f-i4): SIGNED attribute -> !UNSIGNED.
6349 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
6350 (HASH-PREFIX): Define operand attribute.
6351 (NOT-IN-DELAY-SLOT): Define insn attribute.
6352 * i960.cpu (define-arch): Add machs spec.
6353 * m32r.cpu (define-arch): Add machs spec.
6354 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
6355 (HASH-PREFIX): Define operand attribute.
6356 (FILL-SLOT): Define insn attribute.
6358 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
6360 * fr30.cpu (stilm): Correct mask for and operation.
6362 1998-12-17 Doug Evans <devans@casey.cygnus.com>
6364 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
6365 Replace START/EXIT with start/pass.
6366 (gen-sim-test): Delete ".text".
6368 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
6370 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
6372 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
6374 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
6375 (h-sbit): Make it FUN-ACCESS.
6376 (h-gr): Reorder so that general regs are always printed by number.
6378 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
6380 * i960.cpu (flushreg): Use nop.
6382 1998-12-14 Doug Evans <devans@casey.cygnus.com>
6384 * m32r.cpu (default-alignment): Specify.
6385 * mach.scm (<arch-data>): New member default-alignment.
6386 (adata:default-alignment): New proc.
6387 (current-arch-default-alignment): New proc.
6388 (-arch-parse): New arg default-alignment.
6389 (parse-alignment): New proc.
6390 (-arch-read): Handle default-alignment spec.
6392 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
6394 * insn.scm (f-%): Delete.
6395 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
6396 be readded if proved useful.
6397 (gen-extract-fields): Ditto. Use gen-ifetch.
6398 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
6399 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
6401 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
6403 * fr30.cpu (div2): Set zbit properly when remainder not zero.
6405 1998-12-14 Dave Brolley <brolley@cygnus.com>
6407 * fr30.cpu: Remove stub macros.
6408 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
6409 (div2): Don't use addc/subc.
6411 1998-12-11 Doug Evans <devans@casey.cygnus.com>
6413 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
6416 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
6418 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
6420 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
6422 * cpu.scm (keep-all?): New proc.
6423 (assert-keep-all): Use it.
6424 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
6425 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
6426 Check for spelling errors.
6428 1998-12-09 Doug Evans <devans@casey.cygnus.com>
6430 * rtl.scm (s-convop): Call -rtx-sem-mode.
6432 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
6434 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
6435 (-parse-hw-profile): Ditto.
6436 (<hw-register>, parse!): Return `void' result.
6437 (<hw-pc>, parse!): Ditto.
6438 (<hw-memory>, parse!): Ditto.
6439 (<hw-immediate>, parse!): Ditto.
6440 (<hw-address>, parse!): Ditto.
6442 * ifield.scm (-ifield-parse): Validate encode/decode fields.
6443 (-ifld-parse-encode-decode): New proc.
6444 (-ifld-parse-encode,-ifld-parse-decode): New proc.
6445 (-multi-ifield-parse): Set encode/decode to #f.
6446 (ifld:decode-mode): New proc.
6447 * utils.scm (nub): Rewrite.
6448 * operand.scm (op-nub): Rewrite.
6449 * sim.scm (<ifield>, gen-type): Rewrite.
6450 (-gen-ifld-argbuf-defn): New proc.
6451 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
6452 (<sim-hardware>): Forward gen-trace-extract onto `type'.
6453 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
6454 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
6455 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
6456 New method gen-trace-extract.
6457 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
6458 from gen-argbuf-elm, return "" if not caching register address.
6459 Rewrite gen-extract. New method gen-trace-extract.
6460 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
6461 gen-extract, gen-trace-extract, cxmake-get.
6462 (<hw-iaddress>): New method cxmake-get.
6463 (op-needed-iflds): New proc.
6464 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
6465 (-gen-op-argbuf-defn): New proc.
6466 (gen-op-extract): Renamed from op:extract.
6467 (gen-op-trace-extract): Renamed from op:trace-extract.
6468 (fmt-extractable-operands): Renamed from fmt-semantic-operands
6470 (gen-argbuf-elm): Rewrite.
6471 * sim-decode.scm (-gen-record-args): Update.
6473 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
6475 * pmacros.scm (-pmacro-expand): Handle procedural macros in
6476 argument position. Flag symbolic macros in function position as
6478 (define-pmacro): Handle quoting in definition of symbolic macros.
6479 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
6481 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
6483 * fr30.opc (parse_register_list): Account for reverse masks
6485 (print_register_list): Ditto.
6486 (parse_low_register_list_ld): New function.
6487 (parse_hi_register_list_ld): New function.
6488 (parse_low_register_list_st): New function.
6489 (parse_hi_register_list_st): New function.
6490 (print_hi_register_list_ld): New function.
6491 (print_hi_register_list_st): New function.
6492 (print_low_register_list_ld): New function.
6493 (print_low_register_list_st): New function.
6494 * fr30.cpu (ldr15dr): Implement workaround.
6495 (ldm0,ldm1,stm0,stm1): Implemented.
6497 1998-12-08 Doug Evans <devans@casey.cygnus.com>
6499 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
6500 * configure: Regenerate.
6501 * Makefile.am (WITH_HOBBIT): Update.
6502 (cgen-hob.c): Remove Makefile dependency.
6503 (cgen.o): Depend on cgen-gh.h, config.h.
6504 * Makefile.in: Regenerate.
6505 * aclocal.m4: Regenerate.
6507 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
6509 * i960.cpu, i960.opc: New files.
6511 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
6513 * fr30.opc (parse_register_number): New function.
6514 (parse_register_list): New function.
6515 (parse_low_register_list): Use parse_register_list.
6516 (parse_hi_register_list): Use parse_register_list.
6517 * fr30.cpu (sth): Fix assembler syntax. Implement more
6520 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
6522 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
6523 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
6524 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
6525 (-op-gen-set-trace-parallel): Ditto.
6526 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
6528 * fr30.cpu (call,calld): Fix setting of pc.
6529 (f-op5): Fix start bit number.
6531 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
6533 * fr30.cpu (st): Fix operand ordering. Implement more
6536 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
6538 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
6539 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
6540 (fmt-semantic-operands): Move to sim.scm.
6541 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
6542 * operand.scm (<hw-index>): New member `name'. All builders updated.
6543 (<hw-index>): New method get-name.
6544 (op-profilable?): Moved to sim.scm.
6546 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
6547 (op-profilable?): Moved here from operand.scm.
6548 (gen-extract-type): Delete.
6549 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
6550 (-gen-argfld-ref): New proc.
6551 (-gen-ifld-argfld-name): New proc.
6552 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
6553 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
6554 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
6555 (<hardware-base>): Delete method gen-extract-type. New method
6557 (<hw-register): Ditto. Update method gen-extract.
6558 (<operand>, method gen-argbuf-elm): Rewrite.
6559 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
6560 (s-cmpop): Fix handling of eq,ne for unsigned modes.
6561 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
6563 * sim-decode.scm (-gen-record-args): Tweak.
6565 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
6567 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
6569 * doc/porting: Fix typo: gas->sim.
6570 * fr30.opc (print_m4): New function.
6571 * fr30.cpu: Implemented many insns.
6573 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
6575 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
6577 * fr30.cpu (f-rel9): Delete RELOC attribute.
6578 (f-rel12): Add PCREL-ADDR attribute.
6579 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
6580 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
6581 * fr30.opc (print_label9): Delete.
6583 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
6584 code for CTI indicators.
6585 * insn.scm (insn-cti?): Simplify.
6586 * utils-cgen.scm (atlist:cti?): New proc.
6588 1998-11-30 Doug Evans <devans@casey.cygnus.com>
6590 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
6591 (f-i20-4,f-i20-16,f-i20): New fields.
6597 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
6598 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
6599 * mach.scm (arch-data): Ditto.
6600 (current-arch-default-insn-word-bitsize): Renamed from
6601 current-arch-default-insn-bitsize [ya, that's a pretty long name].
6602 (-arch-read): Update.
6604 * hardware.scm (hw:attr-list): Move here ...
6605 * opcodes.scm: ... from here.
6607 * ifield.scm (fld:bitrange): Delete.
6608 (fld:word-offset,fld:word-length): New procs.
6609 (ifield?): Use class-instance.
6610 (<ifield>, method field-start): Rewrite.
6611 (ifld:enum): New proc.
6612 (<ifield>, methods field-mask,field-value): Rewrite.
6613 (-ifield-parse): Rewrite.
6614 (<multi-ifield> support): Rewrite.
6615 (ifld-beyond-base?): Rewrite.
6616 (ifld:std-attrs): New variable.
6617 (ifld:attr-list): New proc.
6618 * iformat.scm (-compute-insn-mask): Rewrite.
6619 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
6621 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
6622 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
6624 (<operand>): Ditto. Forward onto index instead.
6625 (gen-ifld-decls,gen-ifld-defns): New procs.
6626 (ifld:insert,ifld:extract): New procs.
6627 (<ifield>): New methods gen-insert, gen-extract.
6628 (<multi-ifield>): Ditto.
6629 (<hw-index>): Forward gen-insert,gen-extract onto value.
6630 (<hw-asm>): Delete insert/extract support.
6631 (<hw-register,hw-memory,hw-immediate>): Ditto.
6632 (gen-hash-defines): Use string-list.
6633 Define CGEN_MAX_IFMT_OPERANDS.
6634 (gen-switch): Use string-list,string-list-map.
6635 (gen-fget-switch,gen-fset-switch): Use string-list.
6636 (gen-parse-switch,gen-insert-switch): Ditto.
6637 (gen-extract-switch,gen-print-switch): Ditto.
6638 (gen-insert-switch,gen-extract-switch): New local `total_length'.
6639 (gen-ifmt-table-1,gen-ifmt-table): New procs.
6640 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
6641 (gen-ivalue-entry): New proc.
6642 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
6643 computation. Use 0 for operand ref table if ALIAS insn.
6644 (gen-minsn-table-entry): Use string-list.
6645 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
6646 (gen-opcode-open): Record address of ifield table.
6647 (cgen-opc.h): Call gen-ifld-decls.
6648 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
6649 * types.scm (<bitrange>): New members word-offset,word-length.
6650 Delete member total-length. Delete methods start,mask,value.
6651 (bitrange:word-offset,bitrange:word-length): New procs.
6652 * sim-cpu.scm (gen-define-fields): Simplify.
6653 (gen-extract-fields): Simplify.
6654 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
6655 (<ifield>): New methods gen-ifld-extract-decl.
6656 Delete method gen-ifld-extract-beyond.
6657 (<multi-ifield>): New methods gen-ifld-extract-decl.
6658 (<multi-ifield>, method gen-ifld-extract): Implement.
6659 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
6660 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
6662 * rtl.scm (-rtx-traverse-no-mode): Process operands.
6663 (-rtx-traverse-syntax-no-mode): New proc.
6664 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
6665 (s-ifield): New proc.
6666 (s-shop): Don't prepend `unsigned' for unsigned modes.
6667 * rtx-funcs.scm (ifield): New rtx function.
6668 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
6669 (delay): New rtx function.
6670 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
6672 * cos.scm (-elm-make-method-getter): Fix typo.
6674 * utils.scm (backslash): Handle lists of strings.
6676 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
6678 * fr30.cpu (f-rel9): Correct for pc+2.
6679 (label9): Use print_label9.
6680 * fr30.opc (print_label9): New function.
6682 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
6684 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
6685 * fr30.opc (parse_low_register_list): Renamed.
6686 (parse_hi_register_list): Renamed.
6687 (print_hi_register_list): Renamed.
6688 (print_low_register_list): Renamed.
6690 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
6692 * fr30.cpu (f-rel9): Now a pc relative offset.
6694 1998-11-23 Doug Evans <devans@casey.cygnus.com>
6696 * opcodes.scm (op-asm): Move to here, from operands.scm.
6697 (<op-asm>, method parse!): Validate arguments.
6698 (<operand>, method gen-function-name): Fix thinko.
6699 * operand.scm (<operand>, method make!): Don't set op-asm here.
6700 * utils.scm (list-elements-ok?): New proc.
6702 * opcodes.scm: Clean up pass.
6704 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
6706 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
6707 the fr30_int function.
6708 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
6709 (h-dr): Add FUN-ACCESS attribute.
6711 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
6713 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
6714 for C symbol for models array.
6716 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
6718 * fr30.opc (parse_reglist_low): New function.
6719 (parse_reglist_hi): New function.
6720 (print_reglist_low): New function.
6721 (print_reglist_hi): New function.
6722 * fr30.cpu: Finish remaining insn stubs.
6724 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
6726 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
6728 * fr30.cpu (ldi32m): Don't use for disassembly.
6730 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
6732 * fr30.cpu (int): Implement it.
6734 1998-11-18 Doug Evans <devans@casey.cygnus.com>
6736 * rtx-funcs.scm (nop): Fix C code.
6738 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
6740 * fr30.cpu (f-i32): New ifield.
6743 (ldi32m): New macro insn.
6744 (inte): Provide simple version for now.
6746 * sim-arch.scm: New file.
6747 * sim.scm: Move architecture support generation to sim-arch.scm.
6748 * cgen-sim.scm: Load sim-arch.scm.
6751 * hardware.scm (pc?) New proc.
6752 (class <hardware-base>): Rewrite method 'pc?.
6753 (class <hardware>): Forward 'pc? to the hardware type.
6754 (class <hw-pc>): New method 'pc?.
6756 Add support for variable length ISAs.
6757 * ifield.scm (ifld-beyond-base?): New proc.
6758 * m32r.cpu: Remove integral-insn? spec.
6759 * mach.scm (arch:derived,arch:set-derived!): New procs.
6760 (arch:app-data,arch:set-app-data!): New procs.
6761 (class <arch>): New members derived, app-data.
6762 (class <cpu>): Delete member integral-insn?.
6763 (cpu:integral-insn?): Delete.
6764 (-cpu-parse): Delete arg integral-insn?. All callers updated.
6765 (-cpu-read): Delete integral-insn? support.
6766 (state:decode-assist): Delete.
6767 (state:int-insn?): Delete.
6768 (<derived-arch-data>): New class.
6769 (-adata-set-derived!): New proc.
6770 (mach-finish!): Call it.
6771 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
6772 (gen-operand-instance): Add COND_REF support.
6773 (gen-operand-instance-table): Ditto.
6774 (gen-hash-defines): Update.
6775 (gen-extract-switch): Update type of `insn_value' arg.
6776 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
6777 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
6779 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
6780 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
6781 beyond the base insn (for large insns).
6782 (-gen-extract-beyond-var-list): New proc.
6783 (gen-extract-fields): Handle large insns.
6784 (-gen-write-case): Update sem_arg computation.
6785 Update initial vpc computation.
6786 (gen-semantic-fn): Ditto. Update type of `insn'.
6787 (-gen-sem-case): Update sem_arg computation.
6788 Update initial vpc computation.
6789 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
6790 (-gen-extract-word): New proc.
6791 (<ifield>): New method gen-ifld-extract-beyond.
6792 (gen-ifld-extract-beyond): New proc.
6793 * types.scm (bitrange-overlap?): New proc.
6795 * utils.scm (bits->bytes): New proc.
6796 (bytes->bits): New proc.
6798 Move extraction support into decoder.
6799 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
6800 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
6801 support to sim-decode.scm.
6802 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
6803 be array of IDESC,FMT entries. Make the array const.
6804 (-gen-gcc-label-table): Make array const.
6805 (-gen-decode-switch): Branch to extraction code after insn has been
6807 (-gen-decode-insn-globals): Delete extract handler from
6809 (gen-decode-fn): Add extraction support.
6810 (-gen-sem-fn-decls): Delete extraction fn decls.
6811 (-gen-idesc-decls): Update @cpu@_decode decl.
6812 (-gen-idesc-init-fn): Delete extraction support.
6813 (-gen-extract-decls): New proc.
6815 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
6816 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
6818 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
6819 All callers updated.
6820 (table-entry:make): Record insn value as insn object, not name.
6823 * hobbit.scm (path_basename): Renamed from `basename' to avoid
6824 collision with C function.
6825 (path_dirname): Similarily.
6826 * hobbit.c,hobbit.h: Rebuild.
6828 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
6830 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
6832 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
6834 * fr30.cpu: Implement more instruction stubs.
6836 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
6838 * fr30.cpu: Implement more instruction stubs.
6840 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
6842 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
6844 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
6846 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
6847 (op:std-attrs): Ditto.
6848 * opcodes.scm (gen-operand-instance): Ditto.
6849 (gen-switch): Ditto.
6850 * m32r.cpu (condbit,accum): Update.
6851 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
6853 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
6855 * enum.scm (-enum-read): Fix typo.
6857 * iformat.scm (-ifmt-search-key): Simplify a little.
6859 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
6861 * doc/porting: semantics.c -> sem.c.
6862 * Makefile.in: Regenerate.
6863 * fr30.cpu (add): Change ADD to add. Add more registers and set
6864 status bits on 'add' instruction.
6866 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
6868 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
6871 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
6873 * minsn.scm (minsn:enum): Update, call current-arch-name.
6875 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
6877 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
6878 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
6879 (ARCH,CGEN,CGENFLAGS): New variables.
6880 (gas-test,sim-test): New rules.
6881 * Makefile.in: Rebuild.
6882 * configure.in (arch): Define.
6883 * configure: Rebuild.
6885 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
6886 * All .scm files: Ditto.
6888 * dev.scm: Fix gas-test call to cpu-load.
6889 * gas-test.scm: Clean up pass to remove bit-rot.
6890 * sim-test.scm: Ditto.
6892 * enum.scm (read-enum): Fix typo in `vals' handling.
6894 * hardware.scm (-parse-hw-type): Fix typo.
6895 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
6896 (def-hardware,define-normal-hardware): Ditto.
6898 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
6899 (display-var): Use it.
6900 * hobbit.c: Rebuild.
6901 * hobbit.h: Rebuild.
6903 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
6904 avoid hobbit problem.
6905 * mach.scm (-cpu-read): Rename local `parallel-insns' to
6906 `parallel-insns-' to avoid hobbit problem.
6908 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
6910 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
6911 (parse_slo16,parse_ulo16): Ditto.
6912 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
6914 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
6916 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
6917 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
6918 * Makefile.in: Rebuild.
6919 * insn.scm (define-normal-insn): Expand pmacros.
6920 * mode.scm (<mode>): New member `host?'. All uses updated.
6921 (mode:host?): New proc.
6922 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
6923 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
6924 (define-rtx-dual-mode): Ditto.
6925 (s-index-of): New proc.
6926 (s-unop): Use plain C for host mode operations.
6927 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
6928 * rtx-funcs.scm (index-of): New rtx function.
6929 * sim.scm (<hw-index>): New method cxmake-get.
6931 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
6933 * sim-cpu.scm (-gen-engine-decls): Delete.
6935 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
6937 * doc/rtl (Example): Correct Typo.
6938 * doc/porting: Add 'make dep' step to opcodes port instructions.
6939 * fr30.opc: New file.
6940 * fr30.cpu: New file.
6942 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
6944 * configure.in: Handle guile $exec_prefix = $prefix/foo.
6945 * Makefile.am (GUILEINCDIR): New variable.
6947 * configure: Regenerate.
6948 * Makefile.in: Ditto.
6949 * aclocal.m4: Ditto.
6951 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
6953 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
6954 (cgen-semantics.c): Ditto.
6955 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
6956 * sim-model.scm (cgen-model.c): Ditto.
6957 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
6958 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
6960 * opcodes.scm (read-cpu.opc): Handle empty file.
6962 * cos.scm (-elm-make-method-setter): Fix typo.
6964 * cpu.scm (-init-parse-cpu!): Call types-init!.
6965 (-finish-parse-cpu!): Call types-finish!.
6966 * ifield.scm (<ifield>): Delete members start,length.
6967 New member bitrange.
6968 (<ifield>, methods field-start,field-length): Update.
6969 (fld:start): New arg insn-len. All callers updated.
6970 (<ifield>, methods field-mask,field-value): Update.
6971 (-ifield-parse): Update.
6972 (ifield-init!): Update.
6973 * iformat.scm (compute-insn-length): Simplify.
6974 (compute-insn-mask): Update.
6975 * insn.scm (insn:value): Update.
6976 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
6977 (current-arch-default-insn-bitsize): New proc.
6978 (current-arch-insn-lsb0?): New proc.
6979 (-arch-parse,-arch-read): Update.
6980 (<cpu>): New member file-transform.
6981 (-cpu-parse,-cpu-read): Update.
6982 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
6983 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
6984 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
6985 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
6986 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
6987 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
6988 * operand.scm (op:start): Update call to field-start method.
6989 * sim-decode.scm (opcode-slots): New arg lsb0?.
6990 (fill-slot!,build-slots): Ditto.
6991 (build-decode-table-entry,build-decode-table-guts): Ditto.
6992 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
6993 (gen-decode-fn): Ditto.
6994 (cgen-decode.c): Update call to gen-decode-fn.
6995 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
6996 (-gen-cpu-header,-gen-cpuall-includes): New procs.
6997 (cgen-cpuall.h): Call -gen-cpuall-includes.
6998 * types.scm (<bitrange>): New class.
6999 (types-init!,types-finish!): New procs.
7000 * utils-cgen.scm (parse-number): New proc.
7001 (parse-boolean): New proc.
7002 * utils.scm (word-value): Renamed from shift-bits, rewrite.
7003 (word-mask): Rewrite.
7004 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7005 (m32rxf): New field `file-transform'.
7006 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7008 * hobbit.h: Fix include file name.
7010 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
7012 * slib: New directory of slib files used by cgen/hobbit.
7013 * hobbit.scm: New file.
7014 * hobbit.c: New file.
7015 * hobbit.h: New file.
7016 * hobscmif.h: New file.
7017 * hob-main.c: New file.
7018 * hobslib.scm: New file.
7020 * Makefile.am: Add support for compiling hobbit, and using compiled
7021 version of hobbit to compile cgen.
7022 * Makefile.in: Regenerate.
7023 * configure.in: Support --with-hobbit.
7024 * configure: Regenerate.
7025 * acconfig.h (WITH_HOBBIT): Add.
7026 * config.in: Regenerate.
7028 * rtl.scm: New file, was cdl-c.scm.
7029 Definition of rtx funcs moved to rtx-funcs.scm.
7030 (semantic-in-out-operands): Rewrite to compute object form of
7032 * rtx-funcs.scm: New file.
7034 * cgen-gh.c: #include "config.h".
7035 (gh_cadddr,gh_cddddr): New fns.
7036 (cgh_vector_to_list): New fn.
7037 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7038 (cgh_init): Prefix qsort procs with "cgh-".
7039 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7040 * cgen.c: #include "config.h".
7042 * attr.scm (bitset-attr?): New proc.
7043 (<bitset-attribute>, method parse-value): Value syntax changed from
7044 (val1 val2 ...) to val1,val2,....
7045 (<bitset-attribute>): New method gen-value.
7046 (<integer-attribute>): New method gen-value.
7047 (<enum-attribute>): New method gen-value.
7048 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7049 (<reader>): New class.
7050 (CURRENT-ARCH,CURRENT-READER): New globals.
7051 (keep-mach?): Move here from mach.scm.
7052 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7053 (<arch>): New class.
7054 (<arch-data>): New class.
7055 (<cpu>): Make subclass of <ident>.
7056 (*ENDIAN* variables): Delete.
7057 (process-state-vars): Delete.
7058 (mach-finish!): Add `base' value to MACH attribute.
7059 * hardware.scm (<hardware>): Make subclass of <ident>.
7060 (hw:std-attrs): New global.
7061 (hw-profilable?): New proc.
7062 * ifield.scm (<ifield>): Make subclass of <ident>.
7063 (sort-ifield-list): Move here from iformat.scm.
7064 * iformat.scm (<iformat>): Renamed from <insn-format>.
7065 Make subclass of <ident>.
7066 (-ifmt-search-key): Include cti? in categorization of formats.
7067 (ifmt-analyze): Compile semantics (turn to object form).
7068 * insn.scm (<insn>): Make subclass of <ident>.
7069 New member compiled-semantics.
7070 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7071 * mode.scm (<mode>): Make subclass of <ident>.
7073 * model.scm (<unit>): Make subclass of <ident>.
7074 New members inputs,outputs.
7075 (<model>): Make subclass of <ident>. New member state.
7076 (-unit-parse): Parse inputs,outputs.
7077 (<iunit>): New class.
7078 (-insn-timing-parse-model): New proc.
7079 (parse-insn-timing): Function unit spec rewritten.
7080 * operand.scm (<operand>): Make subclass of <ident>.
7081 New members sem-name,num,cond? New method gen-pretty-name.
7082 (hw-index-scalar): New global.
7083 (op-nub-hw): Move here from rtl.scm.
7084 (op:lookup-sem-name,op-profilable?): New procs.
7085 * pmacros.scm: Rewrite to pass through hobbit.
7086 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7087 * utils.scm (logit): Make a macro.
7088 (bit-set?): Rewrite.
7089 (high-part): Rewrite.
7091 * m32r.cpu (define-arch): Move to top of file.
7092 (cpu family m32rbf): Renamed from m32rb.
7093 (model m32r/d): Function unit spec rewritten.
7094 (all insns): Ditto. Replace UBI with BI.
7096 * opcodes.scm (gen-attr-table-decls): Declare
7097 @arch@_cgen_hw_attr_table.
7098 (gen-attr-table-defns): Generate hw attribute table.
7100 * sim-cpu.scm (-gen-engine-decls): New proc.
7101 (-gen-model-decls): New proc.
7102 (gen-parallel-exec-type): Add new member `written' to struct parexec.
7103 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7104 (-gen-record-profile-args): Simplify.
7105 (-gen-parallel-sem-case): Delete.
7106 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7107 New local `written'. Delete profiling code.
7108 (-gen-sem-case): Ditto.
7109 (-uncond-written-mask,-any-cond-written?): New procs.
7110 (cgen-sem-switch.c): Include duplicates of insns that can be executed
7111 parallelly or serially, and write-back handlers for all parallel insns.
7112 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7113 support to initialization of struct insn_sem.
7114 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7115 (-gen-insn-sem-type): Add parallel write-back support to struct
7117 (-gen-idesc-init-fn): Add support for virtual insns.
7118 Add parallel write-back support.
7119 * sim-model.scm (gen-model-profile-fn): Delete
7120 (-gen-model-fn-decls): New proc.
7121 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7122 (-gen-model-init-fn): New proc.
7123 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7124 members in @mach@_init_cpu.
7125 (cgen-model.c): Generate model handlers for each insn.
7126 * sim.scm (gen-define-field-macro): Cti insns handled differently.
7127 (<hw-pc>): New method gen-write.
7128 (<hw-register>, method gen-write): New arg `mode'.
7129 (<hw-register>): Delete method gen-record-profile!.
7130 New method gen-profile-index-type.
7131 (<hw-memory>, method gen-write): New arg `mode'.
7132 (<hw-address>, method gen-extract): Delete.
7133 (<hw-address>, method gen-write): New arg `mode'.
7134 (<hw-index>, method get-write-index): Rewrite.
7135 (<pc>, method cxmake-get-direct): Delete.
7136 (<pc>): New method cxmake-get. Comment out methods
7137 gen-set-quiet,gen-set-trace.
7138 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7139 gen-profile-index-type,gen-profile-code.
7140 Delete method gen-pretty-name. Rewrite method gen-write.
7141 Delete method cxmake-get-direct.
7142 (-op-gen-set-trace): Update `written'.
7143 (-op-gen-set-trace-parallel): Ditto.
7144 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7145 (gen-cpu-insn-enum-decl): Add extra entries for parallel
7146 insns and their write-back handlers.
7147 (insn-op-lookup): New proc.
7148 (<unit>): New method gen-profile-code.
7149 (<iunit>): New method gen-profile-code.
7150 (gen-argbuf-elm): Add profiling elements.
7151 (gen-argbuf-type): Define cti insns separately in their own struct.
7152 Add member `addr_cache' to this struct. Add entries for pbb virtual
7153 insns. Move semantic entries here from struct scache.
7154 Delete everything from struct scache except argbuf.
7155 (<insn>, method gen-profile-locals): Rewrite.
7156 (<insn>, method gen-profile-code): Rewrite.
7157 (sim-finish!): Create virtual pbb insns.
7159 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
7161 * m32r.cpu (h-cr): Add bbpc,bbpsw.
7162 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7163 (h-psw,h-bpsw,h-bbpsw): Define.
7164 (rte,trap): Handle bbpc,bbpsw.
7165 * opcodes.scm (max-operand-instances): Fix typo.
7166 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7167 hardware elements to be fun-access.
7168 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7170 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
7172 * m32r.cpu (trap): Pass `pc' to m32r_trap.
7174 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
7176 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7178 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
7180 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7182 (mach m32r): Update.
7184 * mach.scm (mach:supports?): New proc.
7185 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7186 gen-reg-access-{decls,defns}.
7187 * sim.scm (gen-reg-access-{decl,defn}): New procs.
7188 (gen-mach-bfd-name): New proc.
7189 (gen-arch-reg-access-{decls,defns}): New procs.
7190 (cgen-arch.[ch]): Output register access cover fns.
7192 * hardware.scm (hardware-builtin!): Set print handlers for
7194 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7196 (CGEN_PRINT_NORMAL,print_hash): Ditto.
7197 (my_print_insn): Ditto. Delete args buf, buflen.
7198 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7199 (-hw-asm-specs): Add `handlers' spec.
7200 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
7202 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
7204 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7205 (<hw-asm>, parse!): New method.
7206 (gen-insn-table-entry): Print semantics.
7207 (gen-opcode-open): Renamed from gen-opcode-table.
7209 * utils.scm (string-write): No longer a macro.
7210 (-string-write): Handle procedure args.
7211 * opcodes.scm: Update all calls to string-write.
7212 * sim-cpu.scm: Ditto.
7213 * sim-decode.scm: Ditto.
7214 * sim-model.scm: Ditto.
7217 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
7219 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7220 (-gen-insn-builders,-gen-insn-builder): New procs.
7222 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
7224 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7225 (gen-opcode-table): Properly terminate comment.
7227 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
7230 Clean up pass over everything, so starting fresh.