1 2010-10-28 Nick Clifton<nickc@redhat.com>
3 * cpu/xstormy16.cpu (alignfix-mem-far): New macro. Like
4 alignfix-mem, but works with 32-bit addresses.
5 (set-alignfix-mem-far): New macro. Like set-alignfix-mem but
6 works with 32-bit addresses.
7 (movfgrgri, movfgrgripostinc, movfgrgripredec, movfgrgrii,
8 movfgrgriipostinc, movfgrgriipredec): Use alignfix-mem-far.
9 (movfgrigr, movfgripostincgr, movfgripredecgr): Use
11 (movfgrgriipostinc, movfgriipostincgr): Propagate addition to
12 source register into base register.
13 (movfgrgriipredec, movfgriipredecgr): Propagate subtraction from
14 source register into base register.
16 2010-10-09 Matt Rice <ratmice@gmail.com>
18 * utils-cgen.scm (gen-attr-accessors): Rename bool attribute to bool_.
19 * cpu/mep.opc (mep_cgen_insn_supported): Ditto.
21 2010-08-30 Doug Evans <dje@sebabeach.org>
23 * rtl-c.scm (s-float-predop): New function.
24 (nan, qnan, snan): Call it.
26 2010-06-28 Alan Modra <amodra@gmail.com>
28 * cpu/mep.opc (mep_examine_ivc2_insns): Delete set but unused var.
30 2010-06-01 DJ Delorie <dj@redhat.com>
32 * cpu/xstormy16.cpu (movgriipostincgr, movgriipredecgr,
33 movfgriipredecgr): Fix increment/decrement amount.
35 2010-02-12 Doug Evans <dje@sebabeach.org>
37 * iformat.scm (/sfmt-search-key): Use iformat key instead of list
40 2010-02-11 Doug Evans <dje@sebabeach.org>
42 * testsuite/location-1.test: Use %pmacros.
44 * desc-cpu.scm (/gen-cpu-open): Remove comment on K&R support.
45 * utils-cgen.scm (gen-define-with-symcat): Remove K&R support.
47 * utils-sim.scm (compute-sformat-argbufs!): Use more consistent name
48 for name of empty sbuf.
50 * iformat.scm (/sfmt-search-key, /ifmt-lookup-sfmt!): Add assert.
52 * insn.scm (<insn>): Add initial value for members fmt-desc, ifmt,
54 (/sub-insn-ifields): Delete old commented out code.
55 (/sub-insn-make!, /parse-insn-format-symbol): Ditto.
56 * operand.scm (/anyof-merge-setter, anyof-merge-semantics): Ditto.
58 * sim-decode.scm (/gen-decode-insn-globals): Tweak formatting of
61 2010-02-10 Doug Evans <dje@sebabeach.org>
63 * gen-all: Print options.
65 2010-01-28 Doug Evans <dje@sebabeach.org>
67 * pmacros.scm (pmacros-init!): New arg rtl-version, all callers
68 updated. Use %-prefix if rtl-version >= 0.9.
69 * read.scm (/supported-rtl-versions): Add (0 9).
70 (/rtl-version-valid?): New function.
71 (/cmd-define-rtl-version): If new rtl version, reinvoke pmacros-init!.
72 (/reader-expr): New function.
73 (reader-process): New function.
74 (/reader-process-with-loc!): Renamed from /reader-process!.
75 Don't pre-expand `if' commands.
76 (/cmd-if): Simplify. Pmacro-expand test, then, else clauses here.
77 Handle rtl-version-equal?, rtl-version-at-least?.
78 * testsuite/Makefile.am (clean-test-files): Remove *.test.cpu*.
79 * testsuite/Makefile.in: Regenerate.
80 * testsuite/pmacros-1.test: Test both . and % as prefixes.
81 * testsuite/testsuite.cpu (/begin, /print, /dump): New pmacros.
82 (newline, print-match, print-expr, print-thunk): Use them.
83 (internal-verify): Update definition.
84 * doc/rtl.texi (define-rtl-version): Document rtl version 0.9.
85 (Top level conditionals): New node.
87 * read.scm (rtl-version-at-least?): Fix typo.
89 2010-01-27 Doug Evans <dje@sebabeach.org>
91 * read.scm: Follow commenting convention.
92 * mach.scm: Follow commenting convention.
94 * pmacros.scm: Follow commenting convention. Replace change to
95 $pmacro to %pmacro. $pmacro is confusing with $ in assembler syntax.
96 (/pmacro-orig-prefix, /pmacro-prefix): New globals.
98 2010-01-25 Doug Evans <dje@sebabeach.org>
100 * co-for-gen-all: Simplify a bit.
102 2010-01-24 Doug Evans <dje@sebabeach.org>
104 * desc-cpu.scm (cgen-desc.h): Don't print virtual enums.
105 * sid-cpu.scm (cgen-desc.h): Ditto.
106 * enum.scm (enum-builtin!): New function.
107 * read.scm (reader-install-builtin!): Call it.
108 * rtl-c.scm (s-convop): Delete, replaced with ...
109 (s-int-convop, s-float-convop): ... new fns.
110 (ext, zext, trunc): Update.
111 (fext, ftrunc, float, ufloat, fix, ufix): Update.
112 * rtx-funcs.scm (fext, ftrunc, float, ufloat, fix, ufix): New parameter
114 * cpu/mep-fmax.cpu (fcvtsw): Update.
115 * cpu/sh.cpu (h-fsd, h-fmov): Update.
116 * doc/rtl.texi (float-convop): Update.
118 * gen-all: Be more consistent with intrinsic generation.
120 * utils-cgen.scm (<location>): Define using new define-class.
121 (<ident>, <source-ident>, <context>): Ditto.
123 * cos.scm (/object-string): New function.
124 (/object-error): Use it.
125 (/object-count-true): New function
126 (object-copy-top): Delete. All callers changed to call object-copy.
127 (/parse-member-list, /build-getter-defs, /build-setter-defs): New fns.
128 (define-class, define-interface, define-method): New macros.
129 (define-getters, define-setters, vmake): Moved here ...
130 * utils-cgen.scm: ... from here.
132 * cos.scm: Follow commenting convention. Why did a single ; have to
133 get indented like it does? :-(
134 * utils-cgen.scm: Ditto.
136 2010-01-23 Doug Evans <dje@sebabeach.org>
138 * gen-all: Move build-configuration related parameters to an
139 external file. Add usage info. Add "force" option.
140 Be smarter about what diffs to generate.
142 * doc/rtl.texi (Expressions): Add more docs on conversion functions.
144 2010-01-21 Doug Evans <dje@sebabeach.org>
146 * doc/rtl.texi (Expressions): Fix docs on `subword'.
148 2010-01-20 Doug Evans <dje@sebabeach.org>
150 * rtx-funcs.scm (nan,qnan,snan): New rtl functions.
151 * rtl-c.scm (nan,qnan,snan): New rtl functions.
152 * doc/rtl.texi (Expressions): Add docs for them.
154 * rtl-traverse.scm (/rtx-canon-anycexprmode): New function.
155 (/rtx-make-canon-table): Add entry for ANYCEXPRMODE.
156 (/rtx-canon-operands): Print expr-mode if /rtx-canon-debug?
157 Do final error check on mode assigned to expression.
158 (/rtx-make-traverser-table): Add entry for ANYCEXPRMODE.
159 * rtl-xform.scm (/rtx-trim-args): Handle ANYCEXPRMODE.
160 * rtl.scm (/rtx-valid-mode-types): Add ANYCEXPRMODE.
161 * rtx-funcs.scm (c-code, c-call, c-raw-call): Use ANYCEXPRMODE.
162 (if, cond, case): Use ANYEXPRMODE.
164 2010-01-19 Doug Evans <dje@sebabeach.org>
166 * testsuite/pmacros-1.test: Add more .splice tests.
168 * read.scm (/cmd-include): Fix absolute path handling.
170 2010-01-05 Doug Evans <dje@sebabeach.org>
172 * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
174 (mode:non-mode-c-type): Delete.
175 (mode:c-type): Update.
176 * rtl-c.scm (s-shop): Fix casting of DI mode values.
178 2010-01-04 Doug Evans <dje@sebabeach.org>
180 * gen-all (all_cgen_cpus): Add sh.
182 2010-01-02 Doug Evans <dje@sebabeach.org>
184 * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
186 2009-12-17 Doug Evans <dje@sebabeach.org>
188 * mep.opc: Apply patches from opcodes to compile with -Wshadow.
189 mep-asm.c now regenerates correctly again.
191 * gen-all: Add support for building gcc/newlib.
192 Specify --prefix and install all built tools.
194 2009-12-16 Doug Evans <dje@sebabeach.org>
196 * sim.scm (/op-gen-written-update): Disable operand number is too
197 large warning, for now.
199 2009-12-11 Nick Clifton <nickc@redhat.com>
201 * cpu/fr30.opc: Fix shadowed variable warnings.
203 2009-12-10 Doug Evans <dje@sebabeach.org>
205 * gen-all: Rewrite. Build more ports. Split out building of sid.
207 2009-11-23 Doug Evans <dje@sebabeach.org>
209 * hardware.scm (hw-pc?): New function.
210 * ifield.scm (ifld-signed?): New function.
211 * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
212 * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
213 (insn-cti?): New function.
214 * rtl.scm (/hw): Create <pc> object for pcs.
215 * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
216 All callers updated. Watch for sets to the pc.
217 (semantic-attrs): Watch for sets to the pc.
218 * sid.scm (<pc> cxmake-get): Handle raw-reg.
219 * sim.scm (<pc> cxmake-get): Handle raw-reg.
220 (<operand> cxmake-get): Add debugging printf.
221 * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
222 EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
223 (/gen-extract-word): Ditto.
225 * utils.scm (gen-c-hex-constant): New function.
226 * utils-sim.scm (/gen-decode-insn-entry): Call it.
228 2009-11-22 Doug Evans <dje@sebabeach.org>
230 * insn.scm (/parse-insn-format): Watch for duplicate ifields.
231 * read.scm (parse-error-continuable): New function.
232 (define /continuable-error-found?): New variable.
233 (/init-reader!): Initialize it.
234 (/finish-reader!): New function.
236 * utils-cgen.scm (obj-list-nub): New function.
238 * mach.scm (<derived-arch-data>): New member large-insn-word?.
239 (/adata-set-derived!): Set it.
240 (adata-large-insn-word?): New function.
241 * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
243 * sim-cpu.scm (cgen-cpu.h): #include it here.
244 (/gen-cpu-defines): Define CGEN_INSN_WORD.
245 (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
247 * sim-decode.scm (/gen-idesc-decls): Ditto.
248 (/gen-extract-case, /gen-decode-fn): Ditto.
249 * sim-model.scm (/gen-model-insn-fn): Ditto.
250 * sim.scm (gen-argbuf-type): Ditto.
252 * rtl-c.scm (/use-gcc-stmt-expr?): New function.
253 (s-sequence): Call it.
255 2009-11-21 Doug Evans <dje@sebabeach.org>
257 * rtl-c.scm (s-sequence): Use gcc's statement expressions for
258 non-VOID-mode expressions with multiple statements.
260 * sim.scm (/operand-number-elaboration-written?): New variable.
261 (/op-gen-written-update op): New function.
262 (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
264 * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
266 * operand.scm (op-nub): Delete.
268 * dev-utils.scm: New file.
269 * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
270 load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
271 * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
272 /loaded-file-record!, maybe-load): Delete.
273 Load cgen files directly instead of via maybe-load.
275 2009-11-14 Doug Evans <dje@sebabeach.org>
277 * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
278 expressions used in a void context.
280 * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
282 * cpu/xc16x.cpu: Delete, use copy in ../cpu.
283 * cpu/xc16x.opc: Ditto.
285 2009-11-12 Doug Evans <dje@sebabeach.org>
287 * rtl-c.scm (s-parallel): Use map-in-order instead of map.
289 * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
290 eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
292 2009-11-11 Doug Evans <dje@sebabeach.org>
294 * html.scm (gen-insn-docs): Add logging message.
296 2009-11-05 Doug Evans <dje@sebabeach.org>
298 * utils-cgen.scm (gen-set-macro2): New function.
299 * sim.scm (<hw-register> gen-get-macro): Call it.
301 * co-for-gen-all: New file.
303 * testsuite/name-comments-1.test: Update call to current-insn-lookup.
305 * utils.scm (reduce): Delete.
307 * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
309 * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
310 regarding PREFIX attribute handling.
312 * operand.scm (<hw-index>): Add enum to possible types, all uses
314 (hw-index-constant?, hw-index-constant-value): New functions.
315 (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
316 hw-index-enum-obj): New functions.
317 (/operand-parse): Handle enum indices.
318 * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
319 hw-index-constant-value.
320 * rtl.scm (rtx-constant-value): Fix handling of enums.
321 * rtx-funcs.scm (enum): Ditto.
322 * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
323 currently supported here.
325 2009-11-02 Doug Evans <dje@sebabeach.org>
327 Specify isa(s) when doing ifield, operand, insn lookups.
328 ACU = all callers updated.
329 * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
330 * enum.scm (define-full-insn-enum): Pass isa-name-list to
332 * html.scm (get-insn-properties): Pass isa-name-list to
334 * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
335 * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
336 (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
337 (/parse-insn-format, syntax-break-out): Ditto.
338 * mach.scm (obj-filter-by-isa): New function.
339 (current-ifld-lookup): New optional arg maybe-isa-name-list.
340 (/ifld-already-defined?, /op-already-defined?): Simplify.
341 (current-op-lookup): New optional arg maybe-isa-name-list.
342 (current-insn-lookup): New arg isa-name-list, ACU.
343 (/insn-already-defined?, /minsn-already-defined?): Simplify.
344 (current-minsn-lookup): New arg isa-name-list, ACU.
345 * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
347 * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
348 (gen-syntax-entry): Ditto.
349 * operand.scm (/operand-parse): Pass isa-name-list to
351 (/derived-parse-encoding): New arg isa-name-list, ACU.
352 (/derived-parse-ifield-assertion): Ditto.
353 (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
354 (/anyof-parse-choice): Ditto.
355 (anyof-satisfies-assertions?): Pass context to rtx-solve.
356 (/anyof-merge-syntax): New arg container, ACU.
357 (operand-builtin!): Add pc to all isas.
358 * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
359 (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
360 (rtl-c-parsed, rtl-c++-parsed): Ditto.
361 (rtl-c): New arg isa-name-list, ACU.
362 (rtl-c-expr, rtl-c++): Ditto.
363 (closure): New arg isa-name-list, ACU.
364 * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
365 (/cstate-isas): New function.
366 (/rtx-canon-symbol-list): New function.
367 (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
369 (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
370 (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
371 (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
372 (rtx-canonicalize): New arg isa-name-list, ACU.
373 (rtx-canonicalize-stmt): Delete.
374 (tstate-make): New arg isas, ACU.
375 (tstate-isas, tstate--set-isas!): New functions.
376 (tstate-env-stack): Renamed from tstate-env, ACU.
377 (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
378 (tstate-make-closure): Renamed from tstate-new-env, new arg
380 (/rtx-traverse-env): Delete.
381 (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
383 (/rtx-traverse): Include conditional flag in dump output.
384 Update isa,envstack for closures. Pass isa list to current-op-lookup.
385 (<eval-state>): New member isas. Rename env to env-stack.
386 (<eval-state> vmake!): Handle #:isas. #:env renamed to #:env-stack.
387 (<eval-state>): New getter/setter for isas. Rename env getter/setter
389 (estate-make-for-eval): Provide #:isas.
390 (estate-make-closure): Renamed from estate-new-env. New arg
392 * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
393 (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST.
394 (/rtx-trim-for-doc): Handle closures.
395 * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION,
397 (rtx-env-var-list): Delete.
398 (rtx-env-make): Handle already-compiled environments.
399 (rtx-var-alist-to-env): New function.
400 (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
401 (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
402 (rtx-operand-obj): New arg isa-name-list, ACU.
403 (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
405 * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
406 * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
407 (/frag-compute-desired-frags): Minor simplification.
408 (/frag-pick-best): Ditto.
409 * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
410 (/gen-sfrag-code): Update.
411 * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
412 * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
413 * utils.scm (non-null-intersection?): New function.
415 * gen-all (do_src): Manually run cgen-all for sid.
417 2009-11-01 Doug Evans <dje@sebabeach.org>
421 * rtl-traverse.scm (/rtx-canon): Issue better error message for
422 invalid rtx function names.
424 2009-10-28 Doug Evans <dje@sebabeach.org>
426 * cos.scm (object-assign!): New function.
427 * mode.scm (/mode-set-word-params!): Call it.
429 2009-10-25 Doug Evans <dje@sebabeach.org>
431 Record bitset attributes internally as a list.
432 Record rtx attribute values internally as ((rtx-expr)).
433 * attr.scm (bitset-attr?): Delete, unused.
434 (<bitset-attribute> parse-value): Rewrite.
435 (/attr-parse): Rewrite bitset default value processing.
436 (/attr-read): Pick out values of scalar attributes to distinguish
437 them from bitset values which are a list.
438 Fix spelling errors for processing of default values.
439 Handle string attributes.
440 (bitset-attr->list): Delete, all callers updated.
441 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
443 (atlist-source-form): Rewrite.
444 * hardware.scm (<hardware-base> 'get-isas): Update recognition
446 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
448 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
449 values are now lists.
450 * mach.scm (def-isa-attr!): Update, bitset attribute values,
451 including the default, are now lists.
452 (all-isas-attr-value): Result is now a list.
453 * doc/rtl.texi: Clean up pass over attribute docs.
455 Change internal representation of rtx attribute values.
456 * attr.scm (/attr-val-is-rtx?): New function.
457 (attr-value): Call it.
458 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
459 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
460 Disallow rtx values for bitset attributes.
461 (/attr-read): Record rtx in default value as ((rtx-expr)).
462 (/attr-eval): Update.
464 2009-10-24 Doug Evans <dje@sebabeach.org>
466 * gen-all-doc: Add sh.cpu.
467 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
468 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
470 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
471 (/gen-sfrag-case): Ditto.
472 * sim-cpu.scm (/gen-sem-case): Ditto.
474 * doc/rtl.texi: Add note that different ifields, operands, insns,
475 and minsns may occur with the same name in different isas.
476 Add note on the canonical form of rtl expressions.
478 2009-10-23 Doug Evans <dje@sebabeach.org>
480 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
481 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
483 * decode.scm: Tweak various comments.
484 (/opcode-slots): Add FIXME.
485 (/build-decode-table-guts): Add assert.
486 * utils-sim.scm (/gen-set-itype-and-extract): New function.
487 (/gen-bracketed-set-itype-and-extract): New function.
488 (/gen-decode-default-entry): Rewrite.
489 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
490 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
491 updated. Don't unnecessarily emit check for whether all opcode bits
493 (/gen-decode-expr-set-itype): Delete.
494 (/gen-decode-expr-entry): Update.
495 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
496 updated. Keep track of decoder tables used thus far.
497 (/gen-decoder-switch): Ditto.
498 * utils.scm (word-bit-value): New function.
500 2009-10-14 Doug Evans <dje@sebabeach.org>
502 * ifield.scm (<ifield>, value): Provide default initial value.
503 (ifield-encode-mode): Delete
504 (ifield-decode-mode): Delete duplicate definition.
505 (<derived-ifield>, 'make!): Initialize members encode, decode.
506 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
508 (<multi-ifield>, 'gen-insert): Ditto.
510 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
512 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
513 for @foo@_init_idesc_table.
515 2009-09-30 Doug Evans <dje@sebabeach.org>
517 * doc/intro.texi: Mention SID.
518 * doc/sim.texi: Ditto.
519 * doc/porting.text (Doing a simulator port): Add some text.
521 2009-09-27 Doug Evans <dje@sebabeach.org>
523 * cos.scm (/class-table): New global.
524 (/class-uid, /class-set-uid!): New functions.
525 (/class-parent-name): Renamed from /class-parents.
526 (/class-make!): Change parents arg to parent-name, all callers updated.
528 (/class-lookup-uid): New function.
529 (/class-parent-classes): Rewrite.
530 (/class-mi?): Delete.
531 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
533 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
534 (/class-compute-class-desc, class-desc-dump): Update.
535 (/object-make!): Update.
536 (/object-make-with-values!): Delete arg class-desc, all callers
538 (/object-copy): Delete arg top?, all callers updated.
539 (/object-specialize): Delete.
540 (/object-elements, /object-top-class): Delete.
541 (/object-class-name, /object-class-desc): Update.
542 (/object-class-uid): New function.
543 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
544 class-make, /class-subclass? /class-lookup-element,
546 (/elm-delta, elm-list): Delete.
547 (/elm-make-method-getter, elm-get, elm-xget): Update.
548 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
549 (elm-make-getter, elm-make-setter): Update.
550 (/method-lookup-next): Update.
551 (send): Don't specialize class passed to method.
552 (send-next): New arg class-name, all callers updated.
553 (/class-parent, /class-parent-via-path, object-parent): Delete.
554 (class-cons-parent!, class-append-parent!): Delete.
555 (object-reset!): Init /class-table.
557 * cos.scm (/object-debug-classes): Delete.
558 (/object-debug-elements, /object-debug-methods): Delete.
560 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
561 (method-proc): Delete.
562 (method-make-virtual!, method-make-virtual-forward!): Delete.
563 * ifield.scm (<ifield> field-start): Update.
564 (<ifield> field-length, pretty-print): Update.
565 (<multi-ifield> field-length, field-start, pretty-print): Update.
566 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
567 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
568 (<array> gen-sym-defn): Ditto.
569 (<hardware-base> gen-defn): Renamed from gen-defn.
570 (<hw-register> gen-type): Update.
571 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
572 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
573 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
574 (<hw-immediate> gen-type): Update.
575 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
576 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
577 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
578 (<array> gen-sym-defn): Ditto.
579 (<hardware-base> gen-defn): Renamed from gen-defn.
580 (<hw-register> gen-type): Update.
581 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
582 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
583 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
584 (<hw-immediate> gen-type): Update.
585 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
587 2009-09-25 Doug Evans <dje@sebabeach.org>
589 * operand.scm (/anyof-merge-setter): Handle set-quiet.
590 * rtl.scm (rtx-single-set?): Handle set-quiet.
592 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
593 rtl-cover-fns?, macro?. All callers updated.
594 (estate-make-for-normal-rtl-c): Delete, have all callers call
595 estate-make-for-rtl-c directly.
596 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
597 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
599 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
600 replaces /par-replace-set-dests.
601 (/par-replace-set-src-expr-fn): New function, replaces
602 /par-replace-set-srcs.
603 (s-parallel): Rewrite.
605 * rtl.scm (rtx-pretty-strdump): New function.
606 * rtl-traverse.scm (/rtx-canon-error): Use it.
607 (<eval-state>): New member outer-expr.
608 (estate-error): Include outer expression in error message if present.
610 2009-09-23 Doug Evans <dje@sebabeach.org>
612 * xc16x.cpu (h-cr): New hardware.
613 (muls): Comment out parts that won't compile, add fixme.
614 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
615 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
616 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
618 Rewrite rtl processing to require it to be "canonicalized" first,
619 and write a full canonicalizer / expression checker.
620 Remove all appearances of DFLT in canonical rtl.
621 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
623 * iformat.scm (ifmt-analyze) Use canonical semantics.
624 * insn (<insn>): New member canonical-semantics.
625 * mach.scm (<arch>): New member multi-insns-instantiated?.
626 (/instantiate-multi-insns!): New function.
627 (/canonicalize-insns!): New function.
628 (arch-analyze-insns!): Canonicalize insn semantics before processing
630 * mode.scm (/mode-set-word-params!): New function.
631 (mode-void?): New function.
632 (mode-compatible?): VOID is compatible with VOID.
633 (/mode-word-sizes-defined?): New global.
634 (mode-set-word-modes!): Use/set it.
635 (mode-ensure-word-sizes-defined): Update.
636 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
637 Redo WI/UWI/AI/IAI handling.
638 (op:new-mode): No longer accept DFLT.
639 (<derived-operand> constructor): Ensure all fields are initialized.
640 (<anyof-operand> constructor): Ditto.
641 (/derived-parse-ifield-assertion): Delete arg `args'.
643 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
644 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
645 (rtl-c-expr, rtl-c++): Ditto.
646 (/rtl-c-get): Use mode of operand, not containing expression.
647 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
648 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
649 estate-for-insn? instead.
650 (s-unop): Use mode of expression, not first operand.
651 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
652 (s-sequence): Remove DFLT support.
653 (ifield): Use mode of expression, not UINT.
654 (pc): Comment out, unused.
655 (int-attr): New rtx kind.
657 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
658 * rtl-traverse.scm (/rtx-canon-debug?): New global.
659 (/make-cstate): New function.
660 (/cstate-context, /cstate-outer-expr): New functions.
661 (/rtx-canon-error): New function.
662 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
663 /rtx-get-last-cond-case-rtx): New functions.
664 (/rtx-canon-*): New functions.
665 (/rtx-canner-table, /rtx-operand-canoners): New globals.
666 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
667 (/rtx-option, /rtx-option-list?): Rewrite.
668 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
669 Rewritten, all callers updated.
670 (/rtx-canon-expr, /rtx-canon): New functions.
671 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
672 (rtx-canonicalize-stmt): New function.
673 (tstate-make): Remove arg `set?'. All callers updated.
674 (tstate-new-set?): Delete.
675 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
676 moved to /rtx-canon-*.
677 (/rtx-traverse-normal-operand): New function.
678 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
679 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
680 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
681 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
683 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
684 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
685 (/rtx-make-traverser-table): Update.
686 (/rtx-traverse-operands): Remove mode processing, now done during
688 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
689 (/rtx-traverse): Ditto.
690 (rtx-init-traverser-tables!): New function.
691 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
692 (rtx-verify-no-dflt-modes): New function.
693 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
694 (rtx-simplify-insn): Use insn-canonical-semantics.
695 (rtx-canonicalize): Moved to rtl-traverse.scm.
696 (/compile-expr-fn, rtx-compile): Delete.
697 (/rtx-trim-rtx-list): New function.
698 (/rtx-trim-for-doc): Handle set, if.
699 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
700 (/rtx-valid-mode-types): Update.
701 (/rtx-valid-matches): Update.
702 (/rtx-find-matchexpr-index): New function.
703 (rtx-lookup): Require rtx-kind to be the rtx name.
704 (def-rtx-node): New arg result-mode, all callers updated.
705 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
706 (rtx-lazy-sem-mode): Delete.
707 (/rtx-closure-make): New arg `mode', all callers updated.
708 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
709 (rtx-operand-obj): Rewrite.
710 (rtx-make-xop): New functions.
711 (/hw): Renamed from `hw', all callers updated.
712 Use the correct mode instead of DFLT for the index.
713 (rtl-builtin!): Call rtx-init-traversal-tables!.
714 (rtl-finish!): Update.
715 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
716 Update mode arg-type.
718 (int-attr): New rtx kind.
720 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
721 (/frag-cost-compute!): Ditto.
722 * semantics.scm (/build-operand!): Delete args op-name, op.
723 New arg op-expr. All callers updated.
724 (/build-mem-operand!): Remove DFLT support.
725 (semantic-compile): Update process-expr!, mode arg deleted.
726 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
728 (/gen-sem-case, /gen-sfrag-code): Ditto.
729 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
730 (/op-gen-set-trace): New function. If not doing profiling, or using
731 the pbb engine, call /op-gen-set-quiet.
732 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
733 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
734 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
735 * utils.scm (find-first-index): New function.
736 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
738 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
740 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
742 2009-09-21 Doug Evans <dje@sebabeach.org>
744 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
745 All callers updated. Add FIXME.
746 (all rtx functions): Rename local estate to *estate*. It's an
747 artificial argument added to the rtx, so make it stand out.
749 * openrisc.cpu (or32 isa): Fix setup-semantics.
751 * rtl.scm (rtx-class-*?): Delete, unused.
752 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
754 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
755 (init-reader!): Set /CGEN-RTL-VERSION to default.
757 * read.scm (cpu-load): Print load parameters.
759 * dev.scm (load-doc): Set verbose-level to 2.
761 2009-09-20 Doug Evans <dje@sebabeach.org>
763 * rtl.scm (rtx-strdump): Use write instead of display.
765 2009-09-17 Doug Evans <dje@sebabeach.org>
767 * utils-cgen.scm (obj-csv-names): New function.
768 * utils-sim.scm (/sfmt-contents): Use it in logging message.
770 2009-09-12 Doug Evans <dje@sebabeach.org>
772 Clean up pass of mode handling.
773 Make use of mode name vs <mode> object more consistent and clear.
774 * hardware.scm (/keyword-read): Default mode to the mode name,
775 not the <mode> object.
776 (/hw-parse-indices): Parse mode name and pass mode object to
777 <hw-asm> constructor.
778 (/hw-parse-values): Ditto.
779 (<hw-register> parse!): Pass mode name to /hw-parse-indices
780 and /hw-parse-values.
781 (<hw-memory> parse!): Ditto.
782 (<hw-address> parse!): Ditto.
783 * mode.scm (/mode-table): New global, replaces mode-list.
784 Modes stored in hashtable instead of list.
785 (/mode-class-table): New global.
786 (mode-list-non-alias-values): Update.
787 (mode:eq?, mode-compatible?, mode:add!): Update.
788 (mode:lookup): Restrict arg to the mode's name. All callers updated.
789 (mode-maybe-lookup): New function.
790 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
791 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
792 (mode-find, mode-set-word-modes!): Update
793 (mode-ensure-word-sizes-defined): Update.
794 (/sort-mode-classes!): New function.
795 (mode-builtin!): Update. Sort mode classes here.
796 (mode-finish!): Sort mode classes here too.
797 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
799 (rtl-c-set-quiet): Allow mode to be name of object.
800 (rtl-c-set-trace): Ditto.
801 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
802 <mode> object. All callers updated.
803 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
804 (rtx-lazy-sem-mode): Ditto.
805 (<rtx-temp> make!): Assert mode arg is a <mode> object.
806 (rtx-env-make): Allow var-list modes to be name or object.
807 * sem-frags.scm (/frag-expr-assq-locals): New function.
808 (/frag-compute-locals!): Call it.
809 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
811 * semantics.scm (/build-mem-operand!): Handle mode aliases.
813 * sim-test.scm (*): Symbols no longer can be passed to string-append.
815 2009-09-10 Doug Evans <dje@sebabeach.org>
817 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
818 Improve error message for missing or too many bits.
819 (/insn-parse): Don't verify iformat for virtual insns.
821 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
823 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
824 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
825 * sid.scm (pbb-engine-insns): Ditto.
826 * sim-decode.scm (cgen-decode.c): Ditto.
828 2009-09-09 Doug Evans <dje@sebabeach.org>
830 * rtl-traverse.scm: Comment tweaks.
831 * rtl-xform.scm: Comment and reformatting tweaks.
832 * doc/rtl.texi: Add text to docs on ifield-assertions.
834 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
837 Add support for controlling warnings/errors.
838 Add tests for iformat description errors.
839 * dev.scm (cload): New option #:diag.
840 * read.scm (<reader>): New member verify-iformat?.
841 (/parse-diagnostic, parse-warning): New functions.
842 (parse-error): Guts moved to /parse-diagnostic.
843 (/set-diagnostic-options!): New function.
844 (cpu-load): New arg diagnostic-options, all callers updated.
845 Recognize -w diagnostic-option-list.
846 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
847 (ifld-simple-ifields, ifields-simple-ifields): New function.
848 * insn.scm (/parse-insn-format-iflds): New function.
849 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
850 New arg isa, all callers updated. Do some basic validation of the
851 ifield list if requested.
852 * mach.scm (/sanity-check-insns): Improve error message text.
853 * doc/running.texi: Document -w option.
854 * doc/porting.texi: Document #:trace, #:diag options to cload.
856 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
858 * dev.scm (*): Change default verbosity level to 2.
860 * ifield.scm (<ifield> pretty-print): New method.
861 (ifld-pretty-print): New function.
862 (<multi-ifield> pretty-print): New method.
864 * ifield.scm (<ifield> field-start): Delete word-len arg.
867 (<multi-ifield> field-start): Ditto.
868 * operand.scm (<hw-index> field-start): Ditto.
870 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
871 total-bitsize. All callers updated.
872 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
873 New member /insn-base-value.
874 (insn-base-value): New function.
875 * mach.scm (/sanity-check-insns): New function.
876 (arch-analyze-insns!): Call it.
878 2009-09-08 Doug Evans <dje@sebabeach.org>
880 * iformat.scm (ifields-base-ifields): Simplify.
881 (compute-insn-length): Simplify, call ifields-base-ifields.
882 (compute-insn-base-mask): Ditto.
883 * ifield.scm (ifld-known-values): Ditto.
884 (ifld-base-ifields): Ditto.
885 * insn.scm (insn-value): Ditto.
886 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
888 2009-09-08 DJ Delorie <dj@redhat.com>
890 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
891 preprocessor macro, not an enum.
893 2009-09-08 Doug Evans <dje@sebabeach.org>
895 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
897 (*): Remove trailing ":" from error messages passed to estate-error.
899 2009-09-07 Doug Evans <dje@sebabeach.org>
901 * types.scm (<struct>): Delete.
903 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
905 (/pmacro-loc-error): New function.
907 * mach.scm (/isa-parse-decode-assist): New function.
908 (/isa-parse): Call it.
910 * decode.scm (/get-subopcode-value): New function.
911 (/opcode-slots): Call it.
912 (/fill-slot!): Add logging message.
914 * cos.scm (/object-error): Convert symbols to strings before passing
917 * read.scm (rtl-version-equal?): New function.
918 (rtl-version-at-least?, rtl-version-older?): New functions.
920 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
921 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
923 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
925 2009-09-03 Doug Evans <dje@sebabeach.org>
927 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
930 2009-09-01 DJ Delorie <dj@redhat.com>
932 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
933 (parse_unsigned16_range): Likewise.
934 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
937 2009-09-01 Doug Evans <dje@sebabeach.org>
939 Pmacro .equals -> .equal?
940 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
941 -pmacro-builtin-equals. All callers updated.
942 (pmacros-init!): Rename .equals to .equal?.
943 * doc/pmacros.texi: Update.
944 * testsuite/pmacros-1.test: Update.
946 * doc/porting.texi: Work around texi2html bug where it doesn't
947 properly escape <> inside double-quotes inside @code.
949 * doc/porting.texi (Doing an opcodes port): Add step to specify
952 2009-08-29 Doug Evans <dje@sebabeach.org>
954 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
956 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
958 2009-08-27 Doug Evans <dje@sebabeach.org>
960 Add do-count rtl function.
961 * rtl-c.scm (s-do-count): New function.
962 (do-count): New rtl handler.
963 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
964 (-rtx-make-traverser-table): Add ITERATION.
965 * rtl.scm (rtx-make-iteration-limit-var): New function.
966 (rtx-env-make-iteration-locals): New function.
967 * rtx-funcs.scm (do-count): New rtl function.
968 * cpu/play.cpu: Add do-count-test insn.
969 * doc/rtl.texi: Add docs on do-count.
971 2009-08-26 Doug Evans <dje@sebabeach.org>
973 * read.scm (parse-error): Change error message output format
974 to match context-owner-error.
975 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
976 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
977 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
978 (operand): Call estate-error instead of context-error.
979 (local, delay): Ditto.
980 (ref, attr): Call estate-error instead of error.
981 * rtl-traverse.scm (tstate-error): New function.
982 (-rtx-traverse-error): Call tstate-error instead of context-error.
983 (-rtx-traverse-operands, -rtx-traverse): Ditto.
984 (estate-error): New function.
985 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
987 (e-if): Call estate-error instead of error.
988 * rtx-funcs.scm (error): Call estate-error instead of context-error.
990 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
991 Rewrite to call context-owner-error.
992 (context-owner-error): New function.
994 * ifield.scm (<ifield> constructor): New arg `location',
996 * insn.scm (<insn> constructor): Ditto.
997 (<multi-insn> constructor): Ditto.
998 * minsn.scm (<macro-insn> constructor): Ditto.
999 * operand.scm (<operand> constructor): Ditto.
1000 * utils-cgen.scm (builtin-location): New function.
1001 (<source-ident>): Fix default value of member `location'.
1002 (source-ident?): New function.
1004 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
1005 (estate-push-env, estate-with-modifiers): Ditto.
1006 (estate-deepen): New function.
1008 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
1010 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
1011 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
1014 2009-08-25 Doug Evans <dje@sebabeach.org>
1016 * doc/pmacros.texi (pmacro default argument values): Add text.
1018 2009-08-23 Doug Evans <dje@sebabeach.org>
1020 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
1021 Rename member prefix -> name-prefix.
1022 (<keyword> getters): Update.
1023 (-keyword-parse): Update. Default enum-prefix to NAME-.
1024 (-keyword-read): Update. Don't compute default value for
1026 (define-keyword): Update.
1027 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
1028 * read.scm (cgen-rtl-version): New function.
1029 (-supported-rtl-versions): Add (0 8).
1030 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
1031 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
1032 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
1033 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
1034 Update, print-name -> enum-prefix, make uppercase.
1035 Remove unnecessary name-prefix spec.
1036 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
1037 * cpu/ip2k.cpu (register-names): Ditto.
1038 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
1039 * cpu/sparc.cpu (gr-names): Ditto.
1040 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
1041 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
1042 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
1043 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
1044 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
1045 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
1046 prefix -> name-prefix.
1047 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
1048 Update, print-name -> enum-prefix, make uppercase.
1049 (drc-names, xf-names): Ditto.
1050 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
1051 * doc/rtl.texi (Keywords): New section.
1052 (hardware indices): Update text.
1053 (rtl versions): Add 0.8.
1055 Add define-rtl-version.
1056 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
1057 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
1058 (cgen-lang-fixlevel): Delete.
1059 (-supported-rtl-versions): New variable.
1060 (-cmd-define-rtl-version): New function.
1061 (init-reader!): New command define-rtl-version.
1062 (-cgen): Add rtl version to --version output.
1063 * doc/rtl.texi: Document rtl version support.
1064 * cpu/play.cpu: Add define-rtl-version.
1066 2009-08-22 Doug Evans <dje@sebabeach.org>
1068 * Makefile.am (OPTIONS): Define.
1069 (desc): Just generate <arch>-desc.[ch] files.
1070 * Makefile.in: Regenerate.
1071 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
1073 (cgen-desc.c): Similarly.
1074 * gen-all-desc: New file.
1075 * opcodes.scm (opc-file-provided?): New function.
1077 * mach.scm (current-*-add!): Update calls to parse-error.
1078 * operand.scm (op:new-mode): Update call to parse-error.
1079 * utils-cgen.scm (make-obj-context): New function.
1081 * NEWS: Copy over entries from 1.1 branch.
1083 2009-08-20 Doug Evans <dje@sebabeach.org>
1085 * gas-test.scm (<keyword> test-data): Catch invalid requests,
1086 flag a warning and compensate.
1087 (<hw-address test-data): Tweak for readability.
1088 (<hw-iaddress test-data): Ditto.
1089 (cgen-build.sh): Convert symbols to strings before passing to
1091 (cgen-allinsn.exp): Ditto.
1093 * doc/pmacros.texi (.splice): Add more text.
1095 2009-08-19 Doug Evans <dje@sebabeach.org>
1097 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
1098 distinguish from 1.1.
1099 * configure: Regenerate.
1100 * read.scm (-CGEN-VERSION): Update.
1101 * doc/version.texi: Update.
1103 New builtin .pmacro?.
1104 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
1105 (pmacros-init!): Add .pmacro?.
1106 * doc/pmacros.text: Document .pmacro?.
1107 * testsuite/pmacros-1.test: Test .pmacro?.
1109 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
1110 of a pmacro begins before its arguments are evaluated, improves
1113 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
1114 * testsuite/pmacros-1.test: Ditto. Add better tests.
1116 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
1117 in assembler syntax.
1118 (Operands): Similarly.
1120 2009-08-18 Doug Evans <dje@sebabeach.org>
1122 * ifield.scm (ifld-encode-mode): Add FIXME.
1123 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
1125 (<ifield> gen-extract): Similarly.
1127 * read.scm (parse-error): Handle #f for context-location.
1128 * utils-cgen.scm (unspecified-location): Fix building of
1131 * doc/rtl.texi: Document how to write hex and boolean values.
1133 * gas-test.scm (<hw-asm> test-data): Handle () values.
1134 (<keyword> test-data): Convert symbols to strings before passing
1136 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
1139 * operand.scm (hw-index-scalar): Set `name'.
1140 (hw-index-anyof, hw-index-derived): Ditto.
1142 2009-08-17 Doug Evans <dje@sebabeach.org>
1144 * pmacros.scm (-pmacro-builtin-internal-test): New function.
1145 (pmacros-init!): Add .internal-test.
1146 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
1147 * testsuite/testsuite.cpu (internal-verify): New pmacro.
1148 * doc/pmacros.text: Document .internal-test.
1150 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
1151 (parse-comment): Allow numbers.
1152 * doc/porting.texi: Document that names and comments may be lists.
1154 * insn.scm (-insn-parse): Fix typo.
1156 Rename .eval -> .exec. Add new .eval.
1157 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
1158 (-pmacro-builtin-eval): New function.
1159 (pmacros-init!): Add .exec.
1160 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
1161 * testsuite/location-1.test: Update.
1162 * testsuite/pmacros-1.test: Add test for .eval.
1164 2009-08-16 Doug Evans <dje@sebabeach.org>
1166 * doc/porting.texi: Remove support for Guile 1.4.
1168 * read.scm (current-reader-location): Return unspecified location
1169 if reader hasn't been initialized yet.
1171 2009-08-13 Doug Evans <dje@sebabeach.org>
1173 * dev.scm: Document tracing options.
1175 * pmacros.scm (pmacro-dump): New function.
1176 (check-pmacro): Tweak debugging output.
1177 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1178 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1180 Add .let* pmacro builtin.
1181 * pmacros.scm (-pmacro-builtin-let*): New function.
1182 (pmacros-init!): Add .let*.
1183 * doc/pmacros.texi: Document .let*.
1184 * testsuite/pmacros-1.test: Test .let*.
1186 2009-08-12 Doug Evans <dje@sebabeach.org>
1188 Clean up cpu file parsing, pass context consistently instead of the
1189 old "errtxt" argument.
1190 NOTE: ACU == "All Callers Updated".
1191 * attr.scm (-parse-simple-attribute): Renamed from
1192 parse-simple-attribute, ACU.
1193 (-attr-parse): Change errtxt argument to context, ACU.
1194 (-attr-read): Ditto.
1195 (atlist-parse): Ditto. Put context arg first.
1196 (attr-parse): Use parse-error instead of context-error.
1197 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1198 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1199 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1200 `context' arg is now a <context> object. ACU.
1201 (-keyword-read): `context' arg is now a <context> object. ACU.
1202 (-hw-parse-indices): Change errtxt argument to context, ACU.
1203 (-hw-parse-values, -hw-parse-handlers): Ditto.
1204 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1205 (-hw-validate-layout, -hw-create-getter-from-layout,
1206 -hw-create-setter-from-layout): Ditto.
1207 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1208 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1209 (<hw-address>:parse!): Ditto.
1210 * ifield.scm (-ifield-parse, ifield-read): Ditto.
1211 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1212 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1213 (-multi-ifield-parse, -multi-ifield-read): Ditto.
1214 * insn.scm (-insn-parse, -insn-read): Ditto.
1215 (parse-syntax): Ditto. Put context arg first.
1216 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1217 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1218 (-parse-insn-format): Ditto.
1219 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1220 (-arch-parse-isas): Ditto.
1221 (-isa-read): Add context arg, ACU.
1222 (-cpu-parse, -cpu-read, -mach-read): Ditto.
1223 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1225 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1226 (minsn-make-alias): Ditto.
1227 * mode.scm (-mode-parse): Ditto.
1228 (parse-mode-name): Ditto. Put context arg first.
1229 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1230 errtxt argument to context, ACU.
1231 (-unit-parse, -model-parse, -model-read): Ditto.
1232 * operand.scm (-operand-parse-getter): Use parse-error instead of
1234 (-operand-parse-setter): Ditto.
1235 (-operand-parse): Change errtxt argument to context, ACU.
1236 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1237 (-anyof-operand-parse, -anyof-operand-read): Ditto.
1238 * read.scm (reader-error): Delete. Use parse-error instead.
1239 (parse-error): Change errtxt argument to context, ACU. Split args
1240 argument into expr and maybe-help-text.
1241 (-reader-process-expanded-1!): Reorganize.
1242 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1243 * types.scm (parse-type): Ditto.
1244 * utils-cgen.scm (single-location->simple-string): New function.
1245 (<context>): Replace members file,lineno with location.
1246 (make-prefix-context): Renamed from context-make-prefix, ACU.
1247 (make-current-context): New function.
1248 (context-append, context-append-name): New functions.
1249 (context-make-reader): Delete.
1250 (parse-name): Change errtxt argument to context, ACU.
1251 Put context arg first.
1252 (parse-comment): Ditto.
1253 (parse-number): Change errtxt argument to context, ACU.
1254 (arg-list-validate-name, arg-list-check-no-args,
1255 arg-list-symbol-arg): Ditto.
1257 * read.scm (-cmd-if): Don't assume test is a list.
1259 * html.scm (get-insn-properties): Delete errtxt, unused.
1261 2009-08-11 Doug Evans <dje@sebabeach.org>
1263 * doc/rtl.texi (hardware types): Add pc.
1265 2009-08-07 Doug Evans <dje@sebabeach.org>
1267 Add -t option for tracing things like commands, pmacro expansion.
1268 * dev.scm (cload): New arg #:trace.
1269 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1270 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
1271 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1272 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1273 (-reader-process-expanded-1!): Trace commands if requested.
1274 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1275 (-set-trace-options!): New function.
1276 (-init-reader!): New function.
1277 (cpu-load): New arg trace-options, all callers updated.
1278 Call -init-reader! and -set-trace-options!.
1279 (cgen-usage): Improve output formatting.
1280 (common-arguments): New option -t.
1281 (-cgen): Process -t.
1282 * utils-cgen.scm (single-location->string): Renamed from
1283 pretty-print-single-location. All callers updated.
1284 (location->string): Renamed from pretty-print-location.
1285 All callers updated.
1286 (source-properties-location->string): New function.
1287 * doc/running.texi: Document -t.
1289 2009-08-06 Doug Evans <dje@sebabeach.org>
1291 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1292 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1293 * utils.scm: ... here.
1295 2009-08-05 Doug Evans <dje@sebabeach.org>
1297 Track source location better, for better error messages.
1298 * pmacros.scm (-pmacro-eval): Delete, unused.
1299 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1300 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1301 (scan-list, scan): Ditto.
1302 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1303 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1304 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1305 (scan-list1): New function.
1306 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
1307 * read.scm (<reader>): New member `location'.
1308 (-reader-lookup-command): Renamed from reader-lookup-command,
1309 all callers updated.
1310 (reader-error): Rewrite to produce better source location info.
1311 (current-reader-location): New function.
1312 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1313 All callers updated. Record source location of expression.
1314 (reader-process-expanded!): Renamed from reader-process-expanded.
1315 All callers updated.
1316 (-reader-process!): Renamed from reader-process. New arg `loc'.
1317 All callers updated. Record source location of define-pmacro.
1318 * utils-cgen.scm (<location>): New class.
1319 (single-location): New (pseudo) class.
1320 (pretty-print-single-location, pretty-print-location): New functions.
1321 (location-top, location-push-single, location-push): New functions.
1322 (unspecified-location, current-input-location): New functions.
1323 (location-property): New object property.
1324 (location-property-set!): New function.
1325 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
1327 * testsuite/location-1.test: New testcase.
1328 * testsuite/run-tests.sh: Fix fail count handling.
1329 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
1330 to expect cgen to fail.
1332 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1334 * read.scm (-cmd-include): Renamed from include. All callers updated.
1335 (-cmd-if): Renamed from cmd-if. All callers updated.
1336 Use reader-process-expanded! on then/else clauses instead of eval1.
1338 2009-07-22 Doug Evans <dje@sebabeach.org>
1340 * modes.scm (TI,OI): New modes.
1341 * types.scm (parse-type): Improve error checking. Don't hardwire
1343 * utils.scm (non-negative-integer?): New function.
1345 * pmacros.scm (-pmacro-builtin-find): New predicate.
1346 (pmacros-init!): Add .find.
1347 * doc/pmacros.tex: Document .find.
1348 * testsuite/pmacros-1.test: Test .find.
1350 2009-07-20 Doug Evans <dje@sebabeach.org>
1352 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1353 commented out printfs.
1354 * rtl.scm (rtl-finish!): Whitespace tweaks.
1355 * model.scm (parse-insn-timing): Tweak logging message.
1356 * operand.scm: Comment and whitespace tweaks.
1357 (op:type): Tweak error message.
1358 (op-ifield): Tweak logging message.
1359 (-derived-operand-parse, anyof-merge-semantics): Ditto.
1360 * read.scm: Whitespace cleanup.
1361 * utils.scm: Whitespace cleanup.
1363 2009-07-19 Doug Evans <dje@sebabeach.org>
1365 Fix binding of nested pmacro parameters.
1366 * pmacros.scm (-pmacro-env-make): New arg prev-env.
1367 All callers updated.
1368 (-pmacro-bulid-lambda): Ditto.
1369 * doc/pmacros.texi: Update.
1370 * testsuite/pmacros-1.test: Add testcase.
1372 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1374 (-multi-ifield-make-default-extract): Ditto.
1376 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1377 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1378 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1380 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1381 * doc/rtl.texi: Update.
1383 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1385 Rename builtin boolean pmacros, for consistency with rtl.
1386 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1387 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1388 * doc/pmacros.texi: Update.
1389 * testsuite/pmacros-1.test: Update.
1391 2009-07-17 Doug Evans <dje@sebabeach.org>
1393 Use hash tables to record ifields, operands, insns, macro-insns.
1394 * attr.scm (attr-builtin!): Tweak some comments.
1395 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1396 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1398 (<multi-ifield>): New constructor.
1399 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1400 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1402 (-sub-insn-make!): Add hack to avoid differences in generated code.
1403 (multi-insn-instantiate!): Add total number of multi-insns to
1405 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1406 minsn-list to foo-table. New member next-ordinal.
1407 Update getters/setters.
1408 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1410 (-get-next-ordinal!, -get-lowest-ordinal): New function.
1411 (-make-ident-object-table, -ident-object-table->list,
1412 -ident-object-table-add!, -ident-object-table-lookup): New functions.
1413 (current-ifld-list, current-ifld-add! current-ifld-lookup,
1414 -ifld-already-defined?): Rewrite.
1415 (current-op-list, current-op-add! current-op-lookup,
1416 -op-already-defined?): Rewrite.
1417 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1418 (current-insn-list, current-insn-add! current-insn-lookup,
1419 -insn-already-defined?): Rewrite.
1420 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1421 -minsn-already-defined?): Rewrite.
1422 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1423 (MAX-VIRTUAL-INSNS): Define.
1424 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1425 Update use of arch-insn-list.
1426 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1427 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1429 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1430 <ident>. New constructor.
1431 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1433 * sid.scm (-virtual-insn-add!): New function.
1434 (-create-virtual-insns!): Call it.
1435 (-fill-sim-insn-list!): Rewrite.
1436 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1437 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1438 * utils-cgen.scm (<ordered-ident>): New class.
1439 (obj-ordinal, obj-set-ordinal!): New functions.
1440 (add-ident-methods!): Delete.
1442 * model.scm (parse-insn-timing): Change logging message to level 3.
1444 2009-07-16 Doug Evans <dje@sebabeach.org>
1446 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1447 add a link to define-normal-insn-enum.
1449 * doc/porting.texi (Conventions): Add docs on writing integers.
1451 * cpu/simplify.inc (*): One line doc strings don't need \n.
1452 (df): Invoke define-full-ifield instead of claiming it's an alias.
1454 (dnop): Mark as deprecated.
1456 * cpu/play.cpu: Add example of hardware `layout'.
1457 * doc/porting.tex: Add docs on simplify.inc.
1458 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1461 * ifield.scm: Whitespace/formatting cleanup.
1463 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1465 * read.scm (parse-error): Don't print single entry args as a list.
1466 (-reader-process-expanded-1): Convert symbol to string for
1469 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1471 2009-07-15 Doug Evans <dje@sebabeach.org>
1473 * cpu/simplify.inc (dno): New pmacro.
1474 * doc/porting.texi: Add section on simplify.inc.
1475 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1477 2009-07-15 Doug Evans <devans@sourceware.org>
1479 * gen-all-doc: Generate index.html.
1481 2009-07-13 Doug Evans <dje@sebabeach.org>
1483 Extend pmacro language, add testsuite.
1484 * Makefile.am (SUBDIRS): Add testsuite.
1485 * Makefile.in: Regenerate.
1486 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1487 testsuite/test-utils.sh.
1488 * configure: Regenerate.
1489 * dev.scm (cload): Handle testsuite app.
1490 (load-testsuite): New function.
1491 * pmacros.scm: (-pmacro-debug?): New global.
1492 (-smacro-table): New global.
1493 (-smacro-lookup, -smacro-set!): New functions.
1494 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1495 (-pmacro-syntactic-form?): New function.
1496 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1497 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1498 (-pmacro-expected-non-negative-integer): New function.
1499 (-pmacro-verify-non-negative-integer): New function.
1500 (-pmacro-expand-expr-list): New function.
1501 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1502 (-pmacro-process-args): Renamed from -pmacro-invoke.
1503 (-pmacro-apply, -smacro-apply): New functions.
1504 (-pmacro-expand): Rewrite syntactic form processing.
1505 (-pmacro-build-lambda): Reformat.
1506 (define-pmacro): Watch for more errors in definition.
1507 (pmacro-debug): New function.
1508 (pmacro-trace): Set/reset -pmacro-debug?.
1509 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1510 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1511 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1512 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1513 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1514 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1515 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1516 (pmacros-init!): Initialize -smacro-table.
1517 Rewrite pmacro initialization.
1518 * read.scm (reader-process-expanded): Renamed from
1519 -reader-process-expanded. All callers updated.
1520 Recognize () as a no-op.
1521 (cpu-load): Tweak logging messages.
1522 * utils.scm (message): Add comment.
1523 * cpu/play.cpu: Add some instructions to play with .let.
1524 * doc/cgenint.texi: Move some debugging related docs to here from
1526 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1527 * testsuite/Makefile.am: New file.
1528 * testsuite/Makefile.in: New file.
1529 * testsuite/test-utils.sh.in: New file.
1530 * testsuite/run-tests.sh: New file.
1531 * testsuite/testsuite.cpu: New file.
1532 * testsuite/pmacros-1.test: New file.
1534 * decode.scm: Comment and formatting tweaks.
1535 (-build-decode-table-guts): Add more data to logging message.
1537 2009-07-12 Doug Evans <dje@sebabeach.org>
1539 Delete files that now live in ../cpu.
1540 * cpu/iq10.cpu: Delete.
1541 * cpu/iq2000.cpu: Delete.
1542 * cpu/iq2000.opc: Delete.
1543 * cpu/iq2000m.cpu: Delete.
1544 * cpu/m32r.cpu: Delete.
1545 * cpu/m32r.opc: Delete.
1547 2009-07-09 Doug Evans <dje@sebabeach.org>
1549 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1550 All callers updated. Work around -ve shifts by referencing the
1553 * utils.scm (message): Handle pairs.
1555 2009-07-08 DJ Delorie <dj@redhat.com>
1557 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1558 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1559 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1562 2009-07-07 Doug Evans <dje@sebabeach.org>
1564 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1565 * cpu/play.opc: New file.
1567 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1568 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1569 * doc/rtl.texi (Instructions): Update.
1571 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1572 (opc-arguments, -OPC): Call set-opc-file-path!.
1573 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1574 (set-opc-file-path!): New function.
1575 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1577 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1578 before passing to gen-c-args.
1580 2009-07-06 DJ Delorie <dj@redhat.com>
1582 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1583 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1584 unspecified accesses to control registers.
1586 2009-07-01 DJ Delorie <dj@redhat.com>
1588 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1589 unspecified accesses to control registers.
1591 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1592 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1594 2009-06-27 Doug Evans <dje@sebabeach.org>
1596 * gen-all-intrinsics: New file.
1598 2009-06-24 Doug Evans <dje@sebabeach.org>
1600 * All *.scm files: Update copyright year.
1601 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1603 2009-06-23 DJ Delorie <dj@redhat.com>
1605 * intrinsics.scm: Updates to support IVC2.
1606 (belongs-to-group?): Check IVC2 slots.
1607 (-slots-attribute): New.
1608 (targets::attributes): Add SLOTS.
1609 (target:add-well-known-intrinsics): Add CPMOV.
1610 (md-insn): Add CPTYPE and CRET?.
1611 (add-md-insn): Likewise.
1612 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1613 duplicate insns with different bit patterns.
1614 (write-cgen-insn?): Add cret? support.
1615 (intrinsics.h): Add vector types.
1616 (runtime-op): Add vector support.
1617 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1619 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1620 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1621 (h-cr-ivc2): Default to typeless.
1622 (h-ccr-ivc2): Fix register width.
1623 (SLOTS): Fix values and default.
1624 (ivc2_*): Add control register names.
1625 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1627 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1628 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1630 2009-06-22 Doug Evans <dje@sebabeach.org>
1632 * semantics.scm (insn-build-known-values): Fix typo in comment.
1634 2009-06-21 Doug Evans <dje@sebabeach.org>
1636 * rtl-xform.scm (rtx-simplify-insn): New function.
1637 * html.scm (gen-insn-docs): Call it.
1638 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1639 * iformat.scm (ifmt-analyze): Minor simplification.
1641 * semantics.scm (semantic-compile): Change arg sem-code-list to
1643 (semantic-attrs): Ditto.
1644 * iformat.scm (ifmt-analyze): Update.
1645 (ifmt-compute!): Update.
1646 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1648 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1649 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1650 * semantics.scm (rtx-simplify): Ditto.
1651 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1652 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1653 (-simplify-expr-fn): Move to rtl-xform.scm.
1654 (-solve-expr-fn, rtx-solve): Ditto.
1655 * rtl-xform.c: New file.
1656 * read.scm: Load it.
1658 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1659 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1660 (-rtx-traverse, rtx-traverse): Ditto.
1662 2009-06-20 Doug Evans <dje@sebabeach.org>
1664 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1666 * configure.in: Update version to 1.1.
1667 * configure: Regenerate.
1668 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1670 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1671 Doug Evans <dje@sebabeach.org>
1673 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1674 (cgen-desc.c): Ditto.
1675 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1676 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1677 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1678 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1679 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1680 (cgen-cpuall.h, cgen-ops.c): Ditto.
1681 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1682 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1683 (cgen-sem-switch.c): Ditto.
1684 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1685 * sim-model.c (cgen-model.c): Ditto.
1687 2009-06-18 Doug Evans <dje@sebabeach.org>
1689 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1691 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1693 * dev.scm (cload): Change #:arch argument to take the path to the
1694 .cpu file instead of just the name of the architecture.
1695 * read.scm (arch-path): Remove trailing '/'.
1696 (cpu-load): Set `arch-path' to directory of .cpu file.
1697 (-cgen): Don't set `arch-path' here.
1699 * doc/porting.texi: Update.
1701 2009-06-14 Doug Evans <dje@sebabeach.org>
1703 * gen-all-doc: Use files in ../cpu where possible.
1705 * Makefile.am (ARCHFILE): Fix path.
1706 * Makefile.in: Regenerate.
1707 * html.scm: Use "pre" instead of "plaintext".
1709 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1710 * doc/app.texi: Cleanup pass.
1711 * doc/cgen.texi: Cleanup pass.
1712 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1713 * doc/intro.texi: Cleanup pass.
1714 * doc/mdate-sh: New file.
1715 * doc/opcodes.texi: Cleanup pass.
1716 * doc/pmacros.texi: Cleanup pass.
1717 * doc/porting.texi: Cleanup pass.
1718 * doc/rtl.texi: Cleanup pass.
1719 * doc/running.texi: Cleanup pass. Document more runtime options.
1720 * doc/stamp-vti: Update.
1721 * doc/version.texi: Update.
1723 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1724 (GUILE): Fix definition.
1725 * Makefile.in: Regenerate with automake 1.9.6.
1726 * aclocal.m4: Regenerate with aclocal 1.9.6.
1727 * configure.in (AC_PREREQ): Set to 2.59.
1728 (GENINSRC_NEVER): Define.
1729 * configure: Regenerate with autoconf 2.59.
1730 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1731 (cgen.info,cgen.dvi): Delete.
1732 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1733 (noinst_TEXINFOS): Add cgenint.texi.
1734 (DOCFILES): Add missing files.
1735 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1736 * doc/Makefile.in: Regenerate with automake 1.9.6.
1738 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1740 * attr.scm: Removing trailing whitespace.
1741 * cgen-intrinsics.scm: Ditto.
1742 * cgen-sim.scm: Ditto.
1748 2009-05-28 DJ Delorie <dj@redhat.com>
1750 * cpu/mep.opc (parse_signed16_range): New.
1751 (parse_unsigned16_range): New.
1752 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1754 2009-05-26 DJ Delorie <dj@redhat.com>
1756 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1758 (f-ivc2-ccrn-c3hi): New.
1759 (f-ivc2-ccrn-c3lo): New.
1760 (f-ivc2-ccrn-c3): New.
1761 (ivc2c3ccrn): Use it.
1763 2009-05-22 DJ Delorie <dj@redhat.com>
1765 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1766 (mep_config_map): Regenerate.
1768 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1769 ivc2-specific names.
1771 (cmovc): move to after field definitions, use ivc2-specific
1773 (cpmovi_b_P0S_P1): New.
1775 2009-05-19 DJ Delorie <dj@redhat.com>
1777 * cpu/mep.opc: Regenerate configuration.
1778 (parse_cdisp10): Only check CPU flags, not COP flags.
1779 (check_configured_mach): Likewise.
1781 2009-05-13 DJ Delorie <dj@redhat.com>
1783 * intrinsics.scm (insns.md): Add RTL predicates.
1784 (intrinsics.h): Remove old C intrinsics.
1786 2009-04-29 DJ Delorie <dj@redhat.com>
1788 * mep-ivc2.cpu: New.
1789 * mep-core.cpu: Regenerated. Add support for deferred register
1791 (SLOT): Add IVC2 slot types.
1792 (sim-syscall): Rename to something more appropriate.
1793 * mep-ext-cop.cpu: Regenerate.
1794 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1795 (print_slot_insn): New.
1796 (mep_examine_ivc2_insns): New.
1797 (mep_print_insn_set_ivc2_mode): New.
1798 (mep_print_insn): Support IVC2 slotting.
1800 2009-04-20 DJ Delorie <dj@redhat.com>
1802 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1803 (guess-mode): Drop COP* syntax.
1804 (need-insn): Add "--syscall--" to the list.
1805 (enum-type): Drop COP* syntax.
1806 (intrinsics.h): Likewise.
1807 (intrinsic-protos.h): Change file header to allow it to be
1810 2009-04-17 DJ Delorie <dj@redhat.com>
1812 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1813 (lhucpm1): Limit to C5 mach.
1814 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1815 * cpu/mep-core.cpu (extend-cdisp10): New.
1816 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1818 2009-04-08 DJ Delorie <dj@redhat.com>
1820 * cpu/mep-c5.cpu: New.
1821 * cpu/mep-core.cpu: Add C5 support.
1822 * cpu/mep.opc: Likewise.
1824 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1826 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1827 about calling memset with a zero length.
1829 2009-02-03 DJ Delorie <dj@redhat.com>
1831 * cpu/mep-core.cpu: Update to new MeP configuration.
1832 * cpu/mep-ext-cop.cpu: Likewise.
1833 * cpu/mep.opc: Likewise.
1835 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1837 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1839 2008-06-17 Dave Brolley <brolley@redhat.com>
1841 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1844 2007-11-13 Dave Brolley <brolley@redhat.com>
1846 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1848 2007-11-05 Dave Brolley <brolley@redhat.com>
1850 * intrinsics.scm,cgen-intrinsics.scm: New application which
1851 generates code to support intrinsic functions for insns in the
1852 mep architecture in gcc.
1854 2007-09-21 Dave Brolley <brolley@redhat.com>
1856 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1857 (rn3us): CDATA attribute now LONG.
1859 2007-08-21 Dave Brolley <brolley@redhat.com>
1861 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1864 2007-07-05 Nick Clifton <nickc@redhat.com>
1866 * utils.scm (copyright-fsf): Update copyright notice to refer to
1869 2007-05-22 Nick Clifton <nickc@redhat.com>
1871 * doc/cgen.texi: Use @copying around the copyright notice.
1872 * doc/internals.texi: Likewise.
1874 2007-02-05 Dave Brolley <brolley@redhat.com>
1876 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1878 2007-02-05 Dave Brolley <brolley@redhat.com>
1880 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1881 in the generated code for @arch@_cgen_init_asm if it is defined.
1883 * Contribute the following changes:
1884 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1886 * attr.scm (<string-attribute>): New attribute class.
1887 (attr-kind): Handle <string-attribute>.
1888 (parse-simple-attribute): New function.
1889 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1890 (<bitset-attribute> 'parse-value): Likewise.
1891 (<boolean-attribute> 'parse-value): Likewise.
1892 (<enum-attribute> 'parse-value): Likewise.
1893 (<string-attribute> 'parse-value): New function.
1894 (-attr-parse): Handle <string-attribute>.
1895 (-attr-read): Likewise.
1896 (<string-attribute> 'gen-value-for-defn-raw): New function.
1897 (<string-attribute> 'gen-value-for-defn): New function.
1899 2006-11-07 Dave Brolley <brolley@redhat.com>
1901 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1904 2006-10-18 Dave Brolley <brolley@redhat.com>
1906 * Contribute the following changes:
1908 2006-07-11 Dave Brolley <brolley@redhat.com>
1910 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1912 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1913 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1914 hardware or memory mode which was used.
1915 * sid-cpu.scm (hw-need-write-stack?): New function.
1916 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1917 identify hardware which uses write stacks.
1918 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1919 Initialized to an empty list.
1920 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1921 hw-need-write-stack?.
1922 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1923 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1924 (used-in-delay-rtl?): New method of <hardware-base>.
1925 (hw-used-in-delay-rtl?): New function.
1927 2006-06-20 Dave Brolley <brolley@redhat.com>
1929 * sid.scm (gen-attr-type): Removed.
1930 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1931 (SH2a-MACH): Add sh5.
1932 (sh2a-nofpu-models): Add units for sh5.
1933 (sh2a-fpu-models): Likewise.
1935 2006-06-15 Dave Brolley <brolley@redhat.com>
1937 * cpu/sh-sim.cpu: New file.
1938 * cpu/sh-sid.cpu: New file.
1939 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1940 (All fields): Remap for (insn-lsb0? #f)
1941 (All insns): Add timing specs.
1942 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1943 'xattrs' and .splice it in.
1944 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1945 (h-frc,h-drc): Add PROFILE attribute.
1947 (h-vbr): New hardware.
1948 (All fields): Remap for (insn-lsb0? #f)
1949 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1950 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1951 (fpscr): Use h-fpscr.
1952 (fsdm,fsdn): Use h-fsd.
1953 (dshci): Add xtiming argument and splice it in.
1954 (dr,xd): pmacros removed.
1955 (All insns): Add timing specs, *-MACH attribibutes,
1956 SH4{A}-GROUP attributes.
1957 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1958 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1959 we're being processed for sim or sid.
1960 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1961 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1962 (define-isa compact): Add (isa-parallel-insns 2).
1963 (define-isa media): Add (isa-parallel-insns 2). Add
1964 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1965 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1967 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1968 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1969 (SH4al-MACH, SH5-MACH): New pmacros.
1970 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1971 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1972 (sh5-media-fp-units, common-model, common-model-with-fp)
1973 (sh3-model, sh3e-model): New pmacros.
1974 (define-model sh2): New model.
1975 (define-model sh2e): New model.
1976 (define-model sh3): New model.
1977 (define-model sh3e): New model.
1978 (define-model sh2a-nofpu): New model.
1979 (define-model sh2a-fpu): New model.
1980 (define-model sh4-nofpu): New model.
1981 (define-model sh4): New model.
1982 (define-model sh4a-nofpu): New model.
1983 (define-model sh4a): New model.
1984 (define-model sh4al): New model.
1985 (define-model sh5-media): New model.
1986 (define-model sh5): Add all units.
1987 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1988 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1989 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1990 (h-pc): Add PROFILE attribute.
1993 (h-gr,h-grc): Likewise.
1994 (h-cr): Set h-sr in setter.
1995 (h-frbit): Get/Set h-fpscr.
1996 (h-szbit,h-prbit): Likewise.
1997 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1998 Add getter and setter.
1999 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
2000 Adjust getter and setter.
2001 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
2002 Adjust getter and setter.
2003 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
2004 (h-fsd,h-fmov): New hardware.
2006 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
2008 * doc/app.texi, doc/internals.texi, doc/intro.texi,
2009 doc/notes.texi, doc/porting.texi, doc/running.texi,
2010 doc/sim.texi: Fix some typos.
2012 2006-07-14 Dave Brolley <brolley@redhat.com>
2014 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
2015 hardware or memory mode which was used.
2016 * sid-cpu.scm (hw-need-write-stack?): New function.
2017 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
2018 identify hardware which uses write stacks.
2019 (useful-mode-names): Renamed to write-stack-memory-mode-names.
2020 Initialized to an empty list.
2021 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
2022 hw-need-write-stack?.
2023 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
2024 (define-getters <hardware-base>): Define used-in-delay-rtl?.
2025 (used-in-delay-rtl?): New method of <hardware-base>.
2026 (hw-used-in-delay-rtl?): New function.
2028 2006-06-20 Dave Brolley <brolley@redhat.com>
2030 * sid.scm (gen-attr-type): Removed.
2032 2006-05-10 Dave Brolley <brolley@redhat.com>
2034 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
2035 support for (if (application-is? <appname>) (...) (...)).
2036 (-cgen): Add trailing "/" to arch-path.
2037 * utils.scm (dirname): Removed. dirname is a primitive function.
2039 2006-05-09 Dave Brolley <brolley@redhat.com>
2041 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
2042 'entire_insn' not 'base_insn'.
2043 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
2045 * sim.scm (-gen-arch-model-decls): Likewise.
2046 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
2047 abuf->written if profiling.
2048 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
2049 object->string om the mode.
2050 (-hw-gen-write-stack-decl): Likewise.
2051 * read.scm (include): Use arch-path as file location.
2052 (arch-path): Define it with a default setting.
2053 (-cgen): Update arch-path when "-a" option is specified.
2054 * utils.scm (dirname): New function.
2056 2006-05-05 Steve Ellcey <sje@cup.hp.com>
2058 * configure.in: Remove AC_ARG_PROGRAM.
2059 * configure: Regenerate with autoconf 2.59.
2061 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
2063 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
2066 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
2068 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
2069 or an error message otherwise.
2070 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
2071 Fix up comments to correctly describe the functions.
2073 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
2074 Anil Paranjape <anilp1@kpitcummins.com>
2075 Shilin Shakti <shilins@kpitcummins.com>
2077 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
2079 * cpu/xc16x.opc: New file containing supporting XC16C routines.
2081 2006-02-10 Nick Clifton <nickc@redhat.com>
2083 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
2085 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
2087 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
2089 (-hw-gen-write-stack-decl): Likewise.
2091 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
2093 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
2094 non-(adata-integral-insn? CURRENT-ARCH) case.
2096 2005-10-28 Dave Brolley <brolley@redhat.com>
2098 Contribute the following changes:
2099 2005-09-19 Dave Brolley <brolley@redhat.com>
2101 * attr.scm (gen-value-for-defn-raw): New methods.
2102 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
2103 gen-value-for-defn-raw.
2104 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
2106 2002-12-13 Dave Brolley <brolley@redhat.com>
2108 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
2109 (-gen-attr-accessors): New function.
2110 (gen-obj-attr-defn): Update terminating initializer.
2111 (gen-obj-attr-end-defn): New function.
2112 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
2113 * sid-cpu.scm (cgen-desc.h): Generate code to include
2114 "opcode/cgen-bitset.h"
2115 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
2117 * desc.scm ('gen-defn): Update terminating initializer.
2118 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
2119 terminatinig initializer.
2120 (gen-hw-decls): Ditto.
2121 (gen-operand-decls): Ditto.
2122 (gen-insn-decls): Ditto.
2123 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
2124 (gen-insn-table): Update terminating initializer.
2125 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
2126 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
2127 * attr.scm (charmask-bytes): New function.
2128 (bitset-attr->charmask): New function.
2129 (<bitset-attribute>): Handle isa-attributes specially. Also handle
2130 differences for SID-SIMULATOR.
2131 (<integer-attribute>): Handle differences for SID-SIMULATOR.
2132 (<enum-attribute>): Ditto.
2134 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2136 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
2138 2005-10-24 DJ Delorie <dj@redhat.com>
2140 * operand.scm (-anyof-merge-syntax): Print a more useful error
2143 2005-10-19 Nick Clifton <nickc@redhat.com>
2145 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
2148 2005-10-18 Andreas Schwab <schwab@suse.de>
2150 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
2152 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2154 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
2157 2005-08-02 Dave Brolley <brolley@redhat.com>
2159 * rtl-c.scm (s-unop): Don't dereference
2160 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
2161 (s-binop, s-convop, s-cmpop): Likewise.
2163 2005-07-29 Dave Brolley <brolley@redhat.com>
2165 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
2166 if with-profile or with-parallel-write.
2167 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
2168 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
2171 2005-07-15 Alan Modra <amodra@bigpond.net.au>
2173 * cpu/fr30.opc (print_register_list): Correct format strings.
2174 * cpu/ip2k.opc: Likewise.
2176 2005-07-05 Nick Clifton <nickc@redhat.com>
2178 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2179 unsigned in order to avoid compile time warnings about sign
2182 2005-07-01 Nick Clifton <nickc@redhat.com>
2184 * desc-cpu.scm: Update to ISO C90 function declaration style.
2185 * opc-asmdis.scm: Likewise.
2186 * opc-ibld.scm: Likewise.
2187 * opc-itab.scm: Likewise.
2188 * cpu/fr30.opc: Likewise.
2189 * cpu/i960.opc: Likewise.
2190 * cpu/ip2k.opc: Likewise.
2191 * cpu/iq2000.opc: Likewise.
2192 * cpu/m32r.opc: Likewise.
2193 * cpu/openrisc.opc: Likewise.
2194 * cpu/sh.opc: Likewise.
2195 * cpu/sparc.opc: Likewise.
2196 * cpu/xstormy16.opc: Likewise.
2198 2005-06-15 Dave Brolley <brolley@redhat.com>
2200 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2201 (cgen-cpu.h): Call it.
2203 Contributed on behalf of Graydon Hoare
2204 2001-06-05 graydon hoare <graydon@redhat.com>
2206 * utils.scm (foldl): Define.
2210 (intersection): Simplify.
2211 * sid.scm : Set APPLICATION to SID-SIMULATOR.
2212 (-op-gen-delayed-set-maybe-trace): Define.
2213 (<operand> 'gen-set-{quiet,trace}): Delegate to
2214 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2215 up and needs cleaning.
2216 (-with-parallel?): Hardwire with-parallel to #t.
2217 (<operand> 'cxmake-get): Replace with lookahead-aware code
2218 * sid-decode.scm: Remove per-insn writeback fns.
2219 (-gen-idesc-decls): Redefine sem_fn type.
2220 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2221 with write stack stuff.
2222 (cgen-write.cxx): Replace per-insn writebacks with single write
2223 stack writeback. Add write stack reset function.
2224 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2226 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2227 estate attribute set.
2228 (delay): Set #:delayed attribute to calculated delay, update
2229 maximum delay of cpu, check (delay ...) usage.
2230 * operand.scm (<operand>): Add delayed slot to <operand>.
2231 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2232 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2233 * doc/rtl.texi (Expressions): Add section on (delay ...).
2235 2005-06-13 Jim Blandy <jimb@redhat.com>
2237 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2240 2005-06-07 Zack Weinberg <zack@codesourcery.com>
2242 * doc/porting.texi: Change all mention of md_apply_fix3 and
2243 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2246 2005-05-18 Dave Brolley <brolley@redhat.com>
2248 * utils-sim.scm (-gen-decode-default-entry): New function.
2249 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2250 code to check that all opcodes bits match.
2251 (-gen-decoder-switch): Use -gen-decode-default-entry.
2253 2005-05-16 Jim Blandy <jimb@redhat.com>
2255 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2256 fetched by one of our GETIMEM* methods.
2257 * utils-gen.scm (-extract-chunk-specs): Always fetch full
2258 base-insn-sized chunks.
2260 2005-05-10 Nick Clifton <nickc@redhat.com>
2262 * Update the address and phone number of the FSF organization in
2263 the GPL notices in the following files:
2264 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2265 cpu/powerpc.cpu, slib/random.scm
2267 2005-05-06 Jim Blandy <jimb@redhat.com>
2269 * pprint.scm, cos-pprint.scm: Add documentation.
2271 * pprint.scm (pprint): Don't wipe out elide-table after each call.
2273 * pprint.scm, cos-pprint.scm: New files.
2275 2005-04-04 Nick Clifton <nickc@redhat.com>
2277 * opcodes.scm (-gen-parse-address): Initialise value to zero to
2278 avoid a compile time warning.
2280 2005-03-18 Nick Clifton <nickc@redhat.com>
2282 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2283 "percent-operand" from "%operand" as the latter confuses xgettext
2284 into thinking that it is a C printf formating directive, which
2285 prevents proper translation.
2287 2005-02-23 Nick Clifton <nickc@redhat.com>
2289 * opcodes.scm (gen-parse-number): Add a cast to the desired
2290 pointer signed'ness in order to prevent compile time warnings.
2291 * cpu/ip2k.opc: Fixed compile time warnings about differing
2292 signed'ness of pointers passed to functions.
2293 * cpu/iq2000.opc: Likewise.
2294 * cpu/m32r.opc: Likewise.
2295 * cpu/openrisc.opc: Likewise.
2296 * cpu/xstormy16.opc: Likewise.
2298 2005-02-22 Alan Modra <amodra@bigpond.net.au>
2300 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2301 (cgen-desc.h): ..to here, after opcode/cgen.h include.
2303 2005-02-16 Dave Brolley <brolley@redhat.com>
2305 * utils.scm: Update copyright years.
2306 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2307 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2308 * operand.scm (-derived-operand-parse): Move logit message from level 1
2311 2005-02-15 Nick Clifton <nickc@redhat.com>
2313 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2314 prevent compile time warning messages.
2315 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2316 * utils-gen.scm (attr-int-gen-defn): Likewise.
2317 (attr-gen-defn): Likewise.
2318 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2319 (print_dollarhex16): Remove unused function.
2321 2005-02-15 Jim Blandy <jimb@redhat.com>
2323 * guile.scm (cgen-call-with-debugging): Doc fix.
2325 Make backtraces work more reliably.
2326 * guile.scm: Set up debugging parameters, and enable debugging and
2327 source positions while loading.
2328 (cgen-call-with-debugging, cgen-debugging-stack-start): New
2330 * read.scm: Don't set debugging parameters here.
2331 (catch-with-backtrace): Function deleted.
2332 (-cgen): Simply note the presence or absence of the -b option.
2333 Pass the flag to cgen-call-with-debugging, so debugging is turned
2334 off here if the user didn't request it, for faster computation.
2335 (cgen): Call cgen-debugging-stack-start here, instead of
2336 catch-with-backtrace.
2338 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2340 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2341 Don't write out the trailing -s here.
2342 * Makefile.in: Regenerated.
2343 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2344 fixup.scm here; let the caller decide which Scheme's customization
2346 * dev.scm: Load guile.scm, not fixup.scm.
2347 * fixup.scm: Deleted; contents have all moved to guile.scm.
2350 * guile.scm (debug-write): New function.
2352 2005-02-14 Jim Blandy <jimb@redhat.com>
2354 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2355 transformer procedure, not eval. Transformer procedures take one
2358 2005-02-11 Nick Clifton <nickc@redhat.com>
2360 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2361 to 'bfd_vma *' in order avoid compile time warning message.
2363 2005-02-09 Jim Blandy <jimb@redhat.com>
2365 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
2366 corresponding change in the sim/common directory.)
2368 2005-02-07 Jim Blandy <jimb@redhat.com>
2370 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
2371 changes in the opcodes directory.)
2373 * guile.scm: New file, containing Guile-specific definitions and
2374 adaptations. This is loaded by the app-specific shell scripts.
2375 Initially identical to fixup.scm.
2376 * cgen-sid.scm: Don't load fixup.scm here.
2378 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2381 2005-01-27 Jim Blandy <jimb@redhat.com>
2383 * utils.scm (string/symbol->append): Renamed from 'concat'.
2384 * opcodes.scm (gen-switch): Use new name.
2385 * insn.scm (-sub-insn-make!): Same.
2386 * rtl.scm (rtx-dump): Same.
2387 * semantics.scm (semantic-compile): Same.
2389 2005-01-20 Jim Blandy <jimb@redhat.com>
2391 * opcodes.scm (gen-switch): Use concat instead of string-map.
2393 * utils.scm (concat): New function.
2394 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2395 * rtl.scm (rtx-dump): Same.
2396 * semantics.scm (semantic-compile): Same.
2398 2004-12-16 Jim Blandy <jimb@redhat.com>
2400 * utils-cgen.scm (parse-name): Don't assume that string-map can be
2401 applied to symbols. Process everything as strings, and then
2402 convert to a symbol at the end.
2404 * read.scm (debug-repl): Temporarily redirect input and output to
2405 /dev/tty while we debug, so we don't interfere with whatever CGEN
2406 is reading or writing.
2407 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2410 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
2412 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2413 will work with newer versions of guile.
2415 2004-10-27 Nick Clifton <nickc@redhat.com>
2417 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2418 * cpu/iq2000.cpu: Likewise.
2420 2004-07-21 DJ Delorie <dj@redhat.com>
2422 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2424 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2426 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2427 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2429 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2431 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2433 2004-03-22 Dave Brolley <brolley@redhat.com>
2435 * utils.scm (copyright-fsf): Update copyright years.
2436 (copyright-red-hat): Ditto.
2437 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2439 (-op-gen-set-trace-parallel): Ditto.
2441 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2443 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2444 disassembling codes for 0x*2 addresses.
2446 2004-01-29 Dave Brolley <brolley@redhat.com>
2448 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2449 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2450 in the extra bit positions.
2452 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2454 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2456 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2458 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2459 "short" being 16 bit.
2460 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2461 internationalize error message.
2462 (parse_lo16): Likewise. Remove useless code.
2464 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2466 * cpu/m32r.cpu : Add new model m32r2.
2467 Add new instructions.
2468 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2469 Changed PIPE attr of push from O to OS.
2470 Care for Little-endian of M32R.
2471 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2472 Care for Little-endian of M32R.
2473 (parse_slo16): signed extension for value.
2475 2003-10-26 Dave Brolley <brolley@redhat.com>
2477 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2478 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2479 (-gen-extract-fn): Call -gen-record-profile-args.
2481 2003-10-21 Dave Brolley <brolley@redhat.com>
2483 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2485 * decode.scm (-opcode-slots): Correct typo in logit call.
2487 2003-10-09 Jim Blandy <jimb@redhat.com>
2489 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2490 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2492 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2494 2003-10-06 Dave Brolley <brolley@redhat.com>
2496 * gen-all-doc: Add fr550.
2498 2003-09-11 Doug Evans <dje@sebabeach.org>
2500 * Makefile.am (ARCHFILE): New var.
2501 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2502 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2503 * Makefile.in: Regenerate.
2505 2003-09-08 Dave Brolley <brolley@redhat.com>
2507 On behalf of Doug Evans <dje@sebabeach.org>
2508 Pass in paths to input files, instead of assuming they live in
2509 $srcdir/cpu. Plus misc. option processing cleanup.
2510 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2511 Add pre-process pass to all options.
2512 * cgen-gas.scm (gas-arguments): Ditto.
2513 * cgen-sid.scm (sim-arguments): Ditto.
2514 * cgen-sim.scm (sim-arguments): Ditto.
2515 * cgen-stest.scm (stest-arguments): Ditto.
2516 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2517 (-opc-file-path): New global.
2518 (opc-file-path): New fn.
2519 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2520 All callers updated.
2521 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2522 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2523 Replace srcdir arg with opc-file. All callers updated.
2524 * read.scm (-opt-spec-update): Delete.
2525 (opt-get-first-pass,opt-get-second-pass): New fns.
2526 (-cgen): Process application-specific arguments in two passes.
2528 2003-08-29 Dave Brolley <brolley@redhat.com>
2530 * cpu/frv.cpu: Removed.
2531 * cpu/frv.opc: Removed.
2533 2003-08-21 Nick Clifton <nickc@redhat.com>
2535 * cpu/frv.cpu (mbtoh): Replace input parameter to
2536 u-media-dual-expand and u-media-dual-btoh with output parameter.
2537 (cmbtoh): Add profiling hack.
2539 2003-08-19 Michael Snyder <msnyder@redhat.com>
2541 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2543 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2545 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2546 the elements for the END record of CGEN_OPINST, silencing warnings.
2548 2003-07-15 Doug Evans <dje@sebabeach.org>
2550 Add guile 1.6.4 support.
2551 - empty list must be quoted
2552 - string functions have stricter type checking
2553 - eval now takes a second argument
2554 - symbol-bound? is deprecated
2555 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2556 (bitset-attr->list): Ensure arg to string-cut is a string.
2557 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2558 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2559 * cos.scm (-class-list): Must quote empty list.
2560 (-class-parent-classes,-class-compute-class-desc): Ditto.
2561 (class-make,make,object-reset!): Ditto.
2562 (method-make-make!): Call eval1 instead of eval.
2563 (method-make-forward!,method-make-virtual-forward!): Ditto.
2564 * decode.scm (subdtable-add): Use stringsym-append instead of
2566 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2567 (-build-decode-table-entry): Fetch string name of insn.
2568 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2569 (-gen-mach-table-defns): Ditto for mach.
2570 (gen-ifld-defns): Ditto for ifld.
2571 (gen-hw-table-defns): Ditto for hw.
2572 (gen-operand-table): Ditto for op.
2573 (gen-insn-table-entry): Ditto for insn.
2574 * desc.scm (gen-attr-table-defn): Ditto for attr.
2575 (<keyword>,gen-defn): Don't pass symbols to string-append.
2576 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2578 (enum-vals-upcase): Use symbol-upcase to build result.
2579 (-enum-parse): Use stringsym-append to build errtxt.
2580 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2581 (eval1): New function.
2582 (symbol-bound?): Provide own version if >= guile 1.6.
2583 * hardware.scm (define-keyword): Use string-append instead of
2585 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2586 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2588 (gen-list-entry): Handle either symbol or string `name' arg.
2589 (gen-obj-doc-header): Fetch string name of `o' arg.
2590 (define-cpu-intro): Ditto for cpu.
2591 (gen-mach-intro): Ditto for mach.
2592 (gen-model-intro): Ditto for model.
2593 (gen-isa-intro): Ditto for isa.
2594 (gen-machine-doc-1): Ditto for isa.
2595 (gen-reg-doc-1): Convert mach to string first.
2596 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2597 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2599 (gen-insn-categories): Fetch string name of mach. Convert
2600 enum-val-name to string first.
2601 (gen-insn-docs): Fetch string name of mach.
2602 * ifield.scm (ifld-ilk): Result is a string.
2603 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2604 Fetch string name of ifld.
2605 (-sfmt-search-key): Similarily for ifld and op.
2606 * insn.scm (syntax-make): Fetch string name of syntax element.
2607 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2608 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2609 * mode.scm (mode:c-type): Result is a string.
2610 (mode:enum): Fetch string name of mode.
2611 (-mode-parse): Use stringsym-append to build errtxt.
2612 * model.scm (model:enum): Fetch string name of model.
2613 (-model-parse): Use stringsym-append to build errtxt.
2614 (parse-insn-timing): Must quote empty list.
2615 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2616 (-gen-minsn-opcode-entry): Ditto.
2617 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2619 (read-cpu.opc): Convert current-arch-name to a string before using.
2620 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2621 (<derived-operand>): Must quote empty list.
2622 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2623 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2625 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2626 (-pmacro-sym): Must convert symbols to strings before passing to
2628 (-pmacro-str): Ditto.
2629 (pmacros-init!): Use eval1 instead of eval.
2630 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2631 (keep-isa-atlist?): Ditto.
2632 (cmd-if): Use eval1 instead of eval.
2633 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2634 (-rtl-c-get): Fetch string name of src.
2635 (s-unop): Ditto for mode.
2636 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2637 (-gen-par-temp-defns,subword): Ditto.
2638 (join): Use stringsym-append instead of string-append.
2639 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2640 (rtx-traverse-debug): Fetch string name of rtx-obj.
2641 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2642 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2643 (rtx-pretty-name): Result is a string.
2644 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2645 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2646 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2648 (-gen-sfrag-case): Fetch string name of user.
2649 * sid-model.scm (unit:enum): Fetch string name of unit.
2650 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2651 (<hw-memory>,gen-set-quiet): Ditto.
2652 (gen-mode-defs): Ditto.
2653 (sim-finish!): Convert current-arch-name to a string before using.
2654 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2655 (-gen-no-scache-semantic-fn): Ditto.
2656 (cgen-defs.h): Fetch string name of isa.
2657 (cgen-read.c): Convert current-arch-name to a string before using.
2658 (cgen-write.c): Ditto.
2659 * sim-model.scm (unit:enum): Fetch string name of unit.
2660 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2661 (-gen-model-timing-table): Fetch string name of model.
2662 (-gen-mach-model-table): Ditto.
2663 (-gen-mach-defns): Fetch string name of mach.
2664 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2665 (<hw-memory>,cxmake-get): Fetch string name of mode.
2666 (<hw-memory>,gen-set-quiet): Ditto.
2667 (gen-mode-defs): Ditto.
2668 (sim-finish!): Must quote empty list.
2669 * utils-cgen.scm (<ident>): Must quote empty list.
2670 (obj:str-name): New fn.
2671 (parse-comment): Result is a string.
2672 (parse-symbol): Result is a symbol.
2673 (parse-string): Result is a string.
2674 (keyword-list?): Convert arg to string before calling string-ref.
2675 (keyword-list->arg-list): Ditto.
2676 (gen-attr-name): Convert attr-name to string first.
2677 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2678 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2679 (gen-define-ifmt-ifields): Ditto for fld.
2680 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2682 (gen-file-name): Ditto.
2683 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2684 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2685 (reduce): Call eval1 instead of eval.
2686 * cpu/m32r.cpu (addi): Don't use `#.'.
2688 * gen-all-sim: Fix some typos.
2690 2003-07-08 Doug Evans <dje@sebabeach.org>
2692 * gen-all-doc: Ensure run from cgen src dir.
2693 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2694 * gen-all-sid: Similarily, in ./tmp-sid.
2695 * gen-all-sim: Similarily, in ./tmp-sim.
2697 2003-06-20 Doug Evans <dje@sebabeach.org>
2699 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2701 2003-06-19 Doug Evans <dje@sebabeach.org>
2703 * mach.scm (-ifld-already-defined?): New proc.
2704 (current-ifld-add!): Use it.
2705 (-op-already-defined?): New proc.
2706 (current-op-add!): Use it.
2707 (-insn-already-defined?): New proc.
2708 (current-insn-add!): Use it.
2709 (-minsn-already-defined?): New proc.
2710 (current-minsn-add!): Use it.
2711 (obj-isa-list): New proc.
2712 (isa-supports?): Use it.
2714 2003-06-10 Doug Evans <dje@sebabeach.org>
2716 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2717 * cpu/m32r.cpu (all insns): Ditto.
2719 * mach.scm (current-*-add!): Disallow redefinition. Make result
2722 * gen-all-doc: Split arm and frv docs up a bit.
2724 * cpu/arm.cpu: Add IDOC attribute.
2725 * cpu/frv.cpu: Ditto.
2726 * cpu/i960.cpu: Ditto.
2727 * cpu/openrisc.cpu: Ditto.
2728 * cpu/xstormy16.cpu: Ditto.
2729 * cpu/m32r.cpu: Ditto.
2730 (all insns): Explicitly specify IDOC attribute.
2732 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2733 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2734 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2735 * Makefile.in: Regenerate.
2736 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2737 (-attr-read): Defer computing default value until we know the type.
2738 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2739 (<attr-list>:attr-present?): New method.
2740 (atlist-attr-present?,obj-attr-present?): New fns.
2741 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2742 (attr-builtin!): New insn attr IDOC.
2743 * cgen-doc.scm (doc-arguments): New args -I,-N.
2744 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2745 Support comment as fourth element of enum value.
2746 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2747 * html.scm (gen-html-header): New arg kind, all callers updated.
2748 (gen-table-of-contents): New arg insn-file, all callers updated.
2749 (gen-list-entry,gen-doc-header): New fn.
2750 (get-operands): Delete.
2751 (gen-iformat-table): Rewrite.
2752 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2753 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2754 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2755 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2756 (get-insns-for-category,gen-categories-insn-lists): New fns.
2757 (gen-insn-docs): Simplify each insn's semantics first.
2758 Print insn tables sorted by IDOC categories.
2759 (*insn-html-file-name*): New global.
2760 (cgen-insn.html): New fn.
2762 * insn.scm (<insn>): Create a setter for the `tmp' member.
2763 * semantics.scm (insn-build-known-values): Renamed from
2764 -build-known-values. All callers updated.
2766 * rtl.scm: Move traveral/evaluation support to ...
2767 * rtl-traverse.scm: New file.
2768 * read.scm: Maybe-load rtl-traverse.scm.
2770 * rtl.scm (-rtx-valid-types): Add SETRTX.
2772 * rtx-funcs.scm (nop,parallel): Fix mode.
2774 * utils.scm (eqv-lookup-index): New fn.
2775 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2777 * dev.scm (load-doc): Set APPLICATION.
2779 2003-06-10 Dave Brolley <brolley@redhat.com>
2781 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2782 * sid-decode.scm: Generate #include of config.h into
2783 @prefix@-decode.cxx.
2784 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2786 2003-06-07 Doug Evans <dje@sebabeach.org>
2788 * gen-all-sid: New file.
2789 * gen-all-opcodes: New file.
2791 2003-06-05 Nick Clifton <nickc@redhat.com>
2793 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2794 version of the FRinti operand.
2795 (FRintjeven): Likewise for FRintj.
2796 (FRintkeven): Likewise for FRintk.
2797 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2798 media-quad-arith-sat-semantics, media-quad-arith-sat,
2799 conditional-media-quad-arith-sat, mdunpackh,
2800 media-quad-multiply-semantics, media-quad-multiply,
2801 conditional-media-quad-multiply, media-quad-complex-i,
2802 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2803 conditional-media-quad-multiply-acc, munpackh,
2804 media-quad-multiply-cross-acc-semantics, mdpackh,
2805 media-quad-multiply-cross-acc, mbtoh-semantics,
2806 media-quad-cross-multiply-cross-acc-semantics,
2807 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2808 media-quad-cross-multiply-acc-semantics, cmbtoh,
2809 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2810 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2811 cmhtob): Use new operands.
2812 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2813 (parse_even_register): New function.
2815 2003-06-04 Doug Evans <dje@sebabeach.org>
2817 Better handling of 64 bit and mixed 32/64 bit architectures.
2818 * hardware.scm (hw-update-word-modes!): New fn.
2819 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2820 hw-update-word-modes!.
2821 (state-word-bitsize): Replace FIXME with requested check.
2822 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2823 * mode.scm (mode-find): Ignore INT,UINT.
2824 (-mode-word-sizes-kind): New global.
2825 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2826 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2827 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2829 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2830 unusable, correct values set later.
2831 (mode-finish!): Remove cruft.
2832 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2833 * opcodes.scm (opcodes-init!): Ditto.
2834 * rtx-funcs.scm (annul): Fix mode of pc.
2835 * cpu/ia64.cpu: Remove cruft that sets word modes.
2836 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2838 2003-06-03 Nick Clifton <nickc@redhat.com>
2840 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2841 immediate value not unsigned.
2843 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2845 * cpu/sh.cpu: Amend comments to refer to SuperH.
2846 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2847 * cpu/sh64-media.cpu: Likewise.
2848 (Saturation): Update manual reference.
2850 2003-05-15 Doug Evans <dje@sebabeach.org>
2852 * Makefile.am (srcroot): New var.
2854 * Makefile.in: Regenerate.
2855 * cgen-doc.scm: New file.
2856 * html.scm: New file.
2857 * gen-all-doc: New file.
2858 * dev.scm (cload): Handle DOC application.
2860 * machs.scm (machs-for-cpu): New fn.
2861 * model.scm (models-for-cpu): New fn.
2862 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2864 (iota): Rewrite to be identical to pmacro version. All uses updated.
2865 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2867 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2868 (-gen-decode-bits): Instead put in better fix here.
2870 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2872 2003-05-01 DJ Delorie <dj@redhat.com>
2874 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2876 (set-alignfix-mem): Likewise.
2878 2003-04-16 Dave Brolley <brolley@redhat.com>
2880 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2881 * utils.scm (copyright-fsf): Update generate copyright years.
2882 (copyright-cygnus): Ditto.
2883 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2885 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2887 (<operand>'gen-profile-code): New parameter 'when'.
2888 (<iunit>'gen-profile-code): Ditto.
2889 (<insn>'gen-profile-code): Ditto.
2890 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2891 'insn_reference' for the 'after' function.
2892 * model.scm (unit:enum): Moved to sim-model.scm.
2893 * sim-model.scm (unit:enum): Moved from model.scm.
2894 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2895 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2896 * sid-model.scm (unit:enum): New version for sid.
2897 (gen-model-class-name): New function.
2898 (gen-model-unit-fn-decl): New function.
2899 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2900 (gen-model-unit-fn-name): New parameter 'when'.
2901 (-gen-model-insn-fn-name): Ditto.
2902 (-gen-model-insn-qualified-fn-name): New function.
2903 (-gen-model-insn-fn-decl): New function.
2904 (-gen-model-insn-fn-decls): New function.
2905 (-gen-model-insn-fn): New parameter 'when'. Call
2906 -gen-model-insn-qualified-fn-name.
2907 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2908 functions for modelling insn before and after execution.
2909 (-gen-model-class-decls): New function.
2910 (" (gen-model-class-name model) "): New function.
2911 (gen-model-classes): New function.
2912 (-gen-insn-timing): Generate functions for modelling insn before and after
2914 (-gen-insn-unit-timing): Generate class-qualified names.
2915 (-gen-model-timing-table): Ditto.
2916 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2917 not needed (yet) by sid.
2918 (cgen-model.h): New function.
2920 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2922 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2923 * cpu/sh64-compact.cpu: Likewise.
2924 * cpu/sh64-media.cpu: Likewise.
2926 2003-03-21 DJ Delorie <dj@redhat.com>
2928 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2929 which indicates if the sign flag is set from bit 15 or 7.
2931 (set-psw): New argument ws, propogate it.
2932 (set-psw-nowrite): Likewise.
2933 (set-mem-psw): Likewise.
2934 (set-psw-carry): Likewise. Use temporaries to prevent
2935 prematurely overwriting needed inputs.
2936 (set-psw-rrotate17): Fix logic.
2937 (shrgrgr): Preserve carry for zero-bit shifts.
2938 (shrgrimm): Likewise.
2939 (shlgrgr): Likewise.
2940 (shlgrimm): Likewise.
2941 (asrgrgr): Likewise.
2942 (asrgrimm): Likewise.
2945 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2947 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2949 2002-03-05 DJ Delorie <dj@redhat.com>
2951 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2952 prematurely overwriting needed inputs.
2953 (set-psw-sub): Likewise.
2955 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2957 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2959 2003-02-18 DJ Delorie <dj@redhat.com>
2961 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2962 (movlmemimm): Just mask the address.
2963 (movhmemimm): Likewise.
2964 (movlmemgr): Likewise.
2965 (movhmemgr): Likewise.
2966 (set-psw): Always set the psw last.
2967 (set-psw-carry): Likewise.
2968 (set-psw-add): Likewise.
2969 (set-psw-sub): Likewise.
2971 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2972 of 16 patterns from the set-psw-rotate17 function.
2973 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2974 movgriipostincgr, movgriipredecgr): Set psw correctly.
2975 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2976 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2977 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2979 2003-02-11 Dave Brolley <brolley@redhat.com>
2981 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2982 @arch@_cgen-ifld_table.
2983 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2984 @arch@_cgen-ifld_table.
2986 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2988 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2990 2003-01-09 Graydon Hoare <graydon@redhat.com>
2992 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2995 2003-01-07 Graydon Hoare <graydon@redhat.com>
2997 * utils-gen.scm (attr-int-gen-defn): Define.
2999 2002-12-21 Doug Evans <dje@sebabeach.org>
3001 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
3002 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
3004 * dev.scm (cload): Update location of .cpu files.
3006 2002-12-19 Doug Evans <dje@sebabeach.org>
3008 * utils-sim.scm (gen-profile-sym): New fn.
3009 (<operand>,sbuf-profile-sym): New method.
3010 (<operand>,sbuf-profile-elm): Use it.
3011 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
3012 of hardcoding symbol name.
3013 (<operand>,gen-profile-code): Ditto.
3014 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
3017 * mode.scm (mode-sem-mode): New fn.
3018 * operand.scm (op:new-mode): Update. mode-name.
3019 (op-natural-mode?) New fn.
3020 * rtl.scm (hw): Set hw-name,mode-name.
3022 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
3024 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
3025 as size of IDESC-TABLE-VAR.
3026 (@prefix@_init_idesc_table): Ditto.
3027 * sim-model.scm (-gen-mach-defns): Ditto.
3028 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
3030 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
3032 * insn.scm (-parse-insn-format-symbol): Improve error message.
3033 (-parse-insn-format): Ditto.
3035 * gen-all-sim: New script.
3037 2002-12-16 DJ Delorie <dj@delorie.com>
3039 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
3041 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
3043 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
3044 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
3045 (parse_immediate16): Handle immediate16 values, which now include
3046 @hi(label) and @lo(label)
3048 2002-12-03 Alan Modra <amodra@bigpond.net.au>
3050 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
3051 Add braces and cast for union field.
3052 (gen-multi-ifield-nodes): Add braces and cast for union field.
3053 (cgen_operand_table): Similarly fix sentinel.
3054 (cgen_cpu_close): Constify "insns". Formatting.
3055 (cgen-desc.c): Include xregex.h.
3056 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
3058 <opc.c>: Include safe-ctype.h.
3059 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
3060 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
3061 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
3062 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
3063 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
3064 (parse_addr16): Correct type of "value". Formatting.
3065 (parse_addr16_p): Likewise.
3066 (parse_addr16_cjp): Likewise.
3067 (parse_lit8): Likewise.
3068 (parse_bit3): Formatting.
3069 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
3070 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
3071 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
3073 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
3074 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
3075 (print_dollarhex8): Likewise.
3076 (print_dollarhex16): Likewise.
3077 (print_dollarhex_addr16h): Likewise.
3078 (print_dollarhex_addr16l): Likewise.
3079 (print_dollarhex_p): Likewise.
3080 (print_dollarhex_cj): Likewise.
3081 (print_decimal): Likewise.
3082 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
3084 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
3086 * doc/rtl.texi (Model variants): Mention current limitations for
3087 unit inputs and outputs.
3088 (Hardware elements) <attribute PROFILE>: Be slightly more
3090 (Instructions) <timing>: input/output overrides have a direction
3093 2002-11-25 DJ Delorie <dj@redhat.com>
3095 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
3097 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
3099 * cpu/iq10.cpu: New file.
3100 * cpu/iq2000.cpu: Likewise.
3101 * cpu/iq2000.opc: Likewise.
3102 * cpu/iq2000m.cpu: Likewise.
3104 2002-11-19 DJ Delorie <dj@redhat.com>
3106 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
3108 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
3110 * dev.scm: Call getenv with a string, not a symbol.
3112 2002-10-08 Doug Evans <dje@transmeta.com>
3113 Hans-Peter Nilsson <hp@axis.com>
3115 * types.scm (bitrange-overlap?): Handle lsb0?.
3117 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
3119 From Robert Cragie <rcc@jennic.com>:
3120 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
3122 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
3123 Ben Elliston <bje@redhat.com>
3124 John Healy <jhealy@redhat.com>
3125 Jeff Johnston <jjohnstn@redhat.com>
3126 Alan Lehotsky <alehotsky@redhat.com>
3127 Ubicom Inc. <SupportDesk@ubicom.com>
3129 * cpu/ip2k.cpu: New file.
3130 * cpu/ip2k.opc: Likewise.
3132 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
3134 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
3136 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
3138 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
3139 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
3140 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
3141 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
3142 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
3143 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
3144 (-sthi-byte): If there is a single byte to store, store it at
3146 (sthil, sthiq): Fix big-endian behaviour.
3147 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
3148 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
3149 (saturate): Use Dimode to check if saturation operation is required.
3150 (usaturate): Likewise.
3152 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
3153 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
3154 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
3155 (msadubq): Fix subword index in second operand of first subtraction.
3157 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
3159 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
3162 2002-06-18 Dave Brolley <brolley@redhat.com>
3164 * cpu/frv.cpu: New cpu description.
3165 * cpu/frv.opc: New cpu support code.
3167 2002-05-21 Dave Brolley <brolley@redhat.com>
3169 * decode.scm (-opcode-slots): Don't consider bits beyond the
3172 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
3174 * cpu/powerpc.cpu: New file.
3176 2002-05-01 Graydon Hoare <graydon@redhat.com>
3178 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3180 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
3182 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3183 results are expanded recursively.
3185 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
3187 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3188 call scan-symbol on it, to enable recursive macro-expansion.
3190 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
3192 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3193 for multiple-isa configurations.
3194 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3196 2002-02-04 Ben Elliston <bje@redhat.com>
3198 * cpu/sh.cpu, cpu/sh.opc: New files.
3199 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3201 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
3203 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3204 (Enumerated constants): Mention that an ifield must not specify a
3206 (Instruction operands): Ditto for index.
3207 (Expressions) <parallel>: Remove misplaced mention of local
3209 <if>: Mention that mode must be specified and non-VOID when the
3212 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
3214 * doc/porting.texi: When referring to *.opc, mention they are in
3215 the cpu subdir. Call top-level directory toplevel, not devo.
3216 Close string in define-normal-insn example.
3218 * doc/pmacros.texi: Fix .substr typo to .substring.
3219 Mention that .sym expansions are not further expanded.
3221 2002-01-22 Graydon Hoare <graydon@redhat.com>
3223 * desc-cpu.scm (ifld-number-cache): Add.
3225 (gen-maybe-multi-ifld-of-op): Add.
3226 (gen-maybe-multi-ifld): Add.
3227 (gen-multi-ifield-nodes): Add.
3228 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3230 2002-01-10 matthew green <mrg@redhat.com>
3232 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3233 (gr-Rb-names): ... to this.
3234 (h-Rb): New hardware piece.
3235 (h-Rbj): Use gr-Rb-names.
3237 (holdx): New instruction.
3239 2002-01-07 Ben Elliston <bje@redhat.com>
3241 * utils.scm (package-cygnus-simulators): Rename from this ..
3242 (package-red-hat-simulators): .. to this.
3243 * opcodes.scm (option-set!): Use package-red-hat-simulators.
3244 * sid-cpu.scm (cgen-desc.h): Likewise.
3245 (cgen-cpu.h): Likewise.
3246 (cgen-defs.h): Likewise.
3247 (cgen-write.cxx): Likewise.
3248 (cgen-semantics.cxx): Likewise.
3249 (cgen-sem-switch.cxx): Likewise.
3250 * sid-decode.scm (cgen-decode.h): Likewise.
3251 (cgen-decode.cxx): Likewise.
3252 * sid-model.scm (cgen-model.cxx): Likewise.
3253 * sid.scm (option-set!): Likewise.
3254 * sim.scm (option-set!): Likewise.
3256 2002-01-07 Ben Elliston <bje@redhat.com>
3258 * utils.scm (copyright-fsf): Add 2002.
3259 (copyright-cygnus): Rename to copyright-red-hat.
3260 (copyright-red-hat): Add 2002.
3261 (CURRENT-COPYRIGHT): Update comment.
3262 * opcodes.scm (option-set!): Update callers.
3263 * sid-model.scm (cgen-model.cxx): Likewise.
3264 * sid-cpu.scm: Likewise.
3265 * sid-decode.scm: Likewise.
3266 * sid.scm (option-set!): Handle "redhat" as an option for
3267 "copyright"; use copyright-red-hat.
3268 * sim.scm (option-set!): Likewise.
3270 2002-01-03 Dave Brolley <brolley@redhat.com>
3272 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3273 number of insns in the list. Update the population count function to
3274 identify and prioritize 3 catgories of useful bits.
3275 (-population-top-few): Don't consider bits with a population count of
3277 (-build-decode-table-entry): Don't call
3278 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
3279 identical insns at the next tree level.
3280 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3281 this function is no longer used.
3282 (filter-non-specialized-ambiguous-insns): New function.
3283 (filter-identical-ambiguous-insns): New function.
3284 (find-identical-insn): New function.
3285 (filter-harmlessly-ambiguous-insns): Removed.
3287 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
3288 matthew green <mrg@redhat.com>
3289 Frank Ch. Eigler <fche@redhat.com>
3290 Nick Clifton <nickc@cambridge.redhat.com>
3292 * cpu/xstormy16.cpu: New file.
3293 * cpu/xstormy16.opc: New file.
3295 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
3297 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3299 2001-11-14 Dave Brolley <brolley@redhat.com>
3301 * utils-gen.scm (-gen-extract-word): Correct computation of the length
3302 of the field being extracted.
3304 2001-10-29 Johan Rydberg <johan@rydberg.com>
3306 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3307 (cos ...) and (sin ..) rtx.
3309 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
3311 * desc-cpu.scm: Do not include ctype.h in generated desc
3312 files. They will inherit safe-ctype.h instead.
3314 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
3316 * desc-cpu.scm: Add missing function prototypes (for generated
3317 C files). Fix compile time warning messages about unused
3318 parameters (for generated C files).
3319 * opc-asmdis.scm: The same.
3320 * opc-ibld.c: The same.
3321 * opc-itab.scm: The same.
3322 * cpu/fr30.opc: The same.
3323 * cpu/m32r.opc: The same.
3324 * cpu/openrisc.opc: The same.
3326 2001-09-17 graydon hoare <graydon@redhat.com>
3328 * insn.scm (syntax-break-out): Correct logic in handling escaped
3331 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
3333 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3334 call @arch@_cgen_build_insn_regex now that regex support is in
3337 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
3339 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3340 (mask-superset?): Look for strict supersets to allow rejection of
3343 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3345 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3346 (cgen-desc.h): Call it.
3347 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3349 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3350 entire_insn for extraction, if it's shorter than base-insn-bitsize.
3352 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3354 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3355 mach->cpu insn-chunk-bitsize.
3356 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3357 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3358 * mach.scm (<cpu>): New field insn-chunk-bitsize.
3359 (-cpu-parse, -cpu-read): Parse/initialize it.
3360 * doc/rtl.texi (define-cpu): Document it.
3362 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
3364 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3366 2001-07-06 Ben Elliston <bje@redhat.com>
3368 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3370 2001-07-05 Ben Elliston <bje@redhat.com>
3374 * read.scm (include): Include files from srcdir/cpu.
3375 (-cgen): Likewise for loading .cpu files.
3376 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3377 * *.cpu: Move all cpu descriptions into cpu subdirectory.
3379 * simplify.inc: Likewise.
3381 2001-07-04 Ben Elliston <bje@redhat.com>
3383 * read.scm (include): Log "Including file" message at level 1,
3384 rather than outputting it with (display).
3385 (cpu-load): Log "Loading cpu description" and "Processing cpu
3386 description" messages at levels 1 and 2, respectively, rather than
3389 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
3391 * desc.scm (<keyword> 'gen-defn): Add extra zero into
3392 CGEN_KEYWORD_ENTRY initializers.
3394 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3395 (<operand> 'test-data): Involve both the index and the hardware
3396 in testcase generation.
3397 (<hw-indx> 'test-data): Generate test data from the underlying
3399 (<ifield> 'test-data): Generate test data by computing bit
3400 patterns for the field, then decoding them.
3401 (<hw-address> 'test-data): Allow for new calling convention.
3402 (<hw-iaddress> 'test-data): Likewise.
3403 (<keyword> 'test-data): Convert index values into keywords.
3404 (<hw-asm> 'test-data): Convert index values into integer strings.
3406 * gas-test.scm (cgen-build.sh): Escape '.' as well.
3408 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
3410 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3411 is required for multi-mode hw types (memory).
3413 2001-05-11 Ben Elliston <bje@redhat.com>
3415 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3416 when generating allinsn.d from objdump output. Without it, the
3417 testsuite will treat $ as the regular expression for end of line.
3419 2001-05-09 Ben Elliston <bje@redhat.com>
3421 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3422 with `cgen_cpu_open'; documentation had become out of date.
3423 * doc/rtl.texi (Instruction operands): Likewise.
3425 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3427 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3428 various-base-length instruction sets.
3430 2001-04-02 Ben Elliston <bje@redhat.com>
3432 * sid-cpu.scm (-last-insn): New function.
3433 (-gen-sem-switch-engine): Loop through idesc while less than or
3434 equal to the last instruction enum, not less than the MAX enum.
3435 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3436 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3437 table's size to be the last instruction enum plus one, not
3439 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3440 instruction onto the instruction list.
3442 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3443 using the size of the table and its elements.
3444 (-gen-decode-insn-globals): Define the idesc table's size to be
3445 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3446 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3447 last instruction enum plus one, not @CPU@_INSN_MAX.
3449 2001-03-28 Ben Elliston <bje@redhat.com>
3451 * doc/version.texi (UPDATED, EDITION): Update.
3452 * doc/stamp-vti: Likewise.
3454 2001-03-26 Ben Elliston <bje@redhat.com>
3456 * doc/credits.texi (Credits): Update.
3458 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3459 specified prefix and, if necessary, escape `$' in gas-build.sh to
3460 prevent unwanted shell variable expansion.
3462 2001-03-24 Ben Elliston <bje@redhat.com>
3464 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3465 (<keyword>,test-data): Likewise.
3466 (<hw-address>,test-data): Likewise.
3467 (<hw-iaddress>,test-data): Likewise.
3468 (-collate-test-set): New function.
3469 (build-test-set): Use it.
3470 (gen-gas-test): Generate five test cases per instruction.
3471 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3473 * read.scm: Load "slib/random" if random is not defined.
3474 * slib/random.scm: New file.
3476 * utils.scm: Remove comments about the Hobbit compiler.
3477 (copyright-cygnus): Add 2001.
3478 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3479 (package-gnu-simulators): Tidy.
3481 2001-03-23 Ben Elliston <bje@redhat.com>
3483 * cgen-gas.scm: Inline documentation improvements.
3485 2001-03-21 Ben Elliston <bje@redhat.com>
3487 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3488 given in a syntax string is undefined.
3490 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3491 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3493 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3495 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3496 for arg_type CGEN_CPU_OPEN_BFDMACH.
3498 2001-03-20 Ben Elliston <bje@redhat.com>
3500 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3501 instruction onto the instruction list. Define MAX_INSNS to be the
3502 value of the last instruction enum plus one.
3504 2001-03-14 Nick Clifton <nickc@redhat.com>
3506 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3508 2001-03-05 Dave Brolley <brolley@redhat.com>
3510 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3511 if the number of ifields is greater than zero.
3513 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3515 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3516 Emit LIKELY/UNLIKELY branch probability hints.
3517 * sid-decode.cpu (-gen-record-args): Ditto.
3519 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3521 * desc-cpu.scm (-gen-hash-defines): Rename
3522 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3524 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3526 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3528 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3529 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3531 * sid.scm (<operand> gen-write): Use unsigned long long expression
3533 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3534 (<unit> gen-profile-code): Ditto.
3536 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3538 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3541 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3543 * operand.scm (<operand> pretty-sem-name): New field.
3544 (<operand> make): Initialize it from hw-name.
3545 (op:set-pretty-sem-name!): New function.
3546 (<operand> gen-pretty-name): Default to fetching new field.
3547 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3548 sem-name setting from -rtx-hw-name.
3550 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3552 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3553 its subsequent gen-pretty-name.
3555 * read.scm: Increase thread working stack limit and backtrace
3558 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3560 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3562 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3564 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3565 current insn plus 4.
3566 (h-delay-insn): New hardware register.
3567 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3571 * openrisc.opc (parse_hi16): Sign extend value.
3572 (parse_lo16): Likewise.
3574 2001-01-06 Ben Elliston <bje@redhat.com>
3576 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3577 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3578 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3579 (-gen-semantic-fn-table): Likewise.
3580 (-gen-scache-semantic-fn): Likewise.
3581 (-gen-no-scache-semantic-fn): Likewise.
3582 (cgen-read.c): Likewise.
3583 (cgen-sem-switch.c): Likewise.
3584 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3585 is a filename prefix.
3586 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3587 (-gen-decode-insn-globals): Likewise.
3588 (-gen-idesc-decls): Likewise.
3589 (cgen-decode.h): Likewise.
3590 (cgen-decode.c): Likewise.
3591 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3592 (gen-cpu-insn-enum): Likewise.
3593 (sim-finish!): Likewise.
3595 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3597 * openrisc.cpu: New file.
3598 * openrisc.opc: Likewise.
3600 2000-12-12 Ben Elliston <bje@redhat.com>
3602 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3604 2000-12-07 Ben Elliston <bje@redhat.com>
3606 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3607 "insn" when there are zero ifields to extract.
3609 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3611 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3612 used by simple/non-scache simulators.
3613 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3614 regardless of with-scache?.
3615 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3617 2000-12-03 Ben Elliston <bje@redhat.com>
3619 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3620 (cgen-desc.c): Likewise.
3622 2000-12-01 Greg McGary <greg@mcgary.org>
3624 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3626 2000-12-01 Ben Elliston <bje@redhat.com>
3628 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3629 definitions if run without with-multipla-isa?.
3630 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3631 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3633 2000-11-24 Ben Elliston <bje@redhat.com>
3635 * sim-cpu.scm (-gen-hardware-struct): New function.
3636 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3637 hardware elements wich have share one or more ISAs with the ISAs
3640 * sim.scm (-with-multiple-isa?): New symbol.
3641 (with-multiple-isa?): New function.
3642 (option-init!): Initialise -with-multiple-isa?.
3643 (option-set!): Handle with-multiple-isa option.
3645 2000-11-21 Ben Elliston <bje@redhat.com>
3647 * utils.scm (copyright-fsf): Add the year 2000.
3649 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3651 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3652 unneeded "\n\n" from F() macro definition.
3654 2000-11-15 Greg McGary <greg@mcgary.org>
3656 * utils-cgen.scm (gen-define-with-symcat): New function.
3657 * desc-cpu.scm (gen-ifld-defns): Use it.
3658 (gen-hw-table-defns): Use it.
3659 (-gen-hash-defines): Use it.
3660 (gen-operand-table): Use it.
3661 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3662 * opc-itab.scm (-gen-ifmt-table): Use it.
3663 (-gen-insn-opcode-table): Use it.
3664 (-gen-macro-insn-table): Use it.
3665 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3666 * sim-cpu.scm (cgen-semantics.c): Use it.
3667 (cgen-sem-switch.c): Use it.
3669 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3671 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3672 request to emit calls to insn extractors as functions rather than
3673 branches to inline blocks.
3674 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3675 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3677 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3678 to extractor clauses.
3680 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3682 * decode.scm (-distinguishing-bit-population): Significantly
3683 improve popularity heuristic. Renamed from
3684 (-mask-bit-population): Gone.
3685 (-population-above-threshold): Sort new bit numbers in order of
3687 (-population-top-few): Allow up to three more bits to be selected
3688 than requested. Correct selection order to prefer better bits.
3689 Correct bug in fewer-than-requested case. Keep threshold as
3691 (decode-best-get-bits): Pass also the insn-values.
3693 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3694 future optimization.
3696 * utils.scm (message): Format nested lists better.
3698 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3700 * dev.scm: Add srcdir to %load-path.
3702 * rtx-funcs.scm (subword): Mode of argument can be different
3703 than mode of result, so don't use OP0 to specify argument's mode.
3705 2000-11-02 Ben Elliston <bje@redhat.com>
3707 * doc/porting.texi (Building a GAS test suite): Document my change
3710 2000-11-01 Ben Elliston <bje@redhat.com>
3712 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3714 2000-10-31 Ben Elliston <bje@redhat.com>
3716 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3717 with no command line arguments if the gas build directory can be
3720 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3722 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3723 op-ifld -> op-ifield.
3725 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3727 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3729 2000-10-13 matthew green <mrg@cygnus.com>
3731 * utils-cgen.scm (get-ifetch): Move from here ...
3732 * sim.scm (get-ifetch): ... to here.
3733 * sid.scm (get-ifetch): Copy and port to c++.
3735 2000-10-06 Dave Brolley <brolley@redhat.com>
3737 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3738 ifld-start + ifld-word-offset.
3739 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3740 the field is beyond the base number of bits.
3741 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3742 (gen-extract-ifields): Ditto.
3743 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3744 characters in the regular expression.
3746 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3748 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3749 preprocessor constant.
3751 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3753 * slib/logical.scm: New file from slib. Provides robust bitwise
3754 logical operations for large integers.
3755 * read.scm: maybe-load it.
3757 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3759 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3760 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3761 single-isa predicate, but support keep-isa filtering.
3763 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3765 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3766 statement-expression and comma-expression contexts.
3767 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3769 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3771 * decode.scm (-population-top-few): Signal error gracefully if
3772 decoding is about to become ambiguous.
3774 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3776 * doc/rtl.texi (decode-assist): Describe this field as optional.
3778 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3780 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3783 2000-09-05 Dave Brolley <brolley@redhat.com>
3785 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3786 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3788 2000-08-29 Dave Brolley <brolley@redhat.com>
3790 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3791 adata-integral-insn is true for this architecture.
3793 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3795 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3796 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3797 * rtl-c.scm (-c-rtl-get): Improve an error message.
3798 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3800 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3802 * Makefile.in (DIST_COMMON): Regenerated.
3803 * ifield.scm (<derived-ifield> needed-iflds): New method.
3804 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3805 sfmts built from <derived-ifield>s.
3806 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3807 type symbol 'derived-ifield, not an unparseable string.
3808 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3809 (-sfmt-contents): Add tracing.
3811 From Doug Evans <dje@transmeta.com>:
3812 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3815 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3817 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3818 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3819 (-rtl-c-get): Rename from rtl-c-get.
3820 (rtl-c-get): New fn for getter logging.
3822 2000-07-28 Ben Elliston <bje@redhat.com>
3826 2000-07-25 Ben Elliston <bje@redhat.com>
3828 * doc/credits.texi (Credits): Add Frank Eigler.
3830 2000-07-24 Dave Brolley <brolley@redhat.com>
3832 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3834 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3835 (<keyword>): Initialize all elements fully.
3836 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3838 (-gen-mach-table-defns): Ditto.
3839 (-gen-ifld-defns): Ditto.
3840 (-gen-operand-table): Ditto.
3841 (-gen-insn-table): Ditto.
3842 (-gen-cpu-open): Nothing to do for the mach table.
3844 2000-07-13 Ben Elliston <bje@redhat.com>
3846 * doc/version.texi (UPDATED): Update.
3848 2000-07-05 Ben Elliston <bje@redhat.com>
3850 * configure.in (AC_PATH_PROG): Remove.
3851 * configure: Regenerate.
3852 * Makefile.am (GUILE): Locate guile dynamically.
3853 * Makefile.in: Regenerate.
3854 * doc/Makefile.in: Likewise.
3856 2000-07-03 Ben Elliston <bje@redhat.com>
3858 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3859 * opc-itab.scm (cgen-opc.c): Likewise.
3861 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3863 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3864 guile 1.4 compatibility.
3865 (rtx-env-dump): Comment out buggy display calls.
3867 2000-06-15 matthew green <mrg@redhat.com>
3869 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3871 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3873 * Makefile.in: Regenerated.
3875 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3876 (gen-ifld-defns): Ditto.
3877 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3878 * rtl.c (rtl-finish!): Ditto.
3879 * opc-itab.scm (-gen-ifield-decls): Ditto.
3880 * opcodes.scm (gen-switch): Exclude derived operands.
3881 * operand.scm (op-iflds-used): Expand derived operands.
3882 (hw-index-derived): New dummy function to create dummy object.
3883 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3884 constructor. Set object's hw-name and index fields.
3885 (-anyof-merge-subchoices): Set instance object's index also.
3886 (-anyof-name): New helper function.
3887 (anyof-merge-semantics): Correct replacement of operand names in
3889 (op-ifield): Tolerate derived-operands and their funny indices better.
3890 * ifield.scm (ifld-known-values): Expand derived ifields.
3891 (non-multi-ifields, non-derived-ifields): New utility functions.
3892 (ifld-decode-mode): Tolerate objects with unbound decode field.
3893 * iformat.scm (compute-insn-length): Expand derived ifields.
3894 (compute-insn-base-mask): Ditto.
3895 * insn.scm (insn-base-ifields): Remove.
3896 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3897 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3898 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3899 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3900 (-frag-test-data): Ditto.
3901 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3902 (-gen-sem-switch-engine); Ditto.
3903 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3904 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3905 (-gen-record-args): Tolerate unbound op-ifield.
3906 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3907 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3908 Exclude multi-insns.
3909 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3910 * utils-sim.scm (op-extract?): Handle derived operands.
3912 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3913 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3914 * hardware.scm (hardware-for-mode): New function.
3916 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3917 cleaning up decode tables.
3918 (mask-superset?): Little helper function for above.
3919 * decode.scm (-build-decode-table-entry): Call it.
3920 (-opcode-slots): Add some more tracing.
3921 * arm.cpu: Disable decode-splits construct due to implementation
3922 conflict with `filter-harmlessly-ambiguous-insns'
3924 * decode.scm (-population-top-few): New function for better decode
3925 bit generation. Includes minor helper functions.
3926 (decode-get-best-bits): Call it instead.
3927 (OLDdecode-get-best-bits): Renamed previous version of above.
3930 2000-06-13 Ben Elliston <bje@redhat.com>
3932 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3933 for the Guile library directory.
3934 * configure: Regenerate.
3935 * Makefile.in, doc/Makefile.in: Regenerate.
3937 * Makefile.in, doc/Makefile.in: Regenerate.
3938 * configure.in: Remove unnecessary tests. Move to version 1.0.
3939 * acconfig.h, config.in: Remove.
3940 * configure, aclocal.m4: Regenerate.
3941 * doc/stamp-vti, doc/version.texi: Likewise.
3942 * AUTHORS: New file.
3944 2000-06-07 Ben Elliston <bje@redhat.com>
3946 * fixup.scm (symbol-bound?): Reduce debugging output.
3948 2000-06-02 matthew green <mrg@redhat.com>
3950 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3951 a given instruction, replacing derived fields with their subfields.
3952 (insn-value): Use `insn-base-ifields' to find all constant values.
3953 (multi-insn-instantiate!): Comment some debug messages.
3955 2000-06-01 Ben Elliston <bje@redhat.com>
3957 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3958 symbol names used in a (c-call ..) rtx.
3960 * sim-test.scm (build-test-set): Return (()) for an instruction
3961 with no operands, so it too is included in the generated test set.
3963 2000-05-31 Ben Elliston <bje@redhat.com>
3965 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3966 (sim-test): Likewise.
3967 * Makefile.in: Regenerate.
3969 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3971 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3972 stack traceback, in an order that resembles gdb's `bt'.
3974 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3976 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3977 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3978 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3980 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3982 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3983 * iformat.scm (ifmt-expanded-ifields): Gone.
3984 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3986 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3989 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3992 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3994 * sid.scm (with-any-profile?): New function clone.
3996 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3998 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
4000 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
4002 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
4003 (-multi-ifield-read): Parse them.
4004 (define-full-multi-ifield): Pass #f/#f as defaults for them.
4005 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
4006 (multi-ifield gen-extract): Add decode hook.
4007 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
4009 * insn.scm (syntax-break-out): More correctly handle \-escaped
4011 (syntax-make-elements): Ditto.
4012 * opc-itab.scm (compute-syntax): Ditto.
4014 2000-05-17 Ben Elliston <bje@redhat.com>
4016 * gas-test.scm (cgen-build.sh): Log the correct script filename.
4018 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
4020 * gas-test.scm (build-test-set): Return (()) for an instruction
4021 with no operands, so it too is included in the generated test set.
4023 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
4025 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
4026 IFMT_OPERANDS and SYNTAX_BYTES.
4028 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
4030 * sim.scm (with-any-profile?): New function.
4031 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
4032 to decide whether or not to include profiling counters.
4034 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
4036 Fuller derived-operand support for opcodes.
4037 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
4038 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
4039 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
4040 (gen-operand-table): Omit derived- and anyof- operands from table.
4041 (gen-insn-table): Omit multi-insns from table.
4042 * iformat.scm (ifmt-expanded-fields): New function to expand
4043 subfields of derived-ifields.
4044 (ifmt-compute!): Ignore remaining multi-insns.
4045 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
4047 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
4048 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
4049 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
4050 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
4051 (gen-switch): Omit anyof-operands.
4052 * operand.scm (-anyof-syntax): New function.
4053 (-anyof-merge-syntax): Call it.
4054 * utils.scm (collect): New idiomatic function.
4056 2000-05-10 Ben Elliston <bje@redhat.com>
4058 * m68k.cpu: New file (work in progress).
4060 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
4062 * Makefile.am (all-local): New target. Create stamp-cgen.
4063 * Makefile.in: Regenerated.
4064 * doc/Makefile.in: Regenerated.
4066 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
4068 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
4069 (-operand-parse-setter): Ditto.
4070 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
4071 for CACHE-ADDR operands.
4072 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
4073 trace entries. Widen byte-wide values for printing.
4074 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
4075 Widen byte-wide values for printing. Hexify memory addresses.
4077 2000-04-23 matthew green <mrg@redhat.com>
4079 * m32r.cpu: Fix a typo.
4081 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
4083 * ia64.cpu (define-model): Change merced to Itanium.
4084 (f-qp): Change quilifying to qualifying.
4085 (movbr_ph, movbr_pvec): Delete.
4086 (I-I21): Delete uses of movbr_ph and movbr_pvec.
4088 2000-04-07 Ben Elliston <bje@redhat.com>
4090 * doc/porting.texi (Building a simulator test suite): Clarify
4091 where generated test cases are placed.
4093 2000-04-07 Ben Elliston <bje@redhat.com>
4095 * Makefile.am (gas-test): Remove dependency on `cgen'.
4097 * Makefile.in: Regenerate.
4099 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
4101 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
4102 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
4103 type reconfiguration.
4104 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
4107 2000-03-30 Ben Elliston <bje@redhat.com>
4109 * doc/rtl.texi (Enumerated constants): Add concept index entries.
4111 2000-03-24 Ben Elliston <bje@redhat.com>
4113 * Makefile.am (stamp-cgen): Reinstate target.
4114 * Makefile.in: Regenerate.
4116 2000-03-22 Ben Elliston <bje@redhat.com>
4118 * slib/ppfile.scm: Remove; unused.
4119 * slib/defmacex.scm: Likewise.
4121 2000-03-21 Ben Elliston <bje@redhat.com>
4123 * doc/internals.texi (Source file overview): Document.
4125 * Makefile.am (GUILEDIR): Remove.
4126 (CGEN): Ditto. Callers use $(GUILE) instead.
4127 (GUILEFLAGS): Ditto.
4129 (APPDESCFILES): Ditto.
4130 (OPCODESFILES): Ditto.
4132 (pkgdata_SCRIPTS): Ditto.
4133 (stamp-cgen): Remove target.
4134 * Makefile.in: Regenerate.
4136 * configure.in: Remove header and library tests.
4137 * configure: Regenerate.
4138 * config.in: Likewise.
4140 2000-03-20 Ben Elliston <bje@redhat.com>
4142 * read.scm: Cease loading "hob-sup.scm".
4143 * utils.scm: Inherit the fastcall family of procedures (for now).
4144 * hob-sup.scm: Remove.
4146 2000-03-20 Ben Elliston <bje@redhat.com>
4148 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
4149 * configure: Regenerate.
4150 * gdbinit.in: Remove.
4152 2000-03-17 Ben Elliston <bje@redhat.com>
4154 * Makefile.am (CGEN): Use guile, not cgen.
4155 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
4156 (bin_PROGRAMS, cgen_SOURCES): Likewise.
4157 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
4158 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
4159 (HOB_OBJS): Likewise.
4160 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
4161 (CGENOBJS): Likewise.
4162 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
4163 (hobbit, hobbit.o, hobbit.c): Remove targets.
4164 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
4165 (CLEANFILES): Update.
4166 * acconfig.h (WITH_HOBBIT): Remove.
4167 * configure.in: Do not test for 3 arg scm_make_vector. Remove
4168 option --with-cgen-hobbit.
4169 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
4170 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
4171 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
4172 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
4173 * Makefile.in: Regenerate.
4174 * config.in: Likewise.
4175 * aclocal.m4: Likewise.
4176 * configure: Likewise.
4177 * README (Hobbit support): Remove.
4178 * doc/internals.texi (Conventions): Do not mention Hobbit.
4179 * doc/porting.texi (Supported Guile versions): Likewise.
4181 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
4183 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4184 callback convention to new sid sidutil::basic_cpu code.
4185 (-gen-sfrag-engine-fn): Ditto.
4186 * sid.scm (-create-virtual-insns!): Ditto.
4187 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4189 (cxmake-skip): Implement properly for pbb mode.
4191 2000-03-03 Ben Elliston <bje@redhat.com>
4193 * doc/internals.texi: New file.
4195 2000-02-29 Ben Elliston <bje@redhat.com>
4197 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4198 * doc/porting.texi: Formatting tweaks.
4200 2000-02-25 Nick Clifton <nickc@cygnus.com>
4202 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4205 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
4207 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4210 2000-02-23 Andrew Haley <aph@cygnus.com>
4212 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4215 2000-02-24 Ben Elliston <bje@redhat.com>
4217 * doc/rtl.texi (Derived operands): Add some cindex entries.
4219 2000-02-23 Ben Elliston <bje@redhat.com>
4221 * ia32.cpu (dndo): Move general purpose macro from here ..
4222 * simplify.inc (dndo): .. to here.
4224 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
4226 * arm.cpu (h-tbit): Add c-call setter function.
4229 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
4231 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4232 (-frag-cost-compute!): Ditto.
4233 * utils.scm (copyright-cygnus): Add Y2K.
4234 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4236 2000-01-25 Nick Clifton <nickc@cygnus.com>
4238 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4239 flags field of the CGEN_CPU_TABLE structure.
4241 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
4243 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4244 All references updated.
4246 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
4248 * ia32.cpu: Rewrite addressing mode support.
4250 * ifield.scm (<ifield>): New member `follows'.
4251 (ifld-known-values): New proc.
4252 (<ifield>): New method set-word-offset!.
4253 (ifld-set-word-offset!): New proc.
4254 (ifld-new-word-offset): New proc.
4255 (<ifield>): New method next-word.
4256 (<multi-ifield>): New method next-word.
4257 (ifld-next-word): New proc.
4258 (ifld-precedes?): New proc.
4259 (-ifield-parse): New args word-offset,word-length,follows.
4260 All callers updated. Handle CISC-style vs RISC-style ifields.
4261 (-ifield-read): Recognize word-offset,word-length,follows specs.
4262 (-ifld-parse-follows): New proc.
4263 (-multi-ifield-make-default-insert): New proc.
4264 (-multi-ifield-make-default-extract): New proc.
4265 (-multi-ifield-parse): Provide default values for insert,extract
4266 handlers if not specified.
4267 (<derived-ifield>): New class.
4268 (derived-ifield?): New predicate.
4269 (ifld-derived-operand?): New predicate.
4270 (f-anyof): New global.
4271 (ifld-anyof?,ifld-anyof-operand?): New predicates.
4272 (f-derived,ifld-derived?): Delete.
4273 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
4274 * insn.scm (-sub-insn-ifields): New proc.
4275 (-sub-insn-make!): New proc.
4276 (multi-insn-instantiate!): Provide initial implementation.
4277 (-insn-parse): If insn contains "anyof" operands, create a
4278 <multi-insn> object instead of a plain <insn>.
4279 (-parse-insn-format-symbol): Rewrite derived operand handling.
4280 Add anyof operand handling.
4281 (-parse-insn-format-ifield-spec): Rewrite.
4282 (-parse-insn-format-operand-spec): Delete.
4283 (-parse-insn-format-list): Delete support for `(operand value)'.
4284 (anyof-operand-format?): Replaces derived-operand-format?.
4285 * operand.scm (-operand-parse-getter): Improve error messages.
4286 (-operand-parse-setter): Ditto.
4287 (<derived-operand>): New members args,syntax,base-ifield,encoding,
4289 (<anyof-operand>): Change baseclass from <derived-operand> to
4290 <operand>. Delete member values. New members base-ifield,choices.
4291 (anyof-operand?): New predicate.
4292 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4293 (-derived-operand-parse): Rewrite.
4294 (-derived-operand-read): Rewrite.
4295 (-anyof-parse-choice): New proc.
4296 (-anyof-operand-parse): Rewrite.
4297 (-anyof-operand-read,define-anyof-operand): New procs.
4298 (<anyof-value>): Rewrite.
4299 (-anyof-initial-known): New proc.
4300 (anyof-satisfies-assertions?): New proc.
4301 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4302 (-anyof-merge-getter,-anyof-merge-setter): New procs.
4303 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4304 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4305 (-anyof-value-from-derived): New proc.
4306 (-anyof-all-choices-1,anyof-all-choices): New procs.
4307 (operand-init!): Create define-anyof-operand reader command.
4309 * insn (syntax-break-out): Take syntax as argument instead of insn.
4310 All callers updated.
4311 (syntax-make): Move here, from ???.
4313 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4314 bitrange-foo. All uses updated.
4315 (bitrange-next-word): New proc.
4317 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4319 * rtl.scm (rtx-canonicalize): Provide initial implementation.
4320 (rtx-make-const,rtx-make-enum): New procs.
4321 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
4322 (rtx-mem-addr,rtx-mem-sel): New procs.
4323 (rtx-change-address): New proc.
4324 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4325 (rtx-make-set,rtx-single-set?): New procs.
4326 (rtx-combine): New proc.
4328 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
4329 (rtx-traverse-with-locals): Ditto.
4330 (-rtx-traverse,-rtx-traverse-*): Ditto.
4332 * rtl.scm (define-subr): New proc.
4333 (rtl-init!): Create reader command `define-subr'.
4335 * cos.c (_object_mi_p): Ensure argument is an object.
4336 (indent): New function.
4337 (_object_print_elms): Add pretty-printing support.
4338 (_object_print): Ditto.
4340 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4341 (*floats-s->c-fun-table*): Ditto.
4342 * hobbit.c,hobbit.h: Rebuild.
4343 * hob-sup.c (fastcall7): New proc.
4344 * hob-sup.h (fastcall7): Declare.
4345 * hob-sup.scm (fastcall7): New macro.
4347 * mach.scm (<arch>): New member subr-list.
4348 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4349 (arch-finish!): Reverse recorded subr list.
4351 * read.scm (debug-env): New global.
4352 (debug-var-names,debug-var,debug-repl-env): New procs.
4353 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
4354 (debug-quit): Renamed from `continue'.
4356 * simplify.inc (dsmf): New pmacro.
4358 * utils.scm (plus-scan): New proc.
4359 (split-bits): Rewrite.
4360 (split-value): New proc.
4362 1999-10-13 Doug Evans <devans@casey.cygnus.com>
4364 * doc/Makefile.am (DOCFILES): Add notes.texi.
4365 * doc/Makefile.in: Rebuild.
4367 1999-10-11 Doug Evans <devans@casey.cygnus.com>
4369 * ifield.scm (ifld-derived?): New proc.
4370 (f-derived): New global.
4371 (ifield-builtin!): Create ifield f-derived.
4372 (<multi-insn>): New class.
4373 (multi-insn?): New predicate.
4374 (multi-insn-instantiate!): New proc.
4375 (-insn-parse): Create <multi-insn> objects for insns with derived
4377 (-parse-insn-format-symbol): Handle derived ifields.
4378 (-parse-insn-format-ifield-spec): New proc.
4379 (-parse-insn-format-operand-spec): New proc.
4380 (-parse-insn-format-list): Simplify.
4381 (-parse-insn-format): No longer allow (ifield-object value) spec.
4382 (derived-operand-format?): New proc.
4383 (insn-alias?): New proc.
4384 (non-alias-insns): Rewrite.
4385 (insn-real?): Renamed from real-insn?, all callers updated.
4386 (virutal-insns): Rewrite.
4387 (multi-insns): New proc.
4388 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4389 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4390 Return #f if operand doesn't have an index or if index is not an
4392 (hw-index-anyof): New proc.
4393 (-operand-parse): Allow integer indices.
4394 (<derived-operand>): New class.
4395 (derived-operand?): New predicate.
4396 (<anyof-operand>): New class.
4397 (<anyof-value>): New class.
4398 (-anyof-parse-value,-anyof-operand-parse): New procs.
4399 (-derived-operand-parse,-derived-operand-read): New procs.
4400 (define-derived-operand,define-full-derived-operand): New procs.
4401 (operand-init!): New reader command define-derived-operand.
4403 * utils.scm (list-take): Handle negative amount.
4404 (element?): Rewrite.
4406 1999-10-10 Doug Evans <devans@casey.cygnus.com>
4408 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4410 1999-10-04 Richard Henderson <rth@cygnus.com>
4412 * ia64.cpu: Checkpoint.
4414 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4416 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4418 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4419 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4421 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4423 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4424 PC returned by sim_engine_invalid_insn.
4426 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4428 * ia32.cpu: New file.
4430 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4432 * utils.scm (bit-set?): Fix off by one error.
4434 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4436 * rtl.scm (hw): Check for valid hardware element before trying to
4439 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4440 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4441 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4442 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4443 compute_operand2_foo.
4445 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4446 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4447 Call delayed_branch/branch methods instead of assigning to `vpc'.
4448 (<hw-pc>,cxmake-skip): Call skip method.
4449 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4450 (<pc>,cxmake-skip): Ditto.
4451 (-create-virtual-insns!): Ditto.
4452 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4454 (op:record-profile): Specify #:output-language "c++".
4455 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4457 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4459 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4460 (gen-semantic-code): Ditto.
4461 (-gen-sem-case,-gen-sfrag-code): Ditto.
4462 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4463 (cgen-cpu.h): File is now #included by main cpu class, rather than
4465 (cgen-defs.h): New proc.
4466 (-gen-scache-semantic-fn): Change result type to sem_status.
4467 New local `status'. Call done_cti_insn/done_insn method at end.
4468 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4470 (cgen-sem-switch.cxx): Ditto.
4471 * sid-decode.scm (-gen-idesc-decls): Update return type of
4473 (cgen-decode.h): Add using namespace @arch@.
4474 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4476 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4477 (estate-output-language-c?,estate-output-language-c++?): New procs.
4478 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4479 (estate-make-for-normal-rtl-c++): New proc.
4480 (rtl-c++-parsed,rtl-c++): New proc.
4481 (s-c-call): Invoke cpu class method if c++.
4482 (join): Use s-c-raw-call.
4484 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4487 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4488 * rtl.scm (<eval-state>): New member `modifiers'.
4489 (<eval-state>,vmake!): Handle #:modifiers.
4490 (estate-with-modifiers): New proc.
4492 * rtl.scm (rtx-side-effects?): New proc.
4493 (rtx-canonical-bool): Don't change expr if it has side effects.
4494 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4497 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4499 * sim.scm (gen-scache-type): Fix typo in last patch.
4501 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4503 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4505 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4507 * sid.scm (<hw-pc>,cxmake-skip): New method.
4508 (<pc>,cxmake-skip): New method.
4510 * decode.scm (decode-build-table): Delete args startbit,index-list.
4511 All callers updated.
4512 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4513 All callers updated.
4514 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4515 to decode-get-best-bits.
4516 * sid-decode.scm (-gen-decode-fn): Ditto.
4518 * hardware.scm (hw-bits): New proc.
4519 (-hw-parse): New arg layout. All callers updated.
4520 (define-full-hardware): New arg layout. All callers updated.
4521 (-hw-validate-layout): New proc.
4522 (-hw-create-[gs]etter-from-layout): New procs.
4523 (<hw-register>,parse!): Handle layout spec.
4524 * types.scm (type-bits): New proc.
4526 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4527 UNARY, BINARY, TRINARY rtxs.
4529 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4530 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4531 Support '- as "unused spot" indicator.
4533 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4535 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4537 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4539 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4541 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4543 (tstate-make): New arg `depth'. All callers updated.
4544 (tstate-depth,tstate-set-depth!): New procs.
4545 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4546 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4547 (-rtx-traverse): Ditto. Keep track of traversal depth.
4549 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4551 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4552 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4553 * utils-sim.scm: Decoder generator support moved here.
4554 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4555 (-gen-decoder-switch): Sort entries for more fall-throughs.
4557 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4558 * Makefile.in: Rebuild.
4559 * sim-test.scm (build-sim-testcase): Add logging message.
4560 * dev.scm (cload): Recognize SIM-TEST application.
4561 (load-stest): Set APPLICATION to SIM-TEST.
4563 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4565 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4566 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4567 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4569 * insn.scm (syntax-break-out): Handle ${foo}.
4571 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4573 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4574 (bin_PROGRAMS): Define.
4575 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4576 (cgen-hob.c): Prepend $(srcdir)/ here.
4577 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4578 (libcpu_a_SOURCES): Delete.
4579 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4580 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4581 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4582 Add AC_CHECK_LIB(guile,main).
4583 * Makefile.in: Rebuild.
4584 * doc/Makefile.in: Rebuild.
4585 * aclocal.m4: Rebuild.
4586 * config.in: Rebuild.
4587 * configure: Rebuild.
4589 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4591 Rename rtx functions from name: to name, accept optional leading
4593 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4594 * attr.scm (-attr-eval): Update.
4595 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4596 (<hw-register>,mode-ok?): Disallow VOID.
4597 (<hw-immediate>,mode-ok?): Disallow VOID.
4598 (<hw-address>,mode-ok?): Disallow VOID.
4599 * mode.scm (mode-name?): New proc.
4600 (VOID): Renamed from VM.
4601 (DFLT): Renamed from DM.
4602 (mode-builtin!): Update.
4603 * opcodes.scm (<ifield>,gen-insert): Update.
4604 (<ifield>,gen-extract): Update.
4605 (<multi-ifield>,gen-insert,gen-extract): Update.
4606 * operand.scm (op:mode): Update.
4607 (<pc>,make!): Update.
4608 (op:new-mode): Update.
4609 (-operand-read): Update.
4610 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4611 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4612 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4613 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4614 (rtx-make): Call -rtx-munge-mode&options.
4615 (rtx accessors): Rewrite.
4616 (rtx-pretty-name): Update.
4617 (-rtx-traverse-*): Update.
4618 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4619 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4620 (-rtx-make-traverse-table): Update.
4621 (-rtx-traverse-operands): Update.
4622 (-rtx-option?,-rtx-option-list?): New procs.
4623 (-rtx-munge-mode&options): New proc.
4624 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4625 (-rtx-traverse): Update.
4626 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4627 (rtx-compile-time-constant?): Update.
4628 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4629 (rtx-value): Update.
4630 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4631 * rtx-funcs.scm (*): Update.
4632 * rtl-c.scm (rtl-c-get): Update.
4633 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4634 (s-c-call,s-c-raw-call): Update.
4635 (s-boolifop,s-convop,s-if,s-cond): Update.
4636 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4637 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4638 (s-parallel,s-sequence): Update.
4639 (rtl-c-build-table): Update.
4640 * sem-frags.scm (-frag-hash-compute!): Update.
4641 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4642 for temporary bug compatibility with previous version.
4643 (-frag-expr-locals,-frag-expr-stmts): Update.
4644 (-frag-compute-desired-frags,-frag-pick-best): Update.
4645 * semantics.scm (-simplify-expr-fn): Update.
4646 (rtx-simplify): Update.
4647 (-rtx-ref-type): Update. Account for modifiers.
4648 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4649 (-build-ifield-operand!): Update.
4650 (-build-known-values): Update.
4651 (semantic-compile): Update.
4652 (-gen-reg-access-defns): Update.
4653 (gen-semantic-code,-gen-sem-case): Update.
4654 (-gen-sfrag-code,-gen-sfrag-case): Update.
4655 * sim-cpu (gen-semantic-code): Update.
4656 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4657 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4658 (-hw-cxmake-get): Update.
4659 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4660 (<hw-index>,cxmake-get): Update.
4661 (<operand>,gen-type,gen-read,cxmake-get): Update.
4662 (<operand>,gen-set-quiet,gen-set-trace): Update.
4663 (<pc>,cxmake-get): Update.
4664 (sim-finish!): Update.
4665 * utils-gen.scm (-gen-ifld-extract-base): Update.
4666 (-gen-ifld-extract-beyond): Update.
4667 (gen-multi-ifld-extract): Update.
4668 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4669 * sid.scm (<hw-pc>,gen-write): Update.
4670 (-gen-decode-insn-globals): Update.
4671 (-hw-cxmake-get): Update.
4672 (<hw-register>,cxmake-get-raw): Update.
4673 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4674 (<hw-index>,cxmake-get): Update.
4675 (<operand>,gen-type,gen-read,cxmake-get): Update.
4676 (<operand>,gen-set-quiet,gen-set-trace): Update.
4677 (<pc>,cxmake-get): Update.
4678 (-create-virtual-insns!): Update.
4679 (-decode-split-build-assertion): Update.
4681 * simplify.inc: Update.
4683 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4685 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4686 Prefix queue function name with sim_ instead of @cpu@_.
4688 * sim.scm (-with-parallel-only?): New global.
4689 (option-init!): Initialize it.
4690 (option-set!): Set it.
4691 (with-parallel-only?): New proc.
4692 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4693 and writeback markers if with-parallel-only.
4694 (-gen-idesc-init-fn): Update.
4695 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4698 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4700 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4701 with the invalid insn handler.
4703 * utils.scm (list-maybe-ref): New proc.
4705 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4707 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4709 * i960.cpu (test*-*): Delete `expr' arg.
4710 (test-op,branch-op): Update.
4712 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4714 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4715 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4717 (gen-reg-access-defn): Ditto.
4718 (-gen-hw-addr): Rewrite.
4719 (-op-gen-queued-write): Rewrite.
4720 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4721 (-gen-scache-semantic-fn): Handle with-generic-write.
4722 (-gen-no-scache-semantic-fn): Ditto.
4724 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4726 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4728 * sim.scm (-with-generic-write?): New global.
4729 (option-init!): Initialize it.
4730 (option-set!): Set it.
4731 (with-generic-write?): New proc.
4732 (-gen-hw-addr): New proc.
4733 (-op-gen-queued-write): New proc.
4734 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4736 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4738 (-gen-sem-switch): Preserve existing with-parallel? value.
4739 (-gen-sem-parallel-switch): Ditto.
4740 (-gen-write-case): Add /indent support.
4741 (cgen-write.c): Rewrite.
4743 * utils.scm (-current-print-state): New global.
4744 (make-print-state): New proc.
4745 (pstate-indent,pstate-set-indent!): New procs.
4746 (pstate-cmd?,pstate-cmd-do): New procs.
4747 (/indent): New global.
4748 (/indent-set,/indent-add): New procs.
4749 (string-write): Set -current-print-state.
4750 (-string-write): New arg pstate, all callers updated.
4751 Handle print-state commands.
4752 (-string-list-flatten): New proc.
4753 (string-list->string): Use it.
4755 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4756 (-gen-sem-fn-table-entry): New proc.
4757 (-gen-semantic-fn-table): New proc.
4758 (-gen-scache-semantic-fn): Make fn static.
4759 (-gen-no-scache-semantic-fn): Ditto.
4760 (cgen-semantics.c): Define macro SEM_FN_NAME.
4761 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4762 FAST,FULL. Update @cpu@_insn_sem contents.
4763 (-gen-semf-fn-name): Delete.
4764 (-gen-sem-fn-decls): Delete.
4765 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4766 @cpu@_semf_init_idesc_table.
4767 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4769 (cgen-decode.h): Print sfmt enum.
4770 * sid-decode.scm (-gen-semf-fn-name): Delete.
4771 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4773 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4774 (ifmt-compute!): Ditto.
4775 * sim-decode.scm (-gen-decoder-switch): Ditto.
4776 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4777 (-gen-decoder-switch): Ditto.
4779 * insn.scm (insn-virtual?): New proc.
4781 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4783 * mach.scm (<arch>): attr-list is now a pair of lists.
4784 (current-attr-list): Rewrite.
4785 (current-attr-add!,current-attr-lookup): Rewrite.
4786 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4788 1999-08-06 Richard Henderson <rth@cygnus.com>
4790 * ia64.cpu: Initial checkpoint.
4792 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4794 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4795 (pmacros-init!): Update .apply help string.
4797 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4799 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4800 (<hw-pc>,cxmake-skip): New method.
4801 (<pc>,cxmake-skip): New method.
4802 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4803 (gen-argbuf-type): New member `skip_count'.
4804 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4805 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4807 * utils-sim.scm: New file.
4808 * dev.scm (load-sim): Load it.
4809 (load-sid): Load it.
4810 * cgen-sid.scm: Load it.
4811 * cgen-sim.scm: Load it.
4812 * iformat.scm (<sformat>): New member sbuf, not initialized by
4814 * rtx-funcs.scm (skip): Rewrite.
4815 * rtl-c.scm (skip): Rewrite.
4816 * m32r.cpu (sc,snc): Update `skip' usage.
4817 * mode.scm (mode-real-mode): New proc.
4818 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4819 Distinguish fragments by the <sformat-abuf> they use.
4820 * sim.scm (gen-profile-index-type): Delete.
4821 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4822 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4823 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4824 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4825 (-gen-argbuf-elm): Rewrite.
4826 (-gen-argbuf-hw-elm): Delete.
4827 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4829 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4830 (sim-init!): Initialize them.
4831 (sim-analyze-insns!): Set them.
4832 (current-sbuf-list): New proc.
4833 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4834 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4835 * sim-model.scm (-gen-model-insn-fn): Ditto.
4836 * sim-decode.scm (-gen-extract-decls): Delete.
4837 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4838 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4840 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4841 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4842 (-gen-op-extract,-gen-op-trace-extract): New procs.
4843 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4844 gen-sfmt-argvars-foo and rewrite.
4845 (-gen-record-args): Rewrite.
4846 (-gen-extract-case): Tweak.
4847 * sid.scm (gen-profile-index-type): Delete.
4848 (ifield argbuf support): Move to utils-sim.scm.
4849 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4850 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4851 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4852 (-sim-sformat-argbuf-list): New global.
4853 (sim-init!): Initialize it.
4854 (sim-analyze-insns!): Set it.
4855 (current-sbuf-list): New proc.
4856 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4857 (-gen-argbuf-hw-elm): Delete.
4858 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4860 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4861 (-gen-extract-decls): Delete.
4862 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4864 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4865 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4866 (-gen-op-extract,-gen-op-trace-extract): New procs.
4867 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4868 gen-sfmt-argvars-foo and rewrite.
4869 (-gen-record-args): Rewrite.
4870 (-gen-extract-case): Tweak.
4872 * cgen-gh.c (gh_putc,gh_puts): New functions.
4873 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4874 * cos.c (_object_print_elms,_object_print): Use them.
4875 * hob-sup.c (fastcall_print): Use them.
4876 * configure.in: Check for scm_gen_puts, scm_puts.
4877 * config.in: Rebuild.
4878 * configure: Rebuild.
4879 * aclocal.m4: Rebuild.
4880 * Makefile.in: Rebuild.
4882 * dev.scm (load-opc): Use load instead of maybe-load.
4883 (load-gtest,load-sim,load-stest): Ditto.
4886 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4888 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4889 up to avoid g++ 'goto crosses initialization' warning.
4890 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4891 (-gen-sfrag-case): Update use of NEXT_FRAG.
4893 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4895 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4897 * read.scm: Load sem-frags.scm.
4898 * sem-frags.scm (*): Lots rewritten.
4899 * sid.scm (-with-sem-frags?): New global
4900 (with-sem-frags?): New proc.
4901 (option-init!): Initialize -with-sem-frags?.
4902 (option-set!): Recognize with-sem-frags.
4903 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4904 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4906 (-gen-sfrag-engine-decls): New proc.
4907 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4908 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4909 (-gen-sfrag-engine): New proc.
4910 (-gen-sem-case): Emit setup-semantics if specified.
4911 (-gen-sem-switch-engine): Update init/use of computed goto label.
4912 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4914 (-gen-idesc-decls): Replace sem_address with cgoto.
4915 (-gen-scache-decls): Rewrite definition of `execute' member.
4916 * arm.cpu (arm isa): Enable decode-splits.
4917 * arm7.cpu (multiply insns): Rename result to mul-result.
4919 Rename decode-specialize to decode-split.
4920 * decode.scm (*): Update.
4921 * insn.scm (*): Update.
4922 * mach.scm (*): Update.
4923 * sid.scm (*): Update.
4925 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4927 Record objects as a smob.
4928 * cos.c (scm_tc16_object): New static global.
4929 (cos_init): Initialize it.
4930 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4931 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4932 (_object_tag): Delete.
4933 (_object_make_smob): New function.
4934 (_object_make_x,_object_make_with_values_x): Rewrite.
4935 (_object_elements,_object_class_desc): Rewrite.
4936 (_object_copy,object_p): Rewrite.
4937 (_object_specialize): Rewrite.
4938 (_object_print_elms,_object_print): New functions.
4939 (object_smob): New static global.
4940 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4942 * cos.c (_make_x_symbol): New static global.
4943 (object_make): Use it.
4944 (cos_init): Initialize it.
4946 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4948 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4949 instead to determine whether to use FLD macro.
4950 (<rtl-c-eval-state>): New member ifield-var?.
4951 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4952 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4953 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4955 * rtl.scm (rtx-sequence-assq-locals): New proc.
4957 * cos.scm (-object-error): Don't crash on non-objects.
4959 * Makefile.am (CLEANFILES): Add hobbit.
4960 * Makefile.in: Rebuild.
4962 * rtl-c.scm (s-c-call): Delete unnecessary code.
4964 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4966 * rtl-c.scm (ifield): Always reference value via `FLD'.
4968 * cos.c (elm_bound_p): Return problem SCM boolean values.
4970 * utils-cgen.scm (display-argv): New proc.
4971 * cgen-opc.scm (cgen): Call it.
4972 * cgen-sim.scm (cgen): Ditto.
4973 * cgen-gas.scm (cgen): Ditto.
4974 * cgen-stest.scm (cgen): Ditto.
4975 * cgen-sid.scm (cgen): Ditto.
4977 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4979 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4980 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4981 (-gen-extract-switch): Initialize result to 1.
4982 * opcodes.scm (gen-ifield-default-type): New proc.
4983 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4985 (<hw-index>,gen-insert): Handle non-ifield indices.
4986 (<hw-index>,gen-extract): Ditto.
4987 (<hw-asm>,gen-parse): Ditto.
4988 (<hw-asm>,gen-print): Ditto.
4989 (<keyword>,gen-parse): Ditto.
4990 (<keyword>,gen-print): Ditto.
4991 (<operand>,gen-fget): Ditto.
4992 (<operand>,gen-fset): Ditto.
4994 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4995 (-gen-hw-index): Ditto.
4996 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4997 (-gen-hw-index): Ditto.
4999 * sem-frags.scm: New file.
5001 * attr.scm (attr-parse): Add better checking of input.
5003 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
5005 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
5007 * ifield.scm (ifld-nil?): New proc.
5009 * operand.scm (<operand>): New members getter,setter.
5010 (<operand>,make!): New args getter,setter. All uses updated.
5011 (op:getter,op:setter): New procs.
5012 (<hw-index>,field-start): Return 0 for non-ifield indices.
5013 (<hw-index>,field-length): Return 0 for non-ifield indices.
5014 (-operand-parse-getter,-operand-parse-setter): New procs.
5015 (-operand-parse): New args getter,setter. All callers updated.
5016 Always use hw-index-scalar for scalar operands.
5017 (-operand-read): Handle getter,setter.
5018 (define-full-operand): New args getter,setter. All uses updated.
5019 * semantics.scm (-build-ifield-operand!): Update.
5020 (-build-index-of-operand!): Update.
5021 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
5022 * simplify.inc (define-normal-operand): Update.
5024 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
5025 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
5026 (s-binop,s-cmpop,s-convop): Ditto.
5027 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
5028 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
5029 (fcc-tests): New insn-enum.
5030 (fcc-value): Rename from fcc-type.
5031 * sparcfpu.cpu: New file. All fp support moved here.
5033 * rtl.scm (<rtx-func>): New member class.
5034 (rtx-class-*?): New procs.
5035 (def-rtx-node): New arg class. All callers updated.
5036 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
5037 * rtx-funcs.scm (*): Specify class.
5039 * utils-cgen.scm (context-make-reader): New proc.
5041 * utils.scm (assert-fail-msg): New variable.
5043 (list-drop,list-tail-drop): New procs.
5045 1999-06-22 Doug Evans <devans@casey.cygnus.com>
5047 * desc-cpu.scm (-gen-hash-defines): Restore generation of
5048 CGEN_MIN_INSN_SIZE deleted on March 22.
5050 * ifield.scm (<ifield>,needed-iflds): New method.
5051 (<multi-ifield>,needed-iflds): New method.
5052 (ifld-needed-iflds): New proc.
5053 (multi-ifield?): New proc.
5054 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
5055 (-sfmt-search-key): Include insn length in key.
5056 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
5057 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
5058 (-ifmt-lookup-ifmt!): Compute key here.
5059 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
5060 All callers updated.
5061 (ifmt-build): Delete arg desc. New args search-key,iflds.
5062 All callers updated.
5063 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
5064 in-ops,out-ops,sorted-used-iflds. All callers updated.
5065 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
5067 * operand.scm (op-iflds-used): New proc.
5068 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
5070 And from sid.scm,sid-cpu.scm as well.
5071 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
5072 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
5073 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
5074 (gen-extracted-ifld-value): Ditto.
5075 (-extract-chunk-specs): Ditto.
5076 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
5077 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
5078 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
5079 (-extract-insert-subfields): New function.
5080 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
5081 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
5082 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
5083 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
5085 (-gen-no-scache-semantic-fn): Ditto.
5086 (-gen-sem-case): Ditto.
5087 (-gen-read-case): Update calls to gen-define-ifields,
5088 gen-extract-ifields.
5089 * sim-decode.scm (-gen-record-args): Update.
5090 (-gen-sfmt-argvars-assigns): Update.
5091 (-gen-extract-case): Update.
5092 * sim-model.scm (-gen-model-insn-fn): Replace calls to
5093 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
5095 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
5096 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
5097 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
5098 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
5099 gen-define-ifields, gen-extract-ifields.
5100 (-gen-record-args): Update.
5101 (gen-sfmt-argvars-assigns): Update.
5102 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
5103 with gen-define-ifields. Ditto for gen-extract-foo.
5104 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
5105 procs rather than method calls.
5107 1999-06-18 Doug Evans <devans@casey.cygnus.com>
5109 * sid.scm (-create-virtual-insns!): New local `context', pass it
5112 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
5113 (operand name) not (operand object), (local name) not (local object).
5114 (rtx-traverse-with-locals): New proc.
5115 (-compile-expr-fn): New proc.
5116 (rtx-compile): Rewrite.
5117 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
5118 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
5119 (rtl-c-set-trace): Ditto.
5120 (operand define-fn): Recognize operand name argument.
5121 (local define-fn): Recognize sequence temp name argument.
5122 * rtx-funcs.scm (operand): Argument is operand name, not object,
5123 so call current-op-lookup.
5124 (local): Similarily, so call rtx-temp-lookup.
5126 * rtl.scm (rtx-field?): Use rtx-name instead of car.
5127 (rtx-operand?): Ditto.
5128 (rtx-pretty-name): Ditto.
5129 (rtx-local-obj): Flag symbol argument as an error.
5130 (rtx-local-name): New proc.
5131 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
5133 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
5135 * read.scm (debug-repl): Renamed from -debug-repl. All callers
5138 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
5141 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
5142 (*floats-s->c-fun-table*): Ditto.
5143 * hobbit.c,hobbit.h: Rebuild.
5144 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
5145 * semantics.scm (rtx-simplify): Use /fastcall-make.
5147 * iformat.scm (-sfmt-search-key): Don't include memory modes.
5149 * insn.scm (<insn>): Delete members condition, compiled-condition.
5150 (<insn>,make!): Update
5151 (<insn> getters,setters): Update.
5152 (-insn-parse,insn-read,define-full-insn): Update.
5153 * minsn.scm (minsn-make-alias): Update.
5154 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
5155 (ifmt-compute!): Ditto.
5156 * sim.scm (sim-finish!): Update.
5157 * simplify.inc: (define-normal-insn): Update.
5158 * sid-cpu.scm (gen-semantic-code): Update.
5160 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
5161 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
5162 (ifmt-compute!): Ditto.
5164 1999-06-16 Doug Evans <devans@casey.cygnus.com>
5166 * minsn.scm (minsn-compute-iflds): Print better error message for
5169 1999-06-12 Doug Evans <devans@casey.cygnus.com>
5171 * rtl.scm (tstate->estate): Don't copy over expr-fn.
5173 * Makefile.am (HOBFLAGS): New variable.
5174 (cgen-hob.c): Use it.
5176 (libcpu_a_SOURCES): Add hob-sup.c.
5177 (hob-sup.o): New rule.
5178 * Makefile.in: Rebuild.
5179 * cgen.c: #include hob-sup.h.
5180 (cgen_init_c): Call hobbit_init_support.
5181 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5182 (*special-scm->c-functions*): Add them.
5183 (display-c-expression): Handle *c-symbol*.
5184 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5185 (*floats-s->c-fun-table*): Ditto.
5186 (normalize): Recognize /fastcall-make.
5187 (normalize-fastcall-make): New proc.
5188 * hobbit.c,hobbit.h: Rebuild.
5189 * hob-sup.scm: New file.
5190 * hob-sup.c: New file.
5191 * hob-sup.h: New file.
5192 * read.scm: Load hob-sup.scm.
5193 * rtl.scm (-rtx-name-list): New variable.
5194 (rtx-name-list): New proc.
5195 (rtx-lookup): Try symbol first.
5196 (def-rtx-node): Add name to -rtx-name-list.
5197 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5198 (-rtx-traverse-anymode): New proc.
5199 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5200 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5201 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5202 (-rtx-traverse-{symornum,object}): New procs.
5203 (-rtx-make-traverse-table): Rewrite.
5204 (-rtx-traverse-operands): Rewrite arg-types handling.
5205 Handle #f result of traverser.
5206 (-rtx-traverse): Renamed from -rtx-traverse-normal.
5207 Move debug handling here.
5208 (-rtx-traverse-debug): Delete.
5209 (rtl-finish!): Change -rtx-traverse-table into list of handlers
5211 * semantics.scm (semantic-compile:process-expr!): Fix call to
5213 * utils.scm (map1-improper): New proc.
5215 1999-06-08 Doug Evans <devans@casey.cygnus.com>
5217 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5219 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5220 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5221 (<operand>,cxmake-get): Tweak.
5222 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
5224 1999-06-07 Doug Evans <devans@casey.cygnus.com>
5226 * thumb.cpu (dnti): Delete timing spec.
5229 * arm.cpu (arm isa): New fields condition, setup-semantics.
5230 (thumb isa): New field setup-semantics.
5231 (h-gr): Add attribute CACHE-ADDR.
5232 * arm7.cpu (dnai): Delete condition.
5233 (eval-cond): Delete.
5235 * mach.scm (<isa>): New member setup-semantics.
5236 (-isa-parse-setup-semantics): New proc.
5237 (-isa-parse): New arg setup-semantics.
5238 (-isa-read): Recognize setup-semantics.
5240 * sid-cpu.scm (gen-extract-fields): Split into two:
5241 gen-extract-ifields, gen-extract-ifmt-ifields.
5242 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
5243 tracing begin/end messages (done by caller now).
5244 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
5245 tracing begin/end messages (done by x-before,x-after virtual insns).
5246 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
5247 end so don't have to look it up again next time.
5248 * sid-decode.scm (-decode-expr-ifield-values): New proc.
5249 (-decode-expr-ifield-tracking-key): New proc.
5250 (-decode-expr-ifield-tracking): New proc.
5251 (-decode-expr-ifield-values-used): New proc.
5252 (-decode-expr-ifield-mark-used!): New proc.
5253 (-gen-decode-expr-set-itype): New proc.
5254 (-gen-decode-expr-entry): Rewrite.
5255 (-gen-decode-table-entry): New proc.
5256 (-gen-decoder-switch): Use it.
5257 (-gen-virtual-insn-finder): New proc.
5258 (-gen-argbuf-elm): Move here from sid.scm.
5259 (-gen-argbuf-hw-elm): Ditto.
5260 (-gen-argbuf-fields-union): Add entries for chain,before insns.
5261 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5262 conditional-execution isas.
5263 (-gen-decode-fn): Record conditional-exec ifield.
5264 * sid.scm (-current-pbb-engine?): New global.
5265 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5266 (<ifield>,gen-ifld-extract): New arg `indent'.
5267 (<multi-ifield>,gen-ifld-extract): Ditto.
5268 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
5269 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5270 (-gen-arch-model-decls): Only scan real insns.
5271 (scache-engine-insns,pbb-engine-insns): New procs.
5272 (-create-virtual-insns!): New proc.
5273 (sim-finish!): Call it.
5274 (-decode-specialize-insn?): New proc.
5275 (-decode-specialize-build-assertion): New proc.
5276 (-decode-specialize-insn-1): New proc.
5277 (-decode-specialize-insn): New proc.
5278 (-fill-sim-insn-list!): New proc.
5279 (sim-analyze!): Create copies of insns to be specialized.
5280 * utils-cgen.scm (obj-set-name!): New proc.
5282 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5283 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5285 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
5287 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5288 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5289 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5290 (attr): Rewrite test for insn owner.
5291 (member): New rtx function.
5292 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5293 as separate function.
5294 (rtx-ifield?,rtx-ifield-name): New procs.
5295 (rtx-operand-obj): Rewrite.
5296 (rtx-operand-name): New proc.
5297 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5298 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5299 (tstate-make): New args owner, known. All callers updated.
5300 (tstate-known-lookup): New proc.
5301 (rtx-traverse): New arg owner. All callers updated.
5302 (rtx-make-bool): New proc.
5303 (rtl-find-ifields): Rewrite.
5304 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5305 * semantics.scm: ... here.
5306 (rtx-const-equal,rtx-const-list-equal): New procs.
5307 (-build-known-values): New proc.
5308 (semantic-compile): New arg `insn'. Call rtx-simplify.
5309 (semantic-attrs): Ditto.
5310 * rtx-funcs.scm (member,number-list): New rtx functions.
5312 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5313 Rewrite. Delete arg `all-attrs'. All callers updated.
5314 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
5316 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5318 * decode.scm (subdtable-add): Handle `expr' entries.
5319 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
5320 (exprtable-entry-*): Update.
5321 (exprtable-entry-iflds): New proc.
5322 (exprentry-cost): New proc.
5323 (exprtable-sort,-gen-exprtable-name): New procs.
5324 (exprtable-make): New arg `name'. All callers updated. use vector.
5325 (exprtable-*): Update.
5326 (-build-decode-table-entry): Don't issue collision warning if all are
5327 specialized insns. Sort exprtable entries before building table.
5329 * read.scm (-reader-process-expanded-1): Move pretty printing of
5330 input to logging level 4.
5332 * utils.scm (string-list->string): New proc.
5334 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5336 (insn-read): Delete leading '-' in name. All callers updated.
5337 (real-insn?): New proc.
5338 (real-insns): Rewrite.
5339 (insn-has-ifield?): New proc.
5340 (insn-builtin!): Create insn attribute SPECIALIZED.
5342 * mach.scm (<arch>): Delete member app-data.
5343 (current-raw-insn-list): New proc.
5344 (insn-list-car,insn-list-splice!): New procs.
5345 (<decode-specialize>): New class.
5346 (-isa-parse-decode-specialize): New proc.
5347 (-isa-parse-decode-specializes): New proc.
5348 (<isa>): New members `condition', `decode-specializes'.
5349 (-isa-parse-condition): New proc.
5350 (-isa-parse): New args condition, decode-specializes.
5351 (-isa-read): Recognize condition, decode-specializes.
5352 (-isa-add-decode-specialize!): New proc.
5353 (modify-isa): New proc.
5354 (isa-conditional-exec?,state-conditional-exec?): New procs.
5355 (arch-init!): New reader command `modify-isa'.
5357 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5358 (mode-signed,mode-unsigned?): New procs.
5360 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
5362 * types.scm (<array>): New method get-shape.
5363 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5365 (hw-shape,hw-num-elms): New procs.
5366 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5367 if there's more than 255 registers.
5368 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5370 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5373 1999-05-21 Doug Evans <devans@casey.cygnus.com>
5375 * cgen-sid.scm (sim-arguments): Add -X.
5376 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5377 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5378 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
5379 Simplify by supporting pbb engine only.
5380 (-gen-sem-switch-init): New proc.
5381 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5382 (cgen-sem-switch.cxx): New proc.
5383 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5384 with with-pbb?. Support dual scache/pbb engines.
5385 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5386 Support dual scache/pbb engines.
5387 (cgen-decode.h): Generate semantic fn decls if with-scache?.
5388 * sid.scm (*) with-pbb? replaces with-sem-switch?.
5389 (sim-finish!): Create pbb support virtual insns if with-pbb?.
5391 1999-05-10 Ben Elliston <bje@cygnus.com>
5393 * arm7.cpu: Remove coprocessor related fields, operands and insn
5394 definitions for now. Take the undefined instruction trap instead.
5395 (ldmda-wb): New instruction.
5396 (ldmib-wb): Likewise.
5397 (ldmdb-wb): Likewise.
5398 (stmdb-wb): Likewise.
5399 (stmib-wb): Likewise.
5400 (stmda-wb): Likewise.
5402 1999-05-08 Doug Evans <devans@casey.cygnus.com>
5404 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5405 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5407 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5408 hobbit can't handle optional third arg.
5410 1999-05-07 Doug Evans <devans@casey.cygnus.com>
5412 * arm.cpu (h-tbit): Delete set spec.
5413 (h-mbits): Don't call arm_mbits_set in set spec.
5414 * arm.sim: New file.
5415 * hardware.scm (modify-hardware): New proc.
5416 (hardware-init!): Add modify-hardware command.
5417 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5418 (-hw-gen-set-quiet): Ditto.
5419 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5420 hardware attribute. Load $arch.sim file if present.
5421 * utils-cgen.scm (keyword-list?): New proc.
5422 (keyword-list->arg-list,arg-list-validate-name): New procs.
5423 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5425 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5427 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5430 * attr.scm (obj-prepend-atlist!): New proc.
5432 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5434 * sid.scm (<operand>,profilable?): Use op:type.
5435 * sim.scm (<operand>,profilable?): Use op:type.
5437 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5439 * utils.scm (find-index,find): Be more stack friendly.
5441 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5444 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5446 * arm.cpu (h-gr-usr): New hardware element.
5447 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5448 (arm-mode): New keyword.
5449 (h-mbits): Add set spec.
5450 (h-spsr): Implement get/set specs.
5452 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5453 (-reader-process-expanded-1): Pretty print logging output.
5455 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5456 (cgen-cpu.h): Print enums before hardware elements.
5457 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5458 * sid-decode.scm (cgen-decode.cxx): Ditto.
5459 * sid-model.scm (cgen-model.cxx): Ditto.
5461 * utils-cgen.scm (context-error): Accept variable number of
5464 * rtx-funcs.scm (error:): New rtx function.
5465 * rtl-c.scm (s-case-vm): New proc.
5466 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5467 (s-case): Simplify, handle non-VM result.
5468 (error:): New rtx function.
5470 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5472 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5473 (test-hi,test-ls): Fix cbit handling.
5474 (shift-type,h-operand2-shifttype): Move here ...
5475 * arm7.cpu: ... from here.
5476 (set-cond,set-cond-maybe,dnix): Delete, unused.
5477 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5478 * arm.cpu: ... to here.
5479 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5480 (alu-cmn): Use set-add-flags.
5481 (alu-tst): Use set-zn-flags.
5482 (alu-cmp): Use set-sub-flags.
5483 (lsl,lsr,asr): Set condition codes.
5484 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5485 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5487 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5488 All callers updated.
5489 (sub-sp): Rename from add-sp-neg.
5490 (f-lbwl-offset): Delete.
5491 (f-lbwl-hi,f-lbwl-lo): New ifields.
5492 (lbwl-hi,lbwl-lo): Update.
5493 (bl-hi): Add 4 to pc.
5494 (push-reg,pop-reg): Simplify.
5495 (push,push-lr): Push registers in correct order.
5496 (pop,pop-pc): Pop registers in correct order.
5497 (save-reg-inc,load-reg-inc): Simplify.
5498 (ldmia): Save registers in correct order.
5500 1999-04-30 Ben Elliston <bje@cygnus.com>
5502 * arm7.cpu (f-op-hdt): Remove; unused.
5503 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5504 (f-ror-imm8): New multi-ifield.
5505 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5507 (f-uimm12): New field.
5508 (ror-imm8): New operand.
5510 (hdt-offset8): Reinstate operand.
5511 (offset4-hi,offset4-lo): Remove.
5512 (set-cond): Remove macro; unused.
5513 (set-cond-maybe): Likewise.
5514 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5515 (store-word/byte): Likewise.
5516 (load-halfword): Use hdt-offset8 multifield operand instead of two
5517 4-bit operands that are explicitly combined by semantic code.
5518 (do-halfword-store): Bug fix. Set address when not preindexing.
5519 (store-halfword): Also use hdt-offset8 operand.
5520 (arith-op): Avoid clobbering source registers when one of them is
5521 the destination register.
5522 (arith-imm-op): Likewise.
5523 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5524 (teq-imm): Likewise.
5525 (ldm-p): Rename to ldmdb.
5526 (stm-pw): Rename to stmdb-wb.
5527 (multi-action): New macro; test reg-list bits and execute a
5528 semantic fn if the bit is set.
5529 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5530 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5531 (all insns): Use dnai entries for simplicity rather than dni.
5532 (*): Use short-form of (const ..).
5534 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5536 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5537 member eval to evaluator.
5538 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5539 (tstate-make): Delete arg op-fn. All callers updated.
5540 (tstate-op-fn,tstate-set-op-fn!): Delete.
5541 (rtx-traverse): Delete op-fn arg. All callers updated.
5542 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5543 split out of -simplify-for-compilation.
5545 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5546 (cgen_DEPENDENCIES): Add stamp-cgen.
5547 (stamp-cgen): New rule.
5548 * Makefile.in: Rebuild.
5550 * rtl-c.scm (enum:): Define emitter for.
5551 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5553 (rtx-constant-value,rtx-enum-value): New procs.
5554 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5555 (rtx-compile-time-constant?): Return #t for enums.
5556 (rtx-true?,rtx-false?): Handle enums.
5557 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5558 building result by hand.
5559 (rtx-simplify-eq-attr-insn): Ditto.
5560 * rtx-funcs.scm (enum:,enum): New rtx functions.
5562 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5564 (arch-analyze-insns!): New proc.
5565 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5566 of calling ifmt-compute! directly.
5567 * sid.scm (-sim-insns-analyzed?): Delete.
5568 (sim-analyze!): Call arch-analyze-insns! instead of calling
5569 ifmt-compute! directly.
5570 * sim.scm (-sim-insns-analyzed?): Delete.
5571 (sim-analyze!): Call arch-analyze-insns! instead of calling
5572 ifmt-compute! directly.
5574 * utils.scm (string-take-with-filler): New proc.
5575 (string-take): Use it.
5577 * pgmr-tools.scm: New file.
5578 * read.scm: Load it.
5579 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5581 * insn.scm (insn-base-mask): Renamed from insn:mask.
5582 All callers updated.
5583 (insn-base-mask-length): Renamed from insn:mask-length.
5584 All callers updated.
5585 (insn-foo): Renamed from insn:foo. All callers updated.
5586 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5587 * iformat.scm (compute-insn-base-mask-length): Renamed from
5588 compute-insn-mask-length. All callers updated.
5589 (compute-insn-base-mask): Renamed from compute-insn-mask.
5590 All callers updated.
5592 * enum.scm (-enum-parse-prefix): New proc.
5593 (<enum>,make!): Don't parse enum values here.
5594 (-enum-parse): Do it here. Call -enum-parse-prefix.
5595 (define-full-insn-enum): Ditto.
5596 (enum-vals-upcase): New proc.
5597 * hardware.scm (define-keyword): Make enum prefix uppercase.
5598 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5600 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5601 (<ifield>,field-extract): New method.
5602 (<multi-ifield>,field-extract): New method.
5603 (ifld-extract): New proc.
5604 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5605 (ifld-extract-fn-name): Renamed from ifld-extract.
5607 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5608 All callers updated.
5610 * ifield.scm (ifld-lsb0?): New proc.
5611 (sort-ifield-list): New arg up?. All callers updated.
5612 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5613 rather than global state.
5615 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5617 * insn.scm (pretty-print-insn-format): New proc.
5619 * Makefile.in: Rebuild.
5620 * aclocal.m4: Rebuild
5621 * configure: Rebuild.
5623 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5625 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5626 * configure: Rebuild.
5627 * aclocal.m4: Rebuild.
5628 * Makefile.in: Rebuild.
5629 * doc/Makefile.in: Rebuild.
5630 * doc/version.texi: Rebuild.
5632 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5634 * utils.scm (bits->bools): New proc.
5636 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5638 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5639 subfield's gen-ifld-extract-decl method.
5641 1999-04-23 Ben Elliston <bje@cygnus.com>
5643 * arm7.cpu (ldrsh-pu): Remove.
5644 (do-halfword-load): New pmacro.
5645 (load-halfword): Likewise.
5646 (do-halfword-store): Likewise.
5647 (store-halfword): Likewise.
5648 (strh-*): New instructions.
5649 (ldrsb-*): Likewise.
5651 (ldrsh-*): Likewise.
5653 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5655 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5658 * arm7.cpu (do-word/byte-store): Fix typo.
5660 1999-04-22 Ben Elliston <bje@cygnus.com>
5662 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5663 register is the program counter (R15).
5665 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5666 (str-*): Implement using store-word-byte. Remove older versions.
5667 (bic): Use the `inv' rtx for obtaining bitwise complements.
5668 (bic-imm): Likewise.
5670 (mvn-imm): Likewise.
5671 (store-indev-reg): Remove crufty pmacro.
5672 (load-indiv-reg): Likewise.
5673 (ldm-p): Reverse the order of register processing for decrement.
5675 (stbi): Remove; handled by the str-* insns.
5677 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5679 * thumb.cpu (cmp): Fix carry bit computation.
5682 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5684 * arm.cpu (h-tbit): Specify set spec.
5686 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5687 (set-sub-flags): Interpret "carry bit" as a borrow.
5688 (all sub/cmp insns): Carry bit is actually a borrow bit.
5689 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5690 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5692 (hireg-add,hireg-cmp,hireg-move): Ditto.
5694 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5695 (-CGEN-LANG-VERSION): Ditto.
5697 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5699 * pmacros.scm (-pmacro-make): New arg `default-values',
5700 all callers updated.
5701 (-pmacro-default-values): New proc.
5702 (-pmacro-process-keyworded-args): New proc.
5703 (-pmacro-process-args): New proc.
5704 (-pmacro-invoke): Process arguments before expanding macro.
5705 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5706 (define-pmacro): Handle default values specified in arg list.
5707 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5708 (rtx-boolif-op-arg[01]): New procs.
5709 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5710 (rtx-simplify): Handle not,orif,andif.
5711 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5712 * utils.scm (alist-copy): New proc.
5713 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5715 (swi): Explicitly set pc.
5717 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5719 1999-04-17 Ben Elliston <bje@cygnus.com>
5721 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5722 correctly adjusts the program counter now.
5724 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5725 (f-signed?): Rename from `f-hdt-signed?'.
5726 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5727 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5728 (f-hdt-offset8): Use new field names.
5729 (ldr): Use `imm12' field, not `offset12', since we do our own
5731 (str, str-*): Likewise.
5732 (ldu-*): Remove most; better not implemented than broken.
5734 (ldrsh-pu): New insn.
5738 (ldm-p): Likewise; replace (load-indiv-reg) version.
5740 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5742 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5743 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5744 (*): Explicitly specify mode in c-call.
5745 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5747 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5748 (arith-imm-op): New pmacro.
5749 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5750 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5752 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5754 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5756 * rtl.scm (rtl-find-ifields): Implement.
5758 * utils-gen.scm: New file.
5759 * read.scm: Load it.
5760 * desc.scm: Move generic attribute code to utils-gen.scm.
5761 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5762 * Makefile.in: Rebuild.
5764 * arm7.cpu (R15-OFFSET): New attribute.
5766 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5767 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5768 for reg-shift version.
5770 (data processing insns): Reorganize. Use dnai.
5772 * attr.scm (attr-kind): New proc.
5773 (attr-list-enum-list): Rewrite.
5774 (-attr-sort): Split result into two lists, bools and non-bools.
5775 (current-attr-list-for): Update.
5777 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5778 * sid-cpu.scm (-gen-attr-decls): New proc.
5779 (-gen-insn-attr-decls): New proc.
5780 (cgen-desc.h): New proc.
5781 (cgen-cpu.h): Put everything in @cpu@ namespace.
5782 (gen-parallel-exec-type): Change prefix of parexec struct from
5784 (-gen-trace-record-type): Ditto for trace_record struct.
5785 (-gen-write-case): Update.
5786 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5787 @prefix@. Update scache struct references.
5788 (-gen-sem-case): Update scache struct references.
5789 (-gen-sem-switch-fn): Update idesc struct reference.
5790 Update insn_type enum reference.
5791 (cgen-write.cxx): Update scache,argbuf references.
5792 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5793 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5794 from @cpu@ to @prefix@.
5795 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5796 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5797 from @CPU@ to @PREFIX@.
5798 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5799 from @CPU@ to @PREFIX@.
5800 (-gen-decode-insn-globals): Generate insn attributes.
5801 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5802 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5803 semantic fn typedef.
5804 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5805 Change prefix of scache struct from @cpu@ to @prefix@.
5806 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5807 Change prefix of idesc struct from @cpu@ to @prefix@.
5808 Change prefix of insn_type enum from @cpu@ to @prefix@.
5809 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5810 from @cpu@ to @prefix@.
5811 (-gen-scache-decls): Change prefix of scache struct from
5812 @cpu@ to @prefix@. Update idesc struct name.
5813 Update decode,execute methods.
5814 (-gen-extract-case): Update to type name changes.
5815 (-gen-decode-fn): Ditto.
5816 (cgen-decode.h): Put everything in @cpu@ namespace (except
5817 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5818 (cgen-decode.cxx): Add using namespace @cpu@.
5819 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5820 model_mark_get/set from @cpu@ to @prefix@.
5821 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5823 (gen-model-fn-decls): Update idesc struct name. Change prefix
5824 of model_insn_before/after from @cpu@ to @prefix@.
5825 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5826 Update insn_word type name.
5827 (-gen-model-timing-table): Update INSN_TIMING struct name.
5828 (-gen-model-init-fn): Update MODEL_DATA struct name.
5829 (-gen-mach-defns): Update name of init_idesc_table fn.
5830 (cgen-model.cxx): Add using namespace @cpu@.
5831 * sid.scm (gen-cpu-class): Delete.
5832 (gen-attr-type): New proc.
5833 (gen-obj-attr-sid-defn): New proc.
5834 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5835 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5837 (gen-cpu-insn-enum): Update name of insn enum.
5838 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5840 (swi): Rename @cpu@_swi to @prefix@_swi.
5842 * decode.scm (-build-decode-table-entry): Remove heuristic for
5843 distinguishing insns, and use insn ifield-assertion specs.
5845 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5846 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5847 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5848 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5849 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5850 all callers updated.
5851 (gen-attr-name): New proc
5852 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5853 (gen-obj-attr-defn): Delete num_nonbools count.
5855 * iformat.scm (ifmt-analyze): Handle insn-condition.
5856 (ifmt-compute!): Ditto.
5857 * insn.scm (<insn>): Specify default value for condition,
5858 post-cond-trap,compiled-condition,compiled-semantics.
5859 (<insn>,make!): New arg condition.
5860 (<insn>): Add getters for condition,compiled-condition.
5861 (-insn-parse): New arg condition, all callers updated.
5862 (-insn-read): Recognize condition spec.
5863 (define-full-insn): New arg condition.
5864 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5865 * semantics.scm (semantic-compile): Change arg sem-code to
5867 (semantic-attrs): Ditto.
5868 * sim.scm (sim-finish!): Update calls to define-full-insn.
5869 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5870 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5871 * sid.scm (sim-finish!): Update call to define-full-insn.
5873 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5875 * Makefile.am (sim-cpu): Allow specification of ISA.
5876 * Makefile.in: Rebuild.
5878 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5880 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5882 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5884 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5886 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5888 * attr.scm (atlist?): New proc.
5889 (-attr-eval): Rewrite.
5890 (attr-parse): New proc.
5891 (atlist-parse): Use it.
5893 * decode.scm (exprtable-entry-make): New proc.
5894 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5895 (exprtable-make,exprtable-insns): New procs.
5897 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5899 (hardware-builtin!): Make h-memory a vector.
5901 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5902 All callers updated.
5903 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5905 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5907 (-insn-parse): Set semantics to #f if not specified.
5908 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5910 (-parse-insn-format): Recognize `=' iformat spec.
5912 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5913 (isa-max-insn-bitsize): Ditto.
5915 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5917 (<ifield>,gen-extract): Ditto.
5918 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5919 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5920 (gen-define-ifmt-ifields): New proc.
5921 (gen-semantic-code): Rewrite.
5922 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5923 (-gen-decoder-switch): Handle expression tables.
5924 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5926 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5927 instead of gen-define-fields.
5928 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5930 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5931 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5932 (-gen-ifld-extract-beyond): Ditto.
5933 (<multi-ifield>,gen-ifld-extract): Ditto.
5934 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5935 rtl evaluation code.
5936 (op:read): Build an <eval-state> to pass to gen-read.
5937 (op:write): Build an <eval-state> to pass to gen-write.
5938 (op:record-profile): Build an <eval-state> to pass to
5940 * sim-cpu.scm (gen-semantic-code): Rewrite.
5941 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5943 (-gen-ifld-extract-beyond): Ditto.
5944 (<multi-ifield>,gen-ifld-extract): Ditto.
5945 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5946 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5947 rtl evaluation code.
5948 (op:read): Build an <eval-state> to pass to gen-read.
5949 (op:write): Build an <eval-state> to pass to gen-write.
5950 (op:record-profile): Build an <eval-state> to pass to
5953 * operand.scm (<operand>): Give `selector' default value of #f.
5954 Give `num' default value of -1. Give `cond?' default value of #f.
5955 (op:new-mode): Delete arg `set?', all uses updated.
5957 * read.scm (reader-error): Handle #f return from port-filename.
5958 (-init-parse-cpu!): Call rtl-c-init!.
5959 (reader-install-builtin!): Call rtl-builtin!.
5961 * rtl-c.scm: New file.
5962 * semantics.scm: New file.
5963 * read.scm: Load them.
5964 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5966 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5968 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5969 (-rtx-num-text,-rtx-max-num): New globals.
5970 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5971 (-rtx-macro-lookup): New proc.
5972 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5973 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5974 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5975 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5976 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5977 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5978 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5979 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5980 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5981 (rtx-pretty-name): New proc.
5982 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5983 (rtx-traverse-*): Rewrite rtx traversing.
5984 (rtx-eval-*): Rewrite rtx evaluation.
5985 (rtx-compile): New proc.
5986 (rtx-simplify): New proc.
5987 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5988 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5989 (ifield,index-of): Rewrite.
5990 (name): Renamed from `operand:'.
5991 (operand,xop,local): New rtx's.
5992 (current-insn): Rewrite.
5993 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5994 (cgen-hob.h): Remove rule for.
5995 (cgen-hob.o): Depend on cgen-hob.c only.
5996 * Makefile.in: Rebuild.
5998 * utils-cgen.scm (vmake): New proc.
5999 (<context>): New class.
6000 (context-make-prefix,context-error): New procs.
6002 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
6004 * i960.cpu: Add some ??? comments.
6005 (xnor, ornot): New instructions.
6006 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
6008 1999-04-08 Doug Evans <devans@casey.cygnus.com>
6010 * cos.scm (-object-error): Print better error message.
6012 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
6013 (-pmacro-env-ref): Renamed from -env-ref.
6015 1999-03-31 Doug Evans <devans@casey.cygnus.com>
6017 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
6019 (hardware-builtin!): Delete h-pc builtin.
6020 * arm.cpu (h-pc): Define.
6021 (h-gr): Delete get,set specs. Make array of 16 regs again.
6022 * arm7.cpu (set-logical-cc-maybe): Delete.
6023 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
6024 (data processing insns): Rewrite.
6025 * m32r.cpu (h-pc): Define.
6026 * fr30.cpu (h-pc): Define.
6027 * i960.cpu (h-pc): Define.
6028 * sparc.cpu (h-pc): Define.
6030 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
6031 (s-parallel): Replace do {...} while (0) with {...}.
6032 (s-sequence): Ditto.
6034 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
6036 (-gen-write-case,-gen-sem-case): Ditto.
6037 (-gen-sem-case): Only specify `written' if profiling or
6038 parallel-write-back.
6039 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
6040 (-gen-sem-switch-fn): New proc.
6041 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
6042 based on with-sem-switch option.
6043 * sid-decode.scm (-gen-decode-insn-globals): Only define
6044 idesc_table_initialized_p if with-sem-switch. Record semantic fn
6045 addresses in idesc_table if !with-sem-switch.
6046 (-gen-sem-fn-decls): Rewrite.
6047 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
6048 member based on with-sem-switch. Only define
6049 `idesc_table_initialized_p' member if with-sem-switch.
6050 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
6051 * sid.scm (-with-sem-switch?): New variable.
6052 (option-init!): Initialize it.
6053 (option-set!): Set it.
6054 (with-sem-switch?): New proc.
6055 (-op-gen-set-trace): Only emit `written' reference if profiling.
6056 (sim-finish!): Use h_pc_set to set pc.
6058 1999-03-30 Doug Evans <devans@casey.cygnus.com>
6060 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
6061 All callers updated.
6062 (arith-carry-cc-binop): New arg set-flags. All callers updated.
6064 * sid.scm (gen-argbuf-type): Delete.
6065 (-gen-argbuf-fields-union): Move to ...
6066 * sid-decode.scm: ... here.
6068 * read.scm (-reader-process-expanded-1): New proc.
6069 (-reader-process-expanded): Call it to catch nested begin's.
6070 (reader-process): Move `begin' handling to -reader-process-expanded.
6072 * insn.scm (-insn-read): Fix name of `format' spec.
6074 * pmacros.scm (.pmacro): New builtin.
6075 (scan-symbol): If procedure macro, return macro rather than its symbol.
6076 (check-macro): Don't do lookup, instead check if (car expr) is
6078 (scan-list): Handle .pmacro.
6079 (scan): No longer re-examine text for another macro invocation.
6080 (-pmacro-build-lambda): New proc.
6081 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
6082 another, fetch the other's value (rather than doing it during
6085 1999-03-27 Doug Evans <devans@casey.cygnus.com>
6087 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
6088 * Makefile.in: Rebuild.
6090 * decode.scm (decode-get-best-bits): Use memq instead of element?.
6091 (-fill-slot!): Simplify.
6092 (-build-slots): Simplify.
6094 * dev.scm (load-sid): Don't load sid-arch.scm.
6096 * sid-decode.scm: Replace computed goto decoder/extractor with plain
6098 * sim-decode.scm: Replace computed goto decoder/extractor with plain
6101 1999-03-26 Doug Evans <devans@casey.cygnus.com>
6103 * sim-decode.scm: Clean up pass. Move decoder computation into ...
6104 * decode.scm: ... here. New file.
6105 * sid-decode.scm: Use decoder computation code in decode.scm.
6106 * read.scm: Load decode.scm.
6108 * arm.cpu (arm710 model): Add u-exec function unit.
6109 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
6110 Add get/set specs to redirect reg 15 to h-pc.
6111 (h-*): Indicate for both ARM and THUMB isas.
6112 (cbit,nbit,vbit,zbit): Ditto.
6113 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
6114 (h-cpsr): Make virtual. Add get/set specs.
6115 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
6116 (h-spsr): New virtual reg.
6117 * arm7.cpu (shift-type): New explicitly defined keyword.
6118 (h-operand2-shifttype): Use it.
6119 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
6120 All callers updated. Don't set cbit.
6121 (logical-op): Add rm to ifield list. Change case to case:. Use
6122 shift-type enum as case choices. Set cbit.
6123 (and,orr,eor,add-imm): Uncomment out.
6124 (undefined): Temporarily comment out.
6125 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
6126 (lda-pc,lda-sp): Ditto.
6127 (ldr-pc): Rename from ldr.
6128 (cbranch): Mark insns as being thumb insns.
6130 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
6132 * cgen-sid.scm: Don't load sid-arch.scm.
6133 (sim-arguments): Delete unused entries.
6134 * sid-arch.scm: Delete.
6136 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
6137 (<insn>,ifld-assertions): New member.
6138 (<insn>,make!): New arg ifld-assertions, all callers updated.
6139 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
6140 (insn:fields): Delete.
6141 (-insn-parse): New arg ifld-assertions. All callers updated.
6142 (-insn-read,define-insn): New procs.
6143 (define-full-insn): New arg ifld-assertions. All callers updated.
6144 (insn-init!): New comment define-insn.
6146 * model.scm (-model-parse): Ensure at least one unit specified.
6148 * rtl.scm (-rtx-traverse-operands): Recognize environments.
6149 (<c-expr-temp>,get-name): New method.
6150 (-rtx-make-current-closure,s-closure): New proc.
6151 (hw:): Wrap rtx indices in a closure.
6152 (-gen-case-prefix): New proc.
6154 * rtx-funcs.scm (case:): Fix call to s-case.
6155 (closure): New rtx func.
6157 * hardware.scm (<hardware-base>): New member isas-cache.
6158 (<hardware-base>,get-isas): New method.
6159 (hardware-builtin): Indicate for all isas.
6160 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
6161 * mach.scm (current-arch-mach-name-list): Return list of names.
6162 (current-isa-mach-name-list): Ditto.
6163 (define-arch): Install builtin objects here.
6164 * read.scm (keep-atlist?): Only keep if both mach and isa are
6166 (keep-mach-atlist?): New proc.
6167 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
6168 (reader-install-builtin!): Renamed from -install-builtin!.
6169 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
6170 -gen-cpu-reg-access-defns. Rewrite.
6171 (gen-reg-access-defn): Delete.
6172 (-gen-hardware-struct): New proc.
6173 (-gen-hardware-types): Simplify. Add multiple-isa support.
6174 (gen-semantic-fn,-gen-all-semantics): Delete.
6175 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
6176 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6177 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6178 Call sem-analyze-insns!.
6179 (cgen-semantics.cxx): Add multiple-isa support.
6180 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6181 (-gen-scache-decls,-gen-decode-fn): Ditto.
6182 (cgen-decode.h): Call sem-analyze-insns!.
6183 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6184 * sid.scm (-with-multiple-isa?): New variable.
6185 (option-init!): Initialize it.
6186 (option-set!): Set it.
6187 (with-multiple-isa?): New proc.
6188 (gen-cpu-ref): New arg isas. All callers updated.
6189 (gen-cpu-class): New proc.
6190 (*-get-macro,*-set-macro): Delete.
6191 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6192 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6193 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6194 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6195 (-sim-insns-analyzed): New global variable.
6196 (sim-init!): Reset it.
6197 (sim-analyze-insns!): New proc.
6198 (sim-analyze!): Don't do instruction analysis here.
6199 (sim-finish!): Specify isa of x-invalid insn.
6200 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6202 1999-03-22 Doug Evans <devans@casey.cygnus.com>
6204 * thumb.cpu (cpu,mach,model): Delete.
6205 (dntf): New pmacro. Use it for all field definitions.
6206 (dntop): New pmacro. Use it for all operand definitions.
6207 (asr): Correct field list.
6208 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6210 * utils-cgen.scm (define-getters): New macro to simplify
6211 writing class accessors.
6212 (define-setters): Ditto.
6213 (sanitize): Recognize isa elements.
6215 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6216 state-parallel-exec?.
6217 * sid-model.scm (*): Ditto.
6218 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
6219 state-decode-assist.
6221 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6222 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6223 * sim-decode.scm (-gen-decode-switch): Ditto.
6225 * sim-arch.scm (-regs-for-access-fns): Delete.
6226 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6227 (-gen-arch-reg-access-defns): Delete.
6229 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6230 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6231 with state-parallel=exec?.
6232 (cgen-*): Call sim-analyze-insns! here.
6233 * sim-decode.scm (cgen-*): Ditto.
6234 * sim-model.scm (cgen-*): Ditto.
6235 * sim.scm (-sim-insns-analyzed): New global variable.
6236 (sim-init!): Reset it.
6237 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
6238 already done the analysis.
6240 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6243 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6244 (arm arch): Update isa spec.
6245 (arm,thumb isas): Define.
6246 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6247 (arm7tdmi mach): Add isa spec.
6248 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
6249 `const' on word number.
6250 * fr30.cpu (fr30 arch): Update isa spec.
6252 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6254 * i960.cpu (i960 arch): Update isa spec.
6256 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6257 liw-insns,parallel-insns moved to isas spec.
6258 * m32r.cpu (m32r arch): Update isas spec.
6260 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6261 liw-insns,parallel-insns moved to isa spec.
6262 * sparc.cpu (sparc arch): Update isas spec.
6263 (sparc isa): Define.
6264 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6265 decode-assist moved to isa spec.
6266 * sparc64.cpu (sparc64 cpu): Ditto.
6267 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6268 * desc-cpu.scm (-gen-isa-table-defns): New proc.
6269 (-gen-mach-table-defns): Output mach table.
6270 (-gen-hash-defines): Delete insn size macros, except for
6272 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
6273 (cgen-desc.h): Define MAX_ISAS.
6274 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
6275 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
6276 (arch-* accessors): Renamed from arch:*. All callers updated.
6277 (current-arch-isa-name-list): New proc.
6278 (-arch-parse-isas): Renamed from -arch-parse-isa.
6279 (def-isa-attr!): Rewrite.
6280 (<iframe>): New class.
6281 (<itype>): New class.
6283 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6284 (isa-integral-insn?,isa-parallel-exec?): New procs.
6285 (-isa-parse,-isa-read,define-isa): New proc.
6286 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6287 liw-insns moved to <isa>.
6288 (cpu-* accessors): Renamed from cpu:*. All callers updated.
6289 (-cpu-parse,-cpu-read): Update.
6290 (state-*): Renamed from state:*. All callers updated.
6291 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6293 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6294 (state-decode-assist): New proc.
6295 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6296 (-adata-set-derived!): Rewrite.
6297 (adata-integral-insn?): Renamed from adata:integral-insn?. All
6299 (arch-init!): Add define-isa command.
6300 * read.scm (<reader>): Default keep-isa member to (all).
6301 (reader-* accessors): Renamed from reader:*. All callers updated.
6302 (-keep-isa-set!): Call string->symbol on isa name list.
6303 (keep-isa-validate!): Rewrite.
6304 (current-isa): New proc.
6305 (keep-isa?): Recognize "all".
6306 (-init-parse-cpu!): New arg keep-isa. All callers updated.
6307 Call -keep-isa-set!.
6308 (cmd-if): Recognize keep-isa?.
6309 (cpu-load): New arg keep-isa. All callers updated.
6310 (-opt-spec-update): New proc.
6311 (common-arguments): First arg is string, not symbol.
6312 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
6314 * rtl.scm (rtx-get): Default mode of string arg is INT.
6316 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
6318 * rtx-funcs.scm (join:): Pass cpu to handler.
6320 * configure.in (guile_include_dir): Delete.
6321 * configure: Rebuild.
6322 * Makefile.in: Rebuild.
6323 * doc/Makefile.in: Rebuild.
6325 * sid-cpu.scm (-extract-chunk-specs): New proc.
6326 (gen-define-fields): Use it.
6327 (-extract-chunk): New proc.
6328 (-gen-extract-beyond-var-list): Use it.
6329 (gen-extract-fields): Simplify.
6331 1999-03-22 Ben Elliston <bje@cygnus.com>
6333 * arm7.cpu (ldri-p): New instruction.
6334 (swi): Do not vector through 0x8 yet--there is nothing there.
6337 (all): Use (const x) in subreg expressions.
6339 1999-03-19 Ben Elliston <bje@cygnus.com>
6341 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6344 1999-03-17 Doug Evans <devans@casey.cygnus.com>
6346 * fr30.cpu (define-arch): Specify "forced" default-alignment.
6347 * mach.scm (-parse-alignment): Recognize "forced" alignment.
6348 * sim-cpu.scm (-extract-chunk-specs): New proc.
6349 (gen-define-fields): Use it.
6350 (-extract-chunk): New proc.
6351 (-gen-extract-beyond-var-list): Use it.
6352 (gen-extract-fields): Simplify.
6354 Port to guile 1.3.1.
6355 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6356 (LIBIBERTY): New var.
6357 (HOB_OBJS): Add cgen-gh.o.
6358 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6359 * Makefile.in: Rebuild.
6360 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6361 * config.in: Rebuild.
6362 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6363 libncurses, libtermcap.
6364 Add checks for needed functions in guile 1.2 not in guile 1.3,
6365 and vice versa. Add test for 3 argument scm_make_vector.
6366 * configure: Rebuild.
6367 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6368 definitions if guile doesn't have them.
6369 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6370 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
6371 with gh_vector_set_x.
6372 (cgh_qsort): Replace gh_list_length with gh_length.
6373 * cgen-gh.h: Add decls for added functions.
6374 (cgh_qsort): Don't declare if IN_HOBBIT.
6375 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
6376 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6377 scm_make_vector with gh_make_vector.
6378 * cos.scm: Use vector-length instead of length on vectors.
6379 * dev.scm (cload): Make varargs proc with keyword/value args.
6380 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
6381 provide version that works with guile 1.2 or 1.3.
6382 Include private copy of scmhob.h.
6383 * scmhob.h: New file. Keep our own copy for now.
6385 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
6387 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6389 (-rtx-traverse-operands): Dump cx temp stack if debugging.
6390 (-cx-temp-dump-stack): Pretty up output.
6392 * arm.cpu: comment out thumb.cpu until isa support ready.
6393 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6394 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6395 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6397 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6399 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6401 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6402 (<hw-address>,mode-ok?): unsigned/signed are compatible.
6404 * operand (op:new-mode): Improve error message.
6406 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
6407 * arm7.cpu: New file.
6409 1999-03-12 Ben Elliston <bje@cygnus.com>
6411 * arm.cpu: Lots of minor fixes after desk checking.
6413 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6415 * thumb.cpu: snapshot of current work
6417 * rtl.scm (rtx-get): Tweak error message.
6419 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6421 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6422 * Makefile.in: Rebuild.
6424 * cos.c (cos_vector_copy): New function.
6425 (_object_copy): Use it.
6427 * mode.scm (mode:eq?): Clean up.
6428 * rtl.scm (cx-new-mode): Copy attributes.
6429 (rtx-get): Don't make copy if <c-expr> with identical mode.
6431 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6433 (gr-names): h-gr register names moved here.
6435 (cr-names): h-cr register names moved here.
6437 (dr-names): h-dr register names moved here.
6439 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6440 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6441 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6443 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6445 (gr-names): h-gr register names moved here.
6447 (cr-names): h-cr register names moved here.
6449 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6450 (h-accums,h-psw): Ditto.
6451 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6453 (gr-names): h-gr register names moved here.
6454 (h-gr-indices): Delete.
6455 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6456 (sparc64 h-gr): Ditto.
6457 (h-y): Add get/set specs.
6459 (fp operands): Rewrite.
6460 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6461 (h-tbr,h-cwp,h-wim): Ditto.
6462 * sparc64.cpu (h-fpsr): Add get/set specs.
6463 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6464 (fp-ld-op): New arg `dest', all callers updated.
6465 (*): Replace `make-di' with `join'.
6467 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6469 (gen-semantic-code): Save/restore rtl generator state.
6470 (cgen-cpu.h): Call rtl-gen-init!.
6471 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6472 (-gen-ifld-extract-beyond): Ditto.
6473 (<multi-ifield>,gen-ifld-extract): Ditto.
6474 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6476 (-hw-gen-set-quiet-pc): Ditto.
6477 (<hw-pc>,gen-write): Ditto.
6478 (-hw-cxmake-get): Ditto. Call getter function if present.
6479 (<hw-register>,cxmake-get-raw): New method.
6480 (<hw-register>,gen-set-quiet-raw): New method.
6481 (-hw-gen-set-quiet): New arg `gstate'.
6482 (hw-fun-access?): Delete.
6483 (gen-reg-access-defn): Output function contents.
6484 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6486 (-gen-hw-index): Ditto.
6487 (op:read): Update gen-read invocation.
6488 (op:write): Update gen-write invocation.
6489 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6491 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6492 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6493 (<unit>,gen-profile-code): Update to sim.scm version.
6495 * sim-arch.scm (-regs-for-access-fns): New proc.
6496 (-biggest-reg-mode): New proc.
6497 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6498 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6499 virtual regs separately.
6500 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6502 (gen-semantic-code): Save/restore rtl generator state.
6503 (cgen-cpu.h): Call rtl-gen-init!.
6504 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6505 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6506 renamed to mach-bfd-name.
6507 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6508 (-gen-ifld-extract-beyond): Ditto.
6509 (<multi-ifield>,gen-ifld-extract): Ditto.
6510 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6511 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6512 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6514 (hw-fun-access?): Delete.
6515 (-hw-gen-set-quiet-pc): New arg `gstate'.
6516 (<hw-register>,gen-get-macro): Rewrite.
6517 (<hw-register>,gen-set-macro): Rewrite.
6518 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6519 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6520 (<hw-register>,cxmake-get-raw): New method.
6521 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6522 (<hw-register>,gen-set-quiet-raw): New method.
6523 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6525 (-gen-hw-index): Ditto.
6526 (<hw-index>): New arg `gstate'.
6527 (-gen-hw-selector): Update call to rtx-c.
6528 (<pc>): New arg `gstate'.
6529 (op:read): Update gen-read invocation.
6530 (op:write): Update gen-write invocation.
6531 (<operand>,cxmake-get): Handle raw-reg.
6532 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6533 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6534 (<operand>,gen-set-quiet): Handle raw-reg.
6535 (<operand>,gen-set-trace): Handle raw-reg.
6536 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6538 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6539 cgen_operand_type enum.
6540 (gen-operand-table): Add operand type enum. Replace pointer to
6541 hardware element with its enum. Null terminate table.
6542 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6543 Build operand table.
6544 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6545 * mach.scm (<arch-data>): New member `isas'.
6546 (adata-isas): New accessor.
6548 (isa-default-insn-word-bitsize): New accessor.
6549 (isa-enum): New proc.
6550 (current-arch-default-insn-word-bitsize): Delete.
6551 (current-isa-list,current-isa-lookup): New procs.
6552 (-arch-parse-isa): New proc.
6553 (-arch-parse): Rewrite.
6554 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6555 (define-arch): Define ISA attribute.
6556 (def-isa-attr!,isa-supports?): New procs.
6557 (<mach>): New member `isas'.
6558 (mach-isas): New accessor.
6559 (-mach-parse): New arg `isas', all callers updated.
6560 (-mach-read): Recognize `isas'.
6561 (arch-finish!): Rewrite.
6562 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6563 @arch@_cgen_get_{int,vma}_operand.
6564 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6565 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6566 of pointer to table entry.
6567 * opcodes.scm (gen-switch): Handle multiply defined operands.
6568 * operand.scm (op-sort): New proc.
6570 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6571 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6572 (hw-enum): Accept symbol argument.
6573 (hardware-builtin!): Delete attribute FUN-ACCESS.
6574 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6576 * attr.scm (atlist-source-form): New proc.
6577 (attr-builtin!): New attr `PRIVATE'.
6578 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6579 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6580 if they have `PRIVATE' attribute.
6581 (gen-hw-table-defns): Output definitions of explicitly defined
6583 * hardware.scm (<keyword>): New member print-name. Rename member
6584 `value' to `values', all uses updated.
6585 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6586 (keyword-parse): Rewrite.
6587 (-keyword-read): New proc.
6588 (define-keyword): New proc.
6589 (-hw-parse-keyword): New proc.
6590 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6592 (-hw-parse-values): Ditto.
6593 (-hw-parse-get,-hw-parse-set): Rewrite.
6594 (hardware-init!): Add new comment define-keyword.
6595 * mach.scm (<arch>): New member `kw-list'.
6596 (arch:kw-list,arch_set-kw-list!): New accessors.
6597 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6599 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6600 * mode.scm (mode-class-integral?): New proc.
6601 (mode-class-float?,mode-class-numeric?): New procs.
6602 (mode-integral?,mode-float?,mode-numeric?): New procs.
6603 (mode-compatible?): New proc.
6604 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6606 (<ifield>,gen-extract): Ditto.
6607 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6608 (<gstate>): New class.
6609 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6610 (gstate-context,gstate-set-context!): New accessors.
6611 (gstate-macro?,gstate-set-macro?!): New accessors.
6612 (gstate-make,gstate-copy): New procs.
6613 (-rtl-current-gstate): New global.
6614 (current-gstate-simulator?): New proc.
6615 (current-gstate-context,current-gstate-macro?): New procs.
6616 (current-gstate,current-gstate-set!): New procs.
6617 (rtl-gen-init!): Rewrite.
6618 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6619 (tstate-make): New arg `gstate', all callers updated.
6620 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6621 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6622 (tstate-gstate,tstate-set-gstate!): New accessors.
6623 (tstate-copy): New proc.
6624 (tstate-new-cond?,tstate-new-set?): Rewrite.
6625 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6626 (rtx-traverse): New arg `gstate', all callers updated.
6627 (rtx-strdump): New proc.
6628 (-simplify-for-compilation): New arg `gstate', all callers updated.
6629 (semantic-in-out-operands): Ditto.
6630 (semantic-attrs): Ditto.
6631 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6632 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6633 (rtx-value): Rewrite.
6634 (<c-expr>,gen-name): New method.
6635 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6636 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6637 (cx-new-mode): New proc.
6638 (-rtx-c-with-tstate): New proc.
6639 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6641 (-rtx-mode): Rewrite.
6642 (-rtx-mode-compatible?): New proc.
6643 (<c-expr-temp>): New member `value'.
6644 (cx-temp:value): New accessor.
6645 (<c-expr-temp>,make!): Override default method.
6646 (<c-expr-temp>,cxmake-get): Rewrite.
6647 (<c-expr-temp>,gen-set-quiet): Rewrite.
6648 (<c-expr-temp>,gen-set-trace): Rewrite.
6649 (gen-temp-defs): Use cx-temp:value.
6650 (record-temp!): New arg value, all callers updated.
6651 (cx-temp:cx:make): Delete.
6652 (-cx-temp-dump-stack): New proc.
6653 (rtx-get): New arg `gstate', all callers updated. Do mode
6654 compatibility checks. Ensure result has specified mode.
6655 (rtx-set-quiet): New arg `gstate', all callers updated.
6656 (rtx-set-trace): Ditto.
6657 (s-c-call): New arg `tstate', all callers updated.
6658 (s-c-raw-call): Ditto.
6659 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6660 (s-cmpop,s-if,e-if): Ditto.
6661 (s-subreg): New proc.
6662 (-par-new-temp!): New proc.
6663 (-par-next-temp!): Rewrite.
6664 (-par-replace-set-dests): Use -par-new-temp!.
6665 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6666 (s-sequence): Use -rtx-c-with-state.
6667 * rtx-funcs.scm (*): Update.
6668 (raw-reg:): New rtx function.
6670 (join:,subreg:): New rtx functions.
6672 * insn.scm (<insn>): New members pre-cond-trap, condition,
6673 post-cond-trap, compiled-condition.
6675 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6677 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6679 * utils-cgen.scm (parse-symbol): New proc.
6680 (parse-string): New proc.
6681 (gen-get-macro,gen-set-macro): New arg `index-args'.
6682 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6683 Prepend \ to newlines.
6685 * utils.scm (alist-remove-duplicates): Delete.
6687 * sid.scm (sim-init!): Delete private debugging code.
6689 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6691 * cgen-sid.scm: New file for C++ simulator application.
6692 * sid-arch.scm: Ditto.
6693 * sid-cpu.scm: Ditto.
6694 * sid-decode.scm: Ditto.
6695 * sid-model.scm: Ditto.
6697 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6699 1999-03-05 Ben Elliston <bje@cygnus.com>
6701 * arm.cpu: New file.
6703 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6705 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6706 * Makefile.in: Rebuild.
6708 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6709 (-attr-parse): Validate default value.
6711 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6712 (-CGEN-LANG-VERSION): Ditto.
6713 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6714 (<reader>): New member keep-isa plus accessors.
6715 (-keep-isa-set!,keep-isa-validate!): New procs.
6716 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6717 (common-arguments): New variable.
6718 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6719 (-debug-repl,continue): New procs.
6720 (-cgen,cgen): New procs.
6721 * cgen-gas.scm: Rewrite.
6722 * cgen-opc.scm: Rewrite.
6723 * cgen-sim.scm: Rewrite.
6724 * cgen-stest.scm: Rewrite.
6726 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6727 (gas-test-finish!): Call opcodes-finish!.
6728 (gas-test-analyze!): Call opcodes-analyze!.
6729 (<hw-asm>): New method test-data.
6730 (<operand>,testdata): Rewrite.
6731 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6732 (sim-test-finish!): Call opcodes-finish!.
6733 (sim-test-analyze!): Call opcodes-analyze!.
6734 (<hw-asm>): New method test-data.
6735 (<operand>,testdata): Rewrite.
6737 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6739 * fixup.scm (reverse!): Define if missing.
6740 * *.scm: Use reverse! instead of list-reverse!.
6742 * utils.scm (leading-id-char?): New proc.
6743 (id-char?): Rewrite.
6744 (chars-until-delimiter): New proc.
6745 * opc-itab.scm (extract-syntax-operands): Rewrite.
6746 (strip-mnemonic): Rewrite.
6747 (compute-syntax): Rewrite.
6749 * pmacros.scm (-pmacro-substr): New proc.
6750 (pmacros-init!): Add builtin .substr.
6752 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6754 * thumb.cpu: New file.
6756 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6758 * Makefile.am (CGENCFLAGS): New variable.
6759 (WITH_HOBBIT): Use automake conditional.
6760 (CGEN_HOB_SRC): New variable.
6761 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6762 (*.o): Compile with CGENCFLAGS.
6763 (cgen-hob.c): Simplify.
6764 (cgen-nohob.c): New rule.
6765 (hobbit): Renamed from hob.x.
6766 (CLEANFILES): Add cgen-nohob.c.
6767 * Makefile.in: Rebuild.
6768 * doc/Makefile.in: Rebuild.
6769 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6770 (WITH_HOBBIT): Use AM_CONDITIONAL.
6771 * configure: Rebuild.
6772 * aclocal.m4: Rebuild.
6774 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6775 with string-write-map.
6777 * sim-cpu.scm (hw-need-storage?): New proc.
6778 (-gen-hardware-types): Use it.
6779 (gen-parallel-exec-elm): Call op-save-index?.
6781 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6783 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6785 (-gen-ifld-extract-beyond): Ditto.
6786 (<integer>): Delete all references.
6787 (<sim-hardware>): Delete.
6788 (hw-profilable?): New proc.
6789 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6790 (<hw-register>): Rename method get-index-mode to save-index?.
6791 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6792 (<hw-register>,gen-sym-decl): Make virtual.
6793 (<hw-memory>,gen-sym-decl): Make virtual.
6794 (<hw-memory>): Rename method get-index-mode to save-index?.
6795 (<hw-address>,gen-sym-decl): Make virtual.
6796 (<operand>): New method save-index?.
6797 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6799 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6800 prefix added. All uses updated.
6802 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6803 rather than pointer to table entry.
6805 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6806 Remove all hw-asm,op-asm support.
6807 (-gen-parse-number,-gen-parse-address): New procs.
6808 (<keyword>,gen-parse): Redo function name computation.
6809 (<keyword>,gen-print): Ditto.
6810 (<operand>,gen-function-name): Rewrite.
6811 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6812 (opcodes-init!): Delete call to add-parser!.
6814 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6815 Define enum using hardware semantic name.
6816 (-gen-hw-decl,-gen-hw-defn): New procs.
6817 (gen-hw-table-decls): Use -gen-hw-decl.
6818 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6819 CGEN_HW_ENTRY structs.
6820 (gen-operand-table): Output hw's enum, not pointer to table entry.
6821 (-gen-cpu-open): Build table of selected hardware elements.
6823 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6824 (<hardware> support): Delete.
6825 (<hw-asm>): Delete, moved to hardware.scm.
6826 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6827 (<hw-asm>,gen-table-entry): New method.
6828 (<hw-asm>,parse!): Delete.
6829 (<keyword>,gen-table-entry): New method.
6830 (<keyword>,parse!): Delete.
6831 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6832 for gen-decl,gen-defn,gen-ref,gen-init.
6833 (desc-init!): Don't create parser for operand asm specs.
6835 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6836 * ifield.scm (<ifield>): New member `mode'.
6837 (<ifield>,make!): New arg `mode'.
6838 (ifld-mode): Rewrite.
6839 (ifld-hw-type): Rewrite.
6840 (<ifield>,min-value): Rewrite.
6841 (<ifield>,max-value): Rewrite.
6842 (-ifield-parse): New arg `mode'.
6843 (-ifield-read): Update.
6844 (define-full-ifield): New arg `mode'.
6845 (define-full-multi-ifield): Ditto.
6846 (-multi-ifield-parse): Ditto.
6847 (-multi-ifield-read): Update.
6848 (define-full-multi-ifield): New arg `mode'.
6849 (ifield-builtin!): Update definition of f-nil.
6850 * simplify.inc (define-normal-ifield): Update call to
6852 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6853 (define-normal-hardware): Delete arg asm. New args indices, values,
6854 handlers. Update call to define-full-hardware.
6855 (define-simple-hardware,dsh): New pmacros.
6856 (define-normal-operand): Update call to define-full-operand.
6857 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6858 Specify INT/UINT mode instead.
6859 (h-gr,h-cr): Use "indices" instead of "asm".
6860 (h-dr,h-ps): Update keyword syntax.
6861 (h-r13,h-r14,h-r15): Ditto.
6862 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6863 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6864 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6865 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6866 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6867 Specify INT/UINT mode instead.
6868 (h-gr): Use "indices" instead of "asm".
6869 (h-cc): Update keyword syntax.
6870 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6871 Specify INT/UINT mode instead.
6872 (h-hi16,h-slo16,h-ulo16): Update.
6873 (h-gr,h-cr): Use "indices" instead of "asm".
6874 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6875 (h-accums): Update keyword syntax.
6876 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6877 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6878 Specify INT/UINT mode instead.
6879 (h-gr-indices): New pmacro.
6880 (h-gr32,h-gr64): Split up from h-gr.
6881 (h-a): Update type spec. Use values instead of asm spec.
6882 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6883 (h-y,h-annul-p): Ditto.
6884 (h-asr): Update keyword spec.
6885 (h-lo10,h-lo13,h-hi22): Update.
6886 (get-freg-spec,set-freg-spec): New pmacros.
6887 (h-fr32,h-fr64): Split up from h-fr.
6888 (rdd): Comment out get/set specs.
6889 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6890 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6891 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6892 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6893 UNSIGNED. Specify INT/UINT mode instead.
6894 (h-*): Use dsh instead of dnh where appropriate.
6895 (h-ixcc): Update type spec. Use "values" instead of "asm".
6896 (h-p,h-membarmask): Ditto.
6897 (membarmask): Use "handlers" instead of "asm".
6899 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6900 values,handlers,getters,setters plus accessors.
6901 (hw-mode-ok?,hw-default-mode): New procs.
6902 (<hardware-base>): Rename method new-mode to mode-ok?
6903 (<hardware-base>): New method get-index-mode.
6904 (hw-index-mode): New proc.
6905 (pc?): Delete, moved to operand.scm.
6906 (address?): New proc.
6907 (<hardware>): Delete.
6908 (<hw-asm>): Definition moved here from desc.scm.
6909 (keyword-parse): New proc.
6910 (hardware-parsers): Delete.
6911 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6912 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6913 (-hw-parse-get,-hw-parse-set): New procs.
6914 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6915 indices,values,handlers,get,set. Rewrite.
6916 (-hw-read-extra): Delete.
6918 (define-hardware): Don't add object if not selected.
6919 (define-full-hardware): Ditto.
6920 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6921 (<hw-register>): Member `type' moved to baseclass. Delete member
6923 (<hw-register>,parse!): Rewrite.
6924 (<hw-register>): Delete methods get-rank,get-mode.
6925 (<hw-register>): Method new-mode renamed to mode-ok?
6926 (<hw-register>): New method get-index-mode.
6927 (<hw-pc>,parse!): Rewrite.
6928 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6929 (<hw-memory>,parse!): Rewrite.
6930 (<hw-memory>): Delete methods get-rank,get-mode.
6931 (<hw-memory>): Method new-mode renamed to mode-ok?
6932 (<hw-memory>): New method get-index-mode.
6933 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6935 (<hw-immediate>,parse!): Rewrite.
6936 (<hw-immediate>): Delete methods get-rank,get-mode.
6937 (<hw-immediate>): Method new-mode renamed to mode-ok?
6938 (<hw-address>): Delete member hw-asm.
6939 (<hw-address>,parse!): Rewrite.
6940 (<hw-address>): Delete methods get-rank,get-mode.
6941 (<hw-address>): Method new-mode renamed to mode-ok?
6942 (hw-profilable?): Delete.
6943 (hardware-init!): Delete hardware-parsers reference.
6944 Update argument specs of command define-full-hardware.
6945 (hardware-builtin!): Update definitions of hardware builtins.
6946 * operand.scm (<operand>): New members hw-name,mode-name.
6947 Delete member op-asm. New member handlers.
6948 (<operand>,make!): Update.
6949 (op:hw-name,op:mode-name,op:handlers): New procs.
6952 (<operand>): New method get-index-mode.
6953 (<pc>,make!): Update.
6954 (op:new-mode): Rewrite.
6955 (operand-parsers): Delete.
6956 (-operand-parse): Rewrite. Return #f if insn not selected.
6957 (-op-read-extra): Delete.
6958 (-operand-read): Update.
6959 (define-operand,define-full-operand): Update.
6960 (operand-init!): Delete operand-parsers reference.
6961 Update syntax of define-full-operand command.
6963 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6964 (define-full-insn): Update.
6965 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6966 (define-full-minsn): Update.
6968 * mode.scm (<mode>): New member class.
6969 (mode:class): New proc.
6971 (-mode-parse): New arg class.
6972 (define-full-mode): Update.
6973 (mode-find): Rewrite.
6974 (mode-make-int,mode-make-uint): New procs.
6975 (mode-init!): Update syntax of define-full-mode command.
6976 (mode-builtin!): Update definitions of builtin modes.
6978 * model.scm (<profile>): Delete.
6980 * read.scm (keep-atlist?): New proc.
6981 (keep-multiple?): New proc.
6982 (<parser-list>): Delete.
6983 (add-parser!,parse-spec!): Delete.
6985 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6986 (def-rtx-syntax-node): Ditto.
6987 (-rtx-traverse-debug?): New variable.
6988 (tstate-make): New proc.
6989 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6990 (tstate-new-cond?,tstate-new-set?): New procs.
6991 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6992 tstate. All callers updated.
6993 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6994 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6995 (-build-operand!): Replace arg cond? with tstate.
6996 (-build-reg-operand!,-build-mem-operand!): Ditto.
6997 (-build-index-of-operand!): Update making of <operand> object.
6998 (s-ifield): New arg tstate. All callers updated.
6999 (hw:): New arg tstate. All callers updated. Replace call to
7000 current-hw-lookup with current-hw-sem-lookup-1.
7001 (s-index-of): New arg tstate. All callers updated.
7003 (-rtx-use-sem-fn?): New proc.
7004 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
7006 (s-convop): Only use semantic mode when using semantic cover fns.
7007 (s-cmpop): Call -rtx-use-sem-fn?.
7008 (s-cond,s-case): New arg tstate. All callers updated.
7009 (s-parallel,s-sequence): Ditto.
7011 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
7013 * types.scm (<scalar>): Rewrite implementation.
7014 (<integer>): Delete.
7015 (parse-type): Rewrite.
7017 * utils-cgen.scm (parse-handlers): New proc.
7019 * utils.scm (!=): New proc.
7021 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
7023 * pmacros.scm (-pmacro-expand): Fix typo.
7025 1999-02-12 Doug Evans <devans@casey.cygnus.com>
7027 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
7028 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
7029 * i960.cpu (build-hex2): New pmacro.
7030 (insn-opcode): Simplify.
7031 (insn-opcode2): Ditto.
7033 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
7034 * cgen-stest.scm (catch-with-backtrace): Ditto.
7036 1999-02-11 Doug Evans <devans@casey.cygnus.com>
7038 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
7039 All callers updated.
7040 (-pmacro-invoke): New proc.
7041 (-pmacro-sym,-pmacro-str): New procs.
7042 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
7043 (pmacros-init!): Install builtins .iota, .map, .apply.
7044 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
7045 (h-fr): Simplify register name spec.
7046 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
7047 * utils.scm (num-args-ok?): New proc.
7049 1999-02-10 Doug Evans <devans@casey.cygnus.com>
7051 * pmacros.scm (-pmacro-error): New proc.
7052 (-pmacro-expand): Use it.
7053 (-pmacro-splice): New proc.
7054 (pmacros-init!): Install new builtin .splice.
7056 * sparc.cpu: Include sparc64.cpu when appropriate.
7057 (f-mmask,f-simm11): Moved to sparc64.cpu.
7058 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
7059 (ANNUL attribute): Delete.
7060 (test-* pmacros): New arg cc, all callers updated.
7061 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
7062 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
7064 (ldstub,swap): Moved to sparccom.cpu.
7065 * sparc64.cpu: Add more insns.
7067 1999-02-09 Doug Evans <devans@casey.cygnus.com>
7069 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
7071 (cgen-sem-switch.c): Ditto.
7072 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
7073 moved to cgen-engine.h.
7074 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
7075 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
7076 global. Cache attributes and insn length in IDESC.
7077 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
7078 @cpu@_opcode renamed to @cpu@_get_idata.
7079 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
7080 done later underneath sim_resume.
7081 (@mach@_mach): Record @cpu@_prepare_run.
7082 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
7084 (-hw-gen-set-quiet-pc): Ditto.
7085 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
7086 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
7087 (<hw-addr>,cxmake-get): Ditto.
7088 (<hw-iaddr>,cxmake-get): Ditto.
7089 (<pc>,cxmake-get): Ditto.
7090 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
7091 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
7092 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
7093 (<hw-pc>,gen-write): Use hw-selector-default.
7094 (<hw-register>,gen-write): Ditto.
7095 (<hw-memory>,gen-write): Ditto.
7096 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
7097 (-gen-hw-selector): New proc.
7099 * desc.scm: New file.
7100 * desc-cpu.scm: New file.
7101 * opcodes.scm: Split up into several smaller files.
7102 * opc-asmdis.scm: New file.
7103 * opc-ibld.scm: New file.
7104 * opc-itab.scm: New file.
7105 * opc-opinst.scm: New file.
7106 * Makefile.am (desc): New target.
7107 (opcodes): Update args to cgen-opc.scm.
7108 * Makefile.in: Rebuild.
7109 * aclocal.m4: Rebuild.
7110 * config.in: Rebuild.
7111 * configure.in: Update arg to AC_INIT.
7112 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
7113 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
7115 * configure: Rebuild.
7116 * cgen-gas.scm: Update files to load.
7117 * cgen-opc.scm: Ditto. Reorganize option letters.
7118 * cgen-sim.scm: Update files to load.
7119 * cgen-stest.scm: Ditto.
7120 * dev.scm (cload): New app "DESC".
7121 (load-opc): Update files to load.
7122 (load-gtest,load-sim,load-stest): Ditto.
7124 * attr.scm (bool-attr?): New proc.
7125 (attr-list-enum-list): New proc.
7126 (-attr-sort): Rewrite.
7127 (attr-builtin!): Give ALIAS attribute a fixed index.
7128 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
7129 calculate attribute enum list.
7130 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
7132 * insn.scm (-insn-parse): Renamed from parse-insn.
7134 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
7137 * mode.scm (-mode-parse): Renamed from parse-mode.
7139 * operand.scm (<operand>): New member `selector'.
7140 (<operand>,make!): Use default selector.
7141 (hw-selector-default): New variable.
7142 (hw-selector-default?): New proc.
7144 * pmacros.scm (pmacros-init!): New proc.
7145 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
7146 (-env-set!): Delete.
7147 (-pmacro-expand): New proc apply-macro.
7148 Use it in scan-list,scan. Scan list first, then see if macro
7150 (define-pmacro): Rewrite.
7151 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
7153 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
7154 selected if (current-mach) seen.
7155 (rtx?): Renamed from rtx-uneval?, all callers updated.
7156 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
7158 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
7159 selector, all callers updated.
7160 (hw:): New arg selector, all callers updated. Delete old comments
7162 (reg:,mem:): Handle selectors
7163 * rtx-funcs.scm (reg:): Handle selectors.
7165 * read.scm: Renamed from cpu.scm.
7166 (<command>): New class.
7167 (<reader>): New member commands.
7168 (reader-add-command!): New proc.
7169 (reader-lookup-command): New proc.
7170 (reader-error,-reader-process-expanded,reader-process): New procs.
7171 (reader-read-file!): New proc.
7172 (include): Call reader-read-file!.
7174 (cpu-load): Call reader-read-file!.
7175 * utils.scm (num-args): New proc.
7176 * simplify.inc: New file.
7177 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
7178 procs. Move define-normal-foo procs (and abbreviated forms) to
7179 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
7181 * fr30.cpu: Include simplify.inc.
7182 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7183 * i960.cpu: Include simplify.inc.
7184 * m32r.cpu: Include simplify.inc.
7185 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7186 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7187 * sparc.cpu: Include simplify.inc.
7188 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7189 * utils-cgen.scm (parse-error): Moved to read.scm.
7190 (sanitize): Rewrite.
7191 (utils-init!): New proc.
7193 1999-02-02 Doug Evans <devans@casey.cygnus.com>
7195 * sparc.cpu: New file.
7196 * sparc32.cpu: New file.
7197 * sparc64.cpu: New file.
7198 * sparccom.cpu: New file.
7199 * sparc.opc: New file.
7201 1999-01-27 Frank Eigler <fche@cygnus.com>
7203 * utils.scm (gen-copyright): New proc.
7205 1999-01-27 Doug Evans <devans@casey.cygnus.com>
7207 Parameterize rtl parsing, rather than having lots of little handlers.
7208 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7209 Delete member traverse.
7210 (rtx:set-traverse!): Delete.
7211 (-rtx-valid-types,-rtx-valid-matches): New variables.
7212 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7213 instead of expression. All callers updated.
7214 (def-rtx-node): New args arg-types,arg-modes.
7215 (def-rtx-syntax-node): Ditto.
7216 (def-rtx-dual-mode): Ditto.
7217 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7218 All callers updated.
7219 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7220 All callers updated.
7221 (rtx-macro-expand): New proc.
7222 (-rtx-traverse-check-args): Delete.
7223 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7224 an rtx specific traverser.
7225 (-rtx-any-mode?,-rtx-symornum?): New procs.
7226 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7227 (-rtx-traverse-no-mode): Delete.
7228 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7229 (-rtx-traverse-operands): Rewrite.
7230 (-rtx-traverse-expr): Rewrite.
7231 (rtx-traverse): Don't expand macros here, leave for caller to do.
7232 (rtx-simplify): Delete.
7233 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
7235 (rtx-true?,rtx-false?): Ditto.
7236 (-rtx-ref-type): Set dest is operand 1 now.
7237 (-simplify-for-compilation): New proc.
7238 (semantic-in-out-operands): Recognize regno as an alias for index-of.
7239 Expand macros before calling rtx-traverse. Sort operands by name
7240 to avoid unnecessary semantic formats.
7241 (semantic-attrs): New proc.
7242 (rtx-uneval?): Handle (<rtx-func> ...).
7243 (s-boolifop): Delete arg mode. All callers updated.
7244 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7245 (eq-attr): New arg obj.
7247 * m32r.cpu (rach): Update calls to andif.
7249 * minsn.scm (-minsn-parse-expansion): Renamed from
7250 parse-minsn-expansion.
7251 (-minsn-parse): Renamed from parse-minsn.
7252 (-minsn-read): Renamed from read-minsn.
7253 (def-minsn): Don't check APPLICATION here.
7254 (def-full-minsn): New proc.
7255 (define-macro-insn): Check APPLICATION here. Expand macros.
7256 (define-normal-macro-insn): Ditto.
7258 * utils.scm (word-value): New arg start-lsb?.
7259 (word-mask,word-extract): Ditto.
7260 (split-bits,powers-of-2): Use integer-expt instead of expt.
7261 (bit-set?): Handle 32 bit values (which are bignums).
7262 (cg-logand,cg-logxor): New functions.
7263 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7264 (<ifield>,field-value): Update call to word-value.
7265 (<ifield>,min-value): Use integer-expt instead of expt.
7266 (<ifield>,max-value): Ditto.
7268 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7270 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7272 Compute raw instruction format in addition to semantic based format.
7273 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7274 (<iformat> accessors): Rename accessors to ifmt-*.
7275 (<sformat>): New class.
7276 (fmt-enum): Renamed from fmt:enum.
7277 (-ifmt-search-key): Rewrite.
7278 (-sfmt-search-key): New proc.
7279 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7280 Compute iformat and sformat search keys.
7281 (ifmt-build): Update.
7282 (sfmt-build): New proc.
7283 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7284 (ifmt-compute!): Compute instruction format <iformat> based on
7285 instruction fields alone. Compute new semantic format <sformat>
7286 based on instruction fields and semantic information.
7287 (ifmt:lookup): Delete.
7288 * mach.scm (<arch>): New member sfmt-list, plus accessors.
7289 (current-sfmt-list): New proc.
7290 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7291 Rename member fmt to ifmt. New members fmt-desc, sfmt.
7292 (insn-length,insn-length-bytes): Update.
7293 (insn:mask-length,insn:mask): Update.
7294 (insn-lookup-op): Update.
7295 * gas-test.scm (gas-test-analyze!): Update.
7296 (gen-gas-test): Ditto.
7297 * sim-test.scm (sim-test-analyze!): Update.
7298 (gen-sim-test): Ditto.
7299 * opcodes.scm (gen-operand-instance-table): Update.
7300 (gen-operand-instance-ref): Ditto.
7301 (max-operand-instances): Use heuristic if semantics not parsed.
7302 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7303 (opcodes-analyze!): Only scan semantics of building operand instance
7305 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7306 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7307 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7308 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7309 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7310 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7311 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7313 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7314 New arg lsb0? All callers updated.
7315 (decode-bits): New arg lsb0?. All callers updated.
7316 (opcode-slots): Update call to bit-set?. Call integer-expt instead
7318 (-gen-decode-bits): New arg lsb0?. All callers updated.
7319 (build-slots): Call integer-expt instead of expt.
7320 (build-decode-table-entry): Handle crossing word boundaries better.
7321 (-gen-decode-switch): New arg lsb0?. All callers updated.
7322 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7324 * enum.scm (define-enum): Rewrite.
7325 (define-normal-enum): Ditto.
7326 (def-full-insn-enum): New proc.
7327 (define-normal-insn-enum): Rewrite.
7329 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7331 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7333 * dev.scm: Add sid support.
7335 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7336 (CLEANFILES): Add tmp-*.
7337 * Makefile.in: Rebuild.
7339 * doc/Makefile.am: New file.
7340 * doc/Makefile.in: New file.
7341 * doc/cgen.texi: New file.
7342 * Makefile.am (SUBDIRS): Define.
7343 * Makefile.in: Rebuild.
7344 * configure.in: Create doc/Makefile.
7345 * configure: Rebuild.
7347 1999-01-18 Doug Evans <devans@casey.cygnus.com>
7349 * insn.scm (insn:syn): Delete.
7351 1999-01-15 Doug Evans <devans@casey.cygnus.com>
7353 * fr30.cpu (model fr30-1): Add state variables load-regs,
7354 load-regs-pending. Delete h-gr. Clean up operand names of all units.
7355 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7356 (model m32rx): Ditto.
7357 (addi): Simplify function unit usage spec.
7358 (ld-plus): Rewrite operand names in function unit usage spec.
7359 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7360 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7361 overridden. Allow operand to appear in input and output spec.
7362 (<insn>,gen-profile-code): string-append -> string-list.
7364 * ifield.scm (define-ifield): Call pmacro-expand.
7365 (define-full-ifield,define-normal-ifield): Ditto.
7366 (define-multi-ifield,define-normal-multi-ifield): Ditto.
7368 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7369 with-scache and without-scache cases.
7371 1999-01-14 Doug Evans <devans@casey.cygnus.com>
7373 * fr30.cpu (fr30-1): Add state variable h-gr.
7374 Add units u-cti, u-load, u-store, u-ldm, u-stm.
7375 (all insns): First pass at providing cycle counts.
7376 * sim.scm (<unit>,gen-profile-code): Only check for output operands
7377 when initializing unit output operands, ditto for input operands.
7379 * insn.scm (insn-length,insn-length-bytes): New procs.
7380 * mach.scm (-adata-set-derived!): Use them.
7381 * sim-cpu.scm (-gen-sem-case): Ditto.
7383 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7384 (-gen-write-case): Ditto.
7385 (gen-semantic-fn): Ditto. Split into two:
7386 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
7388 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
7389 scache/no-scache appropriately. All callers updated.
7390 (-gen-sem-case): PCADDR->IADDR.
7391 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7393 * sim-decode.scm (*): Replace string-append,string-map with
7394 string-list,string-list-map where the result is sufficiently large.
7395 (-gen-decode-insn-table): Go back to simple version for non-scache
7396 case: just record IDESC in decoder tables and leave field extraction
7398 (-gen-decode-switch): Ditto.
7399 (-gen-decode-fn): Ditto.
7400 (-gen-extract-decls): Only emit format enum if with-scache?.
7401 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7403 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7404 (-gen-insn-timing): Ditto.
7405 * sim.scm (gen-argbuf-type): Only output sem_fields union in
7408 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7409 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7411 1999-01-12 Doug Evans <devans@casey.cygnus.com>
7413 * cpu.scm (keep-mach-validate!): New proc.
7414 (include): New proc.
7416 * mach.scm (current-arch-mach-name-list): New proc.
7417 (-parse-arch-machs): Always return canonical form.
7418 (def-arch): Validate user specified machs to be kept.
7419 (def-mach-attr!): Simplify.
7421 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7422 (option-init!): Initialize it.
7423 (option-set!): Set it.
7424 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7425 output operand instance tables.
7426 (cgen-opc.in): Only output operand instance tables if asked to.
7428 * sim.scm (option-init!,option-set!): Clarify returned value.
7430 * sim.scm (gen-mach-bfd-name): Move from here.
7431 * utils-cgen.scm: To here.
7433 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7435 * fr30.cpu (ilm): Fix comment field.
7436 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7439 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7440 (rtx-true?, rtx-false?): New procs.
7441 * rtx-funcs.scm (annul): Rename vpc to pc.
7442 (-rtx-traverse-if): Improve determination of whether then/else parts
7443 are conditionally executed.
7445 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7447 (gen-argbuf-type): Simplify generated definition (big sem_fields
7448 union moved outside).
7450 1999-01-11 Ben Elliston <bje@cygnus.com>
7452 * doc/porting.texi: New file.
7454 * doc/intro.texi: New file.
7455 (Layout): Use @example to insert preformatted ASCII text (such as
7456 diagrams). @code is inappropriate here.
7458 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7460 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7462 * m32r.opc (print_hash): Cast dis_info.
7464 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7465 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7468 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7470 * i960.cpu (f-br-disp): Remove RELOC attribute.
7471 (f-ctrl-disp): Ditto.
7472 (callx-disp): set-quiet -> set for (reg h-gr 2).
7473 (callx-indirect,callx-indirect-offset): Ditto.
7475 * Makefile.am (gas-test): Fix dependencies.
7476 * Makefile.in: Rebuild.
7477 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7478 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7479 (gas-test-analyze!): Use syntax-break-out.
7480 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7481 (sim-test-analyze!): Use syntax-break-out.
7482 (cgen-build.sh): Use gen-file-name.
7483 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7484 * insn.scm (syntax-break-out): New proc.
7485 * utils.scm (gen-file-name): New proc.
7487 * fixup.scm (nil,<?,<=?,>?): Delete.
7489 * utils.scm (count-true): Rewrite.
7491 * slib/sort.scm: Move sort.scm to slib directory.
7494 * iformat.scm (ifmt-compute!): Record empty format.
7496 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7497 internal procs outside. Handle expression register numbers.
7500 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7502 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7504 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7505 (gen-semantic-fn,-gen-sem-case): Ditto.
7506 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7507 (cgen-semantics.c): Ditto.
7508 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7509 (gen-ifmt-argvars-defns): New proc.
7510 (gen-ifmt-argvars-assigns): New proc.
7511 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7512 (-gen-decode-fn): Handle non-with-scache case.
7513 (cgen-decode.c): Define WANT_CPU to @cpu@.
7514 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7515 (cgen-model.c): Define WANT_CPU to @cpu@.
7516 * sim.scm (gen-ifld-extract-argvar): New proc.
7517 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7518 with FUN-ACCESS specified.
7519 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7520 (<hw-register>,gen-extract): New arg local?.
7521 (<hw-address>,gen-extract): Ditto.
7522 (-hw-cxmake-get): Handle non-with-scache case.
7523 (-hw-gen-set-quiet): Ditto.
7524 (<hw-address>,cxmake-get): Handle non-with-scache case.
7525 (gen-op-extract-argvar): New proc.
7526 (<operand>,gen-record-profile): Rewrite.
7527 (<operand>,gen-profile-code): Rewrite.
7528 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7529 (gen-argbuf-fields-union): New proc.
7530 (gen-argbuf-type): Use it. Handle non-scache case.
7532 * *.scm: class:foo procs renamed to class-foo.
7533 * attr.scm (<attribute>): New member `for'.
7534 (-attr-parse): New first value in list for default if
7536 (non-bool-attr-list,attr:add!): Delete.
7537 (def-attr): Use current-attr-add!.
7538 (atlist-attr-value-no-default): New proc.
7539 (attr-lookup-default): Handle boolean attributes.
7540 (gen-attr-enum): New proc.
7541 (-attr-remove-meta-attrs-alist): New proc.
7542 (attr-nub): New proc.
7543 (current-attr-list-for): New proc.
7544 (current-{ifld,hw,op,insn}-attr-list): New procs.
7545 (attr-builtin!): New proc.
7546 * cpu.scm (keep-obj?): Rewrite.
7547 (-init-parse-cpu!): Call arch-init!.
7548 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7549 (-finish-parse-cpu!): Call arch-finish!.
7550 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7551 (def-enum,def-full-enum): Use current-enum-add!.
7552 (gen-obj-list-enums): New proc.
7553 * hardware.scm (hw:add!,hw:lookup): Delete.
7554 (def-hardware,def-hardware-ext): Use current-hw-add!.
7555 (hw:std-attrs,hw:attr-list): Delete.
7556 (hardware-builtin!): Define builtin hardware attributes.
7557 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7558 (def-ifield,def-full-ifield): Use current-ifld-add!.
7559 (ifld:std-attrs,ifld:attr-list): Delete.
7560 (ifield-builtin!): New proc.
7561 * insn.scm (insn:add!,insn:lookup): Delete.
7562 (def-full-insn): Use current-insn-add!.
7563 (insn:std-attrs): Delete.
7564 (insn-builtin!): New proc.
7565 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7567 (<arch-data>): New member machs.
7568 (current-attr-list,current-enum-list): New procs.
7569 (current-op-list,current-minsn-list): New procs.
7570 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7571 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7573 (-parse-arch-machs): New proc.
7574 (-arch-parse): New arg machs, all callers updated.
7575 (-arch-read): Handle machs spec.
7576 (def-arch): Define MACH attribute here.
7577 (mach-init!,mach-finish!): Not here.
7578 (cpu:add!,cpu:lookup): Delete.
7579 (def-cpu): Use current-cpu-add!.
7580 (<mach>): New member bfd-name.
7581 (-mach-parse): New arg bfd-name, all callers updated.
7582 (-mach-read): Handle bfd-name spec.
7583 (mach:add!,mach:lookup): Delete.
7584 (def-mach): Use current-mach-add!.
7585 (def-mach-attr!): New proc.
7586 (arch-init!): New proc.
7587 (arch-finish!): New proc. Reverse all object lists here.
7588 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7589 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7590 (define-normal-macro-insn): Ignore minsn if mach not kept.
7591 * mode.scm (mode-builtin!): New proc.
7592 * model.scm (model:add!,model:lookup): Delete.
7593 (def-model): Use current-model-add!.
7594 * opcodes.scm (insn:attr-list): Delete.
7595 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7596 (gen-attr-table-defn): Emit value for default.
7597 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7598 (op:attr-list): Delete.
7599 (gen-operand-decls,gen-insn-decls): New proc.
7600 (compute-insn-attr-list): Delete.
7601 (cgen-opc.h): Reorganize and simplify.
7602 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7603 (def-operand,def-full-operand): Use current-op-add!.
7604 (op:std-attrs): Delete.
7605 (operand-enum): Delete.
7606 (operand-builtin!): Define builtin operand attrs.
7607 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7608 (gen-attr-enum-decl): Use gen-obj-list-enums.
7609 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7611 * fr30.cpu (define-arch): Add machs spec.
7612 (f-i4): SIGNED attribute -> !UNSIGNED.
7613 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7614 (HASH-PREFIX): Define operand attribute.
7615 (NOT-IN-DELAY-SLOT): Define insn attribute.
7616 * i960.cpu (define-arch): Add machs spec.
7617 * m32r.cpu (define-arch): Add machs spec.
7618 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7619 (HASH-PREFIX): Define operand attribute.
7620 (FILL-SLOT): Define insn attribute.
7622 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7624 * fr30.cpu (stilm): Correct mask for and operation.
7626 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7628 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7629 Replace START/EXIT with start/pass.
7630 (gen-sim-test): Delete ".text".
7632 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7634 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7636 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7638 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7639 (h-sbit): Make it FUN-ACCESS.
7640 (h-gr): Reorder so that general regs are always printed by number.
7642 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7644 * i960.cpu (flushreg): Use nop.
7646 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7648 * m32r.cpu (default-alignment): Specify.
7649 * mach.scm (<arch-data>): New member default-alignment.
7650 (adata:default-alignment): New proc.
7651 (current-arch-default-alignment): New proc.
7652 (-arch-parse): New arg default-alignment.
7653 (parse-alignment): New proc.
7654 (-arch-read): Handle default-alignment spec.
7656 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7658 * insn.scm (f-%): Delete.
7659 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7660 be readded if proved useful.
7661 (gen-extract-fields): Ditto. Use gen-ifetch.
7662 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7663 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7665 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7667 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7669 1998-12-14 Dave Brolley <brolley@cygnus.com>
7671 * fr30.cpu: Remove stub macros.
7672 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7673 (div2): Don't use addc/subc.
7675 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7677 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7680 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7682 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7684 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7686 * cpu.scm (keep-all?): New proc.
7687 (assert-keep-all): Use it.
7688 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7689 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7690 Check for spelling errors.
7692 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7694 * rtl.scm (s-convop): Call -rtx-sem-mode.
7696 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7698 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7699 (-parse-hw-profile): Ditto.
7700 (<hw-register>, parse!): Return `void' result.
7701 (<hw-pc>, parse!): Ditto.
7702 (<hw-memory>, parse!): Ditto.
7703 (<hw-immediate>, parse!): Ditto.
7704 (<hw-address>, parse!): Ditto.
7706 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7707 (-ifld-parse-encode-decode): New proc.
7708 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7709 (-multi-ifield-parse): Set encode/decode to #f.
7710 (ifld:decode-mode): New proc.
7711 * utils.scm (nub): Rewrite.
7712 * operand.scm (op-nub): Rewrite.
7713 * sim.scm (<ifield>, gen-type): Rewrite.
7714 (-gen-ifld-argbuf-defn): New proc.
7715 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7716 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7717 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7718 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7719 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7720 New method gen-trace-extract.
7721 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7722 from gen-argbuf-elm, return "" if not caching register address.
7723 Rewrite gen-extract. New method gen-trace-extract.
7724 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7725 gen-extract, gen-trace-extract, cxmake-get.
7726 (<hw-iaddress>): New method cxmake-get.
7727 (op-needed-iflds): New proc.
7728 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7729 (-gen-op-argbuf-defn): New proc.
7730 (gen-op-extract): Renamed from op:extract.
7731 (gen-op-trace-extract): Renamed from op:trace-extract.
7732 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7734 (gen-argbuf-elm): Rewrite.
7735 * sim-decode.scm (-gen-record-args): Update.
7737 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7739 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7740 argument position. Flag symbolic macros in function position as
7742 (define-pmacro): Handle quoting in definition of symbolic macros.
7743 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7745 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7747 * fr30.opc (parse_register_list): Account for reverse masks
7749 (print_register_list): Ditto.
7750 (parse_low_register_list_ld): New function.
7751 (parse_hi_register_list_ld): New function.
7752 (parse_low_register_list_st): New function.
7753 (parse_hi_register_list_st): New function.
7754 (print_hi_register_list_ld): New function.
7755 (print_hi_register_list_st): New function.
7756 (print_low_register_list_ld): New function.
7757 (print_low_register_list_st): New function.
7758 * fr30.cpu (ldr15dr): Implement workaround.
7759 (ldm0,ldm1,stm0,stm1): Implemented.
7761 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7763 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7764 * configure: Regenerate.
7765 * Makefile.am (WITH_HOBBIT): Update.
7766 (cgen-hob.c): Remove Makefile dependency.
7767 (cgen.o): Depend on cgen-gh.h, config.h.
7768 * Makefile.in: Regenerate.
7769 * aclocal.m4: Regenerate.
7771 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7773 * i960.cpu, i960.opc: New files.
7775 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7777 * fr30.opc (parse_register_number): New function.
7778 (parse_register_list): New function.
7779 (parse_low_register_list): Use parse_register_list.
7780 (parse_hi_register_list): Use parse_register_list.
7781 * fr30.cpu (sth): Fix assembler syntax. Implement more
7784 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7786 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7787 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7788 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7789 (-op-gen-set-trace-parallel): Ditto.
7790 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7792 * fr30.cpu (call,calld): Fix setting of pc.
7793 (f-op5): Fix start bit number.
7795 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7797 * fr30.cpu (st): Fix operand ordering. Implement more
7800 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7802 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7803 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7804 (fmt-semantic-operands): Move to sim.scm.
7805 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7806 * operand.scm (<hw-index>): New member `name'. All builders updated.
7807 (<hw-index>): New method get-name.
7808 (op-profilable?): Moved to sim.scm.
7810 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7811 (op-profilable?): Moved here from operand.scm.
7812 (gen-extract-type): Delete.
7813 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7814 (-gen-argfld-ref): New proc.
7815 (-gen-ifld-argfld-name): New proc.
7816 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7817 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7818 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7819 (<hardware-base>): Delete method gen-extract-type. New method
7821 (<hw-register): Ditto. Update method gen-extract.
7822 (<operand>, method gen-argbuf-elm): Rewrite.
7823 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7824 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7825 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7827 * sim-decode.scm (-gen-record-args): Tweak.
7829 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7831 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7833 * doc/porting: Fix typo: gas->sim.
7834 * fr30.opc (print_m4): New function.
7835 * fr30.cpu: Implemented many insns.
7837 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7839 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7841 * fr30.cpu (f-rel9): Delete RELOC attribute.
7842 (f-rel12): Add PCREL-ADDR attribute.
7843 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7844 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7845 * fr30.opc (print_label9): Delete.
7847 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7848 code for CTI indicators.
7849 * insn.scm (insn-cti?): Simplify.
7850 * utils-cgen.scm (atlist:cti?): New proc.
7852 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7854 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7855 (f-i20-4,f-i20-16,f-i20): New fields.
7861 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7862 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7863 * mach.scm (arch-data): Ditto.
7864 (current-arch-default-insn-word-bitsize): Renamed from
7865 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7866 (-arch-read): Update.
7868 * hardware.scm (hw:attr-list): Move here ...
7869 * opcodes.scm: ... from here.
7871 * ifield.scm (fld:bitrange): Delete.
7872 (fld:word-offset,fld:word-length): New procs.
7873 (ifield?): Use class-instance.
7874 (<ifield>, method field-start): Rewrite.
7875 (ifld:enum): New proc.
7876 (<ifield>, methods field-mask,field-value): Rewrite.
7877 (-ifield-parse): Rewrite.
7878 (<multi-ifield> support): Rewrite.
7879 (ifld-beyond-base?): Rewrite.
7880 (ifld:std-attrs): New variable.
7881 (ifld:attr-list): New proc.
7882 * iformat.scm (-compute-insn-mask): Rewrite.
7883 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7885 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7886 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7888 (<operand>): Ditto. Forward onto index instead.
7889 (gen-ifld-decls,gen-ifld-defns): New procs.
7890 (ifld:insert,ifld:extract): New procs.
7891 (<ifield>): New methods gen-insert, gen-extract.
7892 (<multi-ifield>): Ditto.
7893 (<hw-index>): Forward gen-insert,gen-extract onto value.
7894 (<hw-asm>): Delete insert/extract support.
7895 (<hw-register,hw-memory,hw-immediate>): Ditto.
7896 (gen-hash-defines): Use string-list.
7897 Define CGEN_MAX_IFMT_OPERANDS.
7898 (gen-switch): Use string-list,string-list-map.
7899 (gen-fget-switch,gen-fset-switch): Use string-list.
7900 (gen-parse-switch,gen-insert-switch): Ditto.
7901 (gen-extract-switch,gen-print-switch): Ditto.
7902 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7903 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7904 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7905 (gen-ivalue-entry): New proc.
7906 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7907 computation. Use 0 for operand ref table if ALIAS insn.
7908 (gen-minsn-table-entry): Use string-list.
7909 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7910 (gen-opcode-open): Record address of ifield table.
7911 (cgen-opc.h): Call gen-ifld-decls.
7912 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7913 * types.scm (<bitrange>): New members word-offset,word-length.
7914 Delete member total-length. Delete methods start,mask,value.
7915 (bitrange:word-offset,bitrange:word-length): New procs.
7916 * sim-cpu.scm (gen-define-fields): Simplify.
7917 (gen-extract-fields): Simplify.
7918 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7919 (<ifield>): New methods gen-ifld-extract-decl.
7920 Delete method gen-ifld-extract-beyond.
7921 (<multi-ifield>): New methods gen-ifld-extract-decl.
7922 (<multi-ifield>, method gen-ifld-extract): Implement.
7923 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7924 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7926 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7927 (-rtx-traverse-syntax-no-mode): New proc.
7928 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7929 (s-ifield): New proc.
7930 (s-shop): Don't prepend `unsigned' for unsigned modes.
7931 * rtx-funcs.scm (ifield): New rtx function.
7932 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7933 (delay): New rtx function.
7934 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7936 * cos.scm (-elm-make-method-getter): Fix typo.
7938 * utils.scm (backslash): Handle lists of strings.
7940 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7942 * fr30.cpu (f-rel9): Correct for pc+2.
7943 (label9): Use print_label9.
7944 * fr30.opc (print_label9): New function.
7946 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7948 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7949 * fr30.opc (parse_low_register_list): Renamed.
7950 (parse_hi_register_list): Renamed.
7951 (print_hi_register_list): Renamed.
7952 (print_low_register_list): Renamed.
7954 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7956 * fr30.cpu (f-rel9): Now a pc relative offset.
7958 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7960 * opcodes.scm (op-asm): Move to here, from operands.scm.
7961 (<op-asm>, method parse!): Validate arguments.
7962 (<operand>, method gen-function-name): Fix thinko.
7963 * operand.scm (<operand>, method make!): Don't set op-asm here.
7964 * utils.scm (list-elements-ok?): New proc.
7966 * opcodes.scm: Clean up pass.
7968 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7970 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7971 the fr30_int function.
7972 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7973 (h-dr): Add FUN-ACCESS attribute.
7975 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7977 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7978 for C symbol for models array.
7980 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7982 * fr30.opc (parse_reglist_low): New function.
7983 (parse_reglist_hi): New function.
7984 (print_reglist_low): New function.
7985 (print_reglist_hi): New function.
7986 * fr30.cpu: Finish remaining insn stubs.
7988 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7990 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7992 * fr30.cpu (ldi32m): Don't use for disassembly.
7994 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7996 * fr30.cpu (int): Implement it.
7998 1998-11-18 Doug Evans <devans@casey.cygnus.com>
8000 * rtx-funcs.scm (nop): Fix C code.
8002 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
8004 * fr30.cpu (f-i32): New ifield.
8007 (ldi32m): New macro insn.
8008 (inte): Provide simple version for now.
8010 * sim-arch.scm: New file.
8011 * sim.scm: Move architecture support generation to sim-arch.scm.
8012 * cgen-sim.scm: Load sim-arch.scm.
8015 * hardware.scm (pc?) New proc.
8016 (class <hardware-base>): Rewrite method 'pc?.
8017 (class <hardware>): Forward 'pc? to the hardware type.
8018 (class <hw-pc>): New method 'pc?.
8020 Add support for variable length ISAs.
8021 * ifield.scm (ifld-beyond-base?): New proc.
8022 * m32r.cpu: Remove integral-insn? spec.
8023 * mach.scm (arch:derived,arch:set-derived!): New procs.
8024 (arch:app-data,arch:set-app-data!): New procs.
8025 (class <arch>): New members derived, app-data.
8026 (class <cpu>): Delete member integral-insn?.
8027 (cpu:integral-insn?): Delete.
8028 (-cpu-parse): Delete arg integral-insn?. All callers updated.
8029 (-cpu-read): Delete integral-insn? support.
8030 (state:decode-assist): Delete.
8031 (state:int-insn?): Delete.
8032 (<derived-arch-data>): New class.
8033 (-adata-set-derived!): New proc.
8034 (mach-finish!): Call it.
8035 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
8036 (gen-operand-instance): Add COND_REF support.
8037 (gen-operand-instance-table): Ditto.
8038 (gen-hash-defines): Update.
8039 (gen-extract-switch): Update type of `insn_value' arg.
8040 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
8041 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
8043 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
8044 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
8045 beyond the base insn (for large insns).
8046 (-gen-extract-beyond-var-list): New proc.
8047 (gen-extract-fields): Handle large insns.
8048 (-gen-write-case): Update sem_arg computation.
8049 Update initial vpc computation.
8050 (gen-semantic-fn): Ditto. Update type of `insn'.
8051 (-gen-sem-case): Update sem_arg computation.
8052 Update initial vpc computation.
8053 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
8054 (-gen-extract-word): New proc.
8055 (<ifield>): New method gen-ifld-extract-beyond.
8056 (gen-ifld-extract-beyond): New proc.
8057 * types.scm (bitrange-overlap?): New proc.
8059 * utils.scm (bits->bytes): New proc.
8060 (bytes->bits): New proc.
8062 Move extraction support into decoder.
8063 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
8064 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
8065 support to sim-decode.scm.
8066 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
8067 be array of IDESC,FMT entries. Make the array const.
8068 (-gen-gcc-label-table): Make array const.
8069 (-gen-decode-switch): Branch to extraction code after insn has been
8071 (-gen-decode-insn-globals): Delete extract handler from
8073 (gen-decode-fn): Add extraction support.
8074 (-gen-sem-fn-decls): Delete extraction fn decls.
8075 (-gen-idesc-decls): Update @cpu@_decode decl.
8076 (-gen-idesc-init-fn): Delete extraction support.
8077 (-gen-extract-decls): New proc.
8079 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
8080 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
8082 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
8083 All callers updated.
8084 (table-entry:make): Record insn value as insn object, not name.
8087 * hobbit.scm (path_basename): Renamed from `basename' to avoid
8088 collision with C function.
8089 (path_dirname): Similarily.
8090 * hobbit.c,hobbit.h: Rebuild.
8092 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
8094 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
8096 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
8098 * fr30.cpu: Implement more instruction stubs.
8100 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
8102 * fr30.cpu: Implement more instruction stubs.
8104 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
8106 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
8108 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
8110 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
8111 (op:std-attrs): Ditto.
8112 * opcodes.scm (gen-operand-instance): Ditto.
8113 (gen-switch): Ditto.
8114 * m32r.cpu (condbit,accum): Update.
8115 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
8117 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
8119 * enum.scm (-enum-read): Fix typo.
8121 * iformat.scm (-ifmt-search-key): Simplify a little.
8123 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
8125 * doc/porting: semantics.c -> sem.c.
8126 * Makefile.in: Regenerate.
8127 * fr30.cpu (add): Change ADD to add. Add more registers and set
8128 status bits on 'add' instruction.
8130 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
8132 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
8135 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
8137 * minsn.scm (minsn:enum): Update, call current-arch-name.
8139 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
8141 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
8142 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
8143 (ARCH,CGEN,CGENFLAGS): New variables.
8144 (gas-test,sim-test): New rules.
8145 * Makefile.in: Rebuild.
8146 * configure.in (arch): Define.
8147 * configure: Rebuild.
8149 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
8150 * All .scm files: Ditto.
8152 * dev.scm: Fix gas-test call to cpu-load.
8153 * gas-test.scm: Clean up pass to remove bit-rot.
8154 * sim-test.scm: Ditto.
8156 * enum.scm (read-enum): Fix typo in `vals' handling.
8158 * hardware.scm (-parse-hw-type): Fix typo.
8159 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
8160 (def-hardware,define-normal-hardware): Ditto.
8162 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
8163 (display-var): Use it.
8164 * hobbit.c: Rebuild.
8165 * hobbit.h: Rebuild.
8167 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
8168 avoid hobbit problem.
8169 * mach.scm (-cpu-read): Rename local `parallel-insns' to
8170 `parallel-insns-' to avoid hobbit problem.
8172 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
8174 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
8175 (parse_slo16,parse_ulo16): Ditto.
8176 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8178 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
8180 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8181 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8182 * Makefile.in: Rebuild.
8183 * insn.scm (define-normal-insn): Expand pmacros.
8184 * mode.scm (<mode>): New member `host?'. All uses updated.
8185 (mode:host?): New proc.
8186 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8187 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8188 (define-rtx-dual-mode): Ditto.
8189 (s-index-of): New proc.
8190 (s-unop): Use plain C for host mode operations.
8191 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8192 * rtx-funcs.scm (index-of): New rtx function.
8193 * sim.scm (<hw-index>): New method cxmake-get.
8195 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
8197 * sim-cpu.scm (-gen-engine-decls): Delete.
8199 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
8201 * doc/rtl (Example): Correct Typo.
8202 * doc/porting: Add 'make dep' step to opcodes port instructions.
8203 * fr30.opc: New file.
8204 * fr30.cpu: New file.
8206 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
8208 * configure.in: Handle guile $exec_prefix = $prefix/foo.
8209 * Makefile.am (GUILEINCDIR): New variable.
8211 * configure: Regenerate.
8212 * Makefile.in: Ditto.
8213 * aclocal.m4: Ditto.
8215 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
8217 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8218 (cgen-semantics.c): Ditto.
8219 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8220 * sim-model.scm (cgen-model.c): Ditto.
8221 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8222 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8224 * opcodes.scm (read-cpu.opc): Handle empty file.
8226 * cos.scm (-elm-make-method-setter): Fix typo.
8228 * cpu.scm (-init-parse-cpu!): Call types-init!.
8229 (-finish-parse-cpu!): Call types-finish!.
8230 * ifield.scm (<ifield>): Delete members start,length.
8231 New member bitrange.
8232 (<ifield>, methods field-start,field-length): Update.
8233 (fld:start): New arg insn-len. All callers updated.
8234 (<ifield>, methods field-mask,field-value): Update.
8235 (-ifield-parse): Update.
8236 (ifield-init!): Update.
8237 * iformat.scm (compute-insn-length): Simplify.
8238 (compute-insn-mask): Update.
8239 * insn.scm (insn:value): Update.
8240 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8241 (current-arch-default-insn-bitsize): New proc.
8242 (current-arch-insn-lsb0?): New proc.
8243 (-arch-parse,-arch-read): Update.
8244 (<cpu>): New member file-transform.
8245 (-cpu-parse,-cpu-read): Update.
8246 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8247 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8248 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8249 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8250 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8251 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8252 * operand.scm (op:start): Update call to field-start method.
8253 * sim-decode.scm (opcode-slots): New arg lsb0?.
8254 (fill-slot!,build-slots): Ditto.
8255 (build-decode-table-entry,build-decode-table-guts): Ditto.
8256 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8257 (gen-decode-fn): Ditto.
8258 (cgen-decode.c): Update call to gen-decode-fn.
8259 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8260 (-gen-cpu-header,-gen-cpuall-includes): New procs.
8261 (cgen-cpuall.h): Call -gen-cpuall-includes.
8262 * types.scm (<bitrange>): New class.
8263 (types-init!,types-finish!): New procs.
8264 * utils-cgen.scm (parse-number): New proc.
8265 (parse-boolean): New proc.
8266 * utils.scm (word-value): Renamed from shift-bits, rewrite.
8267 (word-mask): Rewrite.
8268 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8269 (m32rxf): New field `file-transform'.
8270 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8272 * hobbit.h: Fix include file name.
8274 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
8276 * slib: New directory of slib files used by cgen/hobbit.
8277 * hobbit.scm: New file.
8278 * hobbit.c: New file.
8279 * hobbit.h: New file.
8280 * hobscmif.h: New file.
8281 * hob-main.c: New file.
8282 * hobslib.scm: New file.
8284 * Makefile.am: Add support for compiling hobbit, and using compiled
8285 version of hobbit to compile cgen.
8286 * Makefile.in: Regenerate.
8287 * configure.in: Support --with-hobbit.
8288 * configure: Regenerate.
8289 * acconfig.h (WITH_HOBBIT): Add.
8290 * config.in: Regenerate.
8292 * rtl.scm: New file, was cdl-c.scm.
8293 Definition of rtx funcs moved to rtx-funcs.scm.
8294 (semantic-in-out-operands): Rewrite to compute object form of
8296 * rtx-funcs.scm: New file.
8298 * cgen-gh.c: #include "config.h".
8299 (gh_cadddr,gh_cddddr): New fns.
8300 (cgh_vector_to_list): New fn.
8301 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8302 (cgh_init): Prefix qsort procs with "cgh-".
8303 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8304 * cgen.c: #include "config.h".
8306 * attr.scm (bitset-attr?): New proc.
8307 (<bitset-attribute>, method parse-value): Value syntax changed from
8308 (val1 val2 ...) to val1,val2,....
8309 (<bitset-attribute>): New method gen-value.
8310 (<integer-attribute>): New method gen-value.
8311 (<enum-attribute>): New method gen-value.
8312 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8313 (<reader>): New class.
8314 (CURRENT-ARCH,CURRENT-READER): New globals.
8315 (keep-mach?): Move here from mach.scm.
8316 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8317 (<arch>): New class.
8318 (<arch-data>): New class.
8319 (<cpu>): Make subclass of <ident>.
8320 (*ENDIAN* variables): Delete.
8321 (process-state-vars): Delete.
8322 (mach-finish!): Add `base' value to MACH attribute.
8323 * hardware.scm (<hardware>): Make subclass of <ident>.
8324 (hw:std-attrs): New global.
8325 (hw-profilable?): New proc.
8326 * ifield.scm (<ifield>): Make subclass of <ident>.
8327 (sort-ifield-list): Move here from iformat.scm.
8328 * iformat.scm (<iformat>): Renamed from <insn-format>.
8329 Make subclass of <ident>.
8330 (-ifmt-search-key): Include cti? in categorization of formats.
8331 (ifmt-analyze): Compile semantics (turn to object form).
8332 * insn.scm (<insn>): Make subclass of <ident>.
8333 New member compiled-semantics.
8334 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8335 * mode.scm (<mode>): Make subclass of <ident>.
8337 * model.scm (<unit>): Make subclass of <ident>.
8338 New members inputs,outputs.
8339 (<model>): Make subclass of <ident>. New member state.
8340 (-unit-parse): Parse inputs,outputs.
8341 (<iunit>): New class.
8342 (-insn-timing-parse-model): New proc.
8343 (parse-insn-timing): Function unit spec rewritten.
8344 * operand.scm (<operand>): Make subclass of <ident>.
8345 New members sem-name,num,cond? New method gen-pretty-name.
8346 (hw-index-scalar): New global.
8347 (op-nub-hw): Move here from rtl.scm.
8348 (op:lookup-sem-name,op-profilable?): New procs.
8349 * pmacros.scm: Rewrite to pass through hobbit.
8350 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8351 * utils.scm (logit): Make a macro.
8352 (bit-set?): Rewrite.
8353 (high-part): Rewrite.
8355 * m32r.cpu (define-arch): Move to top of file.
8356 (cpu family m32rbf): Renamed from m32rb.
8357 (model m32r/d): Function unit spec rewritten.
8358 (all insns): Ditto. Replace UBI with BI.
8360 * opcodes.scm (gen-attr-table-decls): Declare
8361 @arch@_cgen_hw_attr_table.
8362 (gen-attr-table-defns): Generate hw attribute table.
8364 * sim-cpu.scm (-gen-engine-decls): New proc.
8365 (-gen-model-decls): New proc.
8366 (gen-parallel-exec-type): Add new member `written' to struct parexec.
8367 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8368 (-gen-record-profile-args): Simplify.
8369 (-gen-parallel-sem-case): Delete.
8370 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8371 New local `written'. Delete profiling code.
8372 (-gen-sem-case): Ditto.
8373 (-uncond-written-mask,-any-cond-written?): New procs.
8374 (cgen-sem-switch.c): Include duplicates of insns that can be executed
8375 parallelly or serially, and write-back handlers for all parallel insns.
8376 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8377 support to initialization of struct insn_sem.
8378 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8379 (-gen-insn-sem-type): Add parallel write-back support to struct
8381 (-gen-idesc-init-fn): Add support for virtual insns.
8382 Add parallel write-back support.
8383 * sim-model.scm (gen-model-profile-fn): Delete
8384 (-gen-model-fn-decls): New proc.
8385 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8386 (-gen-model-init-fn): New proc.
8387 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8388 members in @mach@_init_cpu.
8389 (cgen-model.c): Generate model handlers for each insn.
8390 * sim.scm (gen-define-field-macro): Cti insns handled differently.
8391 (<hw-pc>): New method gen-write.
8392 (<hw-register>, method gen-write): New arg `mode'.
8393 (<hw-register>): Delete method gen-record-profile!.
8394 New method gen-profile-index-type.
8395 (<hw-memory>, method gen-write): New arg `mode'.
8396 (<hw-address>, method gen-extract): Delete.
8397 (<hw-address>, method gen-write): New arg `mode'.
8398 (<hw-index>, method get-write-index): Rewrite.
8399 (<pc>, method cxmake-get-direct): Delete.
8400 (<pc>): New method cxmake-get. Comment out methods
8401 gen-set-quiet,gen-set-trace.
8402 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8403 gen-profile-index-type,gen-profile-code.
8404 Delete method gen-pretty-name. Rewrite method gen-write.
8405 Delete method cxmake-get-direct.
8406 (-op-gen-set-trace): Update `written'.
8407 (-op-gen-set-trace-parallel): Ditto.
8408 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8409 (gen-cpu-insn-enum-decl): Add extra entries for parallel
8410 insns and their write-back handlers.
8411 (insn-op-lookup): New proc.
8412 (<unit>): New method gen-profile-code.
8413 (<iunit>): New method gen-profile-code.
8414 (gen-argbuf-elm): Add profiling elements.
8415 (gen-argbuf-type): Define cti insns separately in their own struct.
8416 Add member `addr_cache' to this struct. Add entries for pbb virtual
8417 insns. Move semantic entries here from struct scache.
8418 Delete everything from struct scache except argbuf.
8419 (<insn>, method gen-profile-locals): Rewrite.
8420 (<insn>, method gen-profile-code): Rewrite.
8421 (sim-finish!): Create virtual pbb insns.
8423 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8425 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8426 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8427 (h-psw,h-bpsw,h-bbpsw): Define.
8428 (rte,trap): Handle bbpc,bbpsw.
8429 * opcodes.scm (max-operand-instances): Fix typo.
8430 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8431 hardware elements to be fun-access.
8432 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8434 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8436 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8438 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8440 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8442 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8444 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8446 (mach m32r): Update.
8448 * mach.scm (mach:supports?): New proc.
8449 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8450 gen-reg-access-{decls,defns}.
8451 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8452 (gen-mach-bfd-name): New proc.
8453 (gen-arch-reg-access-{decls,defns}): New procs.
8454 (cgen-arch.[ch]): Output register access cover fns.
8456 * hardware.scm (hardware-builtin!): Set print handlers for
8458 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8460 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8461 (my_print_insn): Ditto. Delete args buf, buflen.
8462 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8463 (-hw-asm-specs): Add `handlers' spec.
8464 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8466 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8468 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8469 (<hw-asm>, parse!): New method.
8470 (gen-insn-table-entry): Print semantics.
8471 (gen-opcode-open): Renamed from gen-opcode-table.
8473 * utils.scm (string-write): No longer a macro.
8474 (-string-write): Handle procedure args.
8475 * opcodes.scm: Update all calls to string-write.
8476 * sim-cpu.scm: Ditto.
8477 * sim-decode.scm: Ditto.
8478 * sim-model.scm: Ditto.
8481 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8483 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8484 (-gen-insn-builders,-gen-insn-builder): New procs.
8486 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8488 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8489 (gen-opcode-table): Properly terminate comment.
8491 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8494 Clean up pass over everything, so starting fresh.