1 2010-01-28 Doug Evans <dje@sebabeach.org>
3 * pmacros.scm (pmacros-init!): New arg rtl-version, all callers
4 updated. Use %-prefix if rtl-version >= 0.9.
5 * read.scm (/supported-rtl-versions): Add (0 9).
6 (/rtl-version-valid?): New function.
7 (/cmd-define-rtl-version): If new rtl version, reinvoke pmacros-init!.
8 (/reader-expr): New function.
9 (reader-process): New function.
10 (/reader-process-with-loc!): Renamed from /reader-process!.
11 Don't pre-expand `if' commands.
12 (/cmd-if): Simplify. Pmacro-expand test, then, else clauses here.
13 Handle rtl-version-equal?, rtl-version-at-least?.
14 * testsuite/Makefile.am (clean-test-files): Remove *.test.cpu*.
15 * testsuite/Makefile.in: Regenerate.
16 * testsuite/pmacros-1.test: Test both . and % as prefixes.
17 * testsuite/testsuite.cpu (/begin, /print, /dump): New pmacros.
18 (newline, print-match, print-expr, print-thunk): Use them.
19 (internal-verify): Update definition.
20 * doc/rtl.texi (define-rtl-version): Document rtl version 0.9.
21 (Top level conditionals): New node.
23 * read.scm (rtl-version-at-least?): Fix typo.
25 2010-01-27 Doug Evans <dje@sebabeach.org>
27 * read.scm: Follow commenting convention.
28 * mach.scm: Follow commenting convention.
30 * pmacros.scm: Follow commenting convention. Replace change to
31 $pmacro to %pmacro. $pmacro is confusing with $ in assembler syntax.
32 (/pmacro-orig-prefix, /pmacro-prefix): New globals.
34 2010-01-25 Doug Evans <dje@sebabeach.org>
36 * co-for-gen-all: Simplify a bit.
38 2010-01-24 Doug Evans <dje@sebabeach.org>
40 * desc-cpu.scm (cgen-desc.h): Don't print virtual enums.
41 * sid-cpu.scm (cgen-desc.h): Ditto.
42 * enum.scm (enum-builtin!): New function.
43 * read.scm (reader-install-builtin!): Call it.
44 * rtl-c.scm (s-convop): Delete, replaced with ...
45 (s-int-convop, s-float-convop): ... new fns.
46 (ext, zext, trunc): Update.
47 (fext, ftrunc, float, ufloat, fix, ufix): Update.
48 * rtx-funcs.scm (fext, ftrunc, float, ufloat, fix, ufix): New parameter
50 * cpu/mep-fmax.cpu (fcvtsw): Update.
51 * cpu/sh.cpu (h-fsd, h-fmov): Update.
52 * doc/rtl.texi (float-convop): Update.
54 * gen-all: Be more consistent with intrinsic generation.
56 * utils-cgen.scm (<location>): Define using new define-class.
57 (<ident>, <source-ident>, <context>): Ditto.
59 * cos.scm (/object-string): New function.
60 (/object-error): Use it.
61 (/object-count-true): New function
62 (object-copy-top): Delete. All callers changed to call object-copy.
63 (/parse-member-list, /build-getter-defs, /build-setter-defs): New fns.
64 (define-class, define-interface, define-method): New macros.
65 (define-getters, define-setters, vmake): Moved here ...
66 * utils-cgen.scm: ... from here.
68 * cos.scm: Follow commenting convention. Why did a single ; have to
69 get indented like it does? :-(
70 * utils-cgen.scm: Ditto.
72 2010-01-23 Doug Evans <dje@sebabeach.org>
74 * gen-all: Move build-configuration related parameters to an
75 external file. Add usage info. Add "force" option.
76 Be smarter about what diffs to generate.
78 * doc/rtl.texi (Expressions): Add more docs on conversion functions.
80 2010-01-21 Doug Evans <dje@sebabeach.org>
82 * doc/rtl.texi (Expressions): Fix docs on `subword'.
84 2010-01-20 Doug Evans <dje@sebabeach.org>
86 * rtx-funcs.scm (nan,qnan,snan): New rtl functions.
87 * rtl-c.scm (nan,qnan,snan): New rtl functions.
88 * doc/rtl.texi (Expressions): Add docs for them.
90 * rtl-traverse.scm (/rtx-canon-anycexprmode): New function.
91 (/rtx-make-canon-table): Add entry for ANYCEXPRMODE.
92 (/rtx-canon-operands): Print expr-mode if /rtx-canon-debug?
93 Do final error check on mode assigned to expression.
94 (/rtx-make-traverser-table): Add entry for ANYCEXPRMODE.
95 * rtl-xform.scm (/rtx-trim-args): Handle ANYCEXPRMODE.
96 * rtl.scm (/rtx-valid-mode-types): Add ANYCEXPRMODE.
97 * rtx-funcs.scm (c-code, c-call, c-raw-call): Use ANYCEXPRMODE.
98 (if, cond, case): Use ANYEXPRMODE.
100 2010-01-19 Doug Evans <dje@sebabeach.org>
102 * testsuite/pmacros-1.test: Add more .splice tests.
104 * read.scm (/cmd-include): Fix absolute path handling.
106 2010-01-05 Doug Evans <dje@sebabeach.org>
108 * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
110 (mode:non-mode-c-type): Delete.
111 (mode:c-type): Update.
112 * rtl-c.scm (s-shop): Fix casting of DI mode values.
114 2010-01-04 Doug Evans <dje@sebabeach.org>
116 * gen-all (all_cgen_cpus): Add sh.
118 2010-01-02 Doug Evans <dje@sebabeach.org>
120 * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
122 2009-12-17 Doug Evans <dje@sebabeach.org>
124 * mep.opc: Apply patches from opcodes to compile with -Wshadow.
125 mep-asm.c now regenerates correctly again.
127 * gen-all: Add support for building gcc/newlib.
128 Specify --prefix and install all built tools.
130 2009-12-16 Doug Evans <dje@sebabeach.org>
132 * sim.scm (/op-gen-written-update): Disable operand number is too
133 large warning, for now.
135 2009-12-11 Nick Clifton <nickc@redhat.com>
137 * cpu/fr30.opc: Fix shadowed variable warnings.
139 2009-12-10 Doug Evans <dje@sebabeach.org>
141 * gen-all: Rewrite. Build more ports. Split out building of sid.
143 2009-11-23 Doug Evans <dje@sebabeach.org>
145 * hardware.scm (hw-pc?): New function.
146 * ifield.scm (ifld-signed?): New function.
147 * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
148 * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
149 (insn-cti?): New function.
150 * rtl.scm (/hw): Create <pc> object for pcs.
151 * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
152 All callers updated. Watch for sets to the pc.
153 (semantic-attrs): Watch for sets to the pc.
154 * sid.scm (<pc> cxmake-get): Handle raw-reg.
155 * sim.scm (<pc> cxmake-get): Handle raw-reg.
156 (<operand> cxmake-get): Add debugging printf.
157 * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
158 EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
159 (/gen-extract-word): Ditto.
161 * utils.scm (gen-c-hex-constant): New function.
162 * utils-sim.scm (/gen-decode-insn-entry): Call it.
164 2009-11-22 Doug Evans <dje@sebabeach.org>
166 * insn.scm (/parse-insn-format): Watch for duplicate ifields.
167 * read.scm (parse-error-continuable): New function.
168 (define /continuable-error-found?): New variable.
169 (/init-reader!): Initialize it.
170 (/finish-reader!): New function.
172 * utils-cgen.scm (obj-list-nub): New function.
174 * mach.scm (<derived-arch-data>): New member large-insn-word?.
175 (/adata-set-derived!): Set it.
176 (adata-large-insn-word?): New function.
177 * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
179 * sim-cpu.scm (cgen-cpu.h): #include it here.
180 (/gen-cpu-defines): Define CGEN_INSN_WORD.
181 (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
183 * sim-decode.scm (/gen-idesc-decls): Ditto.
184 (/gen-extract-case, /gen-decode-fn): Ditto.
185 * sim-model.scm (/gen-model-insn-fn): Ditto.
186 * sim.scm (gen-argbuf-type): Ditto.
188 * rtl-c.scm (/use-gcc-stmt-expr?): New function.
189 (s-sequence): Call it.
191 2009-11-21 Doug Evans <dje@sebabeach.org>
193 * rtl-c.scm (s-sequence): Use gcc's statement expressions for
194 non-VOID-mode expressions with multiple statements.
196 * sim.scm (/operand-number-elaboration-written?): New variable.
197 (/op-gen-written-update op): New function.
198 (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
200 * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
202 * operand.scm (op-nub): Delete.
204 * dev-utils.scm: New file.
205 * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
206 load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
207 * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
208 /loaded-file-record!, maybe-load): Delete.
209 Load cgen files directly instead of via maybe-load.
211 2009-11-14 Doug Evans <dje@sebabeach.org>
213 * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
214 expressions used in a void context.
216 * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
218 * cpu/xc16x.cpu: Delete, use copy in ../cpu.
219 * cpu/xc16x.opc: Ditto.
221 2009-11-12 Doug Evans <dje@sebabeach.org>
223 * rtl-c.scm (s-parallel): Use map-in-order instead of map.
225 * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
226 eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
228 2009-11-11 Doug Evans <dje@sebabeach.org>
230 * html.scm (gen-insn-docs): Add logging message.
232 2009-11-05 Doug Evans <dje@sebabeach.org>
234 * utils-cgen.scm (gen-set-macro2): New function.
235 * sim.scm (<hw-register> gen-get-macro): Call it.
237 * co-for-gen-all: New file.
239 * testsuite/name-comments-1.test: Update call to current-insn-lookup.
241 * utils.scm (reduce): Delete.
243 * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
245 * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
246 regarding PREFIX attribute handling.
248 * operand.scm (<hw-index>): Add enum to possible types, all uses
250 (hw-index-constant?, hw-index-constant-value): New functions.
251 (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
252 hw-index-enum-obj): New functions.
253 (/operand-parse): Handle enum indices.
254 * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
255 hw-index-constant-value.
256 * rtl.scm (rtx-constant-value): Fix handling of enums.
257 * rtx-funcs.scm (enum): Ditto.
258 * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
259 currently supported here.
261 2009-11-02 Doug Evans <dje@sebabeach.org>
263 Specify isa(s) when doing ifield, operand, insn lookups.
264 ACU = all callers updated.
265 * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
266 * enum.scm (define-full-insn-enum): Pass isa-name-list to
268 * html.scm (get-insn-properties): Pass isa-name-list to
270 * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
271 * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
272 (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
273 (/parse-insn-format, syntax-break-out): Ditto.
274 * mach.scm (obj-filter-by-isa): New function.
275 (current-ifld-lookup): New optional arg maybe-isa-name-list.
276 (/ifld-already-defined?, /op-already-defined?): Simplify.
277 (current-op-lookup): New optional arg maybe-isa-name-list.
278 (current-insn-lookup): New arg isa-name-list, ACU.
279 (/insn-already-defined?, /minsn-already-defined?): Simplify.
280 (current-minsn-lookup): New arg isa-name-list, ACU.
281 * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
283 * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
284 (gen-syntax-entry): Ditto.
285 * operand.scm (/operand-parse): Pass isa-name-list to
287 (/derived-parse-encoding): New arg isa-name-list, ACU.
288 (/derived-parse-ifield-assertion): Ditto.
289 (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
290 (/anyof-parse-choice): Ditto.
291 (anyof-satisfies-assertions?): Pass context to rtx-solve.
292 (/anyof-merge-syntax): New arg container, ACU.
293 (operand-builtin!): Add pc to all isas.
294 * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
295 (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
296 (rtl-c-parsed, rtl-c++-parsed): Ditto.
297 (rtl-c): New arg isa-name-list, ACU.
298 (rtl-c-expr, rtl-c++): Ditto.
299 (closure): New arg isa-name-list, ACU.
300 * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
301 (/cstate-isas): New function.
302 (/rtx-canon-symbol-list): New function.
303 (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
305 (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
306 (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
307 (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
308 (rtx-canonicalize): New arg isa-name-list, ACU.
309 (rtx-canonicalize-stmt): Delete.
310 (tstate-make): New arg isas, ACU.
311 (tstate-isas, tstate--set-isas!): New functions.
312 (tstate-env-stack): Renamed from tstate-env, ACU.
313 (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
314 (tstate-make-closure): Renamed from tstate-new-env, new arg
316 (/rtx-traverse-env): Delete.
317 (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
319 (/rtx-traverse): Include conditional flag in dump output.
320 Update isa,envstack for closures. Pass isa list to current-op-lookup.
321 (<eval-state>): New member isas. Rename env to env-stack.
322 (<eval-state> vmake!): Handle #:isas. #:env renamed to #:env-stack.
323 (<eval-state>): New getter/setter for isas. Rename env getter/setter
325 (estate-make-for-eval): Provide #:isas.
326 (estate-make-closure): Renamed from estate-new-env. New arg
328 * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
329 (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST.
330 (/rtx-trim-for-doc): Handle closures.
331 * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION,
333 (rtx-env-var-list): Delete.
334 (rtx-env-make): Handle already-compiled environments.
335 (rtx-var-alist-to-env): New function.
336 (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
337 (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
338 (rtx-operand-obj): New arg isa-name-list, ACU.
339 (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
341 * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
342 * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
343 (/frag-compute-desired-frags): Minor simplification.
344 (/frag-pick-best): Ditto.
345 * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
346 (/gen-sfrag-code): Update.
347 * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
348 * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
349 * utils.scm (non-null-intersection?): New function.
351 * gen-all (do_src): Manually run cgen-all for sid.
353 2009-11-01 Doug Evans <dje@sebabeach.org>
357 * rtl-traverse.scm (/rtx-canon): Issue better error message for
358 invalid rtx function names.
360 2009-10-28 Doug Evans <dje@sebabeach.org>
362 * cos.scm (object-assign!): New function.
363 * mode.scm (/mode-set-word-params!): Call it.
365 2009-10-25 Doug Evans <dje@sebabeach.org>
367 Record bitset attributes internally as a list.
368 Record rtx attribute values internally as ((rtx-expr)).
369 * attr.scm (bitset-attr?): Delete, unused.
370 (<bitset-attribute> parse-value): Rewrite.
371 (/attr-parse): Rewrite bitset default value processing.
372 (/attr-read): Pick out values of scalar attributes to distinguish
373 them from bitset values which are a list.
374 Fix spelling errors for processing of default values.
375 Handle string attributes.
376 (bitset-attr->list): Delete, all callers updated.
377 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
379 (atlist-source-form): Rewrite.
380 * hardware.scm (<hardware-base> 'get-isas): Update recognition
382 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
384 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
385 values are now lists.
386 * mach.scm (def-isa-attr!): Update, bitset attribute values,
387 including the default, are now lists.
388 (all-isas-attr-value): Result is now a list.
389 * doc/rtl.texi: Clean up pass over attribute docs.
391 Change internal representation of rtx attribute values.
392 * attr.scm (/attr-val-is-rtx?): New function.
393 (attr-value): Call it.
394 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
395 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
396 Disallow rtx values for bitset attributes.
397 (/attr-read): Record rtx in default value as ((rtx-expr)).
398 (/attr-eval): Update.
400 2009-10-24 Doug Evans <dje@sebabeach.org>
402 * gen-all-doc: Add sh.cpu.
403 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
404 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
406 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
407 (/gen-sfrag-case): Ditto.
408 * sim-cpu.scm (/gen-sem-case): Ditto.
410 * doc/rtl.texi: Add note that different ifields, operands, insns,
411 and minsns may occur with the same name in different isas.
412 Add note on the canonical form of rtl expressions.
414 2009-10-23 Doug Evans <dje@sebabeach.org>
416 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
417 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
419 * decode.scm: Tweak various comments.
420 (/opcode-slots): Add FIXME.
421 (/build-decode-table-guts): Add assert.
422 * utils-sim.scm (/gen-set-itype-and-extract): New function.
423 (/gen-bracketed-set-itype-and-extract): New function.
424 (/gen-decode-default-entry): Rewrite.
425 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
426 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
427 updated. Don't unnecessarily emit check for whether all opcode bits
429 (/gen-decode-expr-set-itype): Delete.
430 (/gen-decode-expr-entry): Update.
431 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
432 updated. Keep track of decoder tables used thus far.
433 (/gen-decoder-switch): Ditto.
434 * utils.scm (word-bit-value): New function.
436 2009-10-14 Doug Evans <dje@sebabeach.org>
438 * ifield.scm (<ifield>, value): Provide default initial value.
439 (ifield-encode-mode): Delete
440 (ifield-decode-mode): Delete duplicate definition.
441 (<derived-ifield>, 'make!): Initialize members encode, decode.
442 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
444 (<multi-ifield>, 'gen-insert): Ditto.
446 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
448 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
449 for @foo@_init_idesc_table.
451 2009-09-30 Doug Evans <dje@sebabeach.org>
453 * doc/intro.texi: Mention SID.
454 * doc/sim.texi: Ditto.
455 * doc/porting.text (Doing a simulator port): Add some text.
457 2009-09-27 Doug Evans <dje@sebabeach.org>
459 * cos.scm (/class-table): New global.
460 (/class-uid, /class-set-uid!): New functions.
461 (/class-parent-name): Renamed from /class-parents.
462 (/class-make!): Change parents arg to parent-name, all callers updated.
464 (/class-lookup-uid): New function.
465 (/class-parent-classes): Rewrite.
466 (/class-mi?): Delete.
467 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
469 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
470 (/class-compute-class-desc, class-desc-dump): Update.
471 (/object-make!): Update.
472 (/object-make-with-values!): Delete arg class-desc, all callers
474 (/object-copy): Delete arg top?, all callers updated.
475 (/object-specialize): Delete.
476 (/object-elements, /object-top-class): Delete.
477 (/object-class-name, /object-class-desc): Update.
478 (/object-class-uid): New function.
479 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
480 class-make, /class-subclass? /class-lookup-element,
482 (/elm-delta, elm-list): Delete.
483 (/elm-make-method-getter, elm-get, elm-xget): Update.
484 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
485 (elm-make-getter, elm-make-setter): Update.
486 (/method-lookup-next): Update.
487 (send): Don't specialize class passed to method.
488 (send-next): New arg class-name, all callers updated.
489 (/class-parent, /class-parent-via-path, object-parent): Delete.
490 (class-cons-parent!, class-append-parent!): Delete.
491 (object-reset!): Init /class-table.
493 * cos.scm (/object-debug-classes): Delete.
494 (/object-debug-elements, /object-debug-methods): Delete.
496 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
497 (method-proc): Delete.
498 (method-make-virtual!, method-make-virtual-forward!): Delete.
499 * ifield.scm (<ifield> field-start): Update.
500 (<ifield> field-length, pretty-print): Update.
501 (<multi-ifield> field-length, field-start, pretty-print): Update.
502 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
503 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
504 (<array> gen-sym-defn): Ditto.
505 (<hardware-base> gen-defn): Renamed from gen-defn.
506 (<hw-register> gen-type): Update.
507 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
508 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
509 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
510 (<hw-immediate> gen-type): Update.
511 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
512 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
513 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
514 (<array> gen-sym-defn): Ditto.
515 (<hardware-base> gen-defn): Renamed from gen-defn.
516 (<hw-register> gen-type): Update.
517 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
518 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
519 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
520 (<hw-immediate> gen-type): Update.
521 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
523 2009-09-25 Doug Evans <dje@sebabeach.org>
525 * operand.scm (/anyof-merge-setter): Handle set-quiet.
526 * rtl.scm (rtx-single-set?): Handle set-quiet.
528 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
529 rtl-cover-fns?, macro?. All callers updated.
530 (estate-make-for-normal-rtl-c): Delete, have all callers call
531 estate-make-for-rtl-c directly.
532 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
533 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
535 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
536 replaces /par-replace-set-dests.
537 (/par-replace-set-src-expr-fn): New function, replaces
538 /par-replace-set-srcs.
539 (s-parallel): Rewrite.
541 * rtl.scm (rtx-pretty-strdump): New function.
542 * rtl-traverse.scm (/rtx-canon-error): Use it.
543 (<eval-state>): New member outer-expr.
544 (estate-error): Include outer expression in error message if present.
546 2009-09-23 Doug Evans <dje@sebabeach.org>
548 * xc16x.cpu (h-cr): New hardware.
549 (muls): Comment out parts that won't compile, add fixme.
550 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
551 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
552 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
554 Rewrite rtl processing to require it to be "canonicalized" first,
555 and write a full canonicalizer / expression checker.
556 Remove all appearances of DFLT in canonical rtl.
557 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
559 * iformat.scm (ifmt-analyze) Use canonical semantics.
560 * insn (<insn>): New member canonical-semantics.
561 * mach.scm (<arch>): New member multi-insns-instantiated?.
562 (/instantiate-multi-insns!): New function.
563 (/canonicalize-insns!): New function.
564 (arch-analyze-insns!): Canonicalize insn semantics before processing
566 * mode.scm (/mode-set-word-params!): New function.
567 (mode-void?): New function.
568 (mode-compatible?): VOID is compatible with VOID.
569 (/mode-word-sizes-defined?): New global.
570 (mode-set-word-modes!): Use/set it.
571 (mode-ensure-word-sizes-defined): Update.
572 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
573 Redo WI/UWI/AI/IAI handling.
574 (op:new-mode): No longer accept DFLT.
575 (<derived-operand> constructor): Ensure all fields are initialized.
576 (<anyof-operand> constructor): Ditto.
577 (/derived-parse-ifield-assertion): Delete arg `args'.
579 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
580 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
581 (rtl-c-expr, rtl-c++): Ditto.
582 (/rtl-c-get): Use mode of operand, not containing expression.
583 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
584 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
585 estate-for-insn? instead.
586 (s-unop): Use mode of expression, not first operand.
587 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
588 (s-sequence): Remove DFLT support.
589 (ifield): Use mode of expression, not UINT.
590 (pc): Comment out, unused.
591 (int-attr): New rtx kind.
593 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
594 * rtl-traverse.scm (/rtx-canon-debug?): New global.
595 (/make-cstate): New function.
596 (/cstate-context, /cstate-outer-expr): New functions.
597 (/rtx-canon-error): New function.
598 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
599 /rtx-get-last-cond-case-rtx): New functions.
600 (/rtx-canon-*): New functions.
601 (/rtx-canner-table, /rtx-operand-canoners): New globals.
602 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
603 (/rtx-option, /rtx-option-list?): Rewrite.
604 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
605 Rewritten, all callers updated.
606 (/rtx-canon-expr, /rtx-canon): New functions.
607 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
608 (rtx-canonicalize-stmt): New function.
609 (tstate-make): Remove arg `set?'. All callers updated.
610 (tstate-new-set?): Delete.
611 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
612 moved to /rtx-canon-*.
613 (/rtx-traverse-normal-operand): New function.
614 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
615 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
616 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
617 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
619 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
620 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
621 (/rtx-make-traverser-table): Update.
622 (/rtx-traverse-operands): Remove mode processing, now done during
624 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
625 (/rtx-traverse): Ditto.
626 (rtx-init-traverser-tables!): New function.
627 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
628 (rtx-verify-no-dflt-modes): New function.
629 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
630 (rtx-simplify-insn): Use insn-canonical-semantics.
631 (rtx-canonicalize): Moved to rtl-traverse.scm.
632 (/compile-expr-fn, rtx-compile): Delete.
633 (/rtx-trim-rtx-list): New function.
634 (/rtx-trim-for-doc): Handle set, if.
635 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
636 (/rtx-valid-mode-types): Update.
637 (/rtx-valid-matches): Update.
638 (/rtx-find-matchexpr-index): New function.
639 (rtx-lookup): Require rtx-kind to be the rtx name.
640 (def-rtx-node): New arg result-mode, all callers updated.
641 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
642 (rtx-lazy-sem-mode): Delete.
643 (/rtx-closure-make): New arg `mode', all callers updated.
644 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
645 (rtx-operand-obj): Rewrite.
646 (rtx-make-xop): New functions.
647 (/hw): Renamed from `hw', all callers updated.
648 Use the correct mode instead of DFLT for the index.
649 (rtl-builtin!): Call rtx-init-traversal-tables!.
650 (rtl-finish!): Update.
651 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
652 Update mode arg-type.
654 (int-attr): New rtx kind.
656 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
657 (/frag-cost-compute!): Ditto.
658 * semantics.scm (/build-operand!): Delete args op-name, op.
659 New arg op-expr. All callers updated.
660 (/build-mem-operand!): Remove DFLT support.
661 (semantic-compile): Update process-expr!, mode arg deleted.
662 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
664 (/gen-sem-case, /gen-sfrag-code): Ditto.
665 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
666 (/op-gen-set-trace): New function. If not doing profiling, or using
667 the pbb engine, call /op-gen-set-quiet.
668 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
669 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
670 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
671 * utils.scm (find-first-index): New function.
672 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
674 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
676 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
678 2009-09-21 Doug Evans <dje@sebabeach.org>
680 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
681 All callers updated. Add FIXME.
682 (all rtx functions): Rename local estate to *estate*. It's an
683 artificial argument added to the rtx, so make it stand out.
685 * openrisc.cpu (or32 isa): Fix setup-semantics.
687 * rtl.scm (rtx-class-*?): Delete, unused.
688 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
690 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
691 (init-reader!): Set /CGEN-RTL-VERSION to default.
693 * read.scm (cpu-load): Print load parameters.
695 * dev.scm (load-doc): Set verbose-level to 2.
697 2009-09-20 Doug Evans <dje@sebabeach.org>
699 * rtl.scm (rtx-strdump): Use write instead of display.
701 2009-09-17 Doug Evans <dje@sebabeach.org>
703 * utils-cgen.scm (obj-csv-names): New function.
704 * utils-sim.scm (/sfmt-contents): Use it in logging message.
706 2009-09-12 Doug Evans <dje@sebabeach.org>
708 Clean up pass of mode handling.
709 Make use of mode name vs <mode> object more consistent and clear.
710 * hardware.scm (/keyword-read): Default mode to the mode name,
711 not the <mode> object.
712 (/hw-parse-indices): Parse mode name and pass mode object to
713 <hw-asm> constructor.
714 (/hw-parse-values): Ditto.
715 (<hw-register> parse!): Pass mode name to /hw-parse-indices
716 and /hw-parse-values.
717 (<hw-memory> parse!): Ditto.
718 (<hw-address> parse!): Ditto.
719 * mode.scm (/mode-table): New global, replaces mode-list.
720 Modes stored in hashtable instead of list.
721 (/mode-class-table): New global.
722 (mode-list-non-alias-values): Update.
723 (mode:eq?, mode-compatible?, mode:add!): Update.
724 (mode:lookup): Restrict arg to the mode's name. All callers updated.
725 (mode-maybe-lookup): New function.
726 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
727 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
728 (mode-find, mode-set-word-modes!): Update
729 (mode-ensure-word-sizes-defined): Update.
730 (/sort-mode-classes!): New function.
731 (mode-builtin!): Update. Sort mode classes here.
732 (mode-finish!): Sort mode classes here too.
733 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
735 (rtl-c-set-quiet): Allow mode to be name of object.
736 (rtl-c-set-trace): Ditto.
737 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
738 <mode> object. All callers updated.
739 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
740 (rtx-lazy-sem-mode): Ditto.
741 (<rtx-temp> make!): Assert mode arg is a <mode> object.
742 (rtx-env-make): Allow var-list modes to be name or object.
743 * sem-frags.scm (/frag-expr-assq-locals): New function.
744 (/frag-compute-locals!): Call it.
745 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
747 * semantics.scm (/build-mem-operand!): Handle mode aliases.
749 * sim-test.scm (*): Symbols no longer can be passed to string-append.
751 2009-09-10 Doug Evans <dje@sebabeach.org>
753 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
754 Improve error message for missing or too many bits.
755 (/insn-parse): Don't verify iformat for virtual insns.
757 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
759 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
760 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
761 * sid.scm (pbb-engine-insns): Ditto.
762 * sim-decode.scm (cgen-decode.c): Ditto.
764 2009-09-09 Doug Evans <dje@sebabeach.org>
766 * rtl-traverse.scm: Comment tweaks.
767 * rtl-xform.scm: Comment and reformatting tweaks.
768 * doc/rtl.texi: Add text to docs on ifield-assertions.
770 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
773 Add support for controlling warnings/errors.
774 Add tests for iformat description errors.
775 * dev.scm (cload): New option #:diag.
776 * read.scm (<reader>): New member verify-iformat?.
777 (/parse-diagnostic, parse-warning): New functions.
778 (parse-error): Guts moved to /parse-diagnostic.
779 (/set-diagnostic-options!): New function.
780 (cpu-load): New arg diagnostic-options, all callers updated.
781 Recognize -w diagnostic-option-list.
782 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
783 (ifld-simple-ifields, ifields-simple-ifields): New function.
784 * insn.scm (/parse-insn-format-iflds): New function.
785 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
786 New arg isa, all callers updated. Do some basic validation of the
787 ifield list if requested.
788 * mach.scm (/sanity-check-insns): Improve error message text.
789 * doc/running.texi: Document -w option.
790 * doc/porting.texi: Document #:trace, #:diag options to cload.
792 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
794 * dev.scm (*): Change default verbosity level to 2.
796 * ifield.scm (<ifield> pretty-print): New method.
797 (ifld-pretty-print): New function.
798 (<multi-ifield> pretty-print): New method.
800 * ifield.scm (<ifield> field-start): Delete word-len arg.
803 (<multi-ifield> field-start): Ditto.
804 * operand.scm (<hw-index> field-start): Ditto.
806 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
807 total-bitsize. All callers updated.
808 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
809 New member /insn-base-value.
810 (insn-base-value): New function.
811 * mach.scm (/sanity-check-insns): New function.
812 (arch-analyze-insns!): Call it.
814 2009-09-08 Doug Evans <dje@sebabeach.org>
816 * iformat.scm (ifields-base-ifields): Simplify.
817 (compute-insn-length): Simplify, call ifields-base-ifields.
818 (compute-insn-base-mask): Ditto.
819 * ifield.scm (ifld-known-values): Ditto.
820 (ifld-base-ifields): Ditto.
821 * insn.scm (insn-value): Ditto.
822 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
824 2009-09-08 DJ Delorie <dj@redhat.com>
826 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
827 preprocessor macro, not an enum.
829 2009-09-08 Doug Evans <dje@sebabeach.org>
831 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
833 (*): Remove trailing ":" from error messages passed to estate-error.
835 2009-09-07 Doug Evans <dje@sebabeach.org>
837 * types.scm (<struct>): Delete.
839 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
841 (/pmacro-loc-error): New function.
843 * mach.scm (/isa-parse-decode-assist): New function.
844 (/isa-parse): Call it.
846 * decode.scm (/get-subopcode-value): New function.
847 (/opcode-slots): Call it.
848 (/fill-slot!): Add logging message.
850 * cos.scm (/object-error): Convert symbols to strings before passing
853 * read.scm (rtl-version-equal?): New function.
854 (rtl-version-at-least?, rtl-version-older?): New functions.
856 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
857 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
859 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
861 2009-09-03 Doug Evans <dje@sebabeach.org>
863 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
866 2009-09-01 DJ Delorie <dj@redhat.com>
868 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
869 (parse_unsigned16_range): Likewise.
870 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
873 2009-09-01 Doug Evans <dje@sebabeach.org>
875 Pmacro .equals -> .equal?
876 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
877 -pmacro-builtin-equals. All callers updated.
878 (pmacros-init!): Rename .equals to .equal?.
879 * doc/pmacros.texi: Update.
880 * testsuite/pmacros-1.test: Update.
882 * doc/porting.texi: Work around texi2html bug where it doesn't
883 properly escape <> inside double-quotes inside @code.
885 * doc/porting.texi (Doing an opcodes port): Add step to specify
888 2009-08-29 Doug Evans <dje@sebabeach.org>
890 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
892 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
894 2009-08-27 Doug Evans <dje@sebabeach.org>
896 Add do-count rtl function.
897 * rtl-c.scm (s-do-count): New function.
898 (do-count): New rtl handler.
899 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
900 (-rtx-make-traverser-table): Add ITERATION.
901 * rtl.scm (rtx-make-iteration-limit-var): New function.
902 (rtx-env-make-iteration-locals): New function.
903 * rtx-funcs.scm (do-count): New rtl function.
904 * cpu/play.cpu: Add do-count-test insn.
905 * doc/rtl.texi: Add docs on do-count.
907 2009-08-26 Doug Evans <dje@sebabeach.org>
909 * read.scm (parse-error): Change error message output format
910 to match context-owner-error.
911 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
912 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
913 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
914 (operand): Call estate-error instead of context-error.
915 (local, delay): Ditto.
916 (ref, attr): Call estate-error instead of error.
917 * rtl-traverse.scm (tstate-error): New function.
918 (-rtx-traverse-error): Call tstate-error instead of context-error.
919 (-rtx-traverse-operands, -rtx-traverse): Ditto.
920 (estate-error): New function.
921 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
923 (e-if): Call estate-error instead of error.
924 * rtx-funcs.scm (error): Call estate-error instead of context-error.
926 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
927 Rewrite to call context-owner-error.
928 (context-owner-error): New function.
930 * ifield.scm (<ifield> constructor): New arg `location',
932 * insn.scm (<insn> constructor): Ditto.
933 (<multi-insn> constructor): Ditto.
934 * minsn.scm (<macro-insn> constructor): Ditto.
935 * operand.scm (<operand> constructor): Ditto.
936 * utils-cgen.scm (builtin-location): New function.
937 (<source-ident>): Fix default value of member `location'.
938 (source-ident?): New function.
940 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
941 (estate-push-env, estate-with-modifiers): Ditto.
942 (estate-deepen): New function.
944 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
946 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
947 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
950 2009-08-25 Doug Evans <dje@sebabeach.org>
952 * doc/pmacros.texi (pmacro default argument values): Add text.
954 2009-08-23 Doug Evans <dje@sebabeach.org>
956 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
957 Rename member prefix -> name-prefix.
958 (<keyword> getters): Update.
959 (-keyword-parse): Update. Default enum-prefix to NAME-.
960 (-keyword-read): Update. Don't compute default value for
962 (define-keyword): Update.
963 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
964 * read.scm (cgen-rtl-version): New function.
965 (-supported-rtl-versions): Add (0 8).
966 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
967 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
968 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
969 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
970 Update, print-name -> enum-prefix, make uppercase.
971 Remove unnecessary name-prefix spec.
972 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
973 * cpu/ip2k.cpu (register-names): Ditto.
974 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
975 * cpu/sparc.cpu (gr-names): Ditto.
976 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
977 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
978 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
979 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
980 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
981 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
982 prefix -> name-prefix.
983 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
984 Update, print-name -> enum-prefix, make uppercase.
985 (drc-names, xf-names): Ditto.
986 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
987 * doc/rtl.texi (Keywords): New section.
988 (hardware indices): Update text.
989 (rtl versions): Add 0.8.
991 Add define-rtl-version.
992 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
993 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
994 (cgen-lang-fixlevel): Delete.
995 (-supported-rtl-versions): New variable.
996 (-cmd-define-rtl-version): New function.
997 (init-reader!): New command define-rtl-version.
998 (-cgen): Add rtl version to --version output.
999 * doc/rtl.texi: Document rtl version support.
1000 * cpu/play.cpu: Add define-rtl-version.
1002 2009-08-22 Doug Evans <dje@sebabeach.org>
1004 * Makefile.am (OPTIONS): Define.
1005 (desc): Just generate <arch>-desc.[ch] files.
1006 * Makefile.in: Regenerate.
1007 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
1009 (cgen-desc.c): Similarly.
1010 * gen-all-desc: New file.
1011 * opcodes.scm (opc-file-provided?): New function.
1013 * mach.scm (current-*-add!): Update calls to parse-error.
1014 * operand.scm (op:new-mode): Update call to parse-error.
1015 * utils-cgen.scm (make-obj-context): New function.
1017 * NEWS: Copy over entries from 1.1 branch.
1019 2009-08-20 Doug Evans <dje@sebabeach.org>
1021 * gas-test.scm (<keyword> test-data): Catch invalid requests,
1022 flag a warning and compensate.
1023 (<hw-address test-data): Tweak for readability.
1024 (<hw-iaddress test-data): Ditto.
1025 (cgen-build.sh): Convert symbols to strings before passing to
1027 (cgen-allinsn.exp): Ditto.
1029 * doc/pmacros.texi (.splice): Add more text.
1031 2009-08-19 Doug Evans <dje@sebabeach.org>
1033 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
1034 distinguish from 1.1.
1035 * configure: Regenerate.
1036 * read.scm (-CGEN-VERSION): Update.
1037 * doc/version.texi: Update.
1039 New builtin .pmacro?.
1040 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
1041 (pmacros-init!): Add .pmacro?.
1042 * doc/pmacros.text: Document .pmacro?.
1043 * testsuite/pmacros-1.test: Test .pmacro?.
1045 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
1046 of a pmacro begins before its arguments are evaluated, improves
1049 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
1050 * testsuite/pmacros-1.test: Ditto. Add better tests.
1052 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
1053 in assembler syntax.
1054 (Operands): Similarly.
1056 2009-08-18 Doug Evans <dje@sebabeach.org>
1058 * ifield.scm (ifld-encode-mode): Add FIXME.
1059 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
1061 (<ifield> gen-extract): Similarly.
1063 * read.scm (parse-error): Handle #f for context-location.
1064 * utils-cgen.scm (unspecified-location): Fix building of
1067 * doc/rtl.texi: Document how to write hex and boolean values.
1069 * gas-test.scm (<hw-asm> test-data): Handle () values.
1070 (<keyword> test-data): Convert symbols to strings before passing
1072 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
1075 * operand.scm (hw-index-scalar): Set `name'.
1076 (hw-index-anyof, hw-index-derived): Ditto.
1078 2009-08-17 Doug Evans <dje@sebabeach.org>
1080 * pmacros.scm (-pmacro-builtin-internal-test): New function.
1081 (pmacros-init!): Add .internal-test.
1082 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
1083 * testsuite/testsuite.cpu (internal-verify): New pmacro.
1084 * doc/pmacros.text: Document .internal-test.
1086 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
1087 (parse-comment): Allow numbers.
1088 * doc/porting.texi: Document that names and comments may be lists.
1090 * insn.scm (-insn-parse): Fix typo.
1092 Rename .eval -> .exec. Add new .eval.
1093 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
1094 (-pmacro-builtin-eval): New function.
1095 (pmacros-init!): Add .exec.
1096 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
1097 * testsuite/location-1.test: Update.
1098 * testsuite/pmacros-1.test: Add test for .eval.
1100 2009-08-16 Doug Evans <dje@sebabeach.org>
1102 * doc/porting.texi: Remove support for Guile 1.4.
1104 * read.scm (current-reader-location): Return unspecified location
1105 if reader hasn't been initialized yet.
1107 2009-08-13 Doug Evans <dje@sebabeach.org>
1109 * dev.scm: Document tracing options.
1111 * pmacros.scm (pmacro-dump): New function.
1112 (check-pmacro): Tweak debugging output.
1113 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1114 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1116 Add .let* pmacro builtin.
1117 * pmacros.scm (-pmacro-builtin-let*): New function.
1118 (pmacros-init!): Add .let*.
1119 * doc/pmacros.texi: Document .let*.
1120 * testsuite/pmacros-1.test: Test .let*.
1122 2009-08-12 Doug Evans <dje@sebabeach.org>
1124 Clean up cpu file parsing, pass context consistently instead of the
1125 old "errtxt" argument.
1126 NOTE: ACU == "All Callers Updated".
1127 * attr.scm (-parse-simple-attribute): Renamed from
1128 parse-simple-attribute, ACU.
1129 (-attr-parse): Change errtxt argument to context, ACU.
1130 (-attr-read): Ditto.
1131 (atlist-parse): Ditto. Put context arg first.
1132 (attr-parse): Use parse-error instead of context-error.
1133 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1134 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1135 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1136 `context' arg is now a <context> object. ACU.
1137 (-keyword-read): `context' arg is now a <context> object. ACU.
1138 (-hw-parse-indices): Change errtxt argument to context, ACU.
1139 (-hw-parse-values, -hw-parse-handlers): Ditto.
1140 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1141 (-hw-validate-layout, -hw-create-getter-from-layout,
1142 -hw-create-setter-from-layout): Ditto.
1143 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1144 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1145 (<hw-address>:parse!): Ditto.
1146 * ifield.scm (-ifield-parse, ifield-read): Ditto.
1147 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1148 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1149 (-multi-ifield-parse, -multi-ifield-read): Ditto.
1150 * insn.scm (-insn-parse, -insn-read): Ditto.
1151 (parse-syntax): Ditto. Put context arg first.
1152 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1153 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1154 (-parse-insn-format): Ditto.
1155 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1156 (-arch-parse-isas): Ditto.
1157 (-isa-read): Add context arg, ACU.
1158 (-cpu-parse, -cpu-read, -mach-read): Ditto.
1159 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1161 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1162 (minsn-make-alias): Ditto.
1163 * mode.scm (-mode-parse): Ditto.
1164 (parse-mode-name): Ditto. Put context arg first.
1165 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1166 errtxt argument to context, ACU.
1167 (-unit-parse, -model-parse, -model-read): Ditto.
1168 * operand.scm (-operand-parse-getter): Use parse-error instead of
1170 (-operand-parse-setter): Ditto.
1171 (-operand-parse): Change errtxt argument to context, ACU.
1172 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1173 (-anyof-operand-parse, -anyof-operand-read): Ditto.
1174 * read.scm (reader-error): Delete. Use parse-error instead.
1175 (parse-error): Change errtxt argument to context, ACU. Split args
1176 argument into expr and maybe-help-text.
1177 (-reader-process-expanded-1!): Reorganize.
1178 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1179 * types.scm (parse-type): Ditto.
1180 * utils-cgen.scm (single-location->simple-string): New function.
1181 (<context>): Replace members file,lineno with location.
1182 (make-prefix-context): Renamed from context-make-prefix, ACU.
1183 (make-current-context): New function.
1184 (context-append, context-append-name): New functions.
1185 (context-make-reader): Delete.
1186 (parse-name): Change errtxt argument to context, ACU.
1187 Put context arg first.
1188 (parse-comment): Ditto.
1189 (parse-number): Change errtxt argument to context, ACU.
1190 (arg-list-validate-name, arg-list-check-no-args,
1191 arg-list-symbol-arg): Ditto.
1193 * read.scm (-cmd-if): Don't assume test is a list.
1195 * html.scm (get-insn-properties): Delete errtxt, unused.
1197 2009-08-11 Doug Evans <dje@sebabeach.org>
1199 * doc/rtl.texi (hardware types): Add pc.
1201 2009-08-07 Doug Evans <dje@sebabeach.org>
1203 Add -t option for tracing things like commands, pmacro expansion.
1204 * dev.scm (cload): New arg #:trace.
1205 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1206 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
1207 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1208 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1209 (-reader-process-expanded-1!): Trace commands if requested.
1210 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1211 (-set-trace-options!): New function.
1212 (-init-reader!): New function.
1213 (cpu-load): New arg trace-options, all callers updated.
1214 Call -init-reader! and -set-trace-options!.
1215 (cgen-usage): Improve output formatting.
1216 (common-arguments): New option -t.
1217 (-cgen): Process -t.
1218 * utils-cgen.scm (single-location->string): Renamed from
1219 pretty-print-single-location. All callers updated.
1220 (location->string): Renamed from pretty-print-location.
1221 All callers updated.
1222 (source-properties-location->string): New function.
1223 * doc/running.texi: Document -t.
1225 2009-08-06 Doug Evans <dje@sebabeach.org>
1227 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1228 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1229 * utils.scm: ... here.
1231 2009-08-05 Doug Evans <dje@sebabeach.org>
1233 Track source location better, for better error messages.
1234 * pmacros.scm (-pmacro-eval): Delete, unused.
1235 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1236 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1237 (scan-list, scan): Ditto.
1238 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1239 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1240 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1241 (scan-list1): New function.
1242 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
1243 * read.scm (<reader>): New member `location'.
1244 (-reader-lookup-command): Renamed from reader-lookup-command,
1245 all callers updated.
1246 (reader-error): Rewrite to produce better source location info.
1247 (current-reader-location): New function.
1248 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1249 All callers updated. Record source location of expression.
1250 (reader-process-expanded!): Renamed from reader-process-expanded.
1251 All callers updated.
1252 (-reader-process!): Renamed from reader-process. New arg `loc'.
1253 All callers updated. Record source location of define-pmacro.
1254 * utils-cgen.scm (<location>): New class.
1255 (single-location): New (pseudo) class.
1256 (pretty-print-single-location, pretty-print-location): New functions.
1257 (location-top, location-push-single, location-push): New functions.
1258 (unspecified-location, current-input-location): New functions.
1259 (location-property): New object property.
1260 (location-property-set!): New function.
1261 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
1263 * testsuite/location-1.test: New testcase.
1264 * testsuite/run-tests.sh: Fix fail count handling.
1265 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
1266 to expect cgen to fail.
1268 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1270 * read.scm (-cmd-include): Renamed from include. All callers updated.
1271 (-cmd-if): Renamed from cmd-if. All callers updated.
1272 Use reader-process-expanded! on then/else clauses instead of eval1.
1274 2009-07-22 Doug Evans <dje@sebabeach.org>
1276 * modes.scm (TI,OI): New modes.
1277 * types.scm (parse-type): Improve error checking. Don't hardwire
1279 * utils.scm (non-negative-integer?): New function.
1281 * pmacros.scm (-pmacro-builtin-find): New predicate.
1282 (pmacros-init!): Add .find.
1283 * doc/pmacros.tex: Document .find.
1284 * testsuite/pmacros-1.test: Test .find.
1286 2009-07-20 Doug Evans <dje@sebabeach.org>
1288 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1289 commented out printfs.
1290 * rtl.scm (rtl-finish!): Whitespace tweaks.
1291 * model.scm (parse-insn-timing): Tweak logging message.
1292 * operand.scm: Comment and whitespace tweaks.
1293 (op:type): Tweak error message.
1294 (op-ifield): Tweak logging message.
1295 (-derived-operand-parse, anyof-merge-semantics): Ditto.
1296 * read.scm: Whitespace cleanup.
1297 * utils.scm: Whitespace cleanup.
1299 2009-07-19 Doug Evans <dje@sebabeach.org>
1301 Fix binding of nested pmacro parameters.
1302 * pmacros.scm (-pmacro-env-make): New arg prev-env.
1303 All callers updated.
1304 (-pmacro-bulid-lambda): Ditto.
1305 * doc/pmacros.texi: Update.
1306 * testsuite/pmacros-1.test: Add testcase.
1308 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1310 (-multi-ifield-make-default-extract): Ditto.
1312 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1313 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1314 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1316 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1317 * doc/rtl.texi: Update.
1319 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1321 Rename builtin boolean pmacros, for consistency with rtl.
1322 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1323 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1324 * doc/pmacros.texi: Update.
1325 * testsuite/pmacros-1.test: Update.
1327 2009-07-17 Doug Evans <dje@sebabeach.org>
1329 Use hash tables to record ifields, operands, insns, macro-insns.
1330 * attr.scm (attr-builtin!): Tweak some comments.
1331 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1332 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1334 (<multi-ifield>): New constructor.
1335 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1336 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1338 (-sub-insn-make!): Add hack to avoid differences in generated code.
1339 (multi-insn-instantiate!): Add total number of multi-insns to
1341 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1342 minsn-list to foo-table. New member next-ordinal.
1343 Update getters/setters.
1344 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1346 (-get-next-ordinal!, -get-lowest-ordinal): New function.
1347 (-make-ident-object-table, -ident-object-table->list,
1348 -ident-object-table-add!, -ident-object-table-lookup): New functions.
1349 (current-ifld-list, current-ifld-add! current-ifld-lookup,
1350 -ifld-already-defined?): Rewrite.
1351 (current-op-list, current-op-add! current-op-lookup,
1352 -op-already-defined?): Rewrite.
1353 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1354 (current-insn-list, current-insn-add! current-insn-lookup,
1355 -insn-already-defined?): Rewrite.
1356 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1357 -minsn-already-defined?): Rewrite.
1358 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1359 (MAX-VIRTUAL-INSNS): Define.
1360 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1361 Update use of arch-insn-list.
1362 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1363 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1365 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1366 <ident>. New constructor.
1367 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1369 * sid.scm (-virtual-insn-add!): New function.
1370 (-create-virtual-insns!): Call it.
1371 (-fill-sim-insn-list!): Rewrite.
1372 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1373 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1374 * utils-cgen.scm (<ordered-ident>): New class.
1375 (obj-ordinal, obj-set-ordinal!): New functions.
1376 (add-ident-methods!): Delete.
1378 * model.scm (parse-insn-timing): Change logging message to level 3.
1380 2009-07-16 Doug Evans <dje@sebabeach.org>
1382 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1383 add a link to define-normal-insn-enum.
1385 * doc/porting.texi (Conventions): Add docs on writing integers.
1387 * cpu/simplify.inc (*): One line doc strings don't need \n.
1388 (df): Invoke define-full-ifield instead of claiming it's an alias.
1390 (dnop): Mark as deprecated.
1392 * cpu/play.cpu: Add example of hardware `layout'.
1393 * doc/porting.tex: Add docs on simplify.inc.
1394 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1397 * ifield.scm: Whitespace/formatting cleanup.
1399 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1401 * read.scm (parse-error): Don't print single entry args as a list.
1402 (-reader-process-expanded-1): Convert symbol to string for
1405 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1407 2009-07-15 Doug Evans <dje@sebabeach.org>
1409 * cpu/simplify.inc (dno): New pmacro.
1410 * doc/porting.texi: Add section on simplify.inc.
1411 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1413 2009-07-15 Doug Evans <devans@sourceware.org>
1415 * gen-all-doc: Generate index.html.
1417 2009-07-13 Doug Evans <dje@sebabeach.org>
1419 Extend pmacro language, add testsuite.
1420 * Makefile.am (SUBDIRS): Add testsuite.
1421 * Makefile.in: Regenerate.
1422 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1423 testsuite/test-utils.sh.
1424 * configure: Regenerate.
1425 * dev.scm (cload): Handle testsuite app.
1426 (load-testsuite): New function.
1427 * pmacros.scm: (-pmacro-debug?): New global.
1428 (-smacro-table): New global.
1429 (-smacro-lookup, -smacro-set!): New functions.
1430 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1431 (-pmacro-syntactic-form?): New function.
1432 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1433 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1434 (-pmacro-expected-non-negative-integer): New function.
1435 (-pmacro-verify-non-negative-integer): New function.
1436 (-pmacro-expand-expr-list): New function.
1437 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1438 (-pmacro-process-args): Renamed from -pmacro-invoke.
1439 (-pmacro-apply, -smacro-apply): New functions.
1440 (-pmacro-expand): Rewrite syntactic form processing.
1441 (-pmacro-build-lambda): Reformat.
1442 (define-pmacro): Watch for more errors in definition.
1443 (pmacro-debug): New function.
1444 (pmacro-trace): Set/reset -pmacro-debug?.
1445 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1446 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1447 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1448 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1449 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1450 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1451 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1452 (pmacros-init!): Initialize -smacro-table.
1453 Rewrite pmacro initialization.
1454 * read.scm (reader-process-expanded): Renamed from
1455 -reader-process-expanded. All callers updated.
1456 Recognize () as a no-op.
1457 (cpu-load): Tweak logging messages.
1458 * utils.scm (message): Add comment.
1459 * cpu/play.cpu: Add some instructions to play with .let.
1460 * doc/cgenint.texi: Move some debugging related docs to here from
1462 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1463 * testsuite/Makefile.am: New file.
1464 * testsuite/Makefile.in: New file.
1465 * testsuite/test-utils.sh.in: New file.
1466 * testsuite/run-tests.sh: New file.
1467 * testsuite/testsuite.cpu: New file.
1468 * testsuite/pmacros-1.test: New file.
1470 * decode.scm: Comment and formatting tweaks.
1471 (-build-decode-table-guts): Add more data to logging message.
1473 2009-07-12 Doug Evans <dje@sebabeach.org>
1475 Delete files that now live in ../cpu.
1476 * cpu/iq10.cpu: Delete.
1477 * cpu/iq2000.cpu: Delete.
1478 * cpu/iq2000.opc: Delete.
1479 * cpu/iq2000m.cpu: Delete.
1480 * cpu/m32r.cpu: Delete.
1481 * cpu/m32r.opc: Delete.
1483 2009-07-09 Doug Evans <dje@sebabeach.org>
1485 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1486 All callers updated. Work around -ve shifts by referencing the
1489 * utils.scm (message): Handle pairs.
1491 2009-07-08 DJ Delorie <dj@redhat.com>
1493 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1494 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1495 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1498 2009-07-07 Doug Evans <dje@sebabeach.org>
1500 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1501 * cpu/play.opc: New file.
1503 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1504 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1505 * doc/rtl.texi (Instructions): Update.
1507 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1508 (opc-arguments, -OPC): Call set-opc-file-path!.
1509 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1510 (set-opc-file-path!): New function.
1511 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1513 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1514 before passing to gen-c-args.
1516 2009-07-06 DJ Delorie <dj@redhat.com>
1518 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1519 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1520 unspecified accesses to control registers.
1522 2009-07-01 DJ Delorie <dj@redhat.com>
1524 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1525 unspecified accesses to control registers.
1527 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1528 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1530 2009-06-27 Doug Evans <dje@sebabeach.org>
1532 * gen-all-intrinsics: New file.
1534 2009-06-24 Doug Evans <dje@sebabeach.org>
1536 * All *.scm files: Update copyright year.
1537 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1539 2009-06-23 DJ Delorie <dj@redhat.com>
1541 * intrinsics.scm: Updates to support IVC2.
1542 (belongs-to-group?): Check IVC2 slots.
1543 (-slots-attribute): New.
1544 (targets::attributes): Add SLOTS.
1545 (target:add-well-known-intrinsics): Add CPMOV.
1546 (md-insn): Add CPTYPE and CRET?.
1547 (add-md-insn): Likewise.
1548 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1549 duplicate insns with different bit patterns.
1550 (write-cgen-insn?): Add cret? support.
1551 (intrinsics.h): Add vector types.
1552 (runtime-op): Add vector support.
1553 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1555 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1556 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1557 (h-cr-ivc2): Default to typeless.
1558 (h-ccr-ivc2): Fix register width.
1559 (SLOTS): Fix values and default.
1560 (ivc2_*): Add control register names.
1561 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1563 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1564 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1566 2009-06-22 Doug Evans <dje@sebabeach.org>
1568 * semantics.scm (insn-build-known-values): Fix typo in comment.
1570 2009-06-21 Doug Evans <dje@sebabeach.org>
1572 * rtl-xform.scm (rtx-simplify-insn): New function.
1573 * html.scm (gen-insn-docs): Call it.
1574 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1575 * iformat.scm (ifmt-analyze): Minor simplification.
1577 * semantics.scm (semantic-compile): Change arg sem-code-list to
1579 (semantic-attrs): Ditto.
1580 * iformat.scm (ifmt-analyze): Update.
1581 (ifmt-compute!): Update.
1582 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1584 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1585 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1586 * semantics.scm (rtx-simplify): Ditto.
1587 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1588 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1589 (-simplify-expr-fn): Move to rtl-xform.scm.
1590 (-solve-expr-fn, rtx-solve): Ditto.
1591 * rtl-xform.c: New file.
1592 * read.scm: Load it.
1594 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1595 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1596 (-rtx-traverse, rtx-traverse): Ditto.
1598 2009-06-20 Doug Evans <dje@sebabeach.org>
1600 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1602 * configure.in: Update version to 1.1.
1603 * configure: Regenerate.
1604 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1606 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1607 Doug Evans <dje@sebabeach.org>
1609 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1610 (cgen-desc.c): Ditto.
1611 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1612 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1613 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1614 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1615 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1616 (cgen-cpuall.h, cgen-ops.c): Ditto.
1617 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1618 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1619 (cgen-sem-switch.c): Ditto.
1620 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1621 * sim-model.c (cgen-model.c): Ditto.
1623 2009-06-18 Doug Evans <dje@sebabeach.org>
1625 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1627 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1629 * dev.scm (cload): Change #:arch argument to take the path to the
1630 .cpu file instead of just the name of the architecture.
1631 * read.scm (arch-path): Remove trailing '/'.
1632 (cpu-load): Set `arch-path' to directory of .cpu file.
1633 (-cgen): Don't set `arch-path' here.
1635 * doc/porting.texi: Update.
1637 2009-06-14 Doug Evans <dje@sebabeach.org>
1639 * gen-all-doc: Use files in ../cpu where possible.
1641 * Makefile.am (ARCHFILE): Fix path.
1642 * Makefile.in: Regenerate.
1643 * html.scm: Use "pre" instead of "plaintext".
1645 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1646 * doc/app.texi: Cleanup pass.
1647 * doc/cgen.texi: Cleanup pass.
1648 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1649 * doc/intro.texi: Cleanup pass.
1650 * doc/mdate-sh: New file.
1651 * doc/opcodes.texi: Cleanup pass.
1652 * doc/pmacros.texi: Cleanup pass.
1653 * doc/porting.texi: Cleanup pass.
1654 * doc/rtl.texi: Cleanup pass.
1655 * doc/running.texi: Cleanup pass. Document more runtime options.
1656 * doc/stamp-vti: Update.
1657 * doc/version.texi: Update.
1659 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1660 (GUILE): Fix definition.
1661 * Makefile.in: Regenerate with automake 1.9.6.
1662 * aclocal.m4: Regenerate with aclocal 1.9.6.
1663 * configure.in (AC_PREREQ): Set to 2.59.
1664 (GENINSRC_NEVER): Define.
1665 * configure: Regenerate with autoconf 2.59.
1666 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1667 (cgen.info,cgen.dvi): Delete.
1668 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1669 (noinst_TEXINFOS): Add cgenint.texi.
1670 (DOCFILES): Add missing files.
1671 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1672 * doc/Makefile.in: Regenerate with automake 1.9.6.
1674 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1676 * attr.scm: Removing trailing whitespace.
1677 * cgen-intrinsics.scm: Ditto.
1678 * cgen-sim.scm: Ditto.
1684 2009-05-28 DJ Delorie <dj@redhat.com>
1686 * cpu/mep.opc (parse_signed16_range): New.
1687 (parse_unsigned16_range): New.
1688 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1690 2009-05-26 DJ Delorie <dj@redhat.com>
1692 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1694 (f-ivc2-ccrn-c3hi): New.
1695 (f-ivc2-ccrn-c3lo): New.
1696 (f-ivc2-ccrn-c3): New.
1697 (ivc2c3ccrn): Use it.
1699 2009-05-22 DJ Delorie <dj@redhat.com>
1701 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1702 (mep_config_map): Regenerate.
1704 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1705 ivc2-specific names.
1707 (cmovc): move to after field definitions, use ivc2-specific
1709 (cpmovi_b_P0S_P1): New.
1711 2009-05-19 DJ Delorie <dj@redhat.com>
1713 * cpu/mep.opc: Regenerate configuration.
1714 (parse_cdisp10): Only check CPU flags, not COP flags.
1715 (check_configured_mach): Likewise.
1717 2009-05-13 DJ Delorie <dj@redhat.com>
1719 * intrinsics.scm (insns.md): Add RTL predicates.
1720 (intrinsics.h): Remove old C intrinsics.
1722 2009-04-29 DJ Delorie <dj@redhat.com>
1724 * mep-ivc2.cpu: New.
1725 * mep-core.cpu: Regenerated. Add support for deferred register
1727 (SLOT): Add IVC2 slot types.
1728 (sim-syscall): Rename to something more appropriate.
1729 * mep-ext-cop.cpu: Regenerate.
1730 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1731 (print_slot_insn): New.
1732 (mep_examine_ivc2_insns): New.
1733 (mep_print_insn_set_ivc2_mode): New.
1734 (mep_print_insn): Support IVC2 slotting.
1736 2009-04-20 DJ Delorie <dj@redhat.com>
1738 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1739 (guess-mode): Drop COP* syntax.
1740 (need-insn): Add "--syscall--" to the list.
1741 (enum-type): Drop COP* syntax.
1742 (intrinsics.h): Likewise.
1743 (intrinsic-protos.h): Change file header to allow it to be
1746 2009-04-17 DJ Delorie <dj@redhat.com>
1748 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1749 (lhucpm1): Limit to C5 mach.
1750 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1751 * cpu/mep-core.cpu (extend-cdisp10): New.
1752 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1754 2009-04-08 DJ Delorie <dj@redhat.com>
1756 * cpu/mep-c5.cpu: New.
1757 * cpu/mep-core.cpu: Add C5 support.
1758 * cpu/mep.opc: Likewise.
1760 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1762 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1763 about calling memset with a zero length.
1765 2009-02-03 DJ Delorie <dj@redhat.com>
1767 * cpu/mep-core.cpu: Update to new MeP configuration.
1768 * cpu/mep-ext-cop.cpu: Likewise.
1769 * cpu/mep.opc: Likewise.
1771 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1773 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1775 2008-06-17 Dave Brolley <brolley@redhat.com>
1777 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1780 2007-11-13 Dave Brolley <brolley@redhat.com>
1782 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1784 2007-11-05 Dave Brolley <brolley@redhat.com>
1786 * intrinsics.scm,cgen-intrinsics.scm: New application which
1787 generates code to support intrinsic functions for insns in the
1788 mep architecture in gcc.
1790 2007-09-21 Dave Brolley <brolley@redhat.com>
1792 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1793 (rn3us): CDATA attribute now LONG.
1795 2007-08-21 Dave Brolley <brolley@redhat.com>
1797 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1800 2007-07-05 Nick Clifton <nickc@redhat.com>
1802 * utils.scm (copyright-fsf): Update copyright notice to refer to
1805 2007-05-22 Nick Clifton <nickc@redhat.com>
1807 * doc/cgen.texi: Use @copying around the copyright notice.
1808 * doc/internals.texi: Likewise.
1810 2007-02-05 Dave Brolley <brolley@redhat.com>
1812 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1814 2007-02-05 Dave Brolley <brolley@redhat.com>
1816 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1817 in the generated code for @arch@_cgen_init_asm if it is defined.
1819 * Contribute the following changes:
1820 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1822 * attr.scm (<string-attribute>): New attribute class.
1823 (attr-kind): Handle <string-attribute>.
1824 (parse-simple-attribute): New function.
1825 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1826 (<bitset-attribute> 'parse-value): Likewise.
1827 (<boolean-attribute> 'parse-value): Likewise.
1828 (<enum-attribute> 'parse-value): Likewise.
1829 (<string-attribute> 'parse-value): New function.
1830 (-attr-parse): Handle <string-attribute>.
1831 (-attr-read): Likewise.
1832 (<string-attribute> 'gen-value-for-defn-raw): New function.
1833 (<string-attribute> 'gen-value-for-defn): New function.
1835 2006-11-07 Dave Brolley <brolley@redhat.com>
1837 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1840 2006-10-18 Dave Brolley <brolley@redhat.com>
1842 * Contribute the following changes:
1844 2006-07-11 Dave Brolley <brolley@redhat.com>
1846 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1848 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1849 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1850 hardware or memory mode which was used.
1851 * sid-cpu.scm (hw-need-write-stack?): New function.
1852 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1853 identify hardware which uses write stacks.
1854 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1855 Initialized to an empty list.
1856 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1857 hw-need-write-stack?.
1858 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1859 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1860 (used-in-delay-rtl?): New method of <hardware-base>.
1861 (hw-used-in-delay-rtl?): New function.
1863 2006-06-20 Dave Brolley <brolley@redhat.com>
1865 * sid.scm (gen-attr-type): Removed.
1866 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1867 (SH2a-MACH): Add sh5.
1868 (sh2a-nofpu-models): Add units for sh5.
1869 (sh2a-fpu-models): Likewise.
1871 2006-06-15 Dave Brolley <brolley@redhat.com>
1873 * cpu/sh-sim.cpu: New file.
1874 * cpu/sh-sid.cpu: New file.
1875 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1876 (All fields): Remap for (insn-lsb0? #f)
1877 (All insns): Add timing specs.
1878 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1879 'xattrs' and .splice it in.
1880 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1881 (h-frc,h-drc): Add PROFILE attribute.
1883 (h-vbr): New hardware.
1884 (All fields): Remap for (insn-lsb0? #f)
1885 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1886 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1887 (fpscr): Use h-fpscr.
1888 (fsdm,fsdn): Use h-fsd.
1889 (dshci): Add xtiming argument and splice it in.
1890 (dr,xd): pmacros removed.
1891 (All insns): Add timing specs, *-MACH attribibutes,
1892 SH4{A}-GROUP attributes.
1893 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1894 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1895 we're being processed for sim or sid.
1896 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1897 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1898 (define-isa compact): Add (isa-parallel-insns 2).
1899 (define-isa media): Add (isa-parallel-insns 2). Add
1900 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1901 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1903 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1904 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1905 (SH4al-MACH, SH5-MACH): New pmacros.
1906 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1907 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1908 (sh5-media-fp-units, common-model, common-model-with-fp)
1909 (sh3-model, sh3e-model): New pmacros.
1910 (define-model sh2): New model.
1911 (define-model sh2e): New model.
1912 (define-model sh3): New model.
1913 (define-model sh3e): New model.
1914 (define-model sh2a-nofpu): New model.
1915 (define-model sh2a-fpu): New model.
1916 (define-model sh4-nofpu): New model.
1917 (define-model sh4): New model.
1918 (define-model sh4a-nofpu): New model.
1919 (define-model sh4a): New model.
1920 (define-model sh4al): New model.
1921 (define-model sh5-media): New model.
1922 (define-model sh5): Add all units.
1923 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1924 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1925 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1926 (h-pc): Add PROFILE attribute.
1929 (h-gr,h-grc): Likewise.
1930 (h-cr): Set h-sr in setter.
1931 (h-frbit): Get/Set h-fpscr.
1932 (h-szbit,h-prbit): Likewise.
1933 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1934 Add getter and setter.
1935 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1936 Adjust getter and setter.
1937 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1938 Adjust getter and setter.
1939 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1940 (h-fsd,h-fmov): New hardware.
1942 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1944 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1945 doc/notes.texi, doc/porting.texi, doc/running.texi,
1946 doc/sim.texi: Fix some typos.
1948 2006-07-14 Dave Brolley <brolley@redhat.com>
1950 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1951 hardware or memory mode which was used.
1952 * sid-cpu.scm (hw-need-write-stack?): New function.
1953 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1954 identify hardware which uses write stacks.
1955 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1956 Initialized to an empty list.
1957 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1958 hw-need-write-stack?.
1959 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1960 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1961 (used-in-delay-rtl?): New method of <hardware-base>.
1962 (hw-used-in-delay-rtl?): New function.
1964 2006-06-20 Dave Brolley <brolley@redhat.com>
1966 * sid.scm (gen-attr-type): Removed.
1968 2006-05-10 Dave Brolley <brolley@redhat.com>
1970 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1971 support for (if (application-is? <appname>) (...) (...)).
1972 (-cgen): Add trailing "/" to arch-path.
1973 * utils.scm (dirname): Removed. dirname is a primitive function.
1975 2006-05-09 Dave Brolley <brolley@redhat.com>
1977 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1978 'entire_insn' not 'base_insn'.
1979 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1981 * sim.scm (-gen-arch-model-decls): Likewise.
1982 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1983 abuf->written if profiling.
1984 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1985 object->string om the mode.
1986 (-hw-gen-write-stack-decl): Likewise.
1987 * read.scm (include): Use arch-path as file location.
1988 (arch-path): Define it with a default setting.
1989 (-cgen): Update arch-path when "-a" option is specified.
1990 * utils.scm (dirname): New function.
1992 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1994 * configure.in: Remove AC_ARG_PROGRAM.
1995 * configure: Regenerate with autoconf 2.59.
1997 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1999 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
2002 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
2004 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
2005 or an error message otherwise.
2006 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
2007 Fix up comments to correctly describe the functions.
2009 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
2010 Anil Paranjape <anilp1@kpitcummins.com>
2011 Shilin Shakti <shilins@kpitcummins.com>
2013 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
2015 * cpu/xc16x.opc: New file containing supporting XC16C routines.
2017 2006-02-10 Nick Clifton <nickc@redhat.com>
2019 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
2021 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
2023 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
2025 (-hw-gen-write-stack-decl): Likewise.
2027 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
2029 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
2030 non-(adata-integral-insn? CURRENT-ARCH) case.
2032 2005-10-28 Dave Brolley <brolley@redhat.com>
2034 Contribute the following changes:
2035 2005-09-19 Dave Brolley <brolley@redhat.com>
2037 * attr.scm (gen-value-for-defn-raw): New methods.
2038 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
2039 gen-value-for-defn-raw.
2040 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
2042 2002-12-13 Dave Brolley <brolley@redhat.com>
2044 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
2045 (-gen-attr-accessors): New function.
2046 (gen-obj-attr-defn): Update terminating initializer.
2047 (gen-obj-attr-end-defn): New function.
2048 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
2049 * sid-cpu.scm (cgen-desc.h): Generate code to include
2050 "opcode/cgen-bitset.h"
2051 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
2053 * desc.scm ('gen-defn): Update terminating initializer.
2054 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
2055 terminatinig initializer.
2056 (gen-hw-decls): Ditto.
2057 (gen-operand-decls): Ditto.
2058 (gen-insn-decls): Ditto.
2059 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
2060 (gen-insn-table): Update terminating initializer.
2061 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
2062 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
2063 * attr.scm (charmask-bytes): New function.
2064 (bitset-attr->charmask): New function.
2065 (<bitset-attribute>): Handle isa-attributes specially. Also handle
2066 differences for SID-SIMULATOR.
2067 (<integer-attribute>): Handle differences for SID-SIMULATOR.
2068 (<enum-attribute>): Ditto.
2070 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2072 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
2074 2005-10-24 DJ Delorie <dj@redhat.com>
2076 * operand.scm (-anyof-merge-syntax): Print a more useful error
2079 2005-10-19 Nick Clifton <nickc@redhat.com>
2081 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
2084 2005-10-18 Andreas Schwab <schwab@suse.de>
2086 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
2088 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2090 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
2093 2005-08-02 Dave Brolley <brolley@redhat.com>
2095 * rtl-c.scm (s-unop): Don't dereference
2096 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
2097 (s-binop, s-convop, s-cmpop): Likewise.
2099 2005-07-29 Dave Brolley <brolley@redhat.com>
2101 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
2102 if with-profile or with-parallel-write.
2103 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
2104 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
2107 2005-07-15 Alan Modra <amodra@bigpond.net.au>
2109 * cpu/fr30.opc (print_register_list): Correct format strings.
2110 * cpu/ip2k.opc: Likewise.
2112 2005-07-05 Nick Clifton <nickc@redhat.com>
2114 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2115 unsigned in order to avoid compile time warnings about sign
2118 2005-07-01 Nick Clifton <nickc@redhat.com>
2120 * desc-cpu.scm: Update to ISO C90 function declaration style.
2121 * opc-asmdis.scm: Likewise.
2122 * opc-ibld.scm: Likewise.
2123 * opc-itab.scm: Likewise.
2124 * cpu/fr30.opc: Likewise.
2125 * cpu/i960.opc: Likewise.
2126 * cpu/ip2k.opc: Likewise.
2127 * cpu/iq2000.opc: Likewise.
2128 * cpu/m32r.opc: Likewise.
2129 * cpu/openrisc.opc: Likewise.
2130 * cpu/sh.opc: Likewise.
2131 * cpu/sparc.opc: Likewise.
2132 * cpu/xstormy16.opc: Likewise.
2134 2005-06-15 Dave Brolley <brolley@redhat.com>
2136 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2137 (cgen-cpu.h): Call it.
2139 Contributed on behalf of Graydon Hoare
2140 2001-06-05 graydon hoare <graydon@redhat.com>
2142 * utils.scm (foldl): Define.
2146 (intersection): Simplify.
2147 * sid.scm : Set APPLICATION to SID-SIMULATOR.
2148 (-op-gen-delayed-set-maybe-trace): Define.
2149 (<operand> 'gen-set-{quiet,trace}): Delegate to
2150 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2151 up and needs cleaning.
2152 (-with-parallel?): Hardwire with-parallel to #t.
2153 (<operand> 'cxmake-get): Replace with lookahead-aware code
2154 * sid-decode.scm: Remove per-insn writeback fns.
2155 (-gen-idesc-decls): Redefine sem_fn type.
2156 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2157 with write stack stuff.
2158 (cgen-write.cxx): Replace per-insn writebacks with single write
2159 stack writeback. Add write stack reset function.
2160 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2162 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2163 estate attribute set.
2164 (delay): Set #:delayed attribute to calculated delay, update
2165 maximum delay of cpu, check (delay ...) usage.
2166 * operand.scm (<operand>): Add delayed slot to <operand>.
2167 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2168 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2169 * doc/rtl.texi (Expressions): Add section on (delay ...).
2171 2005-06-13 Jim Blandy <jimb@redhat.com>
2173 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2176 2005-06-07 Zack Weinberg <zack@codesourcery.com>
2178 * doc/porting.texi: Change all mention of md_apply_fix3 and
2179 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2182 2005-05-18 Dave Brolley <brolley@redhat.com>
2184 * utils-sim.scm (-gen-decode-default-entry): New function.
2185 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2186 code to check that all opcodes bits match.
2187 (-gen-decoder-switch): Use -gen-decode-default-entry.
2189 2005-05-16 Jim Blandy <jimb@redhat.com>
2191 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2192 fetched by one of our GETIMEM* methods.
2193 * utils-gen.scm (-extract-chunk-specs): Always fetch full
2194 base-insn-sized chunks.
2196 2005-05-10 Nick Clifton <nickc@redhat.com>
2198 * Update the address and phone number of the FSF organization in
2199 the GPL notices in the following files:
2200 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2201 cpu/powerpc.cpu, slib/random.scm
2203 2005-05-06 Jim Blandy <jimb@redhat.com>
2205 * pprint.scm, cos-pprint.scm: Add documentation.
2207 * pprint.scm (pprint): Don't wipe out elide-table after each call.
2209 * pprint.scm, cos-pprint.scm: New files.
2211 2005-04-04 Nick Clifton <nickc@redhat.com>
2213 * opcodes.scm (-gen-parse-address): Initialise value to zero to
2214 avoid a compile time warning.
2216 2005-03-18 Nick Clifton <nickc@redhat.com>
2218 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2219 "percent-operand" from "%operand" as the latter confuses xgettext
2220 into thinking that it is a C printf formating directive, which
2221 prevents proper translation.
2223 2005-02-23 Nick Clifton <nickc@redhat.com>
2225 * opcodes.scm (gen-parse-number): Add a cast to the desired
2226 pointer signed'ness in order to prevent compile time warnings.
2227 * cpu/ip2k.opc: Fixed compile time warnings about differing
2228 signed'ness of pointers passed to functions.
2229 * cpu/iq2000.opc: Likewise.
2230 * cpu/m32r.opc: Likewise.
2231 * cpu/openrisc.opc: Likewise.
2232 * cpu/xstormy16.opc: Likewise.
2234 2005-02-22 Alan Modra <amodra@bigpond.net.au>
2236 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2237 (cgen-desc.h): ..to here, after opcode/cgen.h include.
2239 2005-02-16 Dave Brolley <brolley@redhat.com>
2241 * utils.scm: Update copyright years.
2242 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2243 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2244 * operand.scm (-derived-operand-parse): Move logit message from level 1
2247 2005-02-15 Nick Clifton <nickc@redhat.com>
2249 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2250 prevent compile time warning messages.
2251 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2252 * utils-gen.scm (attr-int-gen-defn): Likewise.
2253 (attr-gen-defn): Likewise.
2254 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2255 (print_dollarhex16): Remove unused function.
2257 2005-02-15 Jim Blandy <jimb@redhat.com>
2259 * guile.scm (cgen-call-with-debugging): Doc fix.
2261 Make backtraces work more reliably.
2262 * guile.scm: Set up debugging parameters, and enable debugging and
2263 source positions while loading.
2264 (cgen-call-with-debugging, cgen-debugging-stack-start): New
2266 * read.scm: Don't set debugging parameters here.
2267 (catch-with-backtrace): Function deleted.
2268 (-cgen): Simply note the presence or absence of the -b option.
2269 Pass the flag to cgen-call-with-debugging, so debugging is turned
2270 off here if the user didn't request it, for faster computation.
2271 (cgen): Call cgen-debugging-stack-start here, instead of
2272 catch-with-backtrace.
2274 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2276 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2277 Don't write out the trailing -s here.
2278 * Makefile.in: Regenerated.
2279 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2280 fixup.scm here; let the caller decide which Scheme's customization
2282 * dev.scm: Load guile.scm, not fixup.scm.
2283 * fixup.scm: Deleted; contents have all moved to guile.scm.
2286 * guile.scm (debug-write): New function.
2288 2005-02-14 Jim Blandy <jimb@redhat.com>
2290 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2291 transformer procedure, not eval. Transformer procedures take one
2294 2005-02-11 Nick Clifton <nickc@redhat.com>
2296 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2297 to 'bfd_vma *' in order avoid compile time warning message.
2299 2005-02-09 Jim Blandy <jimb@redhat.com>
2301 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
2302 corresponding change in the sim/common directory.)
2304 2005-02-07 Jim Blandy <jimb@redhat.com>
2306 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
2307 changes in the opcodes directory.)
2309 * guile.scm: New file, containing Guile-specific definitions and
2310 adaptations. This is loaded by the app-specific shell scripts.
2311 Initially identical to fixup.scm.
2312 * cgen-sid.scm: Don't load fixup.scm here.
2314 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2317 2005-01-27 Jim Blandy <jimb@redhat.com>
2319 * utils.scm (string/symbol->append): Renamed from 'concat'.
2320 * opcodes.scm (gen-switch): Use new name.
2321 * insn.scm (-sub-insn-make!): Same.
2322 * rtl.scm (rtx-dump): Same.
2323 * semantics.scm (semantic-compile): Same.
2325 2005-01-20 Jim Blandy <jimb@redhat.com>
2327 * opcodes.scm (gen-switch): Use concat instead of string-map.
2329 * utils.scm (concat): New function.
2330 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2331 * rtl.scm (rtx-dump): Same.
2332 * semantics.scm (semantic-compile): Same.
2334 2004-12-16 Jim Blandy <jimb@redhat.com>
2336 * utils-cgen.scm (parse-name): Don't assume that string-map can be
2337 applied to symbols. Process everything as strings, and then
2338 convert to a symbol at the end.
2340 * read.scm (debug-repl): Temporarily redirect input and output to
2341 /dev/tty while we debug, so we don't interfere with whatever CGEN
2342 is reading or writing.
2343 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2346 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
2348 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2349 will work with newer versions of guile.
2351 2004-10-27 Nick Clifton <nickc@redhat.com>
2353 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2354 * cpu/iq2000.cpu: Likewise.
2356 2004-07-21 DJ Delorie <dj@redhat.com>
2358 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2360 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2362 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2363 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2365 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2367 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2369 2004-03-22 Dave Brolley <brolley@redhat.com>
2371 * utils.scm (copyright-fsf): Update copyright years.
2372 (copyright-red-hat): Ditto.
2373 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2375 (-op-gen-set-trace-parallel): Ditto.
2377 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2379 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2380 disassembling codes for 0x*2 addresses.
2382 2004-01-29 Dave Brolley <brolley@redhat.com>
2384 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2385 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2386 in the extra bit positions.
2388 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2390 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2392 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2394 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2395 "short" being 16 bit.
2396 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2397 internationalize error message.
2398 (parse_lo16): Likewise. Remove useless code.
2400 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2402 * cpu/m32r.cpu : Add new model m32r2.
2403 Add new instructions.
2404 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2405 Changed PIPE attr of push from O to OS.
2406 Care for Little-endian of M32R.
2407 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2408 Care for Little-endian of M32R.
2409 (parse_slo16): signed extension for value.
2411 2003-10-26 Dave Brolley <brolley@redhat.com>
2413 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2414 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2415 (-gen-extract-fn): Call -gen-record-profile-args.
2417 2003-10-21 Dave Brolley <brolley@redhat.com>
2419 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2421 * decode.scm (-opcode-slots): Correct typo in logit call.
2423 2003-10-09 Jim Blandy <jimb@redhat.com>
2425 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2426 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2428 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2430 2003-10-06 Dave Brolley <brolley@redhat.com>
2432 * gen-all-doc: Add fr550.
2434 2003-09-11 Doug Evans <dje@sebabeach.org>
2436 * Makefile.am (ARCHFILE): New var.
2437 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2438 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2439 * Makefile.in: Regenerate.
2441 2003-09-08 Dave Brolley <brolley@redhat.com>
2443 On behalf of Doug Evans <dje@sebabeach.org>
2444 Pass in paths to input files, instead of assuming they live in
2445 $srcdir/cpu. Plus misc. option processing cleanup.
2446 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2447 Add pre-process pass to all options.
2448 * cgen-gas.scm (gas-arguments): Ditto.
2449 * cgen-sid.scm (sim-arguments): Ditto.
2450 * cgen-sim.scm (sim-arguments): Ditto.
2451 * cgen-stest.scm (stest-arguments): Ditto.
2452 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2453 (-opc-file-path): New global.
2454 (opc-file-path): New fn.
2455 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2456 All callers updated.
2457 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2458 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2459 Replace srcdir arg with opc-file. All callers updated.
2460 * read.scm (-opt-spec-update): Delete.
2461 (opt-get-first-pass,opt-get-second-pass): New fns.
2462 (-cgen): Process application-specific arguments in two passes.
2464 2003-08-29 Dave Brolley <brolley@redhat.com>
2466 * cpu/frv.cpu: Removed.
2467 * cpu/frv.opc: Removed.
2469 2003-08-21 Nick Clifton <nickc@redhat.com>
2471 * cpu/frv.cpu (mbtoh): Replace input parameter to
2472 u-media-dual-expand and u-media-dual-btoh with output parameter.
2473 (cmbtoh): Add profiling hack.
2475 2003-08-19 Michael Snyder <msnyder@redhat.com>
2477 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2479 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2481 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2482 the elements for the END record of CGEN_OPINST, silencing warnings.
2484 2003-07-15 Doug Evans <dje@sebabeach.org>
2486 Add guile 1.6.4 support.
2487 - empty list must be quoted
2488 - string functions have stricter type checking
2489 - eval now takes a second argument
2490 - symbol-bound? is deprecated
2491 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2492 (bitset-attr->list): Ensure arg to string-cut is a string.
2493 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2494 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2495 * cos.scm (-class-list): Must quote empty list.
2496 (-class-parent-classes,-class-compute-class-desc): Ditto.
2497 (class-make,make,object-reset!): Ditto.
2498 (method-make-make!): Call eval1 instead of eval.
2499 (method-make-forward!,method-make-virtual-forward!): Ditto.
2500 * decode.scm (subdtable-add): Use stringsym-append instead of
2502 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2503 (-build-decode-table-entry): Fetch string name of insn.
2504 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2505 (-gen-mach-table-defns): Ditto for mach.
2506 (gen-ifld-defns): Ditto for ifld.
2507 (gen-hw-table-defns): Ditto for hw.
2508 (gen-operand-table): Ditto for op.
2509 (gen-insn-table-entry): Ditto for insn.
2510 * desc.scm (gen-attr-table-defn): Ditto for attr.
2511 (<keyword>,gen-defn): Don't pass symbols to string-append.
2512 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2514 (enum-vals-upcase): Use symbol-upcase to build result.
2515 (-enum-parse): Use stringsym-append to build errtxt.
2516 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2517 (eval1): New function.
2518 (symbol-bound?): Provide own version if >= guile 1.6.
2519 * hardware.scm (define-keyword): Use string-append instead of
2521 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2522 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2524 (gen-list-entry): Handle either symbol or string `name' arg.
2525 (gen-obj-doc-header): Fetch string name of `o' arg.
2526 (define-cpu-intro): Ditto for cpu.
2527 (gen-mach-intro): Ditto for mach.
2528 (gen-model-intro): Ditto for model.
2529 (gen-isa-intro): Ditto for isa.
2530 (gen-machine-doc-1): Ditto for isa.
2531 (gen-reg-doc-1): Convert mach to string first.
2532 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2533 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2535 (gen-insn-categories): Fetch string name of mach. Convert
2536 enum-val-name to string first.
2537 (gen-insn-docs): Fetch string name of mach.
2538 * ifield.scm (ifld-ilk): Result is a string.
2539 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2540 Fetch string name of ifld.
2541 (-sfmt-search-key): Similarily for ifld and op.
2542 * insn.scm (syntax-make): Fetch string name of syntax element.
2543 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2544 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2545 * mode.scm (mode:c-type): Result is a string.
2546 (mode:enum): Fetch string name of mode.
2547 (-mode-parse): Use stringsym-append to build errtxt.
2548 * model.scm (model:enum): Fetch string name of model.
2549 (-model-parse): Use stringsym-append to build errtxt.
2550 (parse-insn-timing): Must quote empty list.
2551 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2552 (-gen-minsn-opcode-entry): Ditto.
2553 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2555 (read-cpu.opc): Convert current-arch-name to a string before using.
2556 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2557 (<derived-operand>): Must quote empty list.
2558 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2559 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2561 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2562 (-pmacro-sym): Must convert symbols to strings before passing to
2564 (-pmacro-str): Ditto.
2565 (pmacros-init!): Use eval1 instead of eval.
2566 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2567 (keep-isa-atlist?): Ditto.
2568 (cmd-if): Use eval1 instead of eval.
2569 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2570 (-rtl-c-get): Fetch string name of src.
2571 (s-unop): Ditto for mode.
2572 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2573 (-gen-par-temp-defns,subword): Ditto.
2574 (join): Use stringsym-append instead of string-append.
2575 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2576 (rtx-traverse-debug): Fetch string name of rtx-obj.
2577 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2578 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2579 (rtx-pretty-name): Result is a string.
2580 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2581 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2582 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2584 (-gen-sfrag-case): Fetch string name of user.
2585 * sid-model.scm (unit:enum): Fetch string name of unit.
2586 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2587 (<hw-memory>,gen-set-quiet): Ditto.
2588 (gen-mode-defs): Ditto.
2589 (sim-finish!): Convert current-arch-name to a string before using.
2590 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2591 (-gen-no-scache-semantic-fn): Ditto.
2592 (cgen-defs.h): Fetch string name of isa.
2593 (cgen-read.c): Convert current-arch-name to a string before using.
2594 (cgen-write.c): Ditto.
2595 * sim-model.scm (unit:enum): Fetch string name of unit.
2596 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2597 (-gen-model-timing-table): Fetch string name of model.
2598 (-gen-mach-model-table): Ditto.
2599 (-gen-mach-defns): Fetch string name of mach.
2600 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2601 (<hw-memory>,cxmake-get): Fetch string name of mode.
2602 (<hw-memory>,gen-set-quiet): Ditto.
2603 (gen-mode-defs): Ditto.
2604 (sim-finish!): Must quote empty list.
2605 * utils-cgen.scm (<ident>): Must quote empty list.
2606 (obj:str-name): New fn.
2607 (parse-comment): Result is a string.
2608 (parse-symbol): Result is a symbol.
2609 (parse-string): Result is a string.
2610 (keyword-list?): Convert arg to string before calling string-ref.
2611 (keyword-list->arg-list): Ditto.
2612 (gen-attr-name): Convert attr-name to string first.
2613 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2614 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2615 (gen-define-ifmt-ifields): Ditto for fld.
2616 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2618 (gen-file-name): Ditto.
2619 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2620 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2621 (reduce): Call eval1 instead of eval.
2622 * cpu/m32r.cpu (addi): Don't use `#.'.
2624 * gen-all-sim: Fix some typos.
2626 2003-07-08 Doug Evans <dje@sebabeach.org>
2628 * gen-all-doc: Ensure run from cgen src dir.
2629 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2630 * gen-all-sid: Similarily, in ./tmp-sid.
2631 * gen-all-sim: Similarily, in ./tmp-sim.
2633 2003-06-20 Doug Evans <dje@sebabeach.org>
2635 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2637 2003-06-19 Doug Evans <dje@sebabeach.org>
2639 * mach.scm (-ifld-already-defined?): New proc.
2640 (current-ifld-add!): Use it.
2641 (-op-already-defined?): New proc.
2642 (current-op-add!): Use it.
2643 (-insn-already-defined?): New proc.
2644 (current-insn-add!): Use it.
2645 (-minsn-already-defined?): New proc.
2646 (current-minsn-add!): Use it.
2647 (obj-isa-list): New proc.
2648 (isa-supports?): Use it.
2650 2003-06-10 Doug Evans <dje@sebabeach.org>
2652 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2653 * cpu/m32r.cpu (all insns): Ditto.
2655 * mach.scm (current-*-add!): Disallow redefinition. Make result
2658 * gen-all-doc: Split arm and frv docs up a bit.
2660 * cpu/arm.cpu: Add IDOC attribute.
2661 * cpu/frv.cpu: Ditto.
2662 * cpu/i960.cpu: Ditto.
2663 * cpu/openrisc.cpu: Ditto.
2664 * cpu/xstormy16.cpu: Ditto.
2665 * cpu/m32r.cpu: Ditto.
2666 (all insns): Explicitly specify IDOC attribute.
2668 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2669 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2670 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2671 * Makefile.in: Regenerate.
2672 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2673 (-attr-read): Defer computing default value until we know the type.
2674 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2675 (<attr-list>:attr-present?): New method.
2676 (atlist-attr-present?,obj-attr-present?): New fns.
2677 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2678 (attr-builtin!): New insn attr IDOC.
2679 * cgen-doc.scm (doc-arguments): New args -I,-N.
2680 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2681 Support comment as fourth element of enum value.
2682 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2683 * html.scm (gen-html-header): New arg kind, all callers updated.
2684 (gen-table-of-contents): New arg insn-file, all callers updated.
2685 (gen-list-entry,gen-doc-header): New fn.
2686 (get-operands): Delete.
2687 (gen-iformat-table): Rewrite.
2688 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2689 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2690 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2691 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2692 (get-insns-for-category,gen-categories-insn-lists): New fns.
2693 (gen-insn-docs): Simplify each insn's semantics first.
2694 Print insn tables sorted by IDOC categories.
2695 (*insn-html-file-name*): New global.
2696 (cgen-insn.html): New fn.
2698 * insn.scm (<insn>): Create a setter for the `tmp' member.
2699 * semantics.scm (insn-build-known-values): Renamed from
2700 -build-known-values. All callers updated.
2702 * rtl.scm: Move traveral/evaluation support to ...
2703 * rtl-traverse.scm: New file.
2704 * read.scm: Maybe-load rtl-traverse.scm.
2706 * rtl.scm (-rtx-valid-types): Add SETRTX.
2708 * rtx-funcs.scm (nop,parallel): Fix mode.
2710 * utils.scm (eqv-lookup-index): New fn.
2711 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2713 * dev.scm (load-doc): Set APPLICATION.
2715 2003-06-10 Dave Brolley <brolley@redhat.com>
2717 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2718 * sid-decode.scm: Generate #include of config.h into
2719 @prefix@-decode.cxx.
2720 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2722 2003-06-07 Doug Evans <dje@sebabeach.org>
2724 * gen-all-sid: New file.
2725 * gen-all-opcodes: New file.
2727 2003-06-05 Nick Clifton <nickc@redhat.com>
2729 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2730 version of the FRinti operand.
2731 (FRintjeven): Likewise for FRintj.
2732 (FRintkeven): Likewise for FRintk.
2733 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2734 media-quad-arith-sat-semantics, media-quad-arith-sat,
2735 conditional-media-quad-arith-sat, mdunpackh,
2736 media-quad-multiply-semantics, media-quad-multiply,
2737 conditional-media-quad-multiply, media-quad-complex-i,
2738 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2739 conditional-media-quad-multiply-acc, munpackh,
2740 media-quad-multiply-cross-acc-semantics, mdpackh,
2741 media-quad-multiply-cross-acc, mbtoh-semantics,
2742 media-quad-cross-multiply-cross-acc-semantics,
2743 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2744 media-quad-cross-multiply-acc-semantics, cmbtoh,
2745 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2746 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2747 cmhtob): Use new operands.
2748 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2749 (parse_even_register): New function.
2751 2003-06-04 Doug Evans <dje@sebabeach.org>
2753 Better handling of 64 bit and mixed 32/64 bit architectures.
2754 * hardware.scm (hw-update-word-modes!): New fn.
2755 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2756 hw-update-word-modes!.
2757 (state-word-bitsize): Replace FIXME with requested check.
2758 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2759 * mode.scm (mode-find): Ignore INT,UINT.
2760 (-mode-word-sizes-kind): New global.
2761 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2762 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2763 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2765 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2766 unusable, correct values set later.
2767 (mode-finish!): Remove cruft.
2768 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2769 * opcodes.scm (opcodes-init!): Ditto.
2770 * rtx-funcs.scm (annul): Fix mode of pc.
2771 * cpu/ia64.cpu: Remove cruft that sets word modes.
2772 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2774 2003-06-03 Nick Clifton <nickc@redhat.com>
2776 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2777 immediate value not unsigned.
2779 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2781 * cpu/sh.cpu: Amend comments to refer to SuperH.
2782 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2783 * cpu/sh64-media.cpu: Likewise.
2784 (Saturation): Update manual reference.
2786 2003-05-15 Doug Evans <dje@sebabeach.org>
2788 * Makefile.am (srcroot): New var.
2790 * Makefile.in: Regenerate.
2791 * cgen-doc.scm: New file.
2792 * html.scm: New file.
2793 * gen-all-doc: New file.
2794 * dev.scm (cload): Handle DOC application.
2796 * machs.scm (machs-for-cpu): New fn.
2797 * model.scm (models-for-cpu): New fn.
2798 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2800 (iota): Rewrite to be identical to pmacro version. All uses updated.
2801 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2803 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2804 (-gen-decode-bits): Instead put in better fix here.
2806 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2808 2003-05-01 DJ Delorie <dj@redhat.com>
2810 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2812 (set-alignfix-mem): Likewise.
2814 2003-04-16 Dave Brolley <brolley@redhat.com>
2816 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2817 * utils.scm (copyright-fsf): Update generate copyright years.
2818 (copyright-cygnus): Ditto.
2819 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2821 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2823 (<operand>'gen-profile-code): New parameter 'when'.
2824 (<iunit>'gen-profile-code): Ditto.
2825 (<insn>'gen-profile-code): Ditto.
2826 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2827 'insn_reference' for the 'after' function.
2828 * model.scm (unit:enum): Moved to sim-model.scm.
2829 * sim-model.scm (unit:enum): Moved from model.scm.
2830 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2831 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2832 * sid-model.scm (unit:enum): New version for sid.
2833 (gen-model-class-name): New function.
2834 (gen-model-unit-fn-decl): New function.
2835 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2836 (gen-model-unit-fn-name): New parameter 'when'.
2837 (-gen-model-insn-fn-name): Ditto.
2838 (-gen-model-insn-qualified-fn-name): New function.
2839 (-gen-model-insn-fn-decl): New function.
2840 (-gen-model-insn-fn-decls): New function.
2841 (-gen-model-insn-fn): New parameter 'when'. Call
2842 -gen-model-insn-qualified-fn-name.
2843 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2844 functions for modelling insn before and after execution.
2845 (-gen-model-class-decls): New function.
2846 (" (gen-model-class-name model) "): New function.
2847 (gen-model-classes): New function.
2848 (-gen-insn-timing): Generate functions for modelling insn before and after
2850 (-gen-insn-unit-timing): Generate class-qualified names.
2851 (-gen-model-timing-table): Ditto.
2852 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2853 not needed (yet) by sid.
2854 (cgen-model.h): New function.
2856 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2858 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2859 * cpu/sh64-compact.cpu: Likewise.
2860 * cpu/sh64-media.cpu: Likewise.
2862 2003-03-21 DJ Delorie <dj@redhat.com>
2864 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2865 which indicates if the sign flag is set from bit 15 or 7.
2867 (set-psw): New argument ws, propogate it.
2868 (set-psw-nowrite): Likewise.
2869 (set-mem-psw): Likewise.
2870 (set-psw-carry): Likewise. Use temporaries to prevent
2871 prematurely overwriting needed inputs.
2872 (set-psw-rrotate17): Fix logic.
2873 (shrgrgr): Preserve carry for zero-bit shifts.
2874 (shrgrimm): Likewise.
2875 (shlgrgr): Likewise.
2876 (shlgrimm): Likewise.
2877 (asrgrgr): Likewise.
2878 (asrgrimm): Likewise.
2881 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2883 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2885 2002-03-05 DJ Delorie <dj@redhat.com>
2887 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2888 prematurely overwriting needed inputs.
2889 (set-psw-sub): Likewise.
2891 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2893 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2895 2003-02-18 DJ Delorie <dj@redhat.com>
2897 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2898 (movlmemimm): Just mask the address.
2899 (movhmemimm): Likewise.
2900 (movlmemgr): Likewise.
2901 (movhmemgr): Likewise.
2902 (set-psw): Always set the psw last.
2903 (set-psw-carry): Likewise.
2904 (set-psw-add): Likewise.
2905 (set-psw-sub): Likewise.
2907 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2908 of 16 patterns from the set-psw-rotate17 function.
2909 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2910 movgriipostincgr, movgriipredecgr): Set psw correctly.
2911 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2912 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2913 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2915 2003-02-11 Dave Brolley <brolley@redhat.com>
2917 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2918 @arch@_cgen-ifld_table.
2919 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2920 @arch@_cgen-ifld_table.
2922 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2924 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2926 2003-01-09 Graydon Hoare <graydon@redhat.com>
2928 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2931 2003-01-07 Graydon Hoare <graydon@redhat.com>
2933 * utils-gen.scm (attr-int-gen-defn): Define.
2935 2002-12-21 Doug Evans <dje@sebabeach.org>
2937 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2938 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2940 * dev.scm (cload): Update location of .cpu files.
2942 2002-12-19 Doug Evans <dje@sebabeach.org>
2944 * utils-sim.scm (gen-profile-sym): New fn.
2945 (<operand>,sbuf-profile-sym): New method.
2946 (<operand>,sbuf-profile-elm): Use it.
2947 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2948 of hardcoding symbol name.
2949 (<operand>,gen-profile-code): Ditto.
2950 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2953 * mode.scm (mode-sem-mode): New fn.
2954 * operand.scm (op:new-mode): Update. mode-name.
2955 (op-natural-mode?) New fn.
2956 * rtl.scm (hw): Set hw-name,mode-name.
2958 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2960 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2961 as size of IDESC-TABLE-VAR.
2962 (@prefix@_init_idesc_table): Ditto.
2963 * sim-model.scm (-gen-mach-defns): Ditto.
2964 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2966 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2968 * insn.scm (-parse-insn-format-symbol): Improve error message.
2969 (-parse-insn-format): Ditto.
2971 * gen-all-sim: New script.
2973 2002-12-16 DJ Delorie <dj@delorie.com>
2975 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2977 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2979 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2980 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2981 (parse_immediate16): Handle immediate16 values, which now include
2982 @hi(label) and @lo(label)
2984 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2986 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2987 Add braces and cast for union field.
2988 (gen-multi-ifield-nodes): Add braces and cast for union field.
2989 (cgen_operand_table): Similarly fix sentinel.
2990 (cgen_cpu_close): Constify "insns". Formatting.
2991 (cgen-desc.c): Include xregex.h.
2992 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2994 <opc.c>: Include safe-ctype.h.
2995 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2996 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2997 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2998 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2999 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
3000 (parse_addr16): Correct type of "value". Formatting.
3001 (parse_addr16_p): Likewise.
3002 (parse_addr16_cjp): Likewise.
3003 (parse_lit8): Likewise.
3004 (parse_bit3): Formatting.
3005 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
3006 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
3007 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
3009 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
3010 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
3011 (print_dollarhex8): Likewise.
3012 (print_dollarhex16): Likewise.
3013 (print_dollarhex_addr16h): Likewise.
3014 (print_dollarhex_addr16l): Likewise.
3015 (print_dollarhex_p): Likewise.
3016 (print_dollarhex_cj): Likewise.
3017 (print_decimal): Likewise.
3018 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
3020 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
3022 * doc/rtl.texi (Model variants): Mention current limitations for
3023 unit inputs and outputs.
3024 (Hardware elements) <attribute PROFILE>: Be slightly more
3026 (Instructions) <timing>: input/output overrides have a direction
3029 2002-11-25 DJ Delorie <dj@redhat.com>
3031 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
3033 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
3035 * cpu/iq10.cpu: New file.
3036 * cpu/iq2000.cpu: Likewise.
3037 * cpu/iq2000.opc: Likewise.
3038 * cpu/iq2000m.cpu: Likewise.
3040 2002-11-19 DJ Delorie <dj@redhat.com>
3042 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
3044 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
3046 * dev.scm: Call getenv with a string, not a symbol.
3048 2002-10-08 Doug Evans <dje@transmeta.com>
3049 Hans-Peter Nilsson <hp@axis.com>
3051 * types.scm (bitrange-overlap?): Handle lsb0?.
3053 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
3055 From Robert Cragie <rcc@jennic.com>:
3056 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
3058 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
3059 Ben Elliston <bje@redhat.com>
3060 John Healy <jhealy@redhat.com>
3061 Jeff Johnston <jjohnstn@redhat.com>
3062 Alan Lehotsky <alehotsky@redhat.com>
3063 Ubicom Inc. <SupportDesk@ubicom.com>
3065 * cpu/ip2k.cpu: New file.
3066 * cpu/ip2k.opc: Likewise.
3068 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
3070 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
3072 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
3074 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
3075 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
3076 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
3077 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
3078 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
3079 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
3080 (-sthi-byte): If there is a single byte to store, store it at
3082 (sthil, sthiq): Fix big-endian behaviour.
3083 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
3084 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
3085 (saturate): Use Dimode to check if saturation operation is required.
3086 (usaturate): Likewise.
3088 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
3089 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
3090 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
3091 (msadubq): Fix subword index in second operand of first subtraction.
3093 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
3095 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
3098 2002-06-18 Dave Brolley <brolley@redhat.com>
3100 * cpu/frv.cpu: New cpu description.
3101 * cpu/frv.opc: New cpu support code.
3103 2002-05-21 Dave Brolley <brolley@redhat.com>
3105 * decode.scm (-opcode-slots): Don't consider bits beyond the
3108 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
3110 * cpu/powerpc.cpu: New file.
3112 2002-05-01 Graydon Hoare <graydon@redhat.com>
3114 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3116 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
3118 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3119 results are expanded recursively.
3121 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
3123 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3124 call scan-symbol on it, to enable recursive macro-expansion.
3126 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
3128 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3129 for multiple-isa configurations.
3130 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3132 2002-02-04 Ben Elliston <bje@redhat.com>
3134 * cpu/sh.cpu, cpu/sh.opc: New files.
3135 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3137 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
3139 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3140 (Enumerated constants): Mention that an ifield must not specify a
3142 (Instruction operands): Ditto for index.
3143 (Expressions) <parallel>: Remove misplaced mention of local
3145 <if>: Mention that mode must be specified and non-VOID when the
3148 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
3150 * doc/porting.texi: When referring to *.opc, mention they are in
3151 the cpu subdir. Call top-level directory toplevel, not devo.
3152 Close string in define-normal-insn example.
3154 * doc/pmacros.texi: Fix .substr typo to .substring.
3155 Mention that .sym expansions are not further expanded.
3157 2002-01-22 Graydon Hoare <graydon@redhat.com>
3159 * desc-cpu.scm (ifld-number-cache): Add.
3161 (gen-maybe-multi-ifld-of-op): Add.
3162 (gen-maybe-multi-ifld): Add.
3163 (gen-multi-ifield-nodes): Add.
3164 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3166 2002-01-10 matthew green <mrg@redhat.com>
3168 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3169 (gr-Rb-names): ... to this.
3170 (h-Rb): New hardware piece.
3171 (h-Rbj): Use gr-Rb-names.
3173 (holdx): New instruction.
3175 2002-01-07 Ben Elliston <bje@redhat.com>
3177 * utils.scm (package-cygnus-simulators): Rename from this ..
3178 (package-red-hat-simulators): .. to this.
3179 * opcodes.scm (option-set!): Use package-red-hat-simulators.
3180 * sid-cpu.scm (cgen-desc.h): Likewise.
3181 (cgen-cpu.h): Likewise.
3182 (cgen-defs.h): Likewise.
3183 (cgen-write.cxx): Likewise.
3184 (cgen-semantics.cxx): Likewise.
3185 (cgen-sem-switch.cxx): Likewise.
3186 * sid-decode.scm (cgen-decode.h): Likewise.
3187 (cgen-decode.cxx): Likewise.
3188 * sid-model.scm (cgen-model.cxx): Likewise.
3189 * sid.scm (option-set!): Likewise.
3190 * sim.scm (option-set!): Likewise.
3192 2002-01-07 Ben Elliston <bje@redhat.com>
3194 * utils.scm (copyright-fsf): Add 2002.
3195 (copyright-cygnus): Rename to copyright-red-hat.
3196 (copyright-red-hat): Add 2002.
3197 (CURRENT-COPYRIGHT): Update comment.
3198 * opcodes.scm (option-set!): Update callers.
3199 * sid-model.scm (cgen-model.cxx): Likewise.
3200 * sid-cpu.scm: Likewise.
3201 * sid-decode.scm: Likewise.
3202 * sid.scm (option-set!): Handle "redhat" as an option for
3203 "copyright"; use copyright-red-hat.
3204 * sim.scm (option-set!): Likewise.
3206 2002-01-03 Dave Brolley <brolley@redhat.com>
3208 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3209 number of insns in the list. Update the population count function to
3210 identify and prioritize 3 catgories of useful bits.
3211 (-population-top-few): Don't consider bits with a population count of
3213 (-build-decode-table-entry): Don't call
3214 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
3215 identical insns at the next tree level.
3216 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3217 this function is no longer used.
3218 (filter-non-specialized-ambiguous-insns): New function.
3219 (filter-identical-ambiguous-insns): New function.
3220 (find-identical-insn): New function.
3221 (filter-harmlessly-ambiguous-insns): Removed.
3223 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
3224 matthew green <mrg@redhat.com>
3225 Frank Ch. Eigler <fche@redhat.com>
3226 Nick Clifton <nickc@cambridge.redhat.com>
3228 * cpu/xstormy16.cpu: New file.
3229 * cpu/xstormy16.opc: New file.
3231 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
3233 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3235 2001-11-14 Dave Brolley <brolley@redhat.com>
3237 * utils-gen.scm (-gen-extract-word): Correct computation of the length
3238 of the field being extracted.
3240 2001-10-29 Johan Rydberg <johan@rydberg.com>
3242 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3243 (cos ...) and (sin ..) rtx.
3245 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
3247 * desc-cpu.scm: Do not include ctype.h in generated desc
3248 files. They will inherit safe-ctype.h instead.
3250 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
3252 * desc-cpu.scm: Add missing function prototypes (for generated
3253 C files). Fix compile time warning messages about unused
3254 parameters (for generated C files).
3255 * opc-asmdis.scm: The same.
3256 * opc-ibld.c: The same.
3257 * opc-itab.scm: The same.
3258 * cpu/fr30.opc: The same.
3259 * cpu/m32r.opc: The same.
3260 * cpu/openrisc.opc: The same.
3262 2001-09-17 graydon hoare <graydon@redhat.com>
3264 * insn.scm (syntax-break-out): Correct logic in handling escaped
3267 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
3269 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3270 call @arch@_cgen_build_insn_regex now that regex support is in
3273 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
3275 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3276 (mask-superset?): Look for strict supersets to allow rejection of
3279 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3281 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3282 (cgen-desc.h): Call it.
3283 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3285 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3286 entire_insn for extraction, if it's shorter than base-insn-bitsize.
3288 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3290 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3291 mach->cpu insn-chunk-bitsize.
3292 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3293 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3294 * mach.scm (<cpu>): New field insn-chunk-bitsize.
3295 (-cpu-parse, -cpu-read): Parse/initialize it.
3296 * doc/rtl.texi (define-cpu): Document it.
3298 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
3300 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3302 2001-07-06 Ben Elliston <bje@redhat.com>
3304 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3306 2001-07-05 Ben Elliston <bje@redhat.com>
3310 * read.scm (include): Include files from srcdir/cpu.
3311 (-cgen): Likewise for loading .cpu files.
3312 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3313 * *.cpu: Move all cpu descriptions into cpu subdirectory.
3315 * simplify.inc: Likewise.
3317 2001-07-04 Ben Elliston <bje@redhat.com>
3319 * read.scm (include): Log "Including file" message at level 1,
3320 rather than outputting it with (display).
3321 (cpu-load): Log "Loading cpu description" and "Processing cpu
3322 description" messages at levels 1 and 2, respectively, rather than
3325 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
3327 * desc.scm (<keyword> 'gen-defn): Add extra zero into
3328 CGEN_KEYWORD_ENTRY initializers.
3330 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3331 (<operand> 'test-data): Involve both the index and the hardware
3332 in testcase generation.
3333 (<hw-indx> 'test-data): Generate test data from the underlying
3335 (<ifield> 'test-data): Generate test data by computing bit
3336 patterns for the field, then decoding them.
3337 (<hw-address> 'test-data): Allow for new calling convention.
3338 (<hw-iaddress> 'test-data): Likewise.
3339 (<keyword> 'test-data): Convert index values into keywords.
3340 (<hw-asm> 'test-data): Convert index values into integer strings.
3342 * gas-test.scm (cgen-build.sh): Escape '.' as well.
3344 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
3346 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3347 is required for multi-mode hw types (memory).
3349 2001-05-11 Ben Elliston <bje@redhat.com>
3351 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3352 when generating allinsn.d from objdump output. Without it, the
3353 testsuite will treat $ as the regular expression for end of line.
3355 2001-05-09 Ben Elliston <bje@redhat.com>
3357 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3358 with `cgen_cpu_open'; documentation had become out of date.
3359 * doc/rtl.texi (Instruction operands): Likewise.
3361 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3363 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3364 various-base-length instruction sets.
3366 2001-04-02 Ben Elliston <bje@redhat.com>
3368 * sid-cpu.scm (-last-insn): New function.
3369 (-gen-sem-switch-engine): Loop through idesc while less than or
3370 equal to the last instruction enum, not less than the MAX enum.
3371 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3372 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3373 table's size to be the last instruction enum plus one, not
3375 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3376 instruction onto the instruction list.
3378 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3379 using the size of the table and its elements.
3380 (-gen-decode-insn-globals): Define the idesc table's size to be
3381 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3382 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3383 last instruction enum plus one, not @CPU@_INSN_MAX.
3385 2001-03-28 Ben Elliston <bje@redhat.com>
3387 * doc/version.texi (UPDATED, EDITION): Update.
3388 * doc/stamp-vti: Likewise.
3390 2001-03-26 Ben Elliston <bje@redhat.com>
3392 * doc/credits.texi (Credits): Update.
3394 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3395 specified prefix and, if necessary, escape `$' in gas-build.sh to
3396 prevent unwanted shell variable expansion.
3398 2001-03-24 Ben Elliston <bje@redhat.com>
3400 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3401 (<keyword>,test-data): Likewise.
3402 (<hw-address>,test-data): Likewise.
3403 (<hw-iaddress>,test-data): Likewise.
3404 (-collate-test-set): New function.
3405 (build-test-set): Use it.
3406 (gen-gas-test): Generate five test cases per instruction.
3407 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3409 * read.scm: Load "slib/random" if random is not defined.
3410 * slib/random.scm: New file.
3412 * utils.scm: Remove comments about the Hobbit compiler.
3413 (copyright-cygnus): Add 2001.
3414 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3415 (package-gnu-simulators): Tidy.
3417 2001-03-23 Ben Elliston <bje@redhat.com>
3419 * cgen-gas.scm: Inline documentation improvements.
3421 2001-03-21 Ben Elliston <bje@redhat.com>
3423 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3424 given in a syntax string is undefined.
3426 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3427 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3429 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3431 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3432 for arg_type CGEN_CPU_OPEN_BFDMACH.
3434 2001-03-20 Ben Elliston <bje@redhat.com>
3436 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3437 instruction onto the instruction list. Define MAX_INSNS to be the
3438 value of the last instruction enum plus one.
3440 2001-03-14 Nick Clifton <nickc@redhat.com>
3442 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3444 2001-03-05 Dave Brolley <brolley@redhat.com>
3446 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3447 if the number of ifields is greater than zero.
3449 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3451 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3452 Emit LIKELY/UNLIKELY branch probability hints.
3453 * sid-decode.cpu (-gen-record-args): Ditto.
3455 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3457 * desc-cpu.scm (-gen-hash-defines): Rename
3458 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3460 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3462 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3464 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3465 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3467 * sid.scm (<operand> gen-write): Use unsigned long long expression
3469 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3470 (<unit> gen-profile-code): Ditto.
3472 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3474 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3477 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3479 * operand.scm (<operand> pretty-sem-name): New field.
3480 (<operand> make): Initialize it from hw-name.
3481 (op:set-pretty-sem-name!): New function.
3482 (<operand> gen-pretty-name): Default to fetching new field.
3483 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3484 sem-name setting from -rtx-hw-name.
3486 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3488 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3489 its subsequent gen-pretty-name.
3491 * read.scm: Increase thread working stack limit and backtrace
3494 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3496 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3498 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3500 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3501 current insn plus 4.
3502 (h-delay-insn): New hardware register.
3503 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3507 * openrisc.opc (parse_hi16): Sign extend value.
3508 (parse_lo16): Likewise.
3510 2001-01-06 Ben Elliston <bje@redhat.com>
3512 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3513 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3514 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3515 (-gen-semantic-fn-table): Likewise.
3516 (-gen-scache-semantic-fn): Likewise.
3517 (-gen-no-scache-semantic-fn): Likewise.
3518 (cgen-read.c): Likewise.
3519 (cgen-sem-switch.c): Likewise.
3520 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3521 is a filename prefix.
3522 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3523 (-gen-decode-insn-globals): Likewise.
3524 (-gen-idesc-decls): Likewise.
3525 (cgen-decode.h): Likewise.
3526 (cgen-decode.c): Likewise.
3527 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3528 (gen-cpu-insn-enum): Likewise.
3529 (sim-finish!): Likewise.
3531 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3533 * openrisc.cpu: New file.
3534 * openrisc.opc: Likewise.
3536 2000-12-12 Ben Elliston <bje@redhat.com>
3538 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3540 2000-12-07 Ben Elliston <bje@redhat.com>
3542 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3543 "insn" when there are zero ifields to extract.
3545 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3547 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3548 used by simple/non-scache simulators.
3549 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3550 regardless of with-scache?.
3551 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3553 2000-12-03 Ben Elliston <bje@redhat.com>
3555 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3556 (cgen-desc.c): Likewise.
3558 2000-12-01 Greg McGary <greg@mcgary.org>
3560 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3562 2000-12-01 Ben Elliston <bje@redhat.com>
3564 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3565 definitions if run without with-multipla-isa?.
3566 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3567 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3569 2000-11-24 Ben Elliston <bje@redhat.com>
3571 * sim-cpu.scm (-gen-hardware-struct): New function.
3572 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3573 hardware elements wich have share one or more ISAs with the ISAs
3576 * sim.scm (-with-multiple-isa?): New symbol.
3577 (with-multiple-isa?): New function.
3578 (option-init!): Initialise -with-multiple-isa?.
3579 (option-set!): Handle with-multiple-isa option.
3581 2000-11-21 Ben Elliston <bje@redhat.com>
3583 * utils.scm (copyright-fsf): Add the year 2000.
3585 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3587 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3588 unneeded "\n\n" from F() macro definition.
3590 2000-11-15 Greg McGary <greg@mcgary.org>
3592 * utils-cgen.scm (gen-define-with-symcat): New function.
3593 * desc-cpu.scm (gen-ifld-defns): Use it.
3594 (gen-hw-table-defns): Use it.
3595 (-gen-hash-defines): Use it.
3596 (gen-operand-table): Use it.
3597 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3598 * opc-itab.scm (-gen-ifmt-table): Use it.
3599 (-gen-insn-opcode-table): Use it.
3600 (-gen-macro-insn-table): Use it.
3601 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3602 * sim-cpu.scm (cgen-semantics.c): Use it.
3603 (cgen-sem-switch.c): Use it.
3605 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3607 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3608 request to emit calls to insn extractors as functions rather than
3609 branches to inline blocks.
3610 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3611 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3613 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3614 to extractor clauses.
3616 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3618 * decode.scm (-distinguishing-bit-population): Significantly
3619 improve popularity heuristic. Renamed from
3620 (-mask-bit-population): Gone.
3621 (-population-above-threshold): Sort new bit numbers in order of
3623 (-population-top-few): Allow up to three more bits to be selected
3624 than requested. Correct selection order to prefer better bits.
3625 Correct bug in fewer-than-requested case. Keep threshold as
3627 (decode-best-get-bits): Pass also the insn-values.
3629 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3630 future optimization.
3632 * utils.scm (message): Format nested lists better.
3634 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3636 * dev.scm: Add srcdir to %load-path.
3638 * rtx-funcs.scm (subword): Mode of argument can be different
3639 than mode of result, so don't use OP0 to specify argument's mode.
3641 2000-11-02 Ben Elliston <bje@redhat.com>
3643 * doc/porting.texi (Building a GAS test suite): Document my change
3646 2000-11-01 Ben Elliston <bje@redhat.com>
3648 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3650 2000-10-31 Ben Elliston <bje@redhat.com>
3652 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3653 with no command line arguments if the gas build directory can be
3656 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3658 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3659 op-ifld -> op-ifield.
3661 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3663 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3665 2000-10-13 matthew green <mrg@cygnus.com>
3667 * utils-cgen.scm (get-ifetch): Move from here ...
3668 * sim.scm (get-ifetch): ... to here.
3669 * sid.scm (get-ifetch): Copy and port to c++.
3671 2000-10-06 Dave Brolley <brolley@redhat.com>
3673 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3674 ifld-start + ifld-word-offset.
3675 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3676 the field is beyond the base number of bits.
3677 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3678 (gen-extract-ifields): Ditto.
3679 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3680 characters in the regular expression.
3682 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3684 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3685 preprocessor constant.
3687 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3689 * slib/logical.scm: New file from slib. Provides robust bitwise
3690 logical operations for large integers.
3691 * read.scm: maybe-load it.
3693 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3695 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3696 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3697 single-isa predicate, but support keep-isa filtering.
3699 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3701 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3702 statement-expression and comma-expression contexts.
3703 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3705 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3707 * decode.scm (-population-top-few): Signal error gracefully if
3708 decoding is about to become ambiguous.
3710 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3712 * doc/rtl.texi (decode-assist): Describe this field as optional.
3714 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3716 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3719 2000-09-05 Dave Brolley <brolley@redhat.com>
3721 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3722 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3724 2000-08-29 Dave Brolley <brolley@redhat.com>
3726 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3727 adata-integral-insn is true for this architecture.
3729 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3731 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3732 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3733 * rtl-c.scm (-c-rtl-get): Improve an error message.
3734 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3736 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3738 * Makefile.in (DIST_COMMON): Regenerated.
3739 * ifield.scm (<derived-ifield> needed-iflds): New method.
3740 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3741 sfmts built from <derived-ifield>s.
3742 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3743 type symbol 'derived-ifield, not an unparseable string.
3744 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3745 (-sfmt-contents): Add tracing.
3747 From Doug Evans <dje@transmeta.com>:
3748 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3751 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3753 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3754 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3755 (-rtl-c-get): Rename from rtl-c-get.
3756 (rtl-c-get): New fn for getter logging.
3758 2000-07-28 Ben Elliston <bje@redhat.com>
3762 2000-07-25 Ben Elliston <bje@redhat.com>
3764 * doc/credits.texi (Credits): Add Frank Eigler.
3766 2000-07-24 Dave Brolley <brolley@redhat.com>
3768 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3770 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3771 (<keyword>): Initialize all elements fully.
3772 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3774 (-gen-mach-table-defns): Ditto.
3775 (-gen-ifld-defns): Ditto.
3776 (-gen-operand-table): Ditto.
3777 (-gen-insn-table): Ditto.
3778 (-gen-cpu-open): Nothing to do for the mach table.
3780 2000-07-13 Ben Elliston <bje@redhat.com>
3782 * doc/version.texi (UPDATED): Update.
3784 2000-07-05 Ben Elliston <bje@redhat.com>
3786 * configure.in (AC_PATH_PROG): Remove.
3787 * configure: Regenerate.
3788 * Makefile.am (GUILE): Locate guile dynamically.
3789 * Makefile.in: Regenerate.
3790 * doc/Makefile.in: Likewise.
3792 2000-07-03 Ben Elliston <bje@redhat.com>
3794 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3795 * opc-itab.scm (cgen-opc.c): Likewise.
3797 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3799 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3800 guile 1.4 compatibility.
3801 (rtx-env-dump): Comment out buggy display calls.
3803 2000-06-15 matthew green <mrg@redhat.com>
3805 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3807 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3809 * Makefile.in: Regenerated.
3811 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3812 (gen-ifld-defns): Ditto.
3813 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3814 * rtl.c (rtl-finish!): Ditto.
3815 * opc-itab.scm (-gen-ifield-decls): Ditto.
3816 * opcodes.scm (gen-switch): Exclude derived operands.
3817 * operand.scm (op-iflds-used): Expand derived operands.
3818 (hw-index-derived): New dummy function to create dummy object.
3819 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3820 constructor. Set object's hw-name and index fields.
3821 (-anyof-merge-subchoices): Set instance object's index also.
3822 (-anyof-name): New helper function.
3823 (anyof-merge-semantics): Correct replacement of operand names in
3825 (op-ifield): Tolerate derived-operands and their funny indices better.
3826 * ifield.scm (ifld-known-values): Expand derived ifields.
3827 (non-multi-ifields, non-derived-ifields): New utility functions.
3828 (ifld-decode-mode): Tolerate objects with unbound decode field.
3829 * iformat.scm (compute-insn-length): Expand derived ifields.
3830 (compute-insn-base-mask): Ditto.
3831 * insn.scm (insn-base-ifields): Remove.
3832 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3833 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3834 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3835 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3836 (-frag-test-data): Ditto.
3837 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3838 (-gen-sem-switch-engine); Ditto.
3839 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3840 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3841 (-gen-record-args): Tolerate unbound op-ifield.
3842 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3843 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3844 Exclude multi-insns.
3845 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3846 * utils-sim.scm (op-extract?): Handle derived operands.
3848 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3849 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3850 * hardware.scm (hardware-for-mode): New function.
3852 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3853 cleaning up decode tables.
3854 (mask-superset?): Little helper function for above.
3855 * decode.scm (-build-decode-table-entry): Call it.
3856 (-opcode-slots): Add some more tracing.
3857 * arm.cpu: Disable decode-splits construct due to implementation
3858 conflict with `filter-harmlessly-ambiguous-insns'
3860 * decode.scm (-population-top-few): New function for better decode
3861 bit generation. Includes minor helper functions.
3862 (decode-get-best-bits): Call it instead.
3863 (OLDdecode-get-best-bits): Renamed previous version of above.
3866 2000-06-13 Ben Elliston <bje@redhat.com>
3868 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3869 for the Guile library directory.
3870 * configure: Regenerate.
3871 * Makefile.in, doc/Makefile.in: Regenerate.
3873 * Makefile.in, doc/Makefile.in: Regenerate.
3874 * configure.in: Remove unnecessary tests. Move to version 1.0.
3875 * acconfig.h, config.in: Remove.
3876 * configure, aclocal.m4: Regenerate.
3877 * doc/stamp-vti, doc/version.texi: Likewise.
3878 * AUTHORS: New file.
3880 2000-06-07 Ben Elliston <bje@redhat.com>
3882 * fixup.scm (symbol-bound?): Reduce debugging output.
3884 2000-06-02 matthew green <mrg@redhat.com>
3886 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3887 a given instruction, replacing derived fields with their subfields.
3888 (insn-value): Use `insn-base-ifields' to find all constant values.
3889 (multi-insn-instantiate!): Comment some debug messages.
3891 2000-06-01 Ben Elliston <bje@redhat.com>
3893 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3894 symbol names used in a (c-call ..) rtx.
3896 * sim-test.scm (build-test-set): Return (()) for an instruction
3897 with no operands, so it too is included in the generated test set.
3899 2000-05-31 Ben Elliston <bje@redhat.com>
3901 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3902 (sim-test): Likewise.
3903 * Makefile.in: Regenerate.
3905 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3907 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3908 stack traceback, in an order that resembles gdb's `bt'.
3910 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3912 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3913 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3914 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3916 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3918 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3919 * iformat.scm (ifmt-expanded-ifields): Gone.
3920 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3922 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3925 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3928 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3930 * sid.scm (with-any-profile?): New function clone.
3932 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3934 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3936 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3938 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3939 (-multi-ifield-read): Parse them.
3940 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3941 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3942 (multi-ifield gen-extract): Add decode hook.
3943 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3945 * insn.scm (syntax-break-out): More correctly handle \-escaped
3947 (syntax-make-elements): Ditto.
3948 * opc-itab.scm (compute-syntax): Ditto.
3950 2000-05-17 Ben Elliston <bje@redhat.com>
3952 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3954 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3956 * gas-test.scm (build-test-set): Return (()) for an instruction
3957 with no operands, so it too is included in the generated test set.
3959 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3961 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3962 IFMT_OPERANDS and SYNTAX_BYTES.
3964 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3966 * sim.scm (with-any-profile?): New function.
3967 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3968 to decide whether or not to include profiling counters.
3970 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3972 Fuller derived-operand support for opcodes.
3973 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3974 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3975 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3976 (gen-operand-table): Omit derived- and anyof- operands from table.
3977 (gen-insn-table): Omit multi-insns from table.
3978 * iformat.scm (ifmt-expanded-fields): New function to expand
3979 subfields of derived-ifields.
3980 (ifmt-compute!): Ignore remaining multi-insns.
3981 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3983 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3984 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3985 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3986 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3987 (gen-switch): Omit anyof-operands.
3988 * operand.scm (-anyof-syntax): New function.
3989 (-anyof-merge-syntax): Call it.
3990 * utils.scm (collect): New idiomatic function.
3992 2000-05-10 Ben Elliston <bje@redhat.com>
3994 * m68k.cpu: New file (work in progress).
3996 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3998 * Makefile.am (all-local): New target. Create stamp-cgen.
3999 * Makefile.in: Regenerated.
4000 * doc/Makefile.in: Regenerated.
4002 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
4004 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
4005 (-operand-parse-setter): Ditto.
4006 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
4007 for CACHE-ADDR operands.
4008 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
4009 trace entries. Widen byte-wide values for printing.
4010 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
4011 Widen byte-wide values for printing. Hexify memory addresses.
4013 2000-04-23 matthew green <mrg@redhat.com>
4015 * m32r.cpu: Fix a typo.
4017 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
4019 * ia64.cpu (define-model): Change merced to Itanium.
4020 (f-qp): Change quilifying to qualifying.
4021 (movbr_ph, movbr_pvec): Delete.
4022 (I-I21): Delete uses of movbr_ph and movbr_pvec.
4024 2000-04-07 Ben Elliston <bje@redhat.com>
4026 * doc/porting.texi (Building a simulator test suite): Clarify
4027 where generated test cases are placed.
4029 2000-04-07 Ben Elliston <bje@redhat.com>
4031 * Makefile.am (gas-test): Remove dependency on `cgen'.
4033 * Makefile.in: Regenerate.
4035 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
4037 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
4038 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
4039 type reconfiguration.
4040 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
4043 2000-03-30 Ben Elliston <bje@redhat.com>
4045 * doc/rtl.texi (Enumerated constants): Add concept index entries.
4047 2000-03-24 Ben Elliston <bje@redhat.com>
4049 * Makefile.am (stamp-cgen): Reinstate target.
4050 * Makefile.in: Regenerate.
4052 2000-03-22 Ben Elliston <bje@redhat.com>
4054 * slib/ppfile.scm: Remove; unused.
4055 * slib/defmacex.scm: Likewise.
4057 2000-03-21 Ben Elliston <bje@redhat.com>
4059 * doc/internals.texi (Source file overview): Document.
4061 * Makefile.am (GUILEDIR): Remove.
4062 (CGEN): Ditto. Callers use $(GUILE) instead.
4063 (GUILEFLAGS): Ditto.
4065 (APPDESCFILES): Ditto.
4066 (OPCODESFILES): Ditto.
4068 (pkgdata_SCRIPTS): Ditto.
4069 (stamp-cgen): Remove target.
4070 * Makefile.in: Regenerate.
4072 * configure.in: Remove header and library tests.
4073 * configure: Regenerate.
4074 * config.in: Likewise.
4076 2000-03-20 Ben Elliston <bje@redhat.com>
4078 * read.scm: Cease loading "hob-sup.scm".
4079 * utils.scm: Inherit the fastcall family of procedures (for now).
4080 * hob-sup.scm: Remove.
4082 2000-03-20 Ben Elliston <bje@redhat.com>
4084 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
4085 * configure: Regenerate.
4086 * gdbinit.in: Remove.
4088 2000-03-17 Ben Elliston <bje@redhat.com>
4090 * Makefile.am (CGEN): Use guile, not cgen.
4091 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
4092 (bin_PROGRAMS, cgen_SOURCES): Likewise.
4093 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
4094 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
4095 (HOB_OBJS): Likewise.
4096 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
4097 (CGENOBJS): Likewise.
4098 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
4099 (hobbit, hobbit.o, hobbit.c): Remove targets.
4100 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
4101 (CLEANFILES): Update.
4102 * acconfig.h (WITH_HOBBIT): Remove.
4103 * configure.in: Do not test for 3 arg scm_make_vector. Remove
4104 option --with-cgen-hobbit.
4105 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
4106 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
4107 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
4108 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
4109 * Makefile.in: Regenerate.
4110 * config.in: Likewise.
4111 * aclocal.m4: Likewise.
4112 * configure: Likewise.
4113 * README (Hobbit support): Remove.
4114 * doc/internals.texi (Conventions): Do not mention Hobbit.
4115 * doc/porting.texi (Supported Guile versions): Likewise.
4117 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
4119 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4120 callback convention to new sid sidutil::basic_cpu code.
4121 (-gen-sfrag-engine-fn): Ditto.
4122 * sid.scm (-create-virtual-insns!): Ditto.
4123 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4125 (cxmake-skip): Implement properly for pbb mode.
4127 2000-03-03 Ben Elliston <bje@redhat.com>
4129 * doc/internals.texi: New file.
4131 2000-02-29 Ben Elliston <bje@redhat.com>
4133 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4134 * doc/porting.texi: Formatting tweaks.
4136 2000-02-25 Nick Clifton <nickc@cygnus.com>
4138 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4141 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
4143 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4146 2000-02-23 Andrew Haley <aph@cygnus.com>
4148 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4151 2000-02-24 Ben Elliston <bje@redhat.com>
4153 * doc/rtl.texi (Derived operands): Add some cindex entries.
4155 2000-02-23 Ben Elliston <bje@redhat.com>
4157 * ia32.cpu (dndo): Move general purpose macro from here ..
4158 * simplify.inc (dndo): .. to here.
4160 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
4162 * arm.cpu (h-tbit): Add c-call setter function.
4165 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
4167 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4168 (-frag-cost-compute!): Ditto.
4169 * utils.scm (copyright-cygnus): Add Y2K.
4170 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4172 2000-01-25 Nick Clifton <nickc@cygnus.com>
4174 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4175 flags field of the CGEN_CPU_TABLE structure.
4177 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
4179 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4180 All references updated.
4182 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
4184 * ia32.cpu: Rewrite addressing mode support.
4186 * ifield.scm (<ifield>): New member `follows'.
4187 (ifld-known-values): New proc.
4188 (<ifield>): New method set-word-offset!.
4189 (ifld-set-word-offset!): New proc.
4190 (ifld-new-word-offset): New proc.
4191 (<ifield>): New method next-word.
4192 (<multi-ifield>): New method next-word.
4193 (ifld-next-word): New proc.
4194 (ifld-precedes?): New proc.
4195 (-ifield-parse): New args word-offset,word-length,follows.
4196 All callers updated. Handle CISC-style vs RISC-style ifields.
4197 (-ifield-read): Recognize word-offset,word-length,follows specs.
4198 (-ifld-parse-follows): New proc.
4199 (-multi-ifield-make-default-insert): New proc.
4200 (-multi-ifield-make-default-extract): New proc.
4201 (-multi-ifield-parse): Provide default values for insert,extract
4202 handlers if not specified.
4203 (<derived-ifield>): New class.
4204 (derived-ifield?): New predicate.
4205 (ifld-derived-operand?): New predicate.
4206 (f-anyof): New global.
4207 (ifld-anyof?,ifld-anyof-operand?): New predicates.
4208 (f-derived,ifld-derived?): Delete.
4209 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
4210 * insn.scm (-sub-insn-ifields): New proc.
4211 (-sub-insn-make!): New proc.
4212 (multi-insn-instantiate!): Provide initial implementation.
4213 (-insn-parse): If insn contains "anyof" operands, create a
4214 <multi-insn> object instead of a plain <insn>.
4215 (-parse-insn-format-symbol): Rewrite derived operand handling.
4216 Add anyof operand handling.
4217 (-parse-insn-format-ifield-spec): Rewrite.
4218 (-parse-insn-format-operand-spec): Delete.
4219 (-parse-insn-format-list): Delete support for `(operand value)'.
4220 (anyof-operand-format?): Replaces derived-operand-format?.
4221 * operand.scm (-operand-parse-getter): Improve error messages.
4222 (-operand-parse-setter): Ditto.
4223 (<derived-operand>): New members args,syntax,base-ifield,encoding,
4225 (<anyof-operand>): Change baseclass from <derived-operand> to
4226 <operand>. Delete member values. New members base-ifield,choices.
4227 (anyof-operand?): New predicate.
4228 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4229 (-derived-operand-parse): Rewrite.
4230 (-derived-operand-read): Rewrite.
4231 (-anyof-parse-choice): New proc.
4232 (-anyof-operand-parse): Rewrite.
4233 (-anyof-operand-read,define-anyof-operand): New procs.
4234 (<anyof-value>): Rewrite.
4235 (-anyof-initial-known): New proc.
4236 (anyof-satisfies-assertions?): New proc.
4237 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4238 (-anyof-merge-getter,-anyof-merge-setter): New procs.
4239 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4240 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4241 (-anyof-value-from-derived): New proc.
4242 (-anyof-all-choices-1,anyof-all-choices): New procs.
4243 (operand-init!): Create define-anyof-operand reader command.
4245 * insn (syntax-break-out): Take syntax as argument instead of insn.
4246 All callers updated.
4247 (syntax-make): Move here, from ???.
4249 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4250 bitrange-foo. All uses updated.
4251 (bitrange-next-word): New proc.
4253 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4255 * rtl.scm (rtx-canonicalize): Provide initial implementation.
4256 (rtx-make-const,rtx-make-enum): New procs.
4257 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
4258 (rtx-mem-addr,rtx-mem-sel): New procs.
4259 (rtx-change-address): New proc.
4260 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4261 (rtx-make-set,rtx-single-set?): New procs.
4262 (rtx-combine): New proc.
4264 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
4265 (rtx-traverse-with-locals): Ditto.
4266 (-rtx-traverse,-rtx-traverse-*): Ditto.
4268 * rtl.scm (define-subr): New proc.
4269 (rtl-init!): Create reader command `define-subr'.
4271 * cos.c (_object_mi_p): Ensure argument is an object.
4272 (indent): New function.
4273 (_object_print_elms): Add pretty-printing support.
4274 (_object_print): Ditto.
4276 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4277 (*floats-s->c-fun-table*): Ditto.
4278 * hobbit.c,hobbit.h: Rebuild.
4279 * hob-sup.c (fastcall7): New proc.
4280 * hob-sup.h (fastcall7): Declare.
4281 * hob-sup.scm (fastcall7): New macro.
4283 * mach.scm (<arch>): New member subr-list.
4284 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4285 (arch-finish!): Reverse recorded subr list.
4287 * read.scm (debug-env): New global.
4288 (debug-var-names,debug-var,debug-repl-env): New procs.
4289 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
4290 (debug-quit): Renamed from `continue'.
4292 * simplify.inc (dsmf): New pmacro.
4294 * utils.scm (plus-scan): New proc.
4295 (split-bits): Rewrite.
4296 (split-value): New proc.
4298 1999-10-13 Doug Evans <devans@casey.cygnus.com>
4300 * doc/Makefile.am (DOCFILES): Add notes.texi.
4301 * doc/Makefile.in: Rebuild.
4303 1999-10-11 Doug Evans <devans@casey.cygnus.com>
4305 * ifield.scm (ifld-derived?): New proc.
4306 (f-derived): New global.
4307 (ifield-builtin!): Create ifield f-derived.
4308 (<multi-insn>): New class.
4309 (multi-insn?): New predicate.
4310 (multi-insn-instantiate!): New proc.
4311 (-insn-parse): Create <multi-insn> objects for insns with derived
4313 (-parse-insn-format-symbol): Handle derived ifields.
4314 (-parse-insn-format-ifield-spec): New proc.
4315 (-parse-insn-format-operand-spec): New proc.
4316 (-parse-insn-format-list): Simplify.
4317 (-parse-insn-format): No longer allow (ifield-object value) spec.
4318 (derived-operand-format?): New proc.
4319 (insn-alias?): New proc.
4320 (non-alias-insns): Rewrite.
4321 (insn-real?): Renamed from real-insn?, all callers updated.
4322 (virutal-insns): Rewrite.
4323 (multi-insns): New proc.
4324 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4325 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4326 Return #f if operand doesn't have an index or if index is not an
4328 (hw-index-anyof): New proc.
4329 (-operand-parse): Allow integer indices.
4330 (<derived-operand>): New class.
4331 (derived-operand?): New predicate.
4332 (<anyof-operand>): New class.
4333 (<anyof-value>): New class.
4334 (-anyof-parse-value,-anyof-operand-parse): New procs.
4335 (-derived-operand-parse,-derived-operand-read): New procs.
4336 (define-derived-operand,define-full-derived-operand): New procs.
4337 (operand-init!): New reader command define-derived-operand.
4339 * utils.scm (list-take): Handle negative amount.
4340 (element?): Rewrite.
4342 1999-10-10 Doug Evans <devans@casey.cygnus.com>
4344 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4346 1999-10-04 Richard Henderson <rth@cygnus.com>
4348 * ia64.cpu: Checkpoint.
4350 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4352 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4354 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4355 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4357 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4359 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4360 PC returned by sim_engine_invalid_insn.
4362 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4364 * ia32.cpu: New file.
4366 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4368 * utils.scm (bit-set?): Fix off by one error.
4370 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4372 * rtl.scm (hw): Check for valid hardware element before trying to
4375 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4376 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4377 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4378 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4379 compute_operand2_foo.
4381 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4382 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4383 Call delayed_branch/branch methods instead of assigning to `vpc'.
4384 (<hw-pc>,cxmake-skip): Call skip method.
4385 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4386 (<pc>,cxmake-skip): Ditto.
4387 (-create-virtual-insns!): Ditto.
4388 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4390 (op:record-profile): Specify #:output-language "c++".
4391 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4393 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4395 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4396 (gen-semantic-code): Ditto.
4397 (-gen-sem-case,-gen-sfrag-code): Ditto.
4398 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4399 (cgen-cpu.h): File is now #included by main cpu class, rather than
4401 (cgen-defs.h): New proc.
4402 (-gen-scache-semantic-fn): Change result type to sem_status.
4403 New local `status'. Call done_cti_insn/done_insn method at end.
4404 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4406 (cgen-sem-switch.cxx): Ditto.
4407 * sid-decode.scm (-gen-idesc-decls): Update return type of
4409 (cgen-decode.h): Add using namespace @arch@.
4410 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4412 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4413 (estate-output-language-c?,estate-output-language-c++?): New procs.
4414 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4415 (estate-make-for-normal-rtl-c++): New proc.
4416 (rtl-c++-parsed,rtl-c++): New proc.
4417 (s-c-call): Invoke cpu class method if c++.
4418 (join): Use s-c-raw-call.
4420 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4423 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4424 * rtl.scm (<eval-state>): New member `modifiers'.
4425 (<eval-state>,vmake!): Handle #:modifiers.
4426 (estate-with-modifiers): New proc.
4428 * rtl.scm (rtx-side-effects?): New proc.
4429 (rtx-canonical-bool): Don't change expr if it has side effects.
4430 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4433 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4435 * sim.scm (gen-scache-type): Fix typo in last patch.
4437 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4439 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4441 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4443 * sid.scm (<hw-pc>,cxmake-skip): New method.
4444 (<pc>,cxmake-skip): New method.
4446 * decode.scm (decode-build-table): Delete args startbit,index-list.
4447 All callers updated.
4448 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4449 All callers updated.
4450 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4451 to decode-get-best-bits.
4452 * sid-decode.scm (-gen-decode-fn): Ditto.
4454 * hardware.scm (hw-bits): New proc.
4455 (-hw-parse): New arg layout. All callers updated.
4456 (define-full-hardware): New arg layout. All callers updated.
4457 (-hw-validate-layout): New proc.
4458 (-hw-create-[gs]etter-from-layout): New procs.
4459 (<hw-register>,parse!): Handle layout spec.
4460 * types.scm (type-bits): New proc.
4462 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4463 UNARY, BINARY, TRINARY rtxs.
4465 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4466 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4467 Support '- as "unused spot" indicator.
4469 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4471 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4473 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4475 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4477 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4479 (tstate-make): New arg `depth'. All callers updated.
4480 (tstate-depth,tstate-set-depth!): New procs.
4481 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4482 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4483 (-rtx-traverse): Ditto. Keep track of traversal depth.
4485 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4487 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4488 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4489 * utils-sim.scm: Decoder generator support moved here.
4490 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4491 (-gen-decoder-switch): Sort entries for more fall-throughs.
4493 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4494 * Makefile.in: Rebuild.
4495 * sim-test.scm (build-sim-testcase): Add logging message.
4496 * dev.scm (cload): Recognize SIM-TEST application.
4497 (load-stest): Set APPLICATION to SIM-TEST.
4499 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4501 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4502 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4503 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4505 * insn.scm (syntax-break-out): Handle ${foo}.
4507 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4509 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4510 (bin_PROGRAMS): Define.
4511 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4512 (cgen-hob.c): Prepend $(srcdir)/ here.
4513 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4514 (libcpu_a_SOURCES): Delete.
4515 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4516 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4517 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4518 Add AC_CHECK_LIB(guile,main).
4519 * Makefile.in: Rebuild.
4520 * doc/Makefile.in: Rebuild.
4521 * aclocal.m4: Rebuild.
4522 * config.in: Rebuild.
4523 * configure: Rebuild.
4525 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4527 Rename rtx functions from name: to name, accept optional leading
4529 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4530 * attr.scm (-attr-eval): Update.
4531 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4532 (<hw-register>,mode-ok?): Disallow VOID.
4533 (<hw-immediate>,mode-ok?): Disallow VOID.
4534 (<hw-address>,mode-ok?): Disallow VOID.
4535 * mode.scm (mode-name?): New proc.
4536 (VOID): Renamed from VM.
4537 (DFLT): Renamed from DM.
4538 (mode-builtin!): Update.
4539 * opcodes.scm (<ifield>,gen-insert): Update.
4540 (<ifield>,gen-extract): Update.
4541 (<multi-ifield>,gen-insert,gen-extract): Update.
4542 * operand.scm (op:mode): Update.
4543 (<pc>,make!): Update.
4544 (op:new-mode): Update.
4545 (-operand-read): Update.
4546 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4547 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4548 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4549 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4550 (rtx-make): Call -rtx-munge-mode&options.
4551 (rtx accessors): Rewrite.
4552 (rtx-pretty-name): Update.
4553 (-rtx-traverse-*): Update.
4554 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4555 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4556 (-rtx-make-traverse-table): Update.
4557 (-rtx-traverse-operands): Update.
4558 (-rtx-option?,-rtx-option-list?): New procs.
4559 (-rtx-munge-mode&options): New proc.
4560 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4561 (-rtx-traverse): Update.
4562 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4563 (rtx-compile-time-constant?): Update.
4564 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4565 (rtx-value): Update.
4566 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4567 * rtx-funcs.scm (*): Update.
4568 * rtl-c.scm (rtl-c-get): Update.
4569 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4570 (s-c-call,s-c-raw-call): Update.
4571 (s-boolifop,s-convop,s-if,s-cond): Update.
4572 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4573 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4574 (s-parallel,s-sequence): Update.
4575 (rtl-c-build-table): Update.
4576 * sem-frags.scm (-frag-hash-compute!): Update.
4577 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4578 for temporary bug compatibility with previous version.
4579 (-frag-expr-locals,-frag-expr-stmts): Update.
4580 (-frag-compute-desired-frags,-frag-pick-best): Update.
4581 * semantics.scm (-simplify-expr-fn): Update.
4582 (rtx-simplify): Update.
4583 (-rtx-ref-type): Update. Account for modifiers.
4584 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4585 (-build-ifield-operand!): Update.
4586 (-build-known-values): Update.
4587 (semantic-compile): Update.
4588 (-gen-reg-access-defns): Update.
4589 (gen-semantic-code,-gen-sem-case): Update.
4590 (-gen-sfrag-code,-gen-sfrag-case): Update.
4591 * sim-cpu (gen-semantic-code): Update.
4592 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4593 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4594 (-hw-cxmake-get): Update.
4595 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4596 (<hw-index>,cxmake-get): Update.
4597 (<operand>,gen-type,gen-read,cxmake-get): Update.
4598 (<operand>,gen-set-quiet,gen-set-trace): Update.
4599 (<pc>,cxmake-get): Update.
4600 (sim-finish!): Update.
4601 * utils-gen.scm (-gen-ifld-extract-base): Update.
4602 (-gen-ifld-extract-beyond): Update.
4603 (gen-multi-ifld-extract): Update.
4604 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4605 * sid.scm (<hw-pc>,gen-write): Update.
4606 (-gen-decode-insn-globals): Update.
4607 (-hw-cxmake-get): Update.
4608 (<hw-register>,cxmake-get-raw): Update.
4609 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4610 (<hw-index>,cxmake-get): Update.
4611 (<operand>,gen-type,gen-read,cxmake-get): Update.
4612 (<operand>,gen-set-quiet,gen-set-trace): Update.
4613 (<pc>,cxmake-get): Update.
4614 (-create-virtual-insns!): Update.
4615 (-decode-split-build-assertion): Update.
4617 * simplify.inc: Update.
4619 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4621 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4622 Prefix queue function name with sim_ instead of @cpu@_.
4624 * sim.scm (-with-parallel-only?): New global.
4625 (option-init!): Initialize it.
4626 (option-set!): Set it.
4627 (with-parallel-only?): New proc.
4628 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4629 and writeback markers if with-parallel-only.
4630 (-gen-idesc-init-fn): Update.
4631 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4634 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4636 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4637 with the invalid insn handler.
4639 * utils.scm (list-maybe-ref): New proc.
4641 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4643 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4645 * i960.cpu (test*-*): Delete `expr' arg.
4646 (test-op,branch-op): Update.
4648 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4650 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4651 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4653 (gen-reg-access-defn): Ditto.
4654 (-gen-hw-addr): Rewrite.
4655 (-op-gen-queued-write): Rewrite.
4656 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4657 (-gen-scache-semantic-fn): Handle with-generic-write.
4658 (-gen-no-scache-semantic-fn): Ditto.
4660 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4662 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4664 * sim.scm (-with-generic-write?): New global.
4665 (option-init!): Initialize it.
4666 (option-set!): Set it.
4667 (with-generic-write?): New proc.
4668 (-gen-hw-addr): New proc.
4669 (-op-gen-queued-write): New proc.
4670 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4672 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4674 (-gen-sem-switch): Preserve existing with-parallel? value.
4675 (-gen-sem-parallel-switch): Ditto.
4676 (-gen-write-case): Add /indent support.
4677 (cgen-write.c): Rewrite.
4679 * utils.scm (-current-print-state): New global.
4680 (make-print-state): New proc.
4681 (pstate-indent,pstate-set-indent!): New procs.
4682 (pstate-cmd?,pstate-cmd-do): New procs.
4683 (/indent): New global.
4684 (/indent-set,/indent-add): New procs.
4685 (string-write): Set -current-print-state.
4686 (-string-write): New arg pstate, all callers updated.
4687 Handle print-state commands.
4688 (-string-list-flatten): New proc.
4689 (string-list->string): Use it.
4691 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4692 (-gen-sem-fn-table-entry): New proc.
4693 (-gen-semantic-fn-table): New proc.
4694 (-gen-scache-semantic-fn): Make fn static.
4695 (-gen-no-scache-semantic-fn): Ditto.
4696 (cgen-semantics.c): Define macro SEM_FN_NAME.
4697 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4698 FAST,FULL. Update @cpu@_insn_sem contents.
4699 (-gen-semf-fn-name): Delete.
4700 (-gen-sem-fn-decls): Delete.
4701 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4702 @cpu@_semf_init_idesc_table.
4703 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4705 (cgen-decode.h): Print sfmt enum.
4706 * sid-decode.scm (-gen-semf-fn-name): Delete.
4707 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4709 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4710 (ifmt-compute!): Ditto.
4711 * sim-decode.scm (-gen-decoder-switch): Ditto.
4712 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4713 (-gen-decoder-switch): Ditto.
4715 * insn.scm (insn-virtual?): New proc.
4717 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4719 * mach.scm (<arch>): attr-list is now a pair of lists.
4720 (current-attr-list): Rewrite.
4721 (current-attr-add!,current-attr-lookup): Rewrite.
4722 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4724 1999-08-06 Richard Henderson <rth@cygnus.com>
4726 * ia64.cpu: Initial checkpoint.
4728 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4730 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4731 (pmacros-init!): Update .apply help string.
4733 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4735 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4736 (<hw-pc>,cxmake-skip): New method.
4737 (<pc>,cxmake-skip): New method.
4738 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4739 (gen-argbuf-type): New member `skip_count'.
4740 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4741 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4743 * utils-sim.scm: New file.
4744 * dev.scm (load-sim): Load it.
4745 (load-sid): Load it.
4746 * cgen-sid.scm: Load it.
4747 * cgen-sim.scm: Load it.
4748 * iformat.scm (<sformat>): New member sbuf, not initialized by
4750 * rtx-funcs.scm (skip): Rewrite.
4751 * rtl-c.scm (skip): Rewrite.
4752 * m32r.cpu (sc,snc): Update `skip' usage.
4753 * mode.scm (mode-real-mode): New proc.
4754 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4755 Distinguish fragments by the <sformat-abuf> they use.
4756 * sim.scm (gen-profile-index-type): Delete.
4757 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4758 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4759 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4760 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4761 (-gen-argbuf-elm): Rewrite.
4762 (-gen-argbuf-hw-elm): Delete.
4763 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4765 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4766 (sim-init!): Initialize them.
4767 (sim-analyze-insns!): Set them.
4768 (current-sbuf-list): New proc.
4769 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4770 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4771 * sim-model.scm (-gen-model-insn-fn): Ditto.
4772 * sim-decode.scm (-gen-extract-decls): Delete.
4773 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4774 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4776 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4777 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4778 (-gen-op-extract,-gen-op-trace-extract): New procs.
4779 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4780 gen-sfmt-argvars-foo and rewrite.
4781 (-gen-record-args): Rewrite.
4782 (-gen-extract-case): Tweak.
4783 * sid.scm (gen-profile-index-type): Delete.
4784 (ifield argbuf support): Move to utils-sim.scm.
4785 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4786 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4787 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4788 (-sim-sformat-argbuf-list): New global.
4789 (sim-init!): Initialize it.
4790 (sim-analyze-insns!): Set it.
4791 (current-sbuf-list): New proc.
4792 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4793 (-gen-argbuf-hw-elm): Delete.
4794 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4796 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4797 (-gen-extract-decls): Delete.
4798 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4800 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4801 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4802 (-gen-op-extract,-gen-op-trace-extract): New procs.
4803 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4804 gen-sfmt-argvars-foo and rewrite.
4805 (-gen-record-args): Rewrite.
4806 (-gen-extract-case): Tweak.
4808 * cgen-gh.c (gh_putc,gh_puts): New functions.
4809 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4810 * cos.c (_object_print_elms,_object_print): Use them.
4811 * hob-sup.c (fastcall_print): Use them.
4812 * configure.in: Check for scm_gen_puts, scm_puts.
4813 * config.in: Rebuild.
4814 * configure: Rebuild.
4815 * aclocal.m4: Rebuild.
4816 * Makefile.in: Rebuild.
4818 * dev.scm (load-opc): Use load instead of maybe-load.
4819 (load-gtest,load-sim,load-stest): Ditto.
4822 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4824 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4825 up to avoid g++ 'goto crosses initialization' warning.
4826 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4827 (-gen-sfrag-case): Update use of NEXT_FRAG.
4829 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4831 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4833 * read.scm: Load sem-frags.scm.
4834 * sem-frags.scm (*): Lots rewritten.
4835 * sid.scm (-with-sem-frags?): New global
4836 (with-sem-frags?): New proc.
4837 (option-init!): Initialize -with-sem-frags?.
4838 (option-set!): Recognize with-sem-frags.
4839 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4840 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4842 (-gen-sfrag-engine-decls): New proc.
4843 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4844 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4845 (-gen-sfrag-engine): New proc.
4846 (-gen-sem-case): Emit setup-semantics if specified.
4847 (-gen-sem-switch-engine): Update init/use of computed goto label.
4848 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4850 (-gen-idesc-decls): Replace sem_address with cgoto.
4851 (-gen-scache-decls): Rewrite definition of `execute' member.
4852 * arm.cpu (arm isa): Enable decode-splits.
4853 * arm7.cpu (multiply insns): Rename result to mul-result.
4855 Rename decode-specialize to decode-split.
4856 * decode.scm (*): Update.
4857 * insn.scm (*): Update.
4858 * mach.scm (*): Update.
4859 * sid.scm (*): Update.
4861 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4863 Record objects as a smob.
4864 * cos.c (scm_tc16_object): New static global.
4865 (cos_init): Initialize it.
4866 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4867 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4868 (_object_tag): Delete.
4869 (_object_make_smob): New function.
4870 (_object_make_x,_object_make_with_values_x): Rewrite.
4871 (_object_elements,_object_class_desc): Rewrite.
4872 (_object_copy,object_p): Rewrite.
4873 (_object_specialize): Rewrite.
4874 (_object_print_elms,_object_print): New functions.
4875 (object_smob): New static global.
4876 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4878 * cos.c (_make_x_symbol): New static global.
4879 (object_make): Use it.
4880 (cos_init): Initialize it.
4882 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4884 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4885 instead to determine whether to use FLD macro.
4886 (<rtl-c-eval-state>): New member ifield-var?.
4887 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4888 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4889 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4891 * rtl.scm (rtx-sequence-assq-locals): New proc.
4893 * cos.scm (-object-error): Don't crash on non-objects.
4895 * Makefile.am (CLEANFILES): Add hobbit.
4896 * Makefile.in: Rebuild.
4898 * rtl-c.scm (s-c-call): Delete unnecessary code.
4900 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4902 * rtl-c.scm (ifield): Always reference value via `FLD'.
4904 * cos.c (elm_bound_p): Return problem SCM boolean values.
4906 * utils-cgen.scm (display-argv): New proc.
4907 * cgen-opc.scm (cgen): Call it.
4908 * cgen-sim.scm (cgen): Ditto.
4909 * cgen-gas.scm (cgen): Ditto.
4910 * cgen-stest.scm (cgen): Ditto.
4911 * cgen-sid.scm (cgen): Ditto.
4913 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4915 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4916 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4917 (-gen-extract-switch): Initialize result to 1.
4918 * opcodes.scm (gen-ifield-default-type): New proc.
4919 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4921 (<hw-index>,gen-insert): Handle non-ifield indices.
4922 (<hw-index>,gen-extract): Ditto.
4923 (<hw-asm>,gen-parse): Ditto.
4924 (<hw-asm>,gen-print): Ditto.
4925 (<keyword>,gen-parse): Ditto.
4926 (<keyword>,gen-print): Ditto.
4927 (<operand>,gen-fget): Ditto.
4928 (<operand>,gen-fset): Ditto.
4930 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4931 (-gen-hw-index): Ditto.
4932 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4933 (-gen-hw-index): Ditto.
4935 * sem-frags.scm: New file.
4937 * attr.scm (attr-parse): Add better checking of input.
4939 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4941 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4943 * ifield.scm (ifld-nil?): New proc.
4945 * operand.scm (<operand>): New members getter,setter.
4946 (<operand>,make!): New args getter,setter. All uses updated.
4947 (op:getter,op:setter): New procs.
4948 (<hw-index>,field-start): Return 0 for non-ifield indices.
4949 (<hw-index>,field-length): Return 0 for non-ifield indices.
4950 (-operand-parse-getter,-operand-parse-setter): New procs.
4951 (-operand-parse): New args getter,setter. All callers updated.
4952 Always use hw-index-scalar for scalar operands.
4953 (-operand-read): Handle getter,setter.
4954 (define-full-operand): New args getter,setter. All uses updated.
4955 * semantics.scm (-build-ifield-operand!): Update.
4956 (-build-index-of-operand!): Update.
4957 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4958 * simplify.inc (define-normal-operand): Update.
4960 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4961 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4962 (s-binop,s-cmpop,s-convop): Ditto.
4963 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4964 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4965 (fcc-tests): New insn-enum.
4966 (fcc-value): Rename from fcc-type.
4967 * sparcfpu.cpu: New file. All fp support moved here.
4969 * rtl.scm (<rtx-func>): New member class.
4970 (rtx-class-*?): New procs.
4971 (def-rtx-node): New arg class. All callers updated.
4972 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4973 * rtx-funcs.scm (*): Specify class.
4975 * utils-cgen.scm (context-make-reader): New proc.
4977 * utils.scm (assert-fail-msg): New variable.
4979 (list-drop,list-tail-drop): New procs.
4981 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4983 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4984 CGEN_MIN_INSN_SIZE deleted on March 22.
4986 * ifield.scm (<ifield>,needed-iflds): New method.
4987 (<multi-ifield>,needed-iflds): New method.
4988 (ifld-needed-iflds): New proc.
4989 (multi-ifield?): New proc.
4990 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4991 (-sfmt-search-key): Include insn length in key.
4992 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4993 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4994 (-ifmt-lookup-ifmt!): Compute key here.
4995 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4996 All callers updated.
4997 (ifmt-build): Delete arg desc. New args search-key,iflds.
4998 All callers updated.
4999 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
5000 in-ops,out-ops,sorted-used-iflds. All callers updated.
5001 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
5003 * operand.scm (op-iflds-used): New proc.
5004 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
5006 And from sid.scm,sid-cpu.scm as well.
5007 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
5008 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
5009 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
5010 (gen-extracted-ifld-value): Ditto.
5011 (-extract-chunk-specs): Ditto.
5012 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
5013 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
5014 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
5015 (-extract-insert-subfields): New function.
5016 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
5017 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
5018 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
5019 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
5021 (-gen-no-scache-semantic-fn): Ditto.
5022 (-gen-sem-case): Ditto.
5023 (-gen-read-case): Update calls to gen-define-ifields,
5024 gen-extract-ifields.
5025 * sim-decode.scm (-gen-record-args): Update.
5026 (-gen-sfmt-argvars-assigns): Update.
5027 (-gen-extract-case): Update.
5028 * sim-model.scm (-gen-model-insn-fn): Replace calls to
5029 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
5031 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
5032 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
5033 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
5034 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
5035 gen-define-ifields, gen-extract-ifields.
5036 (-gen-record-args): Update.
5037 (gen-sfmt-argvars-assigns): Update.
5038 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
5039 with gen-define-ifields. Ditto for gen-extract-foo.
5040 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
5041 procs rather than method calls.
5043 1999-06-18 Doug Evans <devans@casey.cygnus.com>
5045 * sid.scm (-create-virtual-insns!): New local `context', pass it
5048 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
5049 (operand name) not (operand object), (local name) not (local object).
5050 (rtx-traverse-with-locals): New proc.
5051 (-compile-expr-fn): New proc.
5052 (rtx-compile): Rewrite.
5053 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
5054 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
5055 (rtl-c-set-trace): Ditto.
5056 (operand define-fn): Recognize operand name argument.
5057 (local define-fn): Recognize sequence temp name argument.
5058 * rtx-funcs.scm (operand): Argument is operand name, not object,
5059 so call current-op-lookup.
5060 (local): Similarily, so call rtx-temp-lookup.
5062 * rtl.scm (rtx-field?): Use rtx-name instead of car.
5063 (rtx-operand?): Ditto.
5064 (rtx-pretty-name): Ditto.
5065 (rtx-local-obj): Flag symbol argument as an error.
5066 (rtx-local-name): New proc.
5067 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
5069 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
5071 * read.scm (debug-repl): Renamed from -debug-repl. All callers
5074 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
5077 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
5078 (*floats-s->c-fun-table*): Ditto.
5079 * hobbit.c,hobbit.h: Rebuild.
5080 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
5081 * semantics.scm (rtx-simplify): Use /fastcall-make.
5083 * iformat.scm (-sfmt-search-key): Don't include memory modes.
5085 * insn.scm (<insn>): Delete members condition, compiled-condition.
5086 (<insn>,make!): Update
5087 (<insn> getters,setters): Update.
5088 (-insn-parse,insn-read,define-full-insn): Update.
5089 * minsn.scm (minsn-make-alias): Update.
5090 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
5091 (ifmt-compute!): Ditto.
5092 * sim.scm (sim-finish!): Update.
5093 * simplify.inc: (define-normal-insn): Update.
5094 * sid-cpu.scm (gen-semantic-code): Update.
5096 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
5097 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
5098 (ifmt-compute!): Ditto.
5100 1999-06-16 Doug Evans <devans@casey.cygnus.com>
5102 * minsn.scm (minsn-compute-iflds): Print better error message for
5105 1999-06-12 Doug Evans <devans@casey.cygnus.com>
5107 * rtl.scm (tstate->estate): Don't copy over expr-fn.
5109 * Makefile.am (HOBFLAGS): New variable.
5110 (cgen-hob.c): Use it.
5112 (libcpu_a_SOURCES): Add hob-sup.c.
5113 (hob-sup.o): New rule.
5114 * Makefile.in: Rebuild.
5115 * cgen.c: #include hob-sup.h.
5116 (cgen_init_c): Call hobbit_init_support.
5117 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5118 (*special-scm->c-functions*): Add them.
5119 (display-c-expression): Handle *c-symbol*.
5120 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5121 (*floats-s->c-fun-table*): Ditto.
5122 (normalize): Recognize /fastcall-make.
5123 (normalize-fastcall-make): New proc.
5124 * hobbit.c,hobbit.h: Rebuild.
5125 * hob-sup.scm: New file.
5126 * hob-sup.c: New file.
5127 * hob-sup.h: New file.
5128 * read.scm: Load hob-sup.scm.
5129 * rtl.scm (-rtx-name-list): New variable.
5130 (rtx-name-list): New proc.
5131 (rtx-lookup): Try symbol first.
5132 (def-rtx-node): Add name to -rtx-name-list.
5133 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5134 (-rtx-traverse-anymode): New proc.
5135 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5136 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5137 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5138 (-rtx-traverse-{symornum,object}): New procs.
5139 (-rtx-make-traverse-table): Rewrite.
5140 (-rtx-traverse-operands): Rewrite arg-types handling.
5141 Handle #f result of traverser.
5142 (-rtx-traverse): Renamed from -rtx-traverse-normal.
5143 Move debug handling here.
5144 (-rtx-traverse-debug): Delete.
5145 (rtl-finish!): Change -rtx-traverse-table into list of handlers
5147 * semantics.scm (semantic-compile:process-expr!): Fix call to
5149 * utils.scm (map1-improper): New proc.
5151 1999-06-08 Doug Evans <devans@casey.cygnus.com>
5153 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5155 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5156 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5157 (<operand>,cxmake-get): Tweak.
5158 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
5160 1999-06-07 Doug Evans <devans@casey.cygnus.com>
5162 * thumb.cpu (dnti): Delete timing spec.
5165 * arm.cpu (arm isa): New fields condition, setup-semantics.
5166 (thumb isa): New field setup-semantics.
5167 (h-gr): Add attribute CACHE-ADDR.
5168 * arm7.cpu (dnai): Delete condition.
5169 (eval-cond): Delete.
5171 * mach.scm (<isa>): New member setup-semantics.
5172 (-isa-parse-setup-semantics): New proc.
5173 (-isa-parse): New arg setup-semantics.
5174 (-isa-read): Recognize setup-semantics.
5176 * sid-cpu.scm (gen-extract-fields): Split into two:
5177 gen-extract-ifields, gen-extract-ifmt-ifields.
5178 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
5179 tracing begin/end messages (done by caller now).
5180 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
5181 tracing begin/end messages (done by x-before,x-after virtual insns).
5182 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
5183 end so don't have to look it up again next time.
5184 * sid-decode.scm (-decode-expr-ifield-values): New proc.
5185 (-decode-expr-ifield-tracking-key): New proc.
5186 (-decode-expr-ifield-tracking): New proc.
5187 (-decode-expr-ifield-values-used): New proc.
5188 (-decode-expr-ifield-mark-used!): New proc.
5189 (-gen-decode-expr-set-itype): New proc.
5190 (-gen-decode-expr-entry): Rewrite.
5191 (-gen-decode-table-entry): New proc.
5192 (-gen-decoder-switch): Use it.
5193 (-gen-virtual-insn-finder): New proc.
5194 (-gen-argbuf-elm): Move here from sid.scm.
5195 (-gen-argbuf-hw-elm): Ditto.
5196 (-gen-argbuf-fields-union): Add entries for chain,before insns.
5197 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5198 conditional-execution isas.
5199 (-gen-decode-fn): Record conditional-exec ifield.
5200 * sid.scm (-current-pbb-engine?): New global.
5201 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5202 (<ifield>,gen-ifld-extract): New arg `indent'.
5203 (<multi-ifield>,gen-ifld-extract): Ditto.
5204 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
5205 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5206 (-gen-arch-model-decls): Only scan real insns.
5207 (scache-engine-insns,pbb-engine-insns): New procs.
5208 (-create-virtual-insns!): New proc.
5209 (sim-finish!): Call it.
5210 (-decode-specialize-insn?): New proc.
5211 (-decode-specialize-build-assertion): New proc.
5212 (-decode-specialize-insn-1): New proc.
5213 (-decode-specialize-insn): New proc.
5214 (-fill-sim-insn-list!): New proc.
5215 (sim-analyze!): Create copies of insns to be specialized.
5216 * utils-cgen.scm (obj-set-name!): New proc.
5218 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5219 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5221 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
5223 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5224 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5225 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5226 (attr): Rewrite test for insn owner.
5227 (member): New rtx function.
5228 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5229 as separate function.
5230 (rtx-ifield?,rtx-ifield-name): New procs.
5231 (rtx-operand-obj): Rewrite.
5232 (rtx-operand-name): New proc.
5233 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5234 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5235 (tstate-make): New args owner, known. All callers updated.
5236 (tstate-known-lookup): New proc.
5237 (rtx-traverse): New arg owner. All callers updated.
5238 (rtx-make-bool): New proc.
5239 (rtl-find-ifields): Rewrite.
5240 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5241 * semantics.scm: ... here.
5242 (rtx-const-equal,rtx-const-list-equal): New procs.
5243 (-build-known-values): New proc.
5244 (semantic-compile): New arg `insn'. Call rtx-simplify.
5245 (semantic-attrs): Ditto.
5246 * rtx-funcs.scm (member,number-list): New rtx functions.
5248 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5249 Rewrite. Delete arg `all-attrs'. All callers updated.
5250 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
5252 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5254 * decode.scm (subdtable-add): Handle `expr' entries.
5255 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
5256 (exprtable-entry-*): Update.
5257 (exprtable-entry-iflds): New proc.
5258 (exprentry-cost): New proc.
5259 (exprtable-sort,-gen-exprtable-name): New procs.
5260 (exprtable-make): New arg `name'. All callers updated. use vector.
5261 (exprtable-*): Update.
5262 (-build-decode-table-entry): Don't issue collision warning if all are
5263 specialized insns. Sort exprtable entries before building table.
5265 * read.scm (-reader-process-expanded-1): Move pretty printing of
5266 input to logging level 4.
5268 * utils.scm (string-list->string): New proc.
5270 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5272 (insn-read): Delete leading '-' in name. All callers updated.
5273 (real-insn?): New proc.
5274 (real-insns): Rewrite.
5275 (insn-has-ifield?): New proc.
5276 (insn-builtin!): Create insn attribute SPECIALIZED.
5278 * mach.scm (<arch>): Delete member app-data.
5279 (current-raw-insn-list): New proc.
5280 (insn-list-car,insn-list-splice!): New procs.
5281 (<decode-specialize>): New class.
5282 (-isa-parse-decode-specialize): New proc.
5283 (-isa-parse-decode-specializes): New proc.
5284 (<isa>): New members `condition', `decode-specializes'.
5285 (-isa-parse-condition): New proc.
5286 (-isa-parse): New args condition, decode-specializes.
5287 (-isa-read): Recognize condition, decode-specializes.
5288 (-isa-add-decode-specialize!): New proc.
5289 (modify-isa): New proc.
5290 (isa-conditional-exec?,state-conditional-exec?): New procs.
5291 (arch-init!): New reader command `modify-isa'.
5293 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5294 (mode-signed,mode-unsigned?): New procs.
5296 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
5298 * types.scm (<array>): New method get-shape.
5299 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5301 (hw-shape,hw-num-elms): New procs.
5302 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5303 if there's more than 255 registers.
5304 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5306 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5309 1999-05-21 Doug Evans <devans@casey.cygnus.com>
5311 * cgen-sid.scm (sim-arguments): Add -X.
5312 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5313 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5314 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
5315 Simplify by supporting pbb engine only.
5316 (-gen-sem-switch-init): New proc.
5317 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5318 (cgen-sem-switch.cxx): New proc.
5319 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5320 with with-pbb?. Support dual scache/pbb engines.
5321 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5322 Support dual scache/pbb engines.
5323 (cgen-decode.h): Generate semantic fn decls if with-scache?.
5324 * sid.scm (*) with-pbb? replaces with-sem-switch?.
5325 (sim-finish!): Create pbb support virtual insns if with-pbb?.
5327 1999-05-10 Ben Elliston <bje@cygnus.com>
5329 * arm7.cpu: Remove coprocessor related fields, operands and insn
5330 definitions for now. Take the undefined instruction trap instead.
5331 (ldmda-wb): New instruction.
5332 (ldmib-wb): Likewise.
5333 (ldmdb-wb): Likewise.
5334 (stmdb-wb): Likewise.
5335 (stmib-wb): Likewise.
5336 (stmda-wb): Likewise.
5338 1999-05-08 Doug Evans <devans@casey.cygnus.com>
5340 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5341 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5343 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5344 hobbit can't handle optional third arg.
5346 1999-05-07 Doug Evans <devans@casey.cygnus.com>
5348 * arm.cpu (h-tbit): Delete set spec.
5349 (h-mbits): Don't call arm_mbits_set in set spec.
5350 * arm.sim: New file.
5351 * hardware.scm (modify-hardware): New proc.
5352 (hardware-init!): Add modify-hardware command.
5353 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5354 (-hw-gen-set-quiet): Ditto.
5355 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5356 hardware attribute. Load $arch.sim file if present.
5357 * utils-cgen.scm (keyword-list?): New proc.
5358 (keyword-list->arg-list,arg-list-validate-name): New procs.
5359 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5361 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5363 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5366 * attr.scm (obj-prepend-atlist!): New proc.
5368 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5370 * sid.scm (<operand>,profilable?): Use op:type.
5371 * sim.scm (<operand>,profilable?): Use op:type.
5373 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5375 * utils.scm (find-index,find): Be more stack friendly.
5377 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5380 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5382 * arm.cpu (h-gr-usr): New hardware element.
5383 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5384 (arm-mode): New keyword.
5385 (h-mbits): Add set spec.
5386 (h-spsr): Implement get/set specs.
5388 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5389 (-reader-process-expanded-1): Pretty print logging output.
5391 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5392 (cgen-cpu.h): Print enums before hardware elements.
5393 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5394 * sid-decode.scm (cgen-decode.cxx): Ditto.
5395 * sid-model.scm (cgen-model.cxx): Ditto.
5397 * utils-cgen.scm (context-error): Accept variable number of
5400 * rtx-funcs.scm (error:): New rtx function.
5401 * rtl-c.scm (s-case-vm): New proc.
5402 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5403 (s-case): Simplify, handle non-VM result.
5404 (error:): New rtx function.
5406 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5408 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5409 (test-hi,test-ls): Fix cbit handling.
5410 (shift-type,h-operand2-shifttype): Move here ...
5411 * arm7.cpu: ... from here.
5412 (set-cond,set-cond-maybe,dnix): Delete, unused.
5413 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5414 * arm.cpu: ... to here.
5415 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5416 (alu-cmn): Use set-add-flags.
5417 (alu-tst): Use set-zn-flags.
5418 (alu-cmp): Use set-sub-flags.
5419 (lsl,lsr,asr): Set condition codes.
5420 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5421 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5423 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5424 All callers updated.
5425 (sub-sp): Rename from add-sp-neg.
5426 (f-lbwl-offset): Delete.
5427 (f-lbwl-hi,f-lbwl-lo): New ifields.
5428 (lbwl-hi,lbwl-lo): Update.
5429 (bl-hi): Add 4 to pc.
5430 (push-reg,pop-reg): Simplify.
5431 (push,push-lr): Push registers in correct order.
5432 (pop,pop-pc): Pop registers in correct order.
5433 (save-reg-inc,load-reg-inc): Simplify.
5434 (ldmia): Save registers in correct order.
5436 1999-04-30 Ben Elliston <bje@cygnus.com>
5438 * arm7.cpu (f-op-hdt): Remove; unused.
5439 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5440 (f-ror-imm8): New multi-ifield.
5441 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5443 (f-uimm12): New field.
5444 (ror-imm8): New operand.
5446 (hdt-offset8): Reinstate operand.
5447 (offset4-hi,offset4-lo): Remove.
5448 (set-cond): Remove macro; unused.
5449 (set-cond-maybe): Likewise.
5450 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5451 (store-word/byte): Likewise.
5452 (load-halfword): Use hdt-offset8 multifield operand instead of two
5453 4-bit operands that are explicitly combined by semantic code.
5454 (do-halfword-store): Bug fix. Set address when not preindexing.
5455 (store-halfword): Also use hdt-offset8 operand.
5456 (arith-op): Avoid clobbering source registers when one of them is
5457 the destination register.
5458 (arith-imm-op): Likewise.
5459 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5460 (teq-imm): Likewise.
5461 (ldm-p): Rename to ldmdb.
5462 (stm-pw): Rename to stmdb-wb.
5463 (multi-action): New macro; test reg-list bits and execute a
5464 semantic fn if the bit is set.
5465 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5466 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5467 (all insns): Use dnai entries for simplicity rather than dni.
5468 (*): Use short-form of (const ..).
5470 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5472 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5473 member eval to evaluator.
5474 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5475 (tstate-make): Delete arg op-fn. All callers updated.
5476 (tstate-op-fn,tstate-set-op-fn!): Delete.
5477 (rtx-traverse): Delete op-fn arg. All callers updated.
5478 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5479 split out of -simplify-for-compilation.
5481 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5482 (cgen_DEPENDENCIES): Add stamp-cgen.
5483 (stamp-cgen): New rule.
5484 * Makefile.in: Rebuild.
5486 * rtl-c.scm (enum:): Define emitter for.
5487 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5489 (rtx-constant-value,rtx-enum-value): New procs.
5490 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5491 (rtx-compile-time-constant?): Return #t for enums.
5492 (rtx-true?,rtx-false?): Handle enums.
5493 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5494 building result by hand.
5495 (rtx-simplify-eq-attr-insn): Ditto.
5496 * rtx-funcs.scm (enum:,enum): New rtx functions.
5498 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5500 (arch-analyze-insns!): New proc.
5501 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5502 of calling ifmt-compute! directly.
5503 * sid.scm (-sim-insns-analyzed?): Delete.
5504 (sim-analyze!): Call arch-analyze-insns! instead of calling
5505 ifmt-compute! directly.
5506 * sim.scm (-sim-insns-analyzed?): Delete.
5507 (sim-analyze!): Call arch-analyze-insns! instead of calling
5508 ifmt-compute! directly.
5510 * utils.scm (string-take-with-filler): New proc.
5511 (string-take): Use it.
5513 * pgmr-tools.scm: New file.
5514 * read.scm: Load it.
5515 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5517 * insn.scm (insn-base-mask): Renamed from insn:mask.
5518 All callers updated.
5519 (insn-base-mask-length): Renamed from insn:mask-length.
5520 All callers updated.
5521 (insn-foo): Renamed from insn:foo. All callers updated.
5522 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5523 * iformat.scm (compute-insn-base-mask-length): Renamed from
5524 compute-insn-mask-length. All callers updated.
5525 (compute-insn-base-mask): Renamed from compute-insn-mask.
5526 All callers updated.
5528 * enum.scm (-enum-parse-prefix): New proc.
5529 (<enum>,make!): Don't parse enum values here.
5530 (-enum-parse): Do it here. Call -enum-parse-prefix.
5531 (define-full-insn-enum): Ditto.
5532 (enum-vals-upcase): New proc.
5533 * hardware.scm (define-keyword): Make enum prefix uppercase.
5534 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5536 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5537 (<ifield>,field-extract): New method.
5538 (<multi-ifield>,field-extract): New method.
5539 (ifld-extract): New proc.
5540 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5541 (ifld-extract-fn-name): Renamed from ifld-extract.
5543 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5544 All callers updated.
5546 * ifield.scm (ifld-lsb0?): New proc.
5547 (sort-ifield-list): New arg up?. All callers updated.
5548 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5549 rather than global state.
5551 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5553 * insn.scm (pretty-print-insn-format): New proc.
5555 * Makefile.in: Rebuild.
5556 * aclocal.m4: Rebuild
5557 * configure: Rebuild.
5559 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5561 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5562 * configure: Rebuild.
5563 * aclocal.m4: Rebuild.
5564 * Makefile.in: Rebuild.
5565 * doc/Makefile.in: Rebuild.
5566 * doc/version.texi: Rebuild.
5568 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5570 * utils.scm (bits->bools): New proc.
5572 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5574 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5575 subfield's gen-ifld-extract-decl method.
5577 1999-04-23 Ben Elliston <bje@cygnus.com>
5579 * arm7.cpu (ldrsh-pu): Remove.
5580 (do-halfword-load): New pmacro.
5581 (load-halfword): Likewise.
5582 (do-halfword-store): Likewise.
5583 (store-halfword): Likewise.
5584 (strh-*): New instructions.
5585 (ldrsb-*): Likewise.
5587 (ldrsh-*): Likewise.
5589 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5591 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5594 * arm7.cpu (do-word/byte-store): Fix typo.
5596 1999-04-22 Ben Elliston <bje@cygnus.com>
5598 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5599 register is the program counter (R15).
5601 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5602 (str-*): Implement using store-word-byte. Remove older versions.
5603 (bic): Use the `inv' rtx for obtaining bitwise complements.
5604 (bic-imm): Likewise.
5606 (mvn-imm): Likewise.
5607 (store-indev-reg): Remove crufty pmacro.
5608 (load-indiv-reg): Likewise.
5609 (ldm-p): Reverse the order of register processing for decrement.
5611 (stbi): Remove; handled by the str-* insns.
5613 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5615 * thumb.cpu (cmp): Fix carry bit computation.
5618 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5620 * arm.cpu (h-tbit): Specify set spec.
5622 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5623 (set-sub-flags): Interpret "carry bit" as a borrow.
5624 (all sub/cmp insns): Carry bit is actually a borrow bit.
5625 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5626 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5628 (hireg-add,hireg-cmp,hireg-move): Ditto.
5630 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5631 (-CGEN-LANG-VERSION): Ditto.
5633 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5635 * pmacros.scm (-pmacro-make): New arg `default-values',
5636 all callers updated.
5637 (-pmacro-default-values): New proc.
5638 (-pmacro-process-keyworded-args): New proc.
5639 (-pmacro-process-args): New proc.
5640 (-pmacro-invoke): Process arguments before expanding macro.
5641 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5642 (define-pmacro): Handle default values specified in arg list.
5643 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5644 (rtx-boolif-op-arg[01]): New procs.
5645 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5646 (rtx-simplify): Handle not,orif,andif.
5647 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5648 * utils.scm (alist-copy): New proc.
5649 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5651 (swi): Explicitly set pc.
5653 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5655 1999-04-17 Ben Elliston <bje@cygnus.com>
5657 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5658 correctly adjusts the program counter now.
5660 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5661 (f-signed?): Rename from `f-hdt-signed?'.
5662 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5663 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5664 (f-hdt-offset8): Use new field names.
5665 (ldr): Use `imm12' field, not `offset12', since we do our own
5667 (str, str-*): Likewise.
5668 (ldu-*): Remove most; better not implemented than broken.
5670 (ldrsh-pu): New insn.
5674 (ldm-p): Likewise; replace (load-indiv-reg) version.
5676 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5678 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5679 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5680 (*): Explicitly specify mode in c-call.
5681 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5683 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5684 (arith-imm-op): New pmacro.
5685 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5686 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5688 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5690 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5692 * rtl.scm (rtl-find-ifields): Implement.
5694 * utils-gen.scm: New file.
5695 * read.scm: Load it.
5696 * desc.scm: Move generic attribute code to utils-gen.scm.
5697 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5698 * Makefile.in: Rebuild.
5700 * arm7.cpu (R15-OFFSET): New attribute.
5702 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5703 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5704 for reg-shift version.
5706 (data processing insns): Reorganize. Use dnai.
5708 * attr.scm (attr-kind): New proc.
5709 (attr-list-enum-list): Rewrite.
5710 (-attr-sort): Split result into two lists, bools and non-bools.
5711 (current-attr-list-for): Update.
5713 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5714 * sid-cpu.scm (-gen-attr-decls): New proc.
5715 (-gen-insn-attr-decls): New proc.
5716 (cgen-desc.h): New proc.
5717 (cgen-cpu.h): Put everything in @cpu@ namespace.
5718 (gen-parallel-exec-type): Change prefix of parexec struct from
5720 (-gen-trace-record-type): Ditto for trace_record struct.
5721 (-gen-write-case): Update.
5722 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5723 @prefix@. Update scache struct references.
5724 (-gen-sem-case): Update scache struct references.
5725 (-gen-sem-switch-fn): Update idesc struct reference.
5726 Update insn_type enum reference.
5727 (cgen-write.cxx): Update scache,argbuf references.
5728 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5729 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5730 from @cpu@ to @prefix@.
5731 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5732 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5733 from @CPU@ to @PREFIX@.
5734 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5735 from @CPU@ to @PREFIX@.
5736 (-gen-decode-insn-globals): Generate insn attributes.
5737 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5738 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5739 semantic fn typedef.
5740 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5741 Change prefix of scache struct from @cpu@ to @prefix@.
5742 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5743 Change prefix of idesc struct from @cpu@ to @prefix@.
5744 Change prefix of insn_type enum from @cpu@ to @prefix@.
5745 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5746 from @cpu@ to @prefix@.
5747 (-gen-scache-decls): Change prefix of scache struct from
5748 @cpu@ to @prefix@. Update idesc struct name.
5749 Update decode,execute methods.
5750 (-gen-extract-case): Update to type name changes.
5751 (-gen-decode-fn): Ditto.
5752 (cgen-decode.h): Put everything in @cpu@ namespace (except
5753 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5754 (cgen-decode.cxx): Add using namespace @cpu@.
5755 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5756 model_mark_get/set from @cpu@ to @prefix@.
5757 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5759 (gen-model-fn-decls): Update idesc struct name. Change prefix
5760 of model_insn_before/after from @cpu@ to @prefix@.
5761 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5762 Update insn_word type name.
5763 (-gen-model-timing-table): Update INSN_TIMING struct name.
5764 (-gen-model-init-fn): Update MODEL_DATA struct name.
5765 (-gen-mach-defns): Update name of init_idesc_table fn.
5766 (cgen-model.cxx): Add using namespace @cpu@.
5767 * sid.scm (gen-cpu-class): Delete.
5768 (gen-attr-type): New proc.
5769 (gen-obj-attr-sid-defn): New proc.
5770 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5771 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5773 (gen-cpu-insn-enum): Update name of insn enum.
5774 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5776 (swi): Rename @cpu@_swi to @prefix@_swi.
5778 * decode.scm (-build-decode-table-entry): Remove heuristic for
5779 distinguishing insns, and use insn ifield-assertion specs.
5781 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5782 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5783 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5784 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5785 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5786 all callers updated.
5787 (gen-attr-name): New proc
5788 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5789 (gen-obj-attr-defn): Delete num_nonbools count.
5791 * iformat.scm (ifmt-analyze): Handle insn-condition.
5792 (ifmt-compute!): Ditto.
5793 * insn.scm (<insn>): Specify default value for condition,
5794 post-cond-trap,compiled-condition,compiled-semantics.
5795 (<insn>,make!): New arg condition.
5796 (<insn>): Add getters for condition,compiled-condition.
5797 (-insn-parse): New arg condition, all callers updated.
5798 (-insn-read): Recognize condition spec.
5799 (define-full-insn): New arg condition.
5800 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5801 * semantics.scm (semantic-compile): Change arg sem-code to
5803 (semantic-attrs): Ditto.
5804 * sim.scm (sim-finish!): Update calls to define-full-insn.
5805 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5806 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5807 * sid.scm (sim-finish!): Update call to define-full-insn.
5809 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5811 * Makefile.am (sim-cpu): Allow specification of ISA.
5812 * Makefile.in: Rebuild.
5814 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5816 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5818 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5820 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5822 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5824 * attr.scm (atlist?): New proc.
5825 (-attr-eval): Rewrite.
5826 (attr-parse): New proc.
5827 (atlist-parse): Use it.
5829 * decode.scm (exprtable-entry-make): New proc.
5830 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5831 (exprtable-make,exprtable-insns): New procs.
5833 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5835 (hardware-builtin!): Make h-memory a vector.
5837 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5838 All callers updated.
5839 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5841 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5843 (-insn-parse): Set semantics to #f if not specified.
5844 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5846 (-parse-insn-format): Recognize `=' iformat spec.
5848 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5849 (isa-max-insn-bitsize): Ditto.
5851 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5853 (<ifield>,gen-extract): Ditto.
5854 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5855 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5856 (gen-define-ifmt-ifields): New proc.
5857 (gen-semantic-code): Rewrite.
5858 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5859 (-gen-decoder-switch): Handle expression tables.
5860 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5862 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5863 instead of gen-define-fields.
5864 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5866 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5867 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5868 (-gen-ifld-extract-beyond): Ditto.
5869 (<multi-ifield>,gen-ifld-extract): Ditto.
5870 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5871 rtl evaluation code.
5872 (op:read): Build an <eval-state> to pass to gen-read.
5873 (op:write): Build an <eval-state> to pass to gen-write.
5874 (op:record-profile): Build an <eval-state> to pass to
5876 * sim-cpu.scm (gen-semantic-code): Rewrite.
5877 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5879 (-gen-ifld-extract-beyond): Ditto.
5880 (<multi-ifield>,gen-ifld-extract): Ditto.
5881 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5882 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5883 rtl evaluation code.
5884 (op:read): Build an <eval-state> to pass to gen-read.
5885 (op:write): Build an <eval-state> to pass to gen-write.
5886 (op:record-profile): Build an <eval-state> to pass to
5889 * operand.scm (<operand>): Give `selector' default value of #f.
5890 Give `num' default value of -1. Give `cond?' default value of #f.
5891 (op:new-mode): Delete arg `set?', all uses updated.
5893 * read.scm (reader-error): Handle #f return from port-filename.
5894 (-init-parse-cpu!): Call rtl-c-init!.
5895 (reader-install-builtin!): Call rtl-builtin!.
5897 * rtl-c.scm: New file.
5898 * semantics.scm: New file.
5899 * read.scm: Load them.
5900 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5902 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5904 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5905 (-rtx-num-text,-rtx-max-num): New globals.
5906 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5907 (-rtx-macro-lookup): New proc.
5908 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5909 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5910 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5911 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5912 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5913 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5914 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5915 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5916 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5917 (rtx-pretty-name): New proc.
5918 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5919 (rtx-traverse-*): Rewrite rtx traversing.
5920 (rtx-eval-*): Rewrite rtx evaluation.
5921 (rtx-compile): New proc.
5922 (rtx-simplify): New proc.
5923 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5924 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5925 (ifield,index-of): Rewrite.
5926 (name): Renamed from `operand:'.
5927 (operand,xop,local): New rtx's.
5928 (current-insn): Rewrite.
5929 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5930 (cgen-hob.h): Remove rule for.
5931 (cgen-hob.o): Depend on cgen-hob.c only.
5932 * Makefile.in: Rebuild.
5934 * utils-cgen.scm (vmake): New proc.
5935 (<context>): New class.
5936 (context-make-prefix,context-error): New procs.
5938 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5940 * i960.cpu: Add some ??? comments.
5941 (xnor, ornot): New instructions.
5942 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5944 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5946 * cos.scm (-object-error): Print better error message.
5948 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5949 (-pmacro-env-ref): Renamed from -env-ref.
5951 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5953 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5955 (hardware-builtin!): Delete h-pc builtin.
5956 * arm.cpu (h-pc): Define.
5957 (h-gr): Delete get,set specs. Make array of 16 regs again.
5958 * arm7.cpu (set-logical-cc-maybe): Delete.
5959 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5960 (data processing insns): Rewrite.
5961 * m32r.cpu (h-pc): Define.
5962 * fr30.cpu (h-pc): Define.
5963 * i960.cpu (h-pc): Define.
5964 * sparc.cpu (h-pc): Define.
5966 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5967 (s-parallel): Replace do {...} while (0) with {...}.
5968 (s-sequence): Ditto.
5970 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5972 (-gen-write-case,-gen-sem-case): Ditto.
5973 (-gen-sem-case): Only specify `written' if profiling or
5974 parallel-write-back.
5975 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5976 (-gen-sem-switch-fn): New proc.
5977 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5978 based on with-sem-switch option.
5979 * sid-decode.scm (-gen-decode-insn-globals): Only define
5980 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5981 addresses in idesc_table if !with-sem-switch.
5982 (-gen-sem-fn-decls): Rewrite.
5983 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5984 member based on with-sem-switch. Only define
5985 `idesc_table_initialized_p' member if with-sem-switch.
5986 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5987 * sid.scm (-with-sem-switch?): New variable.
5988 (option-init!): Initialize it.
5989 (option-set!): Set it.
5990 (with-sem-switch?): New proc.
5991 (-op-gen-set-trace): Only emit `written' reference if profiling.
5992 (sim-finish!): Use h_pc_set to set pc.
5994 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5996 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5997 All callers updated.
5998 (arith-carry-cc-binop): New arg set-flags. All callers updated.
6000 * sid.scm (gen-argbuf-type): Delete.
6001 (-gen-argbuf-fields-union): Move to ...
6002 * sid-decode.scm: ... here.
6004 * read.scm (-reader-process-expanded-1): New proc.
6005 (-reader-process-expanded): Call it to catch nested begin's.
6006 (reader-process): Move `begin' handling to -reader-process-expanded.
6008 * insn.scm (-insn-read): Fix name of `format' spec.
6010 * pmacros.scm (.pmacro): New builtin.
6011 (scan-symbol): If procedure macro, return macro rather than its symbol.
6012 (check-macro): Don't do lookup, instead check if (car expr) is
6014 (scan-list): Handle .pmacro.
6015 (scan): No longer re-examine text for another macro invocation.
6016 (-pmacro-build-lambda): New proc.
6017 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
6018 another, fetch the other's value (rather than doing it during
6021 1999-03-27 Doug Evans <devans@casey.cygnus.com>
6023 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
6024 * Makefile.in: Rebuild.
6026 * decode.scm (decode-get-best-bits): Use memq instead of element?.
6027 (-fill-slot!): Simplify.
6028 (-build-slots): Simplify.
6030 * dev.scm (load-sid): Don't load sid-arch.scm.
6032 * sid-decode.scm: Replace computed goto decoder/extractor with plain
6034 * sim-decode.scm: Replace computed goto decoder/extractor with plain
6037 1999-03-26 Doug Evans <devans@casey.cygnus.com>
6039 * sim-decode.scm: Clean up pass. Move decoder computation into ...
6040 * decode.scm: ... here. New file.
6041 * sid-decode.scm: Use decoder computation code in decode.scm.
6042 * read.scm: Load decode.scm.
6044 * arm.cpu (arm710 model): Add u-exec function unit.
6045 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
6046 Add get/set specs to redirect reg 15 to h-pc.
6047 (h-*): Indicate for both ARM and THUMB isas.
6048 (cbit,nbit,vbit,zbit): Ditto.
6049 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
6050 (h-cpsr): Make virtual. Add get/set specs.
6051 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
6052 (h-spsr): New virtual reg.
6053 * arm7.cpu (shift-type): New explicitly defined keyword.
6054 (h-operand2-shifttype): Use it.
6055 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
6056 All callers updated. Don't set cbit.
6057 (logical-op): Add rm to ifield list. Change case to case:. Use
6058 shift-type enum as case choices. Set cbit.
6059 (and,orr,eor,add-imm): Uncomment out.
6060 (undefined): Temporarily comment out.
6061 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
6062 (lda-pc,lda-sp): Ditto.
6063 (ldr-pc): Rename from ldr.
6064 (cbranch): Mark insns as being thumb insns.
6066 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
6068 * cgen-sid.scm: Don't load sid-arch.scm.
6069 (sim-arguments): Delete unused entries.
6070 * sid-arch.scm: Delete.
6072 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
6073 (<insn>,ifld-assertions): New member.
6074 (<insn>,make!): New arg ifld-assertions, all callers updated.
6075 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
6076 (insn:fields): Delete.
6077 (-insn-parse): New arg ifld-assertions. All callers updated.
6078 (-insn-read,define-insn): New procs.
6079 (define-full-insn): New arg ifld-assertions. All callers updated.
6080 (insn-init!): New comment define-insn.
6082 * model.scm (-model-parse): Ensure at least one unit specified.
6084 * rtl.scm (-rtx-traverse-operands): Recognize environments.
6085 (<c-expr-temp>,get-name): New method.
6086 (-rtx-make-current-closure,s-closure): New proc.
6087 (hw:): Wrap rtx indices in a closure.
6088 (-gen-case-prefix): New proc.
6090 * rtx-funcs.scm (case:): Fix call to s-case.
6091 (closure): New rtx func.
6093 * hardware.scm (<hardware-base>): New member isas-cache.
6094 (<hardware-base>,get-isas): New method.
6095 (hardware-builtin): Indicate for all isas.
6096 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
6097 * mach.scm (current-arch-mach-name-list): Return list of names.
6098 (current-isa-mach-name-list): Ditto.
6099 (define-arch): Install builtin objects here.
6100 * read.scm (keep-atlist?): Only keep if both mach and isa are
6102 (keep-mach-atlist?): New proc.
6103 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
6104 (reader-install-builtin!): Renamed from -install-builtin!.
6105 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
6106 -gen-cpu-reg-access-defns. Rewrite.
6107 (gen-reg-access-defn): Delete.
6108 (-gen-hardware-struct): New proc.
6109 (-gen-hardware-types): Simplify. Add multiple-isa support.
6110 (gen-semantic-fn,-gen-all-semantics): Delete.
6111 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
6112 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6113 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6114 Call sem-analyze-insns!.
6115 (cgen-semantics.cxx): Add multiple-isa support.
6116 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6117 (-gen-scache-decls,-gen-decode-fn): Ditto.
6118 (cgen-decode.h): Call sem-analyze-insns!.
6119 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6120 * sid.scm (-with-multiple-isa?): New variable.
6121 (option-init!): Initialize it.
6122 (option-set!): Set it.
6123 (with-multiple-isa?): New proc.
6124 (gen-cpu-ref): New arg isas. All callers updated.
6125 (gen-cpu-class): New proc.
6126 (*-get-macro,*-set-macro): Delete.
6127 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6128 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6129 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6130 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6131 (-sim-insns-analyzed): New global variable.
6132 (sim-init!): Reset it.
6133 (sim-analyze-insns!): New proc.
6134 (sim-analyze!): Don't do instruction analysis here.
6135 (sim-finish!): Specify isa of x-invalid insn.
6136 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6138 1999-03-22 Doug Evans <devans@casey.cygnus.com>
6140 * thumb.cpu (cpu,mach,model): Delete.
6141 (dntf): New pmacro. Use it for all field definitions.
6142 (dntop): New pmacro. Use it for all operand definitions.
6143 (asr): Correct field list.
6144 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6146 * utils-cgen.scm (define-getters): New macro to simplify
6147 writing class accessors.
6148 (define-setters): Ditto.
6149 (sanitize): Recognize isa elements.
6151 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6152 state-parallel-exec?.
6153 * sid-model.scm (*): Ditto.
6154 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
6155 state-decode-assist.
6157 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6158 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6159 * sim-decode.scm (-gen-decode-switch): Ditto.
6161 * sim-arch.scm (-regs-for-access-fns): Delete.
6162 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6163 (-gen-arch-reg-access-defns): Delete.
6165 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6166 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6167 with state-parallel=exec?.
6168 (cgen-*): Call sim-analyze-insns! here.
6169 * sim-decode.scm (cgen-*): Ditto.
6170 * sim-model.scm (cgen-*): Ditto.
6171 * sim.scm (-sim-insns-analyzed): New global variable.
6172 (sim-init!): Reset it.
6173 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
6174 already done the analysis.
6176 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6179 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6180 (arm arch): Update isa spec.
6181 (arm,thumb isas): Define.
6182 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6183 (arm7tdmi mach): Add isa spec.
6184 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
6185 `const' on word number.
6186 * fr30.cpu (fr30 arch): Update isa spec.
6188 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6190 * i960.cpu (i960 arch): Update isa spec.
6192 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6193 liw-insns,parallel-insns moved to isas spec.
6194 * m32r.cpu (m32r arch): Update isas spec.
6196 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6197 liw-insns,parallel-insns moved to isa spec.
6198 * sparc.cpu (sparc arch): Update isas spec.
6199 (sparc isa): Define.
6200 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6201 decode-assist moved to isa spec.
6202 * sparc64.cpu (sparc64 cpu): Ditto.
6203 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6204 * desc-cpu.scm (-gen-isa-table-defns): New proc.
6205 (-gen-mach-table-defns): Output mach table.
6206 (-gen-hash-defines): Delete insn size macros, except for
6208 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
6209 (cgen-desc.h): Define MAX_ISAS.
6210 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
6211 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
6212 (arch-* accessors): Renamed from arch:*. All callers updated.
6213 (current-arch-isa-name-list): New proc.
6214 (-arch-parse-isas): Renamed from -arch-parse-isa.
6215 (def-isa-attr!): Rewrite.
6216 (<iframe>): New class.
6217 (<itype>): New class.
6219 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6220 (isa-integral-insn?,isa-parallel-exec?): New procs.
6221 (-isa-parse,-isa-read,define-isa): New proc.
6222 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6223 liw-insns moved to <isa>.
6224 (cpu-* accessors): Renamed from cpu:*. All callers updated.
6225 (-cpu-parse,-cpu-read): Update.
6226 (state-*): Renamed from state:*. All callers updated.
6227 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6229 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6230 (state-decode-assist): New proc.
6231 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6232 (-adata-set-derived!): Rewrite.
6233 (adata-integral-insn?): Renamed from adata:integral-insn?. All
6235 (arch-init!): Add define-isa command.
6236 * read.scm (<reader>): Default keep-isa member to (all).
6237 (reader-* accessors): Renamed from reader:*. All callers updated.
6238 (-keep-isa-set!): Call string->symbol on isa name list.
6239 (keep-isa-validate!): Rewrite.
6240 (current-isa): New proc.
6241 (keep-isa?): Recognize "all".
6242 (-init-parse-cpu!): New arg keep-isa. All callers updated.
6243 Call -keep-isa-set!.
6244 (cmd-if): Recognize keep-isa?.
6245 (cpu-load): New arg keep-isa. All callers updated.
6246 (-opt-spec-update): New proc.
6247 (common-arguments): First arg is string, not symbol.
6248 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
6250 * rtl.scm (rtx-get): Default mode of string arg is INT.
6252 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
6254 * rtx-funcs.scm (join:): Pass cpu to handler.
6256 * configure.in (guile_include_dir): Delete.
6257 * configure: Rebuild.
6258 * Makefile.in: Rebuild.
6259 * doc/Makefile.in: Rebuild.
6261 * sid-cpu.scm (-extract-chunk-specs): New proc.
6262 (gen-define-fields): Use it.
6263 (-extract-chunk): New proc.
6264 (-gen-extract-beyond-var-list): Use it.
6265 (gen-extract-fields): Simplify.
6267 1999-03-22 Ben Elliston <bje@cygnus.com>
6269 * arm7.cpu (ldri-p): New instruction.
6270 (swi): Do not vector through 0x8 yet--there is nothing there.
6273 (all): Use (const x) in subreg expressions.
6275 1999-03-19 Ben Elliston <bje@cygnus.com>
6277 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6280 1999-03-17 Doug Evans <devans@casey.cygnus.com>
6282 * fr30.cpu (define-arch): Specify "forced" default-alignment.
6283 * mach.scm (-parse-alignment): Recognize "forced" alignment.
6284 * sim-cpu.scm (-extract-chunk-specs): New proc.
6285 (gen-define-fields): Use it.
6286 (-extract-chunk): New proc.
6287 (-gen-extract-beyond-var-list): Use it.
6288 (gen-extract-fields): Simplify.
6290 Port to guile 1.3.1.
6291 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6292 (LIBIBERTY): New var.
6293 (HOB_OBJS): Add cgen-gh.o.
6294 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6295 * Makefile.in: Rebuild.
6296 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6297 * config.in: Rebuild.
6298 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6299 libncurses, libtermcap.
6300 Add checks for needed functions in guile 1.2 not in guile 1.3,
6301 and vice versa. Add test for 3 argument scm_make_vector.
6302 * configure: Rebuild.
6303 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6304 definitions if guile doesn't have them.
6305 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6306 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
6307 with gh_vector_set_x.
6308 (cgh_qsort): Replace gh_list_length with gh_length.
6309 * cgen-gh.h: Add decls for added functions.
6310 (cgh_qsort): Don't declare if IN_HOBBIT.
6311 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
6312 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6313 scm_make_vector with gh_make_vector.
6314 * cos.scm: Use vector-length instead of length on vectors.
6315 * dev.scm (cload): Make varargs proc with keyword/value args.
6316 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
6317 provide version that works with guile 1.2 or 1.3.
6318 Include private copy of scmhob.h.
6319 * scmhob.h: New file. Keep our own copy for now.
6321 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
6323 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6325 (-rtx-traverse-operands): Dump cx temp stack if debugging.
6326 (-cx-temp-dump-stack): Pretty up output.
6328 * arm.cpu: comment out thumb.cpu until isa support ready.
6329 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6330 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6331 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6333 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6335 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6337 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6338 (<hw-address>,mode-ok?): unsigned/signed are compatible.
6340 * operand (op:new-mode): Improve error message.
6342 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
6343 * arm7.cpu: New file.
6345 1999-03-12 Ben Elliston <bje@cygnus.com>
6347 * arm.cpu: Lots of minor fixes after desk checking.
6349 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6351 * thumb.cpu: snapshot of current work
6353 * rtl.scm (rtx-get): Tweak error message.
6355 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6357 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6358 * Makefile.in: Rebuild.
6360 * cos.c (cos_vector_copy): New function.
6361 (_object_copy): Use it.
6363 * mode.scm (mode:eq?): Clean up.
6364 * rtl.scm (cx-new-mode): Copy attributes.
6365 (rtx-get): Don't make copy if <c-expr> with identical mode.
6367 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6369 (gr-names): h-gr register names moved here.
6371 (cr-names): h-cr register names moved here.
6373 (dr-names): h-dr register names moved here.
6375 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6376 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6377 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6379 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6381 (gr-names): h-gr register names moved here.
6383 (cr-names): h-cr register names moved here.
6385 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6386 (h-accums,h-psw): Ditto.
6387 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6389 (gr-names): h-gr register names moved here.
6390 (h-gr-indices): Delete.
6391 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6392 (sparc64 h-gr): Ditto.
6393 (h-y): Add get/set specs.
6395 (fp operands): Rewrite.
6396 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6397 (h-tbr,h-cwp,h-wim): Ditto.
6398 * sparc64.cpu (h-fpsr): Add get/set specs.
6399 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6400 (fp-ld-op): New arg `dest', all callers updated.
6401 (*): Replace `make-di' with `join'.
6403 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6405 (gen-semantic-code): Save/restore rtl generator state.
6406 (cgen-cpu.h): Call rtl-gen-init!.
6407 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6408 (-gen-ifld-extract-beyond): Ditto.
6409 (<multi-ifield>,gen-ifld-extract): Ditto.
6410 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6412 (-hw-gen-set-quiet-pc): Ditto.
6413 (<hw-pc>,gen-write): Ditto.
6414 (-hw-cxmake-get): Ditto. Call getter function if present.
6415 (<hw-register>,cxmake-get-raw): New method.
6416 (<hw-register>,gen-set-quiet-raw): New method.
6417 (-hw-gen-set-quiet): New arg `gstate'.
6418 (hw-fun-access?): Delete.
6419 (gen-reg-access-defn): Output function contents.
6420 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6422 (-gen-hw-index): Ditto.
6423 (op:read): Update gen-read invocation.
6424 (op:write): Update gen-write invocation.
6425 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6427 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6428 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6429 (<unit>,gen-profile-code): Update to sim.scm version.
6431 * sim-arch.scm (-regs-for-access-fns): New proc.
6432 (-biggest-reg-mode): New proc.
6433 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6434 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6435 virtual regs separately.
6436 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6438 (gen-semantic-code): Save/restore rtl generator state.
6439 (cgen-cpu.h): Call rtl-gen-init!.
6440 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6441 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6442 renamed to mach-bfd-name.
6443 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6444 (-gen-ifld-extract-beyond): Ditto.
6445 (<multi-ifield>,gen-ifld-extract): Ditto.
6446 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6447 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6448 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6450 (hw-fun-access?): Delete.
6451 (-hw-gen-set-quiet-pc): New arg `gstate'.
6452 (<hw-register>,gen-get-macro): Rewrite.
6453 (<hw-register>,gen-set-macro): Rewrite.
6454 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6455 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6456 (<hw-register>,cxmake-get-raw): New method.
6457 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6458 (<hw-register>,gen-set-quiet-raw): New method.
6459 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6461 (-gen-hw-index): Ditto.
6462 (<hw-index>): New arg `gstate'.
6463 (-gen-hw-selector): Update call to rtx-c.
6464 (<pc>): New arg `gstate'.
6465 (op:read): Update gen-read invocation.
6466 (op:write): Update gen-write invocation.
6467 (<operand>,cxmake-get): Handle raw-reg.
6468 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6469 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6470 (<operand>,gen-set-quiet): Handle raw-reg.
6471 (<operand>,gen-set-trace): Handle raw-reg.
6472 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6474 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6475 cgen_operand_type enum.
6476 (gen-operand-table): Add operand type enum. Replace pointer to
6477 hardware element with its enum. Null terminate table.
6478 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6479 Build operand table.
6480 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6481 * mach.scm (<arch-data>): New member `isas'.
6482 (adata-isas): New accessor.
6484 (isa-default-insn-word-bitsize): New accessor.
6485 (isa-enum): New proc.
6486 (current-arch-default-insn-word-bitsize): Delete.
6487 (current-isa-list,current-isa-lookup): New procs.
6488 (-arch-parse-isa): New proc.
6489 (-arch-parse): Rewrite.
6490 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6491 (define-arch): Define ISA attribute.
6492 (def-isa-attr!,isa-supports?): New procs.
6493 (<mach>): New member `isas'.
6494 (mach-isas): New accessor.
6495 (-mach-parse): New arg `isas', all callers updated.
6496 (-mach-read): Recognize `isas'.
6497 (arch-finish!): Rewrite.
6498 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6499 @arch@_cgen_get_{int,vma}_operand.
6500 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6501 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6502 of pointer to table entry.
6503 * opcodes.scm (gen-switch): Handle multiply defined operands.
6504 * operand.scm (op-sort): New proc.
6506 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6507 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6508 (hw-enum): Accept symbol argument.
6509 (hardware-builtin!): Delete attribute FUN-ACCESS.
6510 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6512 * attr.scm (atlist-source-form): New proc.
6513 (attr-builtin!): New attr `PRIVATE'.
6514 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6515 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6516 if they have `PRIVATE' attribute.
6517 (gen-hw-table-defns): Output definitions of explicitly defined
6519 * hardware.scm (<keyword>): New member print-name. Rename member
6520 `value' to `values', all uses updated.
6521 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6522 (keyword-parse): Rewrite.
6523 (-keyword-read): New proc.
6524 (define-keyword): New proc.
6525 (-hw-parse-keyword): New proc.
6526 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6528 (-hw-parse-values): Ditto.
6529 (-hw-parse-get,-hw-parse-set): Rewrite.
6530 (hardware-init!): Add new comment define-keyword.
6531 * mach.scm (<arch>): New member `kw-list'.
6532 (arch:kw-list,arch_set-kw-list!): New accessors.
6533 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6535 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6536 * mode.scm (mode-class-integral?): New proc.
6537 (mode-class-float?,mode-class-numeric?): New procs.
6538 (mode-integral?,mode-float?,mode-numeric?): New procs.
6539 (mode-compatible?): New proc.
6540 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6542 (<ifield>,gen-extract): Ditto.
6543 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6544 (<gstate>): New class.
6545 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6546 (gstate-context,gstate-set-context!): New accessors.
6547 (gstate-macro?,gstate-set-macro?!): New accessors.
6548 (gstate-make,gstate-copy): New procs.
6549 (-rtl-current-gstate): New global.
6550 (current-gstate-simulator?): New proc.
6551 (current-gstate-context,current-gstate-macro?): New procs.
6552 (current-gstate,current-gstate-set!): New procs.
6553 (rtl-gen-init!): Rewrite.
6554 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6555 (tstate-make): New arg `gstate', all callers updated.
6556 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6557 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6558 (tstate-gstate,tstate-set-gstate!): New accessors.
6559 (tstate-copy): New proc.
6560 (tstate-new-cond?,tstate-new-set?): Rewrite.
6561 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6562 (rtx-traverse): New arg `gstate', all callers updated.
6563 (rtx-strdump): New proc.
6564 (-simplify-for-compilation): New arg `gstate', all callers updated.
6565 (semantic-in-out-operands): Ditto.
6566 (semantic-attrs): Ditto.
6567 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6568 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6569 (rtx-value): Rewrite.
6570 (<c-expr>,gen-name): New method.
6571 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6572 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6573 (cx-new-mode): New proc.
6574 (-rtx-c-with-tstate): New proc.
6575 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6577 (-rtx-mode): Rewrite.
6578 (-rtx-mode-compatible?): New proc.
6579 (<c-expr-temp>): New member `value'.
6580 (cx-temp:value): New accessor.
6581 (<c-expr-temp>,make!): Override default method.
6582 (<c-expr-temp>,cxmake-get): Rewrite.
6583 (<c-expr-temp>,gen-set-quiet): Rewrite.
6584 (<c-expr-temp>,gen-set-trace): Rewrite.
6585 (gen-temp-defs): Use cx-temp:value.
6586 (record-temp!): New arg value, all callers updated.
6587 (cx-temp:cx:make): Delete.
6588 (-cx-temp-dump-stack): New proc.
6589 (rtx-get): New arg `gstate', all callers updated. Do mode
6590 compatibility checks. Ensure result has specified mode.
6591 (rtx-set-quiet): New arg `gstate', all callers updated.
6592 (rtx-set-trace): Ditto.
6593 (s-c-call): New arg `tstate', all callers updated.
6594 (s-c-raw-call): Ditto.
6595 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6596 (s-cmpop,s-if,e-if): Ditto.
6597 (s-subreg): New proc.
6598 (-par-new-temp!): New proc.
6599 (-par-next-temp!): Rewrite.
6600 (-par-replace-set-dests): Use -par-new-temp!.
6601 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6602 (s-sequence): Use -rtx-c-with-state.
6603 * rtx-funcs.scm (*): Update.
6604 (raw-reg:): New rtx function.
6606 (join:,subreg:): New rtx functions.
6608 * insn.scm (<insn>): New members pre-cond-trap, condition,
6609 post-cond-trap, compiled-condition.
6611 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6613 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6615 * utils-cgen.scm (parse-symbol): New proc.
6616 (parse-string): New proc.
6617 (gen-get-macro,gen-set-macro): New arg `index-args'.
6618 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6619 Prepend \ to newlines.
6621 * utils.scm (alist-remove-duplicates): Delete.
6623 * sid.scm (sim-init!): Delete private debugging code.
6625 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6627 * cgen-sid.scm: New file for C++ simulator application.
6628 * sid-arch.scm: Ditto.
6629 * sid-cpu.scm: Ditto.
6630 * sid-decode.scm: Ditto.
6631 * sid-model.scm: Ditto.
6633 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6635 1999-03-05 Ben Elliston <bje@cygnus.com>
6637 * arm.cpu: New file.
6639 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6641 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6642 * Makefile.in: Rebuild.
6644 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6645 (-attr-parse): Validate default value.
6647 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6648 (-CGEN-LANG-VERSION): Ditto.
6649 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6650 (<reader>): New member keep-isa plus accessors.
6651 (-keep-isa-set!,keep-isa-validate!): New procs.
6652 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6653 (common-arguments): New variable.
6654 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6655 (-debug-repl,continue): New procs.
6656 (-cgen,cgen): New procs.
6657 * cgen-gas.scm: Rewrite.
6658 * cgen-opc.scm: Rewrite.
6659 * cgen-sim.scm: Rewrite.
6660 * cgen-stest.scm: Rewrite.
6662 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6663 (gas-test-finish!): Call opcodes-finish!.
6664 (gas-test-analyze!): Call opcodes-analyze!.
6665 (<hw-asm>): New method test-data.
6666 (<operand>,testdata): Rewrite.
6667 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6668 (sim-test-finish!): Call opcodes-finish!.
6669 (sim-test-analyze!): Call opcodes-analyze!.
6670 (<hw-asm>): New method test-data.
6671 (<operand>,testdata): Rewrite.
6673 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6675 * fixup.scm (reverse!): Define if missing.
6676 * *.scm: Use reverse! instead of list-reverse!.
6678 * utils.scm (leading-id-char?): New proc.
6679 (id-char?): Rewrite.
6680 (chars-until-delimiter): New proc.
6681 * opc-itab.scm (extract-syntax-operands): Rewrite.
6682 (strip-mnemonic): Rewrite.
6683 (compute-syntax): Rewrite.
6685 * pmacros.scm (-pmacro-substr): New proc.
6686 (pmacros-init!): Add builtin .substr.
6688 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6690 * thumb.cpu: New file.
6692 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6694 * Makefile.am (CGENCFLAGS): New variable.
6695 (WITH_HOBBIT): Use automake conditional.
6696 (CGEN_HOB_SRC): New variable.
6697 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6698 (*.o): Compile with CGENCFLAGS.
6699 (cgen-hob.c): Simplify.
6700 (cgen-nohob.c): New rule.
6701 (hobbit): Renamed from hob.x.
6702 (CLEANFILES): Add cgen-nohob.c.
6703 * Makefile.in: Rebuild.
6704 * doc/Makefile.in: Rebuild.
6705 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6706 (WITH_HOBBIT): Use AM_CONDITIONAL.
6707 * configure: Rebuild.
6708 * aclocal.m4: Rebuild.
6710 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6711 with string-write-map.
6713 * sim-cpu.scm (hw-need-storage?): New proc.
6714 (-gen-hardware-types): Use it.
6715 (gen-parallel-exec-elm): Call op-save-index?.
6717 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6719 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6721 (-gen-ifld-extract-beyond): Ditto.
6722 (<integer>): Delete all references.
6723 (<sim-hardware>): Delete.
6724 (hw-profilable?): New proc.
6725 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6726 (<hw-register>): Rename method get-index-mode to save-index?.
6727 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6728 (<hw-register>,gen-sym-decl): Make virtual.
6729 (<hw-memory>,gen-sym-decl): Make virtual.
6730 (<hw-memory>): Rename method get-index-mode to save-index?.
6731 (<hw-address>,gen-sym-decl): Make virtual.
6732 (<operand>): New method save-index?.
6733 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6735 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6736 prefix added. All uses updated.
6738 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6739 rather than pointer to table entry.
6741 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6742 Remove all hw-asm,op-asm support.
6743 (-gen-parse-number,-gen-parse-address): New procs.
6744 (<keyword>,gen-parse): Redo function name computation.
6745 (<keyword>,gen-print): Ditto.
6746 (<operand>,gen-function-name): Rewrite.
6747 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6748 (opcodes-init!): Delete call to add-parser!.
6750 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6751 Define enum using hardware semantic name.
6752 (-gen-hw-decl,-gen-hw-defn): New procs.
6753 (gen-hw-table-decls): Use -gen-hw-decl.
6754 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6755 CGEN_HW_ENTRY structs.
6756 (gen-operand-table): Output hw's enum, not pointer to table entry.
6757 (-gen-cpu-open): Build table of selected hardware elements.
6759 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6760 (<hardware> support): Delete.
6761 (<hw-asm>): Delete, moved to hardware.scm.
6762 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6763 (<hw-asm>,gen-table-entry): New method.
6764 (<hw-asm>,parse!): Delete.
6765 (<keyword>,gen-table-entry): New method.
6766 (<keyword>,parse!): Delete.
6767 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6768 for gen-decl,gen-defn,gen-ref,gen-init.
6769 (desc-init!): Don't create parser for operand asm specs.
6771 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6772 * ifield.scm (<ifield>): New member `mode'.
6773 (<ifield>,make!): New arg `mode'.
6774 (ifld-mode): Rewrite.
6775 (ifld-hw-type): Rewrite.
6776 (<ifield>,min-value): Rewrite.
6777 (<ifield>,max-value): Rewrite.
6778 (-ifield-parse): New arg `mode'.
6779 (-ifield-read): Update.
6780 (define-full-ifield): New arg `mode'.
6781 (define-full-multi-ifield): Ditto.
6782 (-multi-ifield-parse): Ditto.
6783 (-multi-ifield-read): Update.
6784 (define-full-multi-ifield): New arg `mode'.
6785 (ifield-builtin!): Update definition of f-nil.
6786 * simplify.inc (define-normal-ifield): Update call to
6788 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6789 (define-normal-hardware): Delete arg asm. New args indices, values,
6790 handlers. Update call to define-full-hardware.
6791 (define-simple-hardware,dsh): New pmacros.
6792 (define-normal-operand): Update call to define-full-operand.
6793 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6794 Specify INT/UINT mode instead.
6795 (h-gr,h-cr): Use "indices" instead of "asm".
6796 (h-dr,h-ps): Update keyword syntax.
6797 (h-r13,h-r14,h-r15): Ditto.
6798 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6799 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6800 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6801 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6802 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6803 Specify INT/UINT mode instead.
6804 (h-gr): Use "indices" instead of "asm".
6805 (h-cc): Update keyword syntax.
6806 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6807 Specify INT/UINT mode instead.
6808 (h-hi16,h-slo16,h-ulo16): Update.
6809 (h-gr,h-cr): Use "indices" instead of "asm".
6810 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6811 (h-accums): Update keyword syntax.
6812 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6813 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6814 Specify INT/UINT mode instead.
6815 (h-gr-indices): New pmacro.
6816 (h-gr32,h-gr64): Split up from h-gr.
6817 (h-a): Update type spec. Use values instead of asm spec.
6818 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6819 (h-y,h-annul-p): Ditto.
6820 (h-asr): Update keyword spec.
6821 (h-lo10,h-lo13,h-hi22): Update.
6822 (get-freg-spec,set-freg-spec): New pmacros.
6823 (h-fr32,h-fr64): Split up from h-fr.
6824 (rdd): Comment out get/set specs.
6825 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6826 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6827 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6828 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6829 UNSIGNED. Specify INT/UINT mode instead.
6830 (h-*): Use dsh instead of dnh where appropriate.
6831 (h-ixcc): Update type spec. Use "values" instead of "asm".
6832 (h-p,h-membarmask): Ditto.
6833 (membarmask): Use "handlers" instead of "asm".
6835 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6836 values,handlers,getters,setters plus accessors.
6837 (hw-mode-ok?,hw-default-mode): New procs.
6838 (<hardware-base>): Rename method new-mode to mode-ok?
6839 (<hardware-base>): New method get-index-mode.
6840 (hw-index-mode): New proc.
6841 (pc?): Delete, moved to operand.scm.
6842 (address?): New proc.
6843 (<hardware>): Delete.
6844 (<hw-asm>): Definition moved here from desc.scm.
6845 (keyword-parse): New proc.
6846 (hardware-parsers): Delete.
6847 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6848 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6849 (-hw-parse-get,-hw-parse-set): New procs.
6850 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6851 indices,values,handlers,get,set. Rewrite.
6852 (-hw-read-extra): Delete.
6854 (define-hardware): Don't add object if not selected.
6855 (define-full-hardware): Ditto.
6856 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6857 (<hw-register>): Member `type' moved to baseclass. Delete member
6859 (<hw-register>,parse!): Rewrite.
6860 (<hw-register>): Delete methods get-rank,get-mode.
6861 (<hw-register>): Method new-mode renamed to mode-ok?
6862 (<hw-register>): New method get-index-mode.
6863 (<hw-pc>,parse!): Rewrite.
6864 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6865 (<hw-memory>,parse!): Rewrite.
6866 (<hw-memory>): Delete methods get-rank,get-mode.
6867 (<hw-memory>): Method new-mode renamed to mode-ok?
6868 (<hw-memory>): New method get-index-mode.
6869 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6871 (<hw-immediate>,parse!): Rewrite.
6872 (<hw-immediate>): Delete methods get-rank,get-mode.
6873 (<hw-immediate>): Method new-mode renamed to mode-ok?
6874 (<hw-address>): Delete member hw-asm.
6875 (<hw-address>,parse!): Rewrite.
6876 (<hw-address>): Delete methods get-rank,get-mode.
6877 (<hw-address>): Method new-mode renamed to mode-ok?
6878 (hw-profilable?): Delete.
6879 (hardware-init!): Delete hardware-parsers reference.
6880 Update argument specs of command define-full-hardware.
6881 (hardware-builtin!): Update definitions of hardware builtins.
6882 * operand.scm (<operand>): New members hw-name,mode-name.
6883 Delete member op-asm. New member handlers.
6884 (<operand>,make!): Update.
6885 (op:hw-name,op:mode-name,op:handlers): New procs.
6888 (<operand>): New method get-index-mode.
6889 (<pc>,make!): Update.
6890 (op:new-mode): Rewrite.
6891 (operand-parsers): Delete.
6892 (-operand-parse): Rewrite. Return #f if insn not selected.
6893 (-op-read-extra): Delete.
6894 (-operand-read): Update.
6895 (define-operand,define-full-operand): Update.
6896 (operand-init!): Delete operand-parsers reference.
6897 Update syntax of define-full-operand command.
6899 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6900 (define-full-insn): Update.
6901 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6902 (define-full-minsn): Update.
6904 * mode.scm (<mode>): New member class.
6905 (mode:class): New proc.
6907 (-mode-parse): New arg class.
6908 (define-full-mode): Update.
6909 (mode-find): Rewrite.
6910 (mode-make-int,mode-make-uint): New procs.
6911 (mode-init!): Update syntax of define-full-mode command.
6912 (mode-builtin!): Update definitions of builtin modes.
6914 * model.scm (<profile>): Delete.
6916 * read.scm (keep-atlist?): New proc.
6917 (keep-multiple?): New proc.
6918 (<parser-list>): Delete.
6919 (add-parser!,parse-spec!): Delete.
6921 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6922 (def-rtx-syntax-node): Ditto.
6923 (-rtx-traverse-debug?): New variable.
6924 (tstate-make): New proc.
6925 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6926 (tstate-new-cond?,tstate-new-set?): New procs.
6927 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6928 tstate. All callers updated.
6929 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6930 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6931 (-build-operand!): Replace arg cond? with tstate.
6932 (-build-reg-operand!,-build-mem-operand!): Ditto.
6933 (-build-index-of-operand!): Update making of <operand> object.
6934 (s-ifield): New arg tstate. All callers updated.
6935 (hw:): New arg tstate. All callers updated. Replace call to
6936 current-hw-lookup with current-hw-sem-lookup-1.
6937 (s-index-of): New arg tstate. All callers updated.
6939 (-rtx-use-sem-fn?): New proc.
6940 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6942 (s-convop): Only use semantic mode when using semantic cover fns.
6943 (s-cmpop): Call -rtx-use-sem-fn?.
6944 (s-cond,s-case): New arg tstate. All callers updated.
6945 (s-parallel,s-sequence): Ditto.
6947 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6949 * types.scm (<scalar>): Rewrite implementation.
6950 (<integer>): Delete.
6951 (parse-type): Rewrite.
6953 * utils-cgen.scm (parse-handlers): New proc.
6955 * utils.scm (!=): New proc.
6957 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6959 * pmacros.scm (-pmacro-expand): Fix typo.
6961 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6963 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6964 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6965 * i960.cpu (build-hex2): New pmacro.
6966 (insn-opcode): Simplify.
6967 (insn-opcode2): Ditto.
6969 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6970 * cgen-stest.scm (catch-with-backtrace): Ditto.
6972 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6974 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6975 All callers updated.
6976 (-pmacro-invoke): New proc.
6977 (-pmacro-sym,-pmacro-str): New procs.
6978 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6979 (pmacros-init!): Install builtins .iota, .map, .apply.
6980 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6981 (h-fr): Simplify register name spec.
6982 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6983 * utils.scm (num-args-ok?): New proc.
6985 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6987 * pmacros.scm (-pmacro-error): New proc.
6988 (-pmacro-expand): Use it.
6989 (-pmacro-splice): New proc.
6990 (pmacros-init!): Install new builtin .splice.
6992 * sparc.cpu: Include sparc64.cpu when appropriate.
6993 (f-mmask,f-simm11): Moved to sparc64.cpu.
6994 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6995 (ANNUL attribute): Delete.
6996 (test-* pmacros): New arg cc, all callers updated.
6997 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6998 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
7000 (ldstub,swap): Moved to sparccom.cpu.
7001 * sparc64.cpu: Add more insns.
7003 1999-02-09 Doug Evans <devans@casey.cygnus.com>
7005 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
7007 (cgen-sem-switch.c): Ditto.
7008 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
7009 moved to cgen-engine.h.
7010 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
7011 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
7012 global. Cache attributes and insn length in IDESC.
7013 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
7014 @cpu@_opcode renamed to @cpu@_get_idata.
7015 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
7016 done later underneath sim_resume.
7017 (@mach@_mach): Record @cpu@_prepare_run.
7018 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
7020 (-hw-gen-set-quiet-pc): Ditto.
7021 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
7022 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
7023 (<hw-addr>,cxmake-get): Ditto.
7024 (<hw-iaddr>,cxmake-get): Ditto.
7025 (<pc>,cxmake-get): Ditto.
7026 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
7027 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
7028 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
7029 (<hw-pc>,gen-write): Use hw-selector-default.
7030 (<hw-register>,gen-write): Ditto.
7031 (<hw-memory>,gen-write): Ditto.
7032 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
7033 (-gen-hw-selector): New proc.
7035 * desc.scm: New file.
7036 * desc-cpu.scm: New file.
7037 * opcodes.scm: Split up into several smaller files.
7038 * opc-asmdis.scm: New file.
7039 * opc-ibld.scm: New file.
7040 * opc-itab.scm: New file.
7041 * opc-opinst.scm: New file.
7042 * Makefile.am (desc): New target.
7043 (opcodes): Update args to cgen-opc.scm.
7044 * Makefile.in: Rebuild.
7045 * aclocal.m4: Rebuild.
7046 * config.in: Rebuild.
7047 * configure.in: Update arg to AC_INIT.
7048 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
7049 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
7051 * configure: Rebuild.
7052 * cgen-gas.scm: Update files to load.
7053 * cgen-opc.scm: Ditto. Reorganize option letters.
7054 * cgen-sim.scm: Update files to load.
7055 * cgen-stest.scm: Ditto.
7056 * dev.scm (cload): New app "DESC".
7057 (load-opc): Update files to load.
7058 (load-gtest,load-sim,load-stest): Ditto.
7060 * attr.scm (bool-attr?): New proc.
7061 (attr-list-enum-list): New proc.
7062 (-attr-sort): Rewrite.
7063 (attr-builtin!): Give ALIAS attribute a fixed index.
7064 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
7065 calculate attribute enum list.
7066 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
7068 * insn.scm (-insn-parse): Renamed from parse-insn.
7070 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
7073 * mode.scm (-mode-parse): Renamed from parse-mode.
7075 * operand.scm (<operand>): New member `selector'.
7076 (<operand>,make!): Use default selector.
7077 (hw-selector-default): New variable.
7078 (hw-selector-default?): New proc.
7080 * pmacros.scm (pmacros-init!): New proc.
7081 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
7082 (-env-set!): Delete.
7083 (-pmacro-expand): New proc apply-macro.
7084 Use it in scan-list,scan. Scan list first, then see if macro
7086 (define-pmacro): Rewrite.
7087 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
7089 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
7090 selected if (current-mach) seen.
7091 (rtx?): Renamed from rtx-uneval?, all callers updated.
7092 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
7094 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
7095 selector, all callers updated.
7096 (hw:): New arg selector, all callers updated. Delete old comments
7098 (reg:,mem:): Handle selectors
7099 * rtx-funcs.scm (reg:): Handle selectors.
7101 * read.scm: Renamed from cpu.scm.
7102 (<command>): New class.
7103 (<reader>): New member commands.
7104 (reader-add-command!): New proc.
7105 (reader-lookup-command): New proc.
7106 (reader-error,-reader-process-expanded,reader-process): New procs.
7107 (reader-read-file!): New proc.
7108 (include): Call reader-read-file!.
7110 (cpu-load): Call reader-read-file!.
7111 * utils.scm (num-args): New proc.
7112 * simplify.inc: New file.
7113 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
7114 procs. Move define-normal-foo procs (and abbreviated forms) to
7115 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
7117 * fr30.cpu: Include simplify.inc.
7118 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7119 * i960.cpu: Include simplify.inc.
7120 * m32r.cpu: Include simplify.inc.
7121 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7122 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7123 * sparc.cpu: Include simplify.inc.
7124 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7125 * utils-cgen.scm (parse-error): Moved to read.scm.
7126 (sanitize): Rewrite.
7127 (utils-init!): New proc.
7129 1999-02-02 Doug Evans <devans@casey.cygnus.com>
7131 * sparc.cpu: New file.
7132 * sparc32.cpu: New file.
7133 * sparc64.cpu: New file.
7134 * sparccom.cpu: New file.
7135 * sparc.opc: New file.
7137 1999-01-27 Frank Eigler <fche@cygnus.com>
7139 * utils.scm (gen-copyright): New proc.
7141 1999-01-27 Doug Evans <devans@casey.cygnus.com>
7143 Parameterize rtl parsing, rather than having lots of little handlers.
7144 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7145 Delete member traverse.
7146 (rtx:set-traverse!): Delete.
7147 (-rtx-valid-types,-rtx-valid-matches): New variables.
7148 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7149 instead of expression. All callers updated.
7150 (def-rtx-node): New args arg-types,arg-modes.
7151 (def-rtx-syntax-node): Ditto.
7152 (def-rtx-dual-mode): Ditto.
7153 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7154 All callers updated.
7155 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7156 All callers updated.
7157 (rtx-macro-expand): New proc.
7158 (-rtx-traverse-check-args): Delete.
7159 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7160 an rtx specific traverser.
7161 (-rtx-any-mode?,-rtx-symornum?): New procs.
7162 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7163 (-rtx-traverse-no-mode): Delete.
7164 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7165 (-rtx-traverse-operands): Rewrite.
7166 (-rtx-traverse-expr): Rewrite.
7167 (rtx-traverse): Don't expand macros here, leave for caller to do.
7168 (rtx-simplify): Delete.
7169 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
7171 (rtx-true?,rtx-false?): Ditto.
7172 (-rtx-ref-type): Set dest is operand 1 now.
7173 (-simplify-for-compilation): New proc.
7174 (semantic-in-out-operands): Recognize regno as an alias for index-of.
7175 Expand macros before calling rtx-traverse. Sort operands by name
7176 to avoid unnecessary semantic formats.
7177 (semantic-attrs): New proc.
7178 (rtx-uneval?): Handle (<rtx-func> ...).
7179 (s-boolifop): Delete arg mode. All callers updated.
7180 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7181 (eq-attr): New arg obj.
7183 * m32r.cpu (rach): Update calls to andif.
7185 * minsn.scm (-minsn-parse-expansion): Renamed from
7186 parse-minsn-expansion.
7187 (-minsn-parse): Renamed from parse-minsn.
7188 (-minsn-read): Renamed from read-minsn.
7189 (def-minsn): Don't check APPLICATION here.
7190 (def-full-minsn): New proc.
7191 (define-macro-insn): Check APPLICATION here. Expand macros.
7192 (define-normal-macro-insn): Ditto.
7194 * utils.scm (word-value): New arg start-lsb?.
7195 (word-mask,word-extract): Ditto.
7196 (split-bits,powers-of-2): Use integer-expt instead of expt.
7197 (bit-set?): Handle 32 bit values (which are bignums).
7198 (cg-logand,cg-logxor): New functions.
7199 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7200 (<ifield>,field-value): Update call to word-value.
7201 (<ifield>,min-value): Use integer-expt instead of expt.
7202 (<ifield>,max-value): Ditto.
7204 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7206 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7208 Compute raw instruction format in addition to semantic based format.
7209 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7210 (<iformat> accessors): Rename accessors to ifmt-*.
7211 (<sformat>): New class.
7212 (fmt-enum): Renamed from fmt:enum.
7213 (-ifmt-search-key): Rewrite.
7214 (-sfmt-search-key): New proc.
7215 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7216 Compute iformat and sformat search keys.
7217 (ifmt-build): Update.
7218 (sfmt-build): New proc.
7219 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7220 (ifmt-compute!): Compute instruction format <iformat> based on
7221 instruction fields alone. Compute new semantic format <sformat>
7222 based on instruction fields and semantic information.
7223 (ifmt:lookup): Delete.
7224 * mach.scm (<arch>): New member sfmt-list, plus accessors.
7225 (current-sfmt-list): New proc.
7226 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7227 Rename member fmt to ifmt. New members fmt-desc, sfmt.
7228 (insn-length,insn-length-bytes): Update.
7229 (insn:mask-length,insn:mask): Update.
7230 (insn-lookup-op): Update.
7231 * gas-test.scm (gas-test-analyze!): Update.
7232 (gen-gas-test): Ditto.
7233 * sim-test.scm (sim-test-analyze!): Update.
7234 (gen-sim-test): Ditto.
7235 * opcodes.scm (gen-operand-instance-table): Update.
7236 (gen-operand-instance-ref): Ditto.
7237 (max-operand-instances): Use heuristic if semantics not parsed.
7238 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7239 (opcodes-analyze!): Only scan semantics of building operand instance
7241 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7242 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7243 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7244 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7245 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7246 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7247 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7249 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7250 New arg lsb0? All callers updated.
7251 (decode-bits): New arg lsb0?. All callers updated.
7252 (opcode-slots): Update call to bit-set?. Call integer-expt instead
7254 (-gen-decode-bits): New arg lsb0?. All callers updated.
7255 (build-slots): Call integer-expt instead of expt.
7256 (build-decode-table-entry): Handle crossing word boundaries better.
7257 (-gen-decode-switch): New arg lsb0?. All callers updated.
7258 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7260 * enum.scm (define-enum): Rewrite.
7261 (define-normal-enum): Ditto.
7262 (def-full-insn-enum): New proc.
7263 (define-normal-insn-enum): Rewrite.
7265 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7267 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7269 * dev.scm: Add sid support.
7271 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7272 (CLEANFILES): Add tmp-*.
7273 * Makefile.in: Rebuild.
7275 * doc/Makefile.am: New file.
7276 * doc/Makefile.in: New file.
7277 * doc/cgen.texi: New file.
7278 * Makefile.am (SUBDIRS): Define.
7279 * Makefile.in: Rebuild.
7280 * configure.in: Create doc/Makefile.
7281 * configure: Rebuild.
7283 1999-01-18 Doug Evans <devans@casey.cygnus.com>
7285 * insn.scm (insn:syn): Delete.
7287 1999-01-15 Doug Evans <devans@casey.cygnus.com>
7289 * fr30.cpu (model fr30-1): Add state variables load-regs,
7290 load-regs-pending. Delete h-gr. Clean up operand names of all units.
7291 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7292 (model m32rx): Ditto.
7293 (addi): Simplify function unit usage spec.
7294 (ld-plus): Rewrite operand names in function unit usage spec.
7295 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7296 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7297 overridden. Allow operand to appear in input and output spec.
7298 (<insn>,gen-profile-code): string-append -> string-list.
7300 * ifield.scm (define-ifield): Call pmacro-expand.
7301 (define-full-ifield,define-normal-ifield): Ditto.
7302 (define-multi-ifield,define-normal-multi-ifield): Ditto.
7304 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7305 with-scache and without-scache cases.
7307 1999-01-14 Doug Evans <devans@casey.cygnus.com>
7309 * fr30.cpu (fr30-1): Add state variable h-gr.
7310 Add units u-cti, u-load, u-store, u-ldm, u-stm.
7311 (all insns): First pass at providing cycle counts.
7312 * sim.scm (<unit>,gen-profile-code): Only check for output operands
7313 when initializing unit output operands, ditto for input operands.
7315 * insn.scm (insn-length,insn-length-bytes): New procs.
7316 * mach.scm (-adata-set-derived!): Use them.
7317 * sim-cpu.scm (-gen-sem-case): Ditto.
7319 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7320 (-gen-write-case): Ditto.
7321 (gen-semantic-fn): Ditto. Split into two:
7322 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
7324 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
7325 scache/no-scache appropriately. All callers updated.
7326 (-gen-sem-case): PCADDR->IADDR.
7327 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7329 * sim-decode.scm (*): Replace string-append,string-map with
7330 string-list,string-list-map where the result is sufficiently large.
7331 (-gen-decode-insn-table): Go back to simple version for non-scache
7332 case: just record IDESC in decoder tables and leave field extraction
7334 (-gen-decode-switch): Ditto.
7335 (-gen-decode-fn): Ditto.
7336 (-gen-extract-decls): Only emit format enum if with-scache?.
7337 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7339 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7340 (-gen-insn-timing): Ditto.
7341 * sim.scm (gen-argbuf-type): Only output sem_fields union in
7344 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7345 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7347 1999-01-12 Doug Evans <devans@casey.cygnus.com>
7349 * cpu.scm (keep-mach-validate!): New proc.
7350 (include): New proc.
7352 * mach.scm (current-arch-mach-name-list): New proc.
7353 (-parse-arch-machs): Always return canonical form.
7354 (def-arch): Validate user specified machs to be kept.
7355 (def-mach-attr!): Simplify.
7357 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7358 (option-init!): Initialize it.
7359 (option-set!): Set it.
7360 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7361 output operand instance tables.
7362 (cgen-opc.in): Only output operand instance tables if asked to.
7364 * sim.scm (option-init!,option-set!): Clarify returned value.
7366 * sim.scm (gen-mach-bfd-name): Move from here.
7367 * utils-cgen.scm: To here.
7369 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7371 * fr30.cpu (ilm): Fix comment field.
7372 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7375 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7376 (rtx-true?, rtx-false?): New procs.
7377 * rtx-funcs.scm (annul): Rename vpc to pc.
7378 (-rtx-traverse-if): Improve determination of whether then/else parts
7379 are conditionally executed.
7381 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7383 (gen-argbuf-type): Simplify generated definition (big sem_fields
7384 union moved outside).
7386 1999-01-11 Ben Elliston <bje@cygnus.com>
7388 * doc/porting.texi: New file.
7390 * doc/intro.texi: New file.
7391 (Layout): Use @example to insert preformatted ASCII text (such as
7392 diagrams). @code is inappropriate here.
7394 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7396 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7398 * m32r.opc (print_hash): Cast dis_info.
7400 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7401 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7404 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7406 * i960.cpu (f-br-disp): Remove RELOC attribute.
7407 (f-ctrl-disp): Ditto.
7408 (callx-disp): set-quiet -> set for (reg h-gr 2).
7409 (callx-indirect,callx-indirect-offset): Ditto.
7411 * Makefile.am (gas-test): Fix dependencies.
7412 * Makefile.in: Rebuild.
7413 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7414 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7415 (gas-test-analyze!): Use syntax-break-out.
7416 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7417 (sim-test-analyze!): Use syntax-break-out.
7418 (cgen-build.sh): Use gen-file-name.
7419 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7420 * insn.scm (syntax-break-out): New proc.
7421 * utils.scm (gen-file-name): New proc.
7423 * fixup.scm (nil,<?,<=?,>?): Delete.
7425 * utils.scm (count-true): Rewrite.
7427 * slib/sort.scm: Move sort.scm to slib directory.
7430 * iformat.scm (ifmt-compute!): Record empty format.
7432 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7433 internal procs outside. Handle expression register numbers.
7436 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7438 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7440 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7441 (gen-semantic-fn,-gen-sem-case): Ditto.
7442 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7443 (cgen-semantics.c): Ditto.
7444 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7445 (gen-ifmt-argvars-defns): New proc.
7446 (gen-ifmt-argvars-assigns): New proc.
7447 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7448 (-gen-decode-fn): Handle non-with-scache case.
7449 (cgen-decode.c): Define WANT_CPU to @cpu@.
7450 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7451 (cgen-model.c): Define WANT_CPU to @cpu@.
7452 * sim.scm (gen-ifld-extract-argvar): New proc.
7453 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7454 with FUN-ACCESS specified.
7455 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7456 (<hw-register>,gen-extract): New arg local?.
7457 (<hw-address>,gen-extract): Ditto.
7458 (-hw-cxmake-get): Handle non-with-scache case.
7459 (-hw-gen-set-quiet): Ditto.
7460 (<hw-address>,cxmake-get): Handle non-with-scache case.
7461 (gen-op-extract-argvar): New proc.
7462 (<operand>,gen-record-profile): Rewrite.
7463 (<operand>,gen-profile-code): Rewrite.
7464 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7465 (gen-argbuf-fields-union): New proc.
7466 (gen-argbuf-type): Use it. Handle non-scache case.
7468 * *.scm: class:foo procs renamed to class-foo.
7469 * attr.scm (<attribute>): New member `for'.
7470 (-attr-parse): New first value in list for default if
7472 (non-bool-attr-list,attr:add!): Delete.
7473 (def-attr): Use current-attr-add!.
7474 (atlist-attr-value-no-default): New proc.
7475 (attr-lookup-default): Handle boolean attributes.
7476 (gen-attr-enum): New proc.
7477 (-attr-remove-meta-attrs-alist): New proc.
7478 (attr-nub): New proc.
7479 (current-attr-list-for): New proc.
7480 (current-{ifld,hw,op,insn}-attr-list): New procs.
7481 (attr-builtin!): New proc.
7482 * cpu.scm (keep-obj?): Rewrite.
7483 (-init-parse-cpu!): Call arch-init!.
7484 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7485 (-finish-parse-cpu!): Call arch-finish!.
7486 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7487 (def-enum,def-full-enum): Use current-enum-add!.
7488 (gen-obj-list-enums): New proc.
7489 * hardware.scm (hw:add!,hw:lookup): Delete.
7490 (def-hardware,def-hardware-ext): Use current-hw-add!.
7491 (hw:std-attrs,hw:attr-list): Delete.
7492 (hardware-builtin!): Define builtin hardware attributes.
7493 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7494 (def-ifield,def-full-ifield): Use current-ifld-add!.
7495 (ifld:std-attrs,ifld:attr-list): Delete.
7496 (ifield-builtin!): New proc.
7497 * insn.scm (insn:add!,insn:lookup): Delete.
7498 (def-full-insn): Use current-insn-add!.
7499 (insn:std-attrs): Delete.
7500 (insn-builtin!): New proc.
7501 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7503 (<arch-data>): New member machs.
7504 (current-attr-list,current-enum-list): New procs.
7505 (current-op-list,current-minsn-list): New procs.
7506 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7507 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7509 (-parse-arch-machs): New proc.
7510 (-arch-parse): New arg machs, all callers updated.
7511 (-arch-read): Handle machs spec.
7512 (def-arch): Define MACH attribute here.
7513 (mach-init!,mach-finish!): Not here.
7514 (cpu:add!,cpu:lookup): Delete.
7515 (def-cpu): Use current-cpu-add!.
7516 (<mach>): New member bfd-name.
7517 (-mach-parse): New arg bfd-name, all callers updated.
7518 (-mach-read): Handle bfd-name spec.
7519 (mach:add!,mach:lookup): Delete.
7520 (def-mach): Use current-mach-add!.
7521 (def-mach-attr!): New proc.
7522 (arch-init!): New proc.
7523 (arch-finish!): New proc. Reverse all object lists here.
7524 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7525 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7526 (define-normal-macro-insn): Ignore minsn if mach not kept.
7527 * mode.scm (mode-builtin!): New proc.
7528 * model.scm (model:add!,model:lookup): Delete.
7529 (def-model): Use current-model-add!.
7530 * opcodes.scm (insn:attr-list): Delete.
7531 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7532 (gen-attr-table-defn): Emit value for default.
7533 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7534 (op:attr-list): Delete.
7535 (gen-operand-decls,gen-insn-decls): New proc.
7536 (compute-insn-attr-list): Delete.
7537 (cgen-opc.h): Reorganize and simplify.
7538 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7539 (def-operand,def-full-operand): Use current-op-add!.
7540 (op:std-attrs): Delete.
7541 (operand-enum): Delete.
7542 (operand-builtin!): Define builtin operand attrs.
7543 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7544 (gen-attr-enum-decl): Use gen-obj-list-enums.
7545 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7547 * fr30.cpu (define-arch): Add machs spec.
7548 (f-i4): SIGNED attribute -> !UNSIGNED.
7549 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7550 (HASH-PREFIX): Define operand attribute.
7551 (NOT-IN-DELAY-SLOT): Define insn attribute.
7552 * i960.cpu (define-arch): Add machs spec.
7553 * m32r.cpu (define-arch): Add machs spec.
7554 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7555 (HASH-PREFIX): Define operand attribute.
7556 (FILL-SLOT): Define insn attribute.
7558 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7560 * fr30.cpu (stilm): Correct mask for and operation.
7562 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7564 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7565 Replace START/EXIT with start/pass.
7566 (gen-sim-test): Delete ".text".
7568 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7570 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7572 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7574 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7575 (h-sbit): Make it FUN-ACCESS.
7576 (h-gr): Reorder so that general regs are always printed by number.
7578 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7580 * i960.cpu (flushreg): Use nop.
7582 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7584 * m32r.cpu (default-alignment): Specify.
7585 * mach.scm (<arch-data>): New member default-alignment.
7586 (adata:default-alignment): New proc.
7587 (current-arch-default-alignment): New proc.
7588 (-arch-parse): New arg default-alignment.
7589 (parse-alignment): New proc.
7590 (-arch-read): Handle default-alignment spec.
7592 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7594 * insn.scm (f-%): Delete.
7595 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7596 be readded if proved useful.
7597 (gen-extract-fields): Ditto. Use gen-ifetch.
7598 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7599 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7601 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7603 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7605 1998-12-14 Dave Brolley <brolley@cygnus.com>
7607 * fr30.cpu: Remove stub macros.
7608 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7609 (div2): Don't use addc/subc.
7611 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7613 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7616 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7618 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7620 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7622 * cpu.scm (keep-all?): New proc.
7623 (assert-keep-all): Use it.
7624 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7625 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7626 Check for spelling errors.
7628 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7630 * rtl.scm (s-convop): Call -rtx-sem-mode.
7632 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7634 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7635 (-parse-hw-profile): Ditto.
7636 (<hw-register>, parse!): Return `void' result.
7637 (<hw-pc>, parse!): Ditto.
7638 (<hw-memory>, parse!): Ditto.
7639 (<hw-immediate>, parse!): Ditto.
7640 (<hw-address>, parse!): Ditto.
7642 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7643 (-ifld-parse-encode-decode): New proc.
7644 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7645 (-multi-ifield-parse): Set encode/decode to #f.
7646 (ifld:decode-mode): New proc.
7647 * utils.scm (nub): Rewrite.
7648 * operand.scm (op-nub): Rewrite.
7649 * sim.scm (<ifield>, gen-type): Rewrite.
7650 (-gen-ifld-argbuf-defn): New proc.
7651 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7652 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7653 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7654 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7655 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7656 New method gen-trace-extract.
7657 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7658 from gen-argbuf-elm, return "" if not caching register address.
7659 Rewrite gen-extract. New method gen-trace-extract.
7660 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7661 gen-extract, gen-trace-extract, cxmake-get.
7662 (<hw-iaddress>): New method cxmake-get.
7663 (op-needed-iflds): New proc.
7664 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7665 (-gen-op-argbuf-defn): New proc.
7666 (gen-op-extract): Renamed from op:extract.
7667 (gen-op-trace-extract): Renamed from op:trace-extract.
7668 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7670 (gen-argbuf-elm): Rewrite.
7671 * sim-decode.scm (-gen-record-args): Update.
7673 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7675 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7676 argument position. Flag symbolic macros in function position as
7678 (define-pmacro): Handle quoting in definition of symbolic macros.
7679 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7681 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7683 * fr30.opc (parse_register_list): Account for reverse masks
7685 (print_register_list): Ditto.
7686 (parse_low_register_list_ld): New function.
7687 (parse_hi_register_list_ld): New function.
7688 (parse_low_register_list_st): New function.
7689 (parse_hi_register_list_st): New function.
7690 (print_hi_register_list_ld): New function.
7691 (print_hi_register_list_st): New function.
7692 (print_low_register_list_ld): New function.
7693 (print_low_register_list_st): New function.
7694 * fr30.cpu (ldr15dr): Implement workaround.
7695 (ldm0,ldm1,stm0,stm1): Implemented.
7697 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7699 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7700 * configure: Regenerate.
7701 * Makefile.am (WITH_HOBBIT): Update.
7702 (cgen-hob.c): Remove Makefile dependency.
7703 (cgen.o): Depend on cgen-gh.h, config.h.
7704 * Makefile.in: Regenerate.
7705 * aclocal.m4: Regenerate.
7707 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7709 * i960.cpu, i960.opc: New files.
7711 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7713 * fr30.opc (parse_register_number): New function.
7714 (parse_register_list): New function.
7715 (parse_low_register_list): Use parse_register_list.
7716 (parse_hi_register_list): Use parse_register_list.
7717 * fr30.cpu (sth): Fix assembler syntax. Implement more
7720 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7722 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7723 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7724 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7725 (-op-gen-set-trace-parallel): Ditto.
7726 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7728 * fr30.cpu (call,calld): Fix setting of pc.
7729 (f-op5): Fix start bit number.
7731 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7733 * fr30.cpu (st): Fix operand ordering. Implement more
7736 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7738 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7739 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7740 (fmt-semantic-operands): Move to sim.scm.
7741 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7742 * operand.scm (<hw-index>): New member `name'. All builders updated.
7743 (<hw-index>): New method get-name.
7744 (op-profilable?): Moved to sim.scm.
7746 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7747 (op-profilable?): Moved here from operand.scm.
7748 (gen-extract-type): Delete.
7749 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7750 (-gen-argfld-ref): New proc.
7751 (-gen-ifld-argfld-name): New proc.
7752 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7753 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7754 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7755 (<hardware-base>): Delete method gen-extract-type. New method
7757 (<hw-register): Ditto. Update method gen-extract.
7758 (<operand>, method gen-argbuf-elm): Rewrite.
7759 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7760 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7761 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7763 * sim-decode.scm (-gen-record-args): Tweak.
7765 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7767 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7769 * doc/porting: Fix typo: gas->sim.
7770 * fr30.opc (print_m4): New function.
7771 * fr30.cpu: Implemented many insns.
7773 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7775 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7777 * fr30.cpu (f-rel9): Delete RELOC attribute.
7778 (f-rel12): Add PCREL-ADDR attribute.
7779 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7780 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7781 * fr30.opc (print_label9): Delete.
7783 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7784 code for CTI indicators.
7785 * insn.scm (insn-cti?): Simplify.
7786 * utils-cgen.scm (atlist:cti?): New proc.
7788 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7790 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7791 (f-i20-4,f-i20-16,f-i20): New fields.
7797 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7798 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7799 * mach.scm (arch-data): Ditto.
7800 (current-arch-default-insn-word-bitsize): Renamed from
7801 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7802 (-arch-read): Update.
7804 * hardware.scm (hw:attr-list): Move here ...
7805 * opcodes.scm: ... from here.
7807 * ifield.scm (fld:bitrange): Delete.
7808 (fld:word-offset,fld:word-length): New procs.
7809 (ifield?): Use class-instance.
7810 (<ifield>, method field-start): Rewrite.
7811 (ifld:enum): New proc.
7812 (<ifield>, methods field-mask,field-value): Rewrite.
7813 (-ifield-parse): Rewrite.
7814 (<multi-ifield> support): Rewrite.
7815 (ifld-beyond-base?): Rewrite.
7816 (ifld:std-attrs): New variable.
7817 (ifld:attr-list): New proc.
7818 * iformat.scm (-compute-insn-mask): Rewrite.
7819 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7821 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7822 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7824 (<operand>): Ditto. Forward onto index instead.
7825 (gen-ifld-decls,gen-ifld-defns): New procs.
7826 (ifld:insert,ifld:extract): New procs.
7827 (<ifield>): New methods gen-insert, gen-extract.
7828 (<multi-ifield>): Ditto.
7829 (<hw-index>): Forward gen-insert,gen-extract onto value.
7830 (<hw-asm>): Delete insert/extract support.
7831 (<hw-register,hw-memory,hw-immediate>): Ditto.
7832 (gen-hash-defines): Use string-list.
7833 Define CGEN_MAX_IFMT_OPERANDS.
7834 (gen-switch): Use string-list,string-list-map.
7835 (gen-fget-switch,gen-fset-switch): Use string-list.
7836 (gen-parse-switch,gen-insert-switch): Ditto.
7837 (gen-extract-switch,gen-print-switch): Ditto.
7838 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7839 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7840 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7841 (gen-ivalue-entry): New proc.
7842 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7843 computation. Use 0 for operand ref table if ALIAS insn.
7844 (gen-minsn-table-entry): Use string-list.
7845 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7846 (gen-opcode-open): Record address of ifield table.
7847 (cgen-opc.h): Call gen-ifld-decls.
7848 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7849 * types.scm (<bitrange>): New members word-offset,word-length.
7850 Delete member total-length. Delete methods start,mask,value.
7851 (bitrange:word-offset,bitrange:word-length): New procs.
7852 * sim-cpu.scm (gen-define-fields): Simplify.
7853 (gen-extract-fields): Simplify.
7854 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7855 (<ifield>): New methods gen-ifld-extract-decl.
7856 Delete method gen-ifld-extract-beyond.
7857 (<multi-ifield>): New methods gen-ifld-extract-decl.
7858 (<multi-ifield>, method gen-ifld-extract): Implement.
7859 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7860 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7862 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7863 (-rtx-traverse-syntax-no-mode): New proc.
7864 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7865 (s-ifield): New proc.
7866 (s-shop): Don't prepend `unsigned' for unsigned modes.
7867 * rtx-funcs.scm (ifield): New rtx function.
7868 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7869 (delay): New rtx function.
7870 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7872 * cos.scm (-elm-make-method-getter): Fix typo.
7874 * utils.scm (backslash): Handle lists of strings.
7876 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7878 * fr30.cpu (f-rel9): Correct for pc+2.
7879 (label9): Use print_label9.
7880 * fr30.opc (print_label9): New function.
7882 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7884 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7885 * fr30.opc (parse_low_register_list): Renamed.
7886 (parse_hi_register_list): Renamed.
7887 (print_hi_register_list): Renamed.
7888 (print_low_register_list): Renamed.
7890 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7892 * fr30.cpu (f-rel9): Now a pc relative offset.
7894 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7896 * opcodes.scm (op-asm): Move to here, from operands.scm.
7897 (<op-asm>, method parse!): Validate arguments.
7898 (<operand>, method gen-function-name): Fix thinko.
7899 * operand.scm (<operand>, method make!): Don't set op-asm here.
7900 * utils.scm (list-elements-ok?): New proc.
7902 * opcodes.scm: Clean up pass.
7904 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7906 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7907 the fr30_int function.
7908 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7909 (h-dr): Add FUN-ACCESS attribute.
7911 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7913 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7914 for C symbol for models array.
7916 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7918 * fr30.opc (parse_reglist_low): New function.
7919 (parse_reglist_hi): New function.
7920 (print_reglist_low): New function.
7921 (print_reglist_hi): New function.
7922 * fr30.cpu: Finish remaining insn stubs.
7924 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7926 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7928 * fr30.cpu (ldi32m): Don't use for disassembly.
7930 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7932 * fr30.cpu (int): Implement it.
7934 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7936 * rtx-funcs.scm (nop): Fix C code.
7938 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7940 * fr30.cpu (f-i32): New ifield.
7943 (ldi32m): New macro insn.
7944 (inte): Provide simple version for now.
7946 * sim-arch.scm: New file.
7947 * sim.scm: Move architecture support generation to sim-arch.scm.
7948 * cgen-sim.scm: Load sim-arch.scm.
7951 * hardware.scm (pc?) New proc.
7952 (class <hardware-base>): Rewrite method 'pc?.
7953 (class <hardware>): Forward 'pc? to the hardware type.
7954 (class <hw-pc>): New method 'pc?.
7956 Add support for variable length ISAs.
7957 * ifield.scm (ifld-beyond-base?): New proc.
7958 * m32r.cpu: Remove integral-insn? spec.
7959 * mach.scm (arch:derived,arch:set-derived!): New procs.
7960 (arch:app-data,arch:set-app-data!): New procs.
7961 (class <arch>): New members derived, app-data.
7962 (class <cpu>): Delete member integral-insn?.
7963 (cpu:integral-insn?): Delete.
7964 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7965 (-cpu-read): Delete integral-insn? support.
7966 (state:decode-assist): Delete.
7967 (state:int-insn?): Delete.
7968 (<derived-arch-data>): New class.
7969 (-adata-set-derived!): New proc.
7970 (mach-finish!): Call it.
7971 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7972 (gen-operand-instance): Add COND_REF support.
7973 (gen-operand-instance-table): Ditto.
7974 (gen-hash-defines): Update.
7975 (gen-extract-switch): Update type of `insn_value' arg.
7976 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7977 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7979 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7980 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7981 beyond the base insn (for large insns).
7982 (-gen-extract-beyond-var-list): New proc.
7983 (gen-extract-fields): Handle large insns.
7984 (-gen-write-case): Update sem_arg computation.
7985 Update initial vpc computation.
7986 (gen-semantic-fn): Ditto. Update type of `insn'.
7987 (-gen-sem-case): Update sem_arg computation.
7988 Update initial vpc computation.
7989 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7990 (-gen-extract-word): New proc.
7991 (<ifield>): New method gen-ifld-extract-beyond.
7992 (gen-ifld-extract-beyond): New proc.
7993 * types.scm (bitrange-overlap?): New proc.
7995 * utils.scm (bits->bytes): New proc.
7996 (bytes->bits): New proc.
7998 Move extraction support into decoder.
7999 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
8000 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
8001 support to sim-decode.scm.
8002 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
8003 be array of IDESC,FMT entries. Make the array const.
8004 (-gen-gcc-label-table): Make array const.
8005 (-gen-decode-switch): Branch to extraction code after insn has been
8007 (-gen-decode-insn-globals): Delete extract handler from
8009 (gen-decode-fn): Add extraction support.
8010 (-gen-sem-fn-decls): Delete extraction fn decls.
8011 (-gen-idesc-decls): Update @cpu@_decode decl.
8012 (-gen-idesc-init-fn): Delete extraction support.
8013 (-gen-extract-decls): New proc.
8015 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
8016 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
8018 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
8019 All callers updated.
8020 (table-entry:make): Record insn value as insn object, not name.
8023 * hobbit.scm (path_basename): Renamed from `basename' to avoid
8024 collision with C function.
8025 (path_dirname): Similarily.
8026 * hobbit.c,hobbit.h: Rebuild.
8028 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
8030 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
8032 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
8034 * fr30.cpu: Implement more instruction stubs.
8036 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
8038 * fr30.cpu: Implement more instruction stubs.
8040 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
8042 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
8044 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
8046 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
8047 (op:std-attrs): Ditto.
8048 * opcodes.scm (gen-operand-instance): Ditto.
8049 (gen-switch): Ditto.
8050 * m32r.cpu (condbit,accum): Update.
8051 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
8053 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
8055 * enum.scm (-enum-read): Fix typo.
8057 * iformat.scm (-ifmt-search-key): Simplify a little.
8059 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
8061 * doc/porting: semantics.c -> sem.c.
8062 * Makefile.in: Regenerate.
8063 * fr30.cpu (add): Change ADD to add. Add more registers and set
8064 status bits on 'add' instruction.
8066 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
8068 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
8071 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
8073 * minsn.scm (minsn:enum): Update, call current-arch-name.
8075 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
8077 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
8078 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
8079 (ARCH,CGEN,CGENFLAGS): New variables.
8080 (gas-test,sim-test): New rules.
8081 * Makefile.in: Rebuild.
8082 * configure.in (arch): Define.
8083 * configure: Rebuild.
8085 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
8086 * All .scm files: Ditto.
8088 * dev.scm: Fix gas-test call to cpu-load.
8089 * gas-test.scm: Clean up pass to remove bit-rot.
8090 * sim-test.scm: Ditto.
8092 * enum.scm (read-enum): Fix typo in `vals' handling.
8094 * hardware.scm (-parse-hw-type): Fix typo.
8095 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
8096 (def-hardware,define-normal-hardware): Ditto.
8098 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
8099 (display-var): Use it.
8100 * hobbit.c: Rebuild.
8101 * hobbit.h: Rebuild.
8103 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
8104 avoid hobbit problem.
8105 * mach.scm (-cpu-read): Rename local `parallel-insns' to
8106 `parallel-insns-' to avoid hobbit problem.
8108 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
8110 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
8111 (parse_slo16,parse_ulo16): Ditto.
8112 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8114 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
8116 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8117 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8118 * Makefile.in: Rebuild.
8119 * insn.scm (define-normal-insn): Expand pmacros.
8120 * mode.scm (<mode>): New member `host?'. All uses updated.
8121 (mode:host?): New proc.
8122 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8123 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8124 (define-rtx-dual-mode): Ditto.
8125 (s-index-of): New proc.
8126 (s-unop): Use plain C for host mode operations.
8127 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8128 * rtx-funcs.scm (index-of): New rtx function.
8129 * sim.scm (<hw-index>): New method cxmake-get.
8131 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
8133 * sim-cpu.scm (-gen-engine-decls): Delete.
8135 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
8137 * doc/rtl (Example): Correct Typo.
8138 * doc/porting: Add 'make dep' step to opcodes port instructions.
8139 * fr30.opc: New file.
8140 * fr30.cpu: New file.
8142 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
8144 * configure.in: Handle guile $exec_prefix = $prefix/foo.
8145 * Makefile.am (GUILEINCDIR): New variable.
8147 * configure: Regenerate.
8148 * Makefile.in: Ditto.
8149 * aclocal.m4: Ditto.
8151 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
8153 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8154 (cgen-semantics.c): Ditto.
8155 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8156 * sim-model.scm (cgen-model.c): Ditto.
8157 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8158 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8160 * opcodes.scm (read-cpu.opc): Handle empty file.
8162 * cos.scm (-elm-make-method-setter): Fix typo.
8164 * cpu.scm (-init-parse-cpu!): Call types-init!.
8165 (-finish-parse-cpu!): Call types-finish!.
8166 * ifield.scm (<ifield>): Delete members start,length.
8167 New member bitrange.
8168 (<ifield>, methods field-start,field-length): Update.
8169 (fld:start): New arg insn-len. All callers updated.
8170 (<ifield>, methods field-mask,field-value): Update.
8171 (-ifield-parse): Update.
8172 (ifield-init!): Update.
8173 * iformat.scm (compute-insn-length): Simplify.
8174 (compute-insn-mask): Update.
8175 * insn.scm (insn:value): Update.
8176 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8177 (current-arch-default-insn-bitsize): New proc.
8178 (current-arch-insn-lsb0?): New proc.
8179 (-arch-parse,-arch-read): Update.
8180 (<cpu>): New member file-transform.
8181 (-cpu-parse,-cpu-read): Update.
8182 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8183 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8184 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8185 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8186 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8187 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8188 * operand.scm (op:start): Update call to field-start method.
8189 * sim-decode.scm (opcode-slots): New arg lsb0?.
8190 (fill-slot!,build-slots): Ditto.
8191 (build-decode-table-entry,build-decode-table-guts): Ditto.
8192 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8193 (gen-decode-fn): Ditto.
8194 (cgen-decode.c): Update call to gen-decode-fn.
8195 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8196 (-gen-cpu-header,-gen-cpuall-includes): New procs.
8197 (cgen-cpuall.h): Call -gen-cpuall-includes.
8198 * types.scm (<bitrange>): New class.
8199 (types-init!,types-finish!): New procs.
8200 * utils-cgen.scm (parse-number): New proc.
8201 (parse-boolean): New proc.
8202 * utils.scm (word-value): Renamed from shift-bits, rewrite.
8203 (word-mask): Rewrite.
8204 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8205 (m32rxf): New field `file-transform'.
8206 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8208 * hobbit.h: Fix include file name.
8210 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
8212 * slib: New directory of slib files used by cgen/hobbit.
8213 * hobbit.scm: New file.
8214 * hobbit.c: New file.
8215 * hobbit.h: New file.
8216 * hobscmif.h: New file.
8217 * hob-main.c: New file.
8218 * hobslib.scm: New file.
8220 * Makefile.am: Add support for compiling hobbit, and using compiled
8221 version of hobbit to compile cgen.
8222 * Makefile.in: Regenerate.
8223 * configure.in: Support --with-hobbit.
8224 * configure: Regenerate.
8225 * acconfig.h (WITH_HOBBIT): Add.
8226 * config.in: Regenerate.
8228 * rtl.scm: New file, was cdl-c.scm.
8229 Definition of rtx funcs moved to rtx-funcs.scm.
8230 (semantic-in-out-operands): Rewrite to compute object form of
8232 * rtx-funcs.scm: New file.
8234 * cgen-gh.c: #include "config.h".
8235 (gh_cadddr,gh_cddddr): New fns.
8236 (cgh_vector_to_list): New fn.
8237 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8238 (cgh_init): Prefix qsort procs with "cgh-".
8239 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8240 * cgen.c: #include "config.h".
8242 * attr.scm (bitset-attr?): New proc.
8243 (<bitset-attribute>, method parse-value): Value syntax changed from
8244 (val1 val2 ...) to val1,val2,....
8245 (<bitset-attribute>): New method gen-value.
8246 (<integer-attribute>): New method gen-value.
8247 (<enum-attribute>): New method gen-value.
8248 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8249 (<reader>): New class.
8250 (CURRENT-ARCH,CURRENT-READER): New globals.
8251 (keep-mach?): Move here from mach.scm.
8252 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8253 (<arch>): New class.
8254 (<arch-data>): New class.
8255 (<cpu>): Make subclass of <ident>.
8256 (*ENDIAN* variables): Delete.
8257 (process-state-vars): Delete.
8258 (mach-finish!): Add `base' value to MACH attribute.
8259 * hardware.scm (<hardware>): Make subclass of <ident>.
8260 (hw:std-attrs): New global.
8261 (hw-profilable?): New proc.
8262 * ifield.scm (<ifield>): Make subclass of <ident>.
8263 (sort-ifield-list): Move here from iformat.scm.
8264 * iformat.scm (<iformat>): Renamed from <insn-format>.
8265 Make subclass of <ident>.
8266 (-ifmt-search-key): Include cti? in categorization of formats.
8267 (ifmt-analyze): Compile semantics (turn to object form).
8268 * insn.scm (<insn>): Make subclass of <ident>.
8269 New member compiled-semantics.
8270 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8271 * mode.scm (<mode>): Make subclass of <ident>.
8273 * model.scm (<unit>): Make subclass of <ident>.
8274 New members inputs,outputs.
8275 (<model>): Make subclass of <ident>. New member state.
8276 (-unit-parse): Parse inputs,outputs.
8277 (<iunit>): New class.
8278 (-insn-timing-parse-model): New proc.
8279 (parse-insn-timing): Function unit spec rewritten.
8280 * operand.scm (<operand>): Make subclass of <ident>.
8281 New members sem-name,num,cond? New method gen-pretty-name.
8282 (hw-index-scalar): New global.
8283 (op-nub-hw): Move here from rtl.scm.
8284 (op:lookup-sem-name,op-profilable?): New procs.
8285 * pmacros.scm: Rewrite to pass through hobbit.
8286 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8287 * utils.scm (logit): Make a macro.
8288 (bit-set?): Rewrite.
8289 (high-part): Rewrite.
8291 * m32r.cpu (define-arch): Move to top of file.
8292 (cpu family m32rbf): Renamed from m32rb.
8293 (model m32r/d): Function unit spec rewritten.
8294 (all insns): Ditto. Replace UBI with BI.
8296 * opcodes.scm (gen-attr-table-decls): Declare
8297 @arch@_cgen_hw_attr_table.
8298 (gen-attr-table-defns): Generate hw attribute table.
8300 * sim-cpu.scm (-gen-engine-decls): New proc.
8301 (-gen-model-decls): New proc.
8302 (gen-parallel-exec-type): Add new member `written' to struct parexec.
8303 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8304 (-gen-record-profile-args): Simplify.
8305 (-gen-parallel-sem-case): Delete.
8306 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8307 New local `written'. Delete profiling code.
8308 (-gen-sem-case): Ditto.
8309 (-uncond-written-mask,-any-cond-written?): New procs.
8310 (cgen-sem-switch.c): Include duplicates of insns that can be executed
8311 parallelly or serially, and write-back handlers for all parallel insns.
8312 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8313 support to initialization of struct insn_sem.
8314 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8315 (-gen-insn-sem-type): Add parallel write-back support to struct
8317 (-gen-idesc-init-fn): Add support for virtual insns.
8318 Add parallel write-back support.
8319 * sim-model.scm (gen-model-profile-fn): Delete
8320 (-gen-model-fn-decls): New proc.
8321 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8322 (-gen-model-init-fn): New proc.
8323 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8324 members in @mach@_init_cpu.
8325 (cgen-model.c): Generate model handlers for each insn.
8326 * sim.scm (gen-define-field-macro): Cti insns handled differently.
8327 (<hw-pc>): New method gen-write.
8328 (<hw-register>, method gen-write): New arg `mode'.
8329 (<hw-register>): Delete method gen-record-profile!.
8330 New method gen-profile-index-type.
8331 (<hw-memory>, method gen-write): New arg `mode'.
8332 (<hw-address>, method gen-extract): Delete.
8333 (<hw-address>, method gen-write): New arg `mode'.
8334 (<hw-index>, method get-write-index): Rewrite.
8335 (<pc>, method cxmake-get-direct): Delete.
8336 (<pc>): New method cxmake-get. Comment out methods
8337 gen-set-quiet,gen-set-trace.
8338 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8339 gen-profile-index-type,gen-profile-code.
8340 Delete method gen-pretty-name. Rewrite method gen-write.
8341 Delete method cxmake-get-direct.
8342 (-op-gen-set-trace): Update `written'.
8343 (-op-gen-set-trace-parallel): Ditto.
8344 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8345 (gen-cpu-insn-enum-decl): Add extra entries for parallel
8346 insns and their write-back handlers.
8347 (insn-op-lookup): New proc.
8348 (<unit>): New method gen-profile-code.
8349 (<iunit>): New method gen-profile-code.
8350 (gen-argbuf-elm): Add profiling elements.
8351 (gen-argbuf-type): Define cti insns separately in their own struct.
8352 Add member `addr_cache' to this struct. Add entries for pbb virtual
8353 insns. Move semantic entries here from struct scache.
8354 Delete everything from struct scache except argbuf.
8355 (<insn>, method gen-profile-locals): Rewrite.
8356 (<insn>, method gen-profile-code): Rewrite.
8357 (sim-finish!): Create virtual pbb insns.
8359 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8361 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8362 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8363 (h-psw,h-bpsw,h-bbpsw): Define.
8364 (rte,trap): Handle bbpc,bbpsw.
8365 * opcodes.scm (max-operand-instances): Fix typo.
8366 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8367 hardware elements to be fun-access.
8368 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8370 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8372 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8374 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8376 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8378 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8380 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8382 (mach m32r): Update.
8384 * mach.scm (mach:supports?): New proc.
8385 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8386 gen-reg-access-{decls,defns}.
8387 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8388 (gen-mach-bfd-name): New proc.
8389 (gen-arch-reg-access-{decls,defns}): New procs.
8390 (cgen-arch.[ch]): Output register access cover fns.
8392 * hardware.scm (hardware-builtin!): Set print handlers for
8394 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8396 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8397 (my_print_insn): Ditto. Delete args buf, buflen.
8398 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8399 (-hw-asm-specs): Add `handlers' spec.
8400 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8402 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8404 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8405 (<hw-asm>, parse!): New method.
8406 (gen-insn-table-entry): Print semantics.
8407 (gen-opcode-open): Renamed from gen-opcode-table.
8409 * utils.scm (string-write): No longer a macro.
8410 (-string-write): Handle procedure args.
8411 * opcodes.scm: Update all calls to string-write.
8412 * sim-cpu.scm: Ditto.
8413 * sim-decode.scm: Ditto.
8414 * sim-model.scm: Ditto.
8417 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8419 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8420 (-gen-insn-builders,-gen-insn-builder): New procs.
8422 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8424 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8425 (gen-opcode-table): Properly terminate comment.
8427 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8430 Clean up pass over everything, so starting fresh.