1 2010-01-04 Doug Evans <dje@sebabeach.org>
3 * gen-all (all_cgen_cpus): Add sh.
5 2010-01-02 Doug Evans <dje@sebabeach.org>
7 * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
9 2009-12-17 Doug Evans <dje@sebabeach.org>
11 * mep.opc: Apply patches from opcodes to compile with -Wshadow.
12 mep-asm.c now regenerates correctly again.
14 * gen-all: Add support for building gcc/newlib.
15 Specify --prefix and install all built tools.
17 2009-12-16 Doug Evans <dje@sebabeach.org>
19 * sim.scm (/op-gen-written-update): Disable operand number is too
20 large warning, for now.
22 2009-12-11 Nick Clifton <nickc@redhat.com>
24 * cpu/fr30.opc: Fix shadowed variable warnings.
26 2009-12-10 Doug Evans <dje@sebabeach.org>
28 * gen-all: Rewrite. Build more ports. Split out building of sid.
30 2009-11-23 Doug Evans <dje@sebabeach.org>
32 * hardware.scm (hw-pc?): New function.
33 * ifield.scm (ifld-signed?): New function.
34 * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
35 * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
36 (insn-cti?): New function.
37 * rtl.scm (/hw): Create <pc> object for pcs.
38 * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
39 All callers updated. Watch for sets to the pc.
40 (semantic-attrs): Watch for sets to the pc.
41 * sid.scm (<pc> cxmake-get): Handle raw-reg.
42 * sim.scm (<pc> cxmake-get): Handle raw-reg.
43 (<operand> cxmake-get): Add debugging printf.
44 * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
45 EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
46 (/gen-extract-word): Ditto.
48 * utils.scm (gen-c-hex-constant): New function.
49 * utils-sim.scm (/gen-decode-insn-entry): Call it.
51 2009-11-22 Doug Evans <dje@sebabeach.org>
53 * insn.scm (/parse-insn-format): Watch for duplicate ifields.
54 * read.scm (parse-error-continuable): New function.
55 (define /continuable-error-found?): New variable.
56 (/init-reader!): Initialize it.
57 (/finish-reader!): New function.
59 * utils-cgen.scm (obj-list-nub): New function.
61 * mach.scm (<derived-arch-data>): New member large-insn-word?.
62 (/adata-set-derived!): Set it.
63 (adata-large-insn-word?): New function.
64 * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
66 * sim-cpu.scm (cgen-cpu.h): #include it here.
67 (/gen-cpu-defines): Define CGEN_INSN_WORD.
68 (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
70 * sim-decode.scm (/gen-idesc-decls): Ditto.
71 (/gen-extract-case, /gen-decode-fn): Ditto.
72 * sim-model.scm (/gen-model-insn-fn): Ditto.
73 * sim.scm (gen-argbuf-type): Ditto.
75 * rtl-c.scm (/use-gcc-stmt-expr?): New function.
76 (s-sequence): Call it.
78 2009-11-21 Doug Evans <dje@sebabeach.org>
80 * rtl-c.scm (s-sequence): Use gcc's statement expressions for
81 non-VOID-mode expressions with multiple statements.
83 * sim.scm (/operand-number-elaboration-written?): New variable.
84 (/op-gen-written-update op): New function.
85 (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
87 * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
89 * operand.scm (op-nub): Delete.
91 * dev-utils.scm: New file.
92 * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
93 load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
94 * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
95 /loaded-file-record!, maybe-load): Delete.
96 Load cgen files directly instead of via maybe-load.
98 2009-11-14 Doug Evans <dje@sebabeach.org>
100 * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
101 expressions used in a void context.
103 * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
105 * cpu/xc16x.cpu: Delete, use copy in ../cpu.
106 * cpu/xc16x.opc: Ditto.
108 2009-11-12 Doug Evans <dje@sebabeach.org>
110 * rtl-c.scm (s-parallel): Use map-in-order instead of map.
112 * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
113 eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
115 2009-11-11 Doug Evans <dje@sebabeach.org>
117 * html.scm (gen-insn-docs): Add logging message.
119 2009-11-05 Doug Evans <dje@sebabeach.org>
121 * utils-cgen.scm (gen-set-macro2): New function.
122 * sim.scm (<hw-register> gen-get-macro): Call it.
124 * co-for-gen-all: New file.
126 * testsuite/name-comments-1.test: Update call to current-insn-lookup.
128 * utils.scm (reduce): Delete.
130 * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
132 * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
133 regarding PREFIX attribute handling.
135 * operand.scm (<hw-index>): Add enum to possible types, all uses
137 (hw-index-constant?, hw-index-constant-value): New functions.
138 (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
139 hw-index-enum-obj): New functions.
140 (/operand-parse): Handle enum indices.
141 * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
142 hw-index-constant-value.
143 * rtl.scm (rtx-constant-value): Fix handling of enums.
144 * rtx-funcs.scm (enum): Ditto.
145 * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
146 currently supported here.
148 2009-11-02 Doug Evans <dje@sebabeach.org>
150 Specify isa(s) when doing ifield, operand, insn lookups.
151 ACU = all callers updated.
152 * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
153 * enum.scm (define-full-insn-enum): Pass isa-name-list to
155 * html.scm (get-insn-properties): Pass isa-name-list to
157 * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
158 * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
159 (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
160 (/parse-insn-format, syntax-break-out): Ditto.
161 * mach.scm (obj-filter-by-isa): New function.
162 (current-ifld-lookup): New optional arg maybe-isa-name-list.
163 (/ifld-already-defined?, /op-already-defined?): Simplify.
164 (current-op-lookup): New optional arg maybe-isa-name-list.
165 (current-insn-lookup): New arg isa-name-list, ACU.
166 (/insn-already-defined?, /minsn-already-defined?): Simplify.
167 (current-minsn-lookup): New arg isa-name-list, ACU.
168 * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
170 * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
171 (gen-syntax-entry): Ditto.
172 * operand.scm (/operand-parse): Pass isa-name-list to
174 (/derived-parse-encoding): New arg isa-name-list, ACU.
175 (/derived-parse-ifield-assertion): Ditto.
176 (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
177 (/anyof-parse-choice): Ditto.
178 (anyof-satisfies-assertions?): Pass context to rtx-solve.
179 (/anyof-merge-syntax): New arg container, ACU.
180 (operand-builtin!): Add pc to all isas.
181 * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
182 (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
183 (rtl-c-parsed, rtl-c++-parsed): Ditto.
184 (rtl-c): New arg isa-name-list, ACU.
185 (rtl-c-expr, rtl-c++): Ditto.
186 (closure): New arg isa-name-list, ACU.
187 * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
188 (/cstate-isas): New function.
189 (/rtx-canon-symbol-list): New function.
190 (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
192 (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
193 (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
194 (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
195 (rtx-canonicalize): New arg isa-name-list, ACU.
196 (rtx-canonicalize-stmt): Delete.
197 (tstate-make): New arg isas, ACU.
198 (tstate-isas, tstate--set-isas!): New functions.
199 (tstate-env-stack): Renamed from tstate-env, ACU.
200 (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
201 (tstate-make-closure): Renamed from tstate-new-env, new arg
203 (/rtx-traverse-env): Delete.
204 (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
206 (/rtx-traverse): Include conditional flag in dump output.
207 Update isa,envstack for closures. Pass isa list to current-op-lookup.
208 (<eval-state>): New member isas. Rename env to env-stack.
209 (<eval-state> vmake!): Handle #:isas. #:env renamed to #:env-stack.
210 (<eval-state>): New getter/setter for isas. Rename env getter/setter
212 (estate-make-for-eval): Provide #:isas.
213 (estate-make-closure): Renamed from estate-new-env. New arg
215 * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
216 (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST.
217 (/rtx-trim-for-doc): Handle closures.
218 * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION,
220 (rtx-env-var-list): Delete.
221 (rtx-env-make): Handle already-compiled environments.
222 (rtx-var-alist-to-env): New function.
223 (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
224 (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
225 (rtx-operand-obj): New arg isa-name-list, ACU.
226 (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
228 * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
229 * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
230 (/frag-compute-desired-frags): Minor simplification.
231 (/frag-pick-best): Ditto.
232 * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
233 (/gen-sfrag-code): Update.
234 * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
235 * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
236 * utils.scm (non-null-intersection?): New function.
238 * gen-all (do_src): Manually run cgen-all for sid.
240 2009-11-01 Doug Evans <dje@sebabeach.org>
244 * rtl-traverse.scm (/rtx-canon): Issue better error message for
245 invalid rtx function names.
247 2009-10-28 Doug Evans <dje@sebabeach.org>
249 * cos.scm (object-assign!): New function.
250 * mode.scm (/mode-set-word-params!): Call it.
252 2009-10-25 Doug Evans <dje@sebabeach.org>
254 Record bitset attributes internally as a list.
255 Record rtx attribute values internally as ((rtx-expr)).
256 * attr.scm (bitset-attr?): Delete, unused.
257 (<bitset-attribute> parse-value): Rewrite.
258 (/attr-parse): Rewrite bitset default value processing.
259 (/attr-read): Pick out values of scalar attributes to distinguish
260 them from bitset values which are a list.
261 Fix spelling errors for processing of default values.
262 Handle string attributes.
263 (bitset-attr->list): Delete, all callers updated.
264 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
266 (atlist-source-form): Rewrite.
267 * hardware.scm (<hardware-base> 'get-isas): Update recognition
269 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
271 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
272 values are now lists.
273 * mach.scm (def-isa-attr!): Update, bitset attribute values,
274 including the default, are now lists.
275 (all-isas-attr-value): Result is now a list.
276 * doc/rtl.texi: Clean up pass over attribute docs.
278 Change internal representation of rtx attribute values.
279 * attr.scm (/attr-val-is-rtx?): New function.
280 (attr-value): Call it.
281 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
282 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
283 Disallow rtx values for bitset attributes.
284 (/attr-read): Record rtx in default value as ((rtx-expr)).
285 (/attr-eval): Update.
287 2009-10-24 Doug Evans <dje@sebabeach.org>
289 * gen-all-doc: Add sh.cpu.
290 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
291 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
293 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
294 (/gen-sfrag-case): Ditto.
295 * sim-cpu.scm (/gen-sem-case): Ditto.
297 * doc/rtl.texi: Add note that different ifields, operands, insns,
298 and minsns may occur with the same name in different isas.
299 Add note on the canonical form of rtl expressions.
301 2009-10-23 Doug Evans <dje@sebabeach.org>
303 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
304 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
306 * decode.scm: Tweak various comments.
307 (/opcode-slots): Add FIXME.
308 (/build-decode-table-guts): Add assert.
309 * utils-sim.scm (/gen-set-itype-and-extract): New function.
310 (/gen-bracketed-set-itype-and-extract): New function.
311 (/gen-decode-default-entry): Rewrite.
312 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
313 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
314 updated. Don't unnecessarily emit check for whether all opcode bits
316 (/gen-decode-expr-set-itype): Delete.
317 (/gen-decode-expr-entry): Update.
318 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
319 updated. Keep track of decoder tables used thus far.
320 (/gen-decoder-switch): Ditto.
321 * utils.scm (word-bit-value): New function.
323 2009-10-14 Doug Evans <dje@sebabeach.org>
325 * ifield.scm (<ifield>, value): Provide default initial value.
326 (ifield-encode-mode): Delete
327 (ifield-decode-mode): Delete duplicate definition.
328 (<derived-ifield>, 'make!): Initialize members encode, decode.
329 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
331 (<multi-ifield>, 'gen-insert): Ditto.
333 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
335 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
336 for @foo@_init_idesc_table.
338 2009-09-30 Doug Evans <dje@sebabeach.org>
340 * doc/intro.texi: Mention SID.
341 * doc/sim.texi: Ditto.
342 * doc/porting.text (Doing a simulator port): Add some text.
344 2009-09-27 Doug Evans <dje@sebabeach.org>
346 * cos.scm (/class-table): New global.
347 (/class-uid, /class-set-uid!): New functions.
348 (/class-parent-name): Renamed from /class-parents.
349 (/class-make!): Change parents arg to parent-name, all callers updated.
351 (/class-lookup-uid): New function.
352 (/class-parent-classes): Rewrite.
353 (/class-mi?): Delete.
354 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
356 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
357 (/class-compute-class-desc, class-desc-dump): Update.
358 (/object-make!): Update.
359 (/object-make-with-values!): Delete arg class-desc, all callers
361 (/object-copy): Delete arg top?, all callers updated.
362 (/object-specialize): Delete.
363 (/object-elements, /object-top-class): Delete.
364 (/object-class-name, /object-class-desc): Update.
365 (/object-class-uid): New function.
366 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
367 class-make, /class-subclass? /class-lookup-element,
369 (/elm-delta, elm-list): Delete.
370 (/elm-make-method-getter, elm-get, elm-xget): Update.
371 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
372 (elm-make-getter, elm-make-setter): Update.
373 (/method-lookup-next): Update.
374 (send): Don't specialize class passed to method.
375 (send-next): New arg class-name, all callers updated.
376 (/class-parent, /class-parent-via-path, object-parent): Delete.
377 (class-cons-parent!, class-append-parent!): Delete.
378 (object-reset!): Init /class-table.
380 * cos.scm (/object-debug-classes): Delete.
381 (/object-debug-elements, /object-debug-methods): Delete.
383 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
384 (method-proc): Delete.
385 (method-make-virtual!, method-make-virtual-forward!): Delete.
386 * ifield.scm (<ifield> field-start): Update.
387 (<ifield> field-length, pretty-print): Update.
388 (<multi-ifield> field-length, field-start, pretty-print): Update.
389 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
390 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
391 (<array> gen-sym-defn): Ditto.
392 (<hardware-base> gen-defn): Renamed from gen-defn.
393 (<hw-register> gen-type): Update.
394 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
395 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
396 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
397 (<hw-immediate> gen-type): Update.
398 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
399 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
400 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
401 (<array> gen-sym-defn): Ditto.
402 (<hardware-base> gen-defn): Renamed from gen-defn.
403 (<hw-register> gen-type): Update.
404 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
405 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
406 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
407 (<hw-immediate> gen-type): Update.
408 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
410 2009-09-25 Doug Evans <dje@sebabeach.org>
412 * operand.scm (/anyof-merge-setter): Handle set-quiet.
413 * rtl.scm (rtx-single-set?): Handle set-quiet.
415 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
416 rtl-cover-fns?, macro?. All callers updated.
417 (estate-make-for-normal-rtl-c): Delete, have all callers call
418 estate-make-for-rtl-c directly.
419 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
420 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
422 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
423 replaces /par-replace-set-dests.
424 (/par-replace-set-src-expr-fn): New function, replaces
425 /par-replace-set-srcs.
426 (s-parallel): Rewrite.
428 * rtl.scm (rtx-pretty-strdump): New function.
429 * rtl-traverse.scm (/rtx-canon-error): Use it.
430 (<eval-state>): New member outer-expr.
431 (estate-error): Include outer expression in error message if present.
433 2009-09-23 Doug Evans <dje@sebabeach.org>
435 * xc16x.cpu (h-cr): New hardware.
436 (muls): Comment out parts that won't compile, add fixme.
437 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
438 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
439 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
441 Rewrite rtl processing to require it to be "canonicalized" first,
442 and write a full canonicalizer / expression checker.
443 Remove all appearances of DFLT in canonical rtl.
444 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
446 * iformat.scm (ifmt-analyze) Use canonical semantics.
447 * insn (<insn>): New member canonical-semantics.
448 * mach.scm (<arch>): New member multi-insns-instantiated?.
449 (/instantiate-multi-insns!): New function.
450 (/canonicalize-insns!): New function.
451 (arch-analyze-insns!): Canonicalize insn semantics before processing
453 * mode.scm (/mode-set-word-params!): New function.
454 (mode-void?): New function.
455 (mode-compatible?): VOID is compatible with VOID.
456 (/mode-word-sizes-defined?): New global.
457 (mode-set-word-modes!): Use/set it.
458 (mode-ensure-word-sizes-defined): Update.
459 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
460 Redo WI/UWI/AI/IAI handling.
461 (op:new-mode): No longer accept DFLT.
462 (<derived-operand> constructor): Ensure all fields are initialized.
463 (<anyof-operand> constructor): Ditto.
464 (/derived-parse-ifield-assertion): Delete arg `args'.
466 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
467 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
468 (rtl-c-expr, rtl-c++): Ditto.
469 (/rtl-c-get): Use mode of operand, not containing expression.
470 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
471 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
472 estate-for-insn? instead.
473 (s-unop): Use mode of expression, not first operand.
474 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
475 (s-sequence): Remove DFLT support.
476 (ifield): Use mode of expression, not UINT.
477 (pc): Comment out, unused.
478 (int-attr): New rtx kind.
480 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
481 * rtl-traverse.scm (/rtx-canon-debug?): New global.
482 (/make-cstate): New function.
483 (/cstate-context, /cstate-outer-expr): New functions.
484 (/rtx-canon-error): New function.
485 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
486 /rtx-get-last-cond-case-rtx): New functions.
487 (/rtx-canon-*): New functions.
488 (/rtx-canner-table, /rtx-operand-canoners): New globals.
489 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
490 (/rtx-option, /rtx-option-list?): Rewrite.
491 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
492 Rewritten, all callers updated.
493 (/rtx-canon-expr, /rtx-canon): New functions.
494 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
495 (rtx-canonicalize-stmt): New function.
496 (tstate-make): Remove arg `set?'. All callers updated.
497 (tstate-new-set?): Delete.
498 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
499 moved to /rtx-canon-*.
500 (/rtx-traverse-normal-operand): New function.
501 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
502 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
503 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
504 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
506 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
507 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
508 (/rtx-make-traverser-table): Update.
509 (/rtx-traverse-operands): Remove mode processing, now done during
511 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
512 (/rtx-traverse): Ditto.
513 (rtx-init-traverser-tables!): New function.
514 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
515 (rtx-verify-no-dflt-modes): New function.
516 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
517 (rtx-simplify-insn): Use insn-canonical-semantics.
518 (rtx-canonicalize): Moved to rtl-traverse.scm.
519 (/compile-expr-fn, rtx-compile): Delete.
520 (/rtx-trim-rtx-list): New function.
521 (/rtx-trim-for-doc): Handle set, if.
522 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
523 (/rtx-valid-mode-types): Update.
524 (/rtx-valid-matches): Update.
525 (/rtx-find-matchexpr-index): New function.
526 (rtx-lookup): Require rtx-kind to be the rtx name.
527 (def-rtx-node): New arg result-mode, all callers updated.
528 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
529 (rtx-lazy-sem-mode): Delete.
530 (/rtx-closure-make): New arg `mode', all callers updated.
531 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
532 (rtx-operand-obj): Rewrite.
533 (rtx-make-xop): New functions.
534 (/hw): Renamed from `hw', all callers updated.
535 Use the correct mode instead of DFLT for the index.
536 (rtl-builtin!): Call rtx-init-traversal-tables!.
537 (rtl-finish!): Update.
538 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
539 Update mode arg-type.
541 (int-attr): New rtx kind.
543 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
544 (/frag-cost-compute!): Ditto.
545 * semantics.scm (/build-operand!): Delete args op-name, op.
546 New arg op-expr. All callers updated.
547 (/build-mem-operand!): Remove DFLT support.
548 (semantic-compile): Update process-expr!, mode arg deleted.
549 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
551 (/gen-sem-case, /gen-sfrag-code): Ditto.
552 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
553 (/op-gen-set-trace): New function. If not doing profiling, or using
554 the pbb engine, call /op-gen-set-quiet.
555 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
556 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
557 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
558 * utils.scm (find-first-index): New function.
559 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
561 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
563 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
565 2009-09-21 Doug Evans <dje@sebabeach.org>
567 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
568 All callers updated. Add FIXME.
569 (all rtx functions): Rename local estate to *estate*. It's an
570 artificial argument added to the rtx, so make it stand out.
572 * openrisc.cpu (or32 isa): Fix setup-semantics.
574 * rtl.scm (rtx-class-*?): Delete, unused.
575 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
577 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
578 (init-reader!): Set /CGEN-RTL-VERSION to default.
580 * read.scm (cpu-load): Print load parameters.
582 * dev.scm (load-doc): Set verbose-level to 2.
584 2009-09-20 Doug Evans <dje@sebabeach.org>
586 * rtl.scm (rtx-strdump): Use write instead of display.
588 2009-09-17 Doug Evans <dje@sebabeach.org>
590 * utils-cgen.scm (obj-csv-names): New function.
591 * utils-sim.scm (/sfmt-contents): Use it in logging message.
593 2009-09-12 Doug Evans <dje@sebabeach.org>
595 Clean up pass of mode handling.
596 Make use of mode name vs <mode> object more consistent and clear.
597 * hardware.scm (/keyword-read): Default mode to the mode name,
598 not the <mode> object.
599 (/hw-parse-indices): Parse mode name and pass mode object to
600 <hw-asm> constructor.
601 (/hw-parse-values): Ditto.
602 (<hw-register> parse!): Pass mode name to /hw-parse-indices
603 and /hw-parse-values.
604 (<hw-memory> parse!): Ditto.
605 (<hw-address> parse!): Ditto.
606 * mode.scm (/mode-table): New global, replaces mode-list.
607 Modes stored in hashtable instead of list.
608 (/mode-class-table): New global.
609 (mode-list-non-alias-values): Update.
610 (mode:eq?, mode-compatible?, mode:add!): Update.
611 (mode:lookup): Restrict arg to the mode's name. All callers updated.
612 (mode-maybe-lookup): New function.
613 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
614 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
615 (mode-find, mode-set-word-modes!): Update
616 (mode-ensure-word-sizes-defined): Update.
617 (/sort-mode-classes!): New function.
618 (mode-builtin!): Update. Sort mode classes here.
619 (mode-finish!): Sort mode classes here too.
620 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
622 (rtl-c-set-quiet): Allow mode to be name of object.
623 (rtl-c-set-trace): Ditto.
624 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
625 <mode> object. All callers updated.
626 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
627 (rtx-lazy-sem-mode): Ditto.
628 (<rtx-temp> make!): Assert mode arg is a <mode> object.
629 (rtx-env-make): Allow var-list modes to be name or object.
630 * sem-frags.scm (/frag-expr-assq-locals): New function.
631 (/frag-compute-locals!): Call it.
632 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
634 * semantics.scm (/build-mem-operand!): Handle mode aliases.
636 * sim-test.scm (*): Symbols no longer can be passed to string-append.
638 2009-09-10 Doug Evans <dje@sebabeach.org>
640 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
641 Improve error message for missing or too many bits.
642 (/insn-parse): Don't verify iformat for virtual insns.
644 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
646 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
647 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
648 * sid.scm (pbb-engine-insns): Ditto.
649 * sim-decode.scm (cgen-decode.c): Ditto.
651 2009-09-09 Doug Evans <dje@sebabeach.org>
653 * rtl-traverse.scm: Comment tweaks.
654 * rtl-xform.scm: Comment and reformatting tweaks.
655 * doc/rtl.texi: Add text to docs on ifield-assertions.
657 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
660 Add support for controlling warnings/errors.
661 Add tests for iformat description errors.
662 * dev.scm (cload): New option #:diag.
663 * read.scm (<reader>): New member verify-iformat?.
664 (/parse-diagnostic, parse-warning): New functions.
665 (parse-error): Guts moved to /parse-diagnostic.
666 (/set-diagnostic-options!): New function.
667 (cpu-load): New arg diagnostic-options, all callers updated.
668 Recognize -w diagnostic-option-list.
669 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
670 (ifld-simple-ifields, ifields-simple-ifields): New function.
671 * insn.scm (/parse-insn-format-iflds): New function.
672 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
673 New arg isa, all callers updated. Do some basic validation of the
674 ifield list if requested.
675 * mach.scm (/sanity-check-insns): Improve error message text.
676 * doc/running.texi: Document -w option.
677 * doc/porting.texi: Document #:trace, #:diag options to cload.
679 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
681 * dev.scm (*): Change default verbosity level to 2.
683 * ifield.scm (<ifield> pretty-print): New method.
684 (ifld-pretty-print): New function.
685 (<multi-ifield> pretty-print): New method.
687 * ifield.scm (<ifield> field-start): Delete word-len arg.
690 (<multi-ifield> field-start): Ditto.
691 * operand.scm (<hw-index> field-start): Ditto.
693 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
694 total-bitsize. All callers updated.
695 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
696 New member /insn-base-value.
697 (insn-base-value): New function.
698 * mach.scm (/sanity-check-insns): New function.
699 (arch-analyze-insns!): Call it.
701 2009-09-08 Doug Evans <dje@sebabeach.org>
703 * iformat.scm (ifields-base-ifields): Simplify.
704 (compute-insn-length): Simplify, call ifields-base-ifields.
705 (compute-insn-base-mask): Ditto.
706 * ifield.scm (ifld-known-values): Ditto.
707 (ifld-base-ifields): Ditto.
708 * insn.scm (insn-value): Ditto.
709 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
711 2009-09-08 DJ Delorie <dj@redhat.com>
713 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
714 preprocessor macro, not an enum.
716 2009-09-08 Doug Evans <dje@sebabeach.org>
718 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
720 (*): Remove trailing ":" from error messages passed to estate-error.
722 2009-09-07 Doug Evans <dje@sebabeach.org>
724 * types.scm (<struct>): Delete.
726 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
728 (/pmacro-loc-error): New function.
730 * mach.scm (/isa-parse-decode-assist): New function.
731 (/isa-parse): Call it.
733 * decode.scm (/get-subopcode-value): New function.
734 (/opcode-slots): Call it.
735 (/fill-slot!): Add logging message.
737 * cos.scm (/object-error): Convert symbols to strings before passing
740 * read.scm (rtl-version-equal?): New function.
741 (rtl-version-at-least?, rtl-version-older?): New functions.
743 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
744 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
746 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
748 2009-09-03 Doug Evans <dje@sebabeach.org>
750 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
753 2009-09-01 DJ Delorie <dj@redhat.com>
755 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
756 (parse_unsigned16_range): Likewise.
757 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
760 2009-09-01 Doug Evans <dje@sebabeach.org>
762 Pmacro .equals -> .equal?
763 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
764 -pmacro-builtin-equals. All callers updated.
765 (pmacros-init!): Rename .equals to .equal?.
766 * doc/pmacros.texi: Update.
767 * testsuite/pmacros-1.test: Update.
769 * doc/porting.texi: Work around texi2html bug where it doesn't
770 properly escape <> inside double-quotes inside @code.
772 * doc/porting.texi (Doing an opcodes port): Add step to specify
775 2009-08-29 Doug Evans <dje@sebabeach.org>
777 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
779 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
781 2009-08-27 Doug Evans <dje@sebabeach.org>
783 Add do-count rtl function.
784 * rtl-c.scm (s-do-count): New function.
785 (do-count): New rtl handler.
786 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
787 (-rtx-make-traverser-table): Add ITERATION.
788 * rtl.scm (rtx-make-iteration-limit-var): New function.
789 (rtx-env-make-iteration-locals): New function.
790 * rtx-funcs.scm (do-count): New rtl function.
791 * cpu/play.cpu: Add do-count-test insn.
792 * doc/rtl.texi: Add docs on do-count.
794 2009-08-26 Doug Evans <dje@sebabeach.org>
796 * read.scm (parse-error): Change error message output format
797 to match context-owner-error.
798 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
799 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
800 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
801 (operand): Call estate-error instead of context-error.
802 (local, delay): Ditto.
803 (ref, attr): Call estate-error instead of error.
804 * rtl-traverse.scm (tstate-error): New function.
805 (-rtx-traverse-error): Call tstate-error instead of context-error.
806 (-rtx-traverse-operands, -rtx-traverse): Ditto.
807 (estate-error): New function.
808 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
810 (e-if): Call estate-error instead of error.
811 * rtx-funcs.scm (error): Call estate-error instead of context-error.
813 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
814 Rewrite to call context-owner-error.
815 (context-owner-error): New function.
817 * ifield.scm (<ifield> constructor): New arg `location',
819 * insn.scm (<insn> constructor): Ditto.
820 (<multi-insn> constructor): Ditto.
821 * minsn.scm (<macro-insn> constructor): Ditto.
822 * operand.scm (<operand> constructor): Ditto.
823 * utils-cgen.scm (builtin-location): New function.
824 (<source-ident>): Fix default value of member `location'.
825 (source-ident?): New function.
827 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
828 (estate-push-env, estate-with-modifiers): Ditto.
829 (estate-deepen): New function.
831 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
833 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
834 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
837 2009-08-25 Doug Evans <dje@sebabeach.org>
839 * doc/pmacros.texi (pmacro default argument values): Add text.
841 2009-08-23 Doug Evans <dje@sebabeach.org>
843 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
844 Rename member prefix -> name-prefix.
845 (<keyword> getters): Update.
846 (-keyword-parse): Update. Default enum-prefix to NAME-.
847 (-keyword-read): Update. Don't compute default value for
849 (define-keyword): Update.
850 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
851 * read.scm (cgen-rtl-version): New function.
852 (-supported-rtl-versions): Add (0 8).
853 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
854 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
855 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
856 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
857 Update, print-name -> enum-prefix, make uppercase.
858 Remove unnecessary name-prefix spec.
859 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
860 * cpu/ip2k.cpu (register-names): Ditto.
861 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
862 * cpu/sparc.cpu (gr-names): Ditto.
863 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
864 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
865 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
866 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
867 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
868 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
869 prefix -> name-prefix.
870 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
871 Update, print-name -> enum-prefix, make uppercase.
872 (drc-names, xf-names): Ditto.
873 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
874 * doc/rtl.texi (Keywords): New section.
875 (hardware indices): Update text.
876 (rtl versions): Add 0.8.
878 Add define-rtl-version.
879 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
880 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
881 (cgen-lang-fixlevel): Delete.
882 (-supported-rtl-versions): New variable.
883 (-cmd-define-rtl-version): New function.
884 (init-reader!): New command define-rtl-version.
885 (-cgen): Add rtl version to --version output.
886 * doc/rtl.texi: Document rtl version support.
887 * cpu/play.cpu: Add define-rtl-version.
889 2009-08-22 Doug Evans <dje@sebabeach.org>
891 * Makefile.am (OPTIONS): Define.
892 (desc): Just generate <arch>-desc.[ch] files.
893 * Makefile.in: Regenerate.
894 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
896 (cgen-desc.c): Similarly.
897 * gen-all-desc: New file.
898 * opcodes.scm (opc-file-provided?): New function.
900 * mach.scm (current-*-add!): Update calls to parse-error.
901 * operand.scm (op:new-mode): Update call to parse-error.
902 * utils-cgen.scm (make-obj-context): New function.
904 * NEWS: Copy over entries from 1.1 branch.
906 2009-08-20 Doug Evans <dje@sebabeach.org>
908 * gas-test.scm (<keyword> test-data): Catch invalid requests,
909 flag a warning and compensate.
910 (<hw-address test-data): Tweak for readability.
911 (<hw-iaddress test-data): Ditto.
912 (cgen-build.sh): Convert symbols to strings before passing to
914 (cgen-allinsn.exp): Ditto.
916 * doc/pmacros.texi (.splice): Add more text.
918 2009-08-19 Doug Evans <dje@sebabeach.org>
920 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
921 distinguish from 1.1.
922 * configure: Regenerate.
923 * read.scm (-CGEN-VERSION): Update.
924 * doc/version.texi: Update.
926 New builtin .pmacro?.
927 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
928 (pmacros-init!): Add .pmacro?.
929 * doc/pmacros.text: Document .pmacro?.
930 * testsuite/pmacros-1.test: Test .pmacro?.
932 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
933 of a pmacro begins before its arguments are evaluated, improves
936 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
937 * testsuite/pmacros-1.test: Ditto. Add better tests.
939 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
941 (Operands): Similarly.
943 2009-08-18 Doug Evans <dje@sebabeach.org>
945 * ifield.scm (ifld-encode-mode): Add FIXME.
946 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
948 (<ifield> gen-extract): Similarly.
950 * read.scm (parse-error): Handle #f for context-location.
951 * utils-cgen.scm (unspecified-location): Fix building of
954 * doc/rtl.texi: Document how to write hex and boolean values.
956 * gas-test.scm (<hw-asm> test-data): Handle () values.
957 (<keyword> test-data): Convert symbols to strings before passing
959 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
962 * operand.scm (hw-index-scalar): Set `name'.
963 (hw-index-anyof, hw-index-derived): Ditto.
965 2009-08-17 Doug Evans <dje@sebabeach.org>
967 * pmacros.scm (-pmacro-builtin-internal-test): New function.
968 (pmacros-init!): Add .internal-test.
969 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
970 * testsuite/testsuite.cpu (internal-verify): New pmacro.
971 * doc/pmacros.text: Document .internal-test.
973 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
974 (parse-comment): Allow numbers.
975 * doc/porting.texi: Document that names and comments may be lists.
977 * insn.scm (-insn-parse): Fix typo.
979 Rename .eval -> .exec. Add new .eval.
980 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
981 (-pmacro-builtin-eval): New function.
982 (pmacros-init!): Add .exec.
983 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
984 * testsuite/location-1.test: Update.
985 * testsuite/pmacros-1.test: Add test for .eval.
987 2009-08-16 Doug Evans <dje@sebabeach.org>
989 * doc/porting.texi: Remove support for Guile 1.4.
991 * read.scm (current-reader-location): Return unspecified location
992 if reader hasn't been initialized yet.
994 2009-08-13 Doug Evans <dje@sebabeach.org>
996 * dev.scm: Document tracing options.
998 * pmacros.scm (pmacro-dump): New function.
999 (check-pmacro): Tweak debugging output.
1000 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1001 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1003 Add .let* pmacro builtin.
1004 * pmacros.scm (-pmacro-builtin-let*): New function.
1005 (pmacros-init!): Add .let*.
1006 * doc/pmacros.texi: Document .let*.
1007 * testsuite/pmacros-1.test: Test .let*.
1009 2009-08-12 Doug Evans <dje@sebabeach.org>
1011 Clean up cpu file parsing, pass context consistently instead of the
1012 old "errtxt" argument.
1013 NOTE: ACU == "All Callers Updated".
1014 * attr.scm (-parse-simple-attribute): Renamed from
1015 parse-simple-attribute, ACU.
1016 (-attr-parse): Change errtxt argument to context, ACU.
1017 (-attr-read): Ditto.
1018 (atlist-parse): Ditto. Put context arg first.
1019 (attr-parse): Use parse-error instead of context-error.
1020 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1021 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1022 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1023 `context' arg is now a <context> object. ACU.
1024 (-keyword-read): `context' arg is now a <context> object. ACU.
1025 (-hw-parse-indices): Change errtxt argument to context, ACU.
1026 (-hw-parse-values, -hw-parse-handlers): Ditto.
1027 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1028 (-hw-validate-layout, -hw-create-getter-from-layout,
1029 -hw-create-setter-from-layout): Ditto.
1030 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1031 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1032 (<hw-address>:parse!): Ditto.
1033 * ifield.scm (-ifield-parse, ifield-read): Ditto.
1034 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1035 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1036 (-multi-ifield-parse, -multi-ifield-read): Ditto.
1037 * insn.scm (-insn-parse, -insn-read): Ditto.
1038 (parse-syntax): Ditto. Put context arg first.
1039 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1040 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1041 (-parse-insn-format): Ditto.
1042 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1043 (-arch-parse-isas): Ditto.
1044 (-isa-read): Add context arg, ACU.
1045 (-cpu-parse, -cpu-read, -mach-read): Ditto.
1046 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1048 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1049 (minsn-make-alias): Ditto.
1050 * mode.scm (-mode-parse): Ditto.
1051 (parse-mode-name): Ditto. Put context arg first.
1052 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1053 errtxt argument to context, ACU.
1054 (-unit-parse, -model-parse, -model-read): Ditto.
1055 * operand.scm (-operand-parse-getter): Use parse-error instead of
1057 (-operand-parse-setter): Ditto.
1058 (-operand-parse): Change errtxt argument to context, ACU.
1059 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1060 (-anyof-operand-parse, -anyof-operand-read): Ditto.
1061 * read.scm (reader-error): Delete. Use parse-error instead.
1062 (parse-error): Change errtxt argument to context, ACU. Split args
1063 argument into expr and maybe-help-text.
1064 (-reader-process-expanded-1!): Reorganize.
1065 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1066 * types.scm (parse-type): Ditto.
1067 * utils-cgen.scm (single-location->simple-string): New function.
1068 (<context>): Replace members file,lineno with location.
1069 (make-prefix-context): Renamed from context-make-prefix, ACU.
1070 (make-current-context): New function.
1071 (context-append, context-append-name): New functions.
1072 (context-make-reader): Delete.
1073 (parse-name): Change errtxt argument to context, ACU.
1074 Put context arg first.
1075 (parse-comment): Ditto.
1076 (parse-number): Change errtxt argument to context, ACU.
1077 (arg-list-validate-name, arg-list-check-no-args,
1078 arg-list-symbol-arg): Ditto.
1080 * read.scm (-cmd-if): Don't assume test is a list.
1082 * html.scm (get-insn-properties): Delete errtxt, unused.
1084 2009-08-11 Doug Evans <dje@sebabeach.org>
1086 * doc/rtl.texi (hardware types): Add pc.
1088 2009-08-07 Doug Evans <dje@sebabeach.org>
1090 Add -t option for tracing things like commands, pmacro expansion.
1091 * dev.scm (cload): New arg #:trace.
1092 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1093 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
1094 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1095 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1096 (-reader-process-expanded-1!): Trace commands if requested.
1097 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1098 (-set-trace-options!): New function.
1099 (-init-reader!): New function.
1100 (cpu-load): New arg trace-options, all callers updated.
1101 Call -init-reader! and -set-trace-options!.
1102 (cgen-usage): Improve output formatting.
1103 (common-arguments): New option -t.
1104 (-cgen): Process -t.
1105 * utils-cgen.scm (single-location->string): Renamed from
1106 pretty-print-single-location. All callers updated.
1107 (location->string): Renamed from pretty-print-location.
1108 All callers updated.
1109 (source-properties-location->string): New function.
1110 * doc/running.texi: Document -t.
1112 2009-08-06 Doug Evans <dje@sebabeach.org>
1114 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1115 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1116 * utils.scm: ... here.
1118 2009-08-05 Doug Evans <dje@sebabeach.org>
1120 Track source location better, for better error messages.
1121 * pmacros.scm (-pmacro-eval): Delete, unused.
1122 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1123 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1124 (scan-list, scan): Ditto.
1125 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1126 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1127 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1128 (scan-list1): New function.
1129 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
1130 * read.scm (<reader>): New member `location'.
1131 (-reader-lookup-command): Renamed from reader-lookup-command,
1132 all callers updated.
1133 (reader-error): Rewrite to produce better source location info.
1134 (current-reader-location): New function.
1135 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1136 All callers updated. Record source location of expression.
1137 (reader-process-expanded!): Renamed from reader-process-expanded.
1138 All callers updated.
1139 (-reader-process!): Renamed from reader-process. New arg `loc'.
1140 All callers updated. Record source location of define-pmacro.
1141 * utils-cgen.scm (<location>): New class.
1142 (single-location): New (pseudo) class.
1143 (pretty-print-single-location, pretty-print-location): New functions.
1144 (location-top, location-push-single, location-push): New functions.
1145 (unspecified-location, current-input-location): New functions.
1146 (location-property): New object property.
1147 (location-property-set!): New function.
1148 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
1150 * testsuite/location-1.test: New testcase.
1151 * testsuite/run-tests.sh: Fix fail count handling.
1152 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
1153 to expect cgen to fail.
1155 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1157 * read.scm (-cmd-include): Renamed from include. All callers updated.
1158 (-cmd-if): Renamed from cmd-if. All callers updated.
1159 Use reader-process-expanded! on then/else clauses instead of eval1.
1161 2009-07-22 Doug Evans <dje@sebabeach.org>
1163 * modes.scm (TI,OI): New modes.
1164 * types.scm (parse-type): Improve error checking. Don't hardwire
1166 * utils.scm (non-negative-integer?): New function.
1168 * pmacros.scm (-pmacro-builtin-find): New predicate.
1169 (pmacros-init!): Add .find.
1170 * doc/pmacros.tex: Document .find.
1171 * testsuite/pmacros-1.test: Test .find.
1173 2009-07-20 Doug Evans <dje@sebabeach.org>
1175 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1176 commented out printfs.
1177 * rtl.scm (rtl-finish!): Whitespace tweaks.
1178 * model.scm (parse-insn-timing): Tweak logging message.
1179 * operand.scm: Comment and whitespace tweaks.
1180 (op:type): Tweak error message.
1181 (op-ifield): Tweak logging message.
1182 (-derived-operand-parse, anyof-merge-semantics): Ditto.
1183 * read.scm: Whitespace cleanup.
1184 * utils.scm: Whitespace cleanup.
1186 2009-07-19 Doug Evans <dje@sebabeach.org>
1188 Fix binding of nested pmacro parameters.
1189 * pmacros.scm (-pmacro-env-make): New arg prev-env.
1190 All callers updated.
1191 (-pmacro-bulid-lambda): Ditto.
1192 * doc/pmacros.texi: Update.
1193 * testsuite/pmacros-1.test: Add testcase.
1195 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1197 (-multi-ifield-make-default-extract): Ditto.
1199 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1200 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1201 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1203 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1204 * doc/rtl.texi: Update.
1206 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1208 Rename builtin boolean pmacros, for consistency with rtl.
1209 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1210 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1211 * doc/pmacros.texi: Update.
1212 * testsuite/pmacros-1.test: Update.
1214 2009-07-17 Doug Evans <dje@sebabeach.org>
1216 Use hash tables to record ifields, operands, insns, macro-insns.
1217 * attr.scm (attr-builtin!): Tweak some comments.
1218 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1219 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1221 (<multi-ifield>): New constructor.
1222 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1223 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1225 (-sub-insn-make!): Add hack to avoid differences in generated code.
1226 (multi-insn-instantiate!): Add total number of multi-insns to
1228 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1229 minsn-list to foo-table. New member next-ordinal.
1230 Update getters/setters.
1231 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1233 (-get-next-ordinal!, -get-lowest-ordinal): New function.
1234 (-make-ident-object-table, -ident-object-table->list,
1235 -ident-object-table-add!, -ident-object-table-lookup): New functions.
1236 (current-ifld-list, current-ifld-add! current-ifld-lookup,
1237 -ifld-already-defined?): Rewrite.
1238 (current-op-list, current-op-add! current-op-lookup,
1239 -op-already-defined?): Rewrite.
1240 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1241 (current-insn-list, current-insn-add! current-insn-lookup,
1242 -insn-already-defined?): Rewrite.
1243 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1244 -minsn-already-defined?): Rewrite.
1245 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1246 (MAX-VIRTUAL-INSNS): Define.
1247 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1248 Update use of arch-insn-list.
1249 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1250 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1252 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1253 <ident>. New constructor.
1254 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1256 * sid.scm (-virtual-insn-add!): New function.
1257 (-create-virtual-insns!): Call it.
1258 (-fill-sim-insn-list!): Rewrite.
1259 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1260 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1261 * utils-cgen.scm (<ordered-ident>): New class.
1262 (obj-ordinal, obj-set-ordinal!): New functions.
1263 (add-ident-methods!): Delete.
1265 * model.scm (parse-insn-timing): Change logging message to level 3.
1267 2009-07-16 Doug Evans <dje@sebabeach.org>
1269 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1270 add a link to define-normal-insn-enum.
1272 * doc/porting.texi (Conventions): Add docs on writing integers.
1274 * cpu/simplify.inc (*): One line doc strings don't need \n.
1275 (df): Invoke define-full-ifield instead of claiming it's an alias.
1277 (dnop): Mark as deprecated.
1279 * cpu/play.cpu: Add example of hardware `layout'.
1280 * doc/porting.tex: Add docs on simplify.inc.
1281 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1284 * ifield.scm: Whitespace/formatting cleanup.
1286 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1288 * read.scm (parse-error): Don't print single entry args as a list.
1289 (-reader-process-expanded-1): Convert symbol to string for
1292 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1294 2009-07-15 Doug Evans <dje@sebabeach.org>
1296 * cpu/simplify.inc (dno): New pmacro.
1297 * doc/porting.texi: Add section on simplify.inc.
1298 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1300 2009-07-15 Doug Evans <devans@sourceware.org>
1302 * gen-all-doc: Generate index.html.
1304 2009-07-13 Doug Evans <dje@sebabeach.org>
1306 Extend pmacro language, add testsuite.
1307 * Makefile.am (SUBDIRS): Add testsuite.
1308 * Makefile.in: Regenerate.
1309 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1310 testsuite/test-utils.sh.
1311 * configure: Regenerate.
1312 * dev.scm (cload): Handle testsuite app.
1313 (load-testsuite): New function.
1314 * pmacros.scm: (-pmacro-debug?): New global.
1315 (-smacro-table): New global.
1316 (-smacro-lookup, -smacro-set!): New functions.
1317 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1318 (-pmacro-syntactic-form?): New function.
1319 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1320 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1321 (-pmacro-expected-non-negative-integer): New function.
1322 (-pmacro-verify-non-negative-integer): New function.
1323 (-pmacro-expand-expr-list): New function.
1324 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1325 (-pmacro-process-args): Renamed from -pmacro-invoke.
1326 (-pmacro-apply, -smacro-apply): New functions.
1327 (-pmacro-expand): Rewrite syntactic form processing.
1328 (-pmacro-build-lambda): Reformat.
1329 (define-pmacro): Watch for more errors in definition.
1330 (pmacro-debug): New function.
1331 (pmacro-trace): Set/reset -pmacro-debug?.
1332 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1333 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1334 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1335 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1336 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1337 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1338 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1339 (pmacros-init!): Initialize -smacro-table.
1340 Rewrite pmacro initialization.
1341 * read.scm (reader-process-expanded): Renamed from
1342 -reader-process-expanded. All callers updated.
1343 Recognize () as a no-op.
1344 (cpu-load): Tweak logging messages.
1345 * utils.scm (message): Add comment.
1346 * cpu/play.cpu: Add some instructions to play with .let.
1347 * doc/cgenint.texi: Move some debugging related docs to here from
1349 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1350 * testsuite/Makefile.am: New file.
1351 * testsuite/Makefile.in: New file.
1352 * testsuite/test-utils.sh.in: New file.
1353 * testsuite/run-tests.sh: New file.
1354 * testsuite/testsuite.cpu: New file.
1355 * testsuite/pmacros-1.test: New file.
1357 * decode.scm: Comment and formatting tweaks.
1358 (-build-decode-table-guts): Add more data to logging message.
1360 2009-07-12 Doug Evans <dje@sebabeach.org>
1362 Delete files that now live in ../cpu.
1363 * cpu/iq10.cpu: Delete.
1364 * cpu/iq2000.cpu: Delete.
1365 * cpu/iq2000.opc: Delete.
1366 * cpu/iq2000m.cpu: Delete.
1367 * cpu/m32r.cpu: Delete.
1368 * cpu/m32r.opc: Delete.
1370 2009-07-09 Doug Evans <dje@sebabeach.org>
1372 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1373 All callers updated. Work around -ve shifts by referencing the
1376 * utils.scm (message): Handle pairs.
1378 2009-07-08 DJ Delorie <dj@redhat.com>
1380 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1381 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1382 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1385 2009-07-07 Doug Evans <dje@sebabeach.org>
1387 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1388 * cpu/play.opc: New file.
1390 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1391 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1392 * doc/rtl.texi (Instructions): Update.
1394 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1395 (opc-arguments, -OPC): Call set-opc-file-path!.
1396 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1397 (set-opc-file-path!): New function.
1398 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1400 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1401 before passing to gen-c-args.
1403 2009-07-06 DJ Delorie <dj@redhat.com>
1405 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1406 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1407 unspecified accesses to control registers.
1409 2009-07-01 DJ Delorie <dj@redhat.com>
1411 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1412 unspecified accesses to control registers.
1414 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1415 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1417 2009-06-27 Doug Evans <dje@sebabeach.org>
1419 * gen-all-intrinsics: New file.
1421 2009-06-24 Doug Evans <dje@sebabeach.org>
1423 * All *.scm files: Update copyright year.
1424 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1426 2009-06-23 DJ Delorie <dj@redhat.com>
1428 * intrinsics.scm: Updates to support IVC2.
1429 (belongs-to-group?): Check IVC2 slots.
1430 (-slots-attribute): New.
1431 (targets::attributes): Add SLOTS.
1432 (target:add-well-known-intrinsics): Add CPMOV.
1433 (md-insn): Add CPTYPE and CRET?.
1434 (add-md-insn): Likewise.
1435 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1436 duplicate insns with different bit patterns.
1437 (write-cgen-insn?): Add cret? support.
1438 (intrinsics.h): Add vector types.
1439 (runtime-op): Add vector support.
1440 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1442 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1443 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1444 (h-cr-ivc2): Default to typeless.
1445 (h-ccr-ivc2): Fix register width.
1446 (SLOTS): Fix values and default.
1447 (ivc2_*): Add control register names.
1448 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1450 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1451 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1453 2009-06-22 Doug Evans <dje@sebabeach.org>
1455 * semantics.scm (insn-build-known-values): Fix typo in comment.
1457 2009-06-21 Doug Evans <dje@sebabeach.org>
1459 * rtl-xform.scm (rtx-simplify-insn): New function.
1460 * html.scm (gen-insn-docs): Call it.
1461 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1462 * iformat.scm (ifmt-analyze): Minor simplification.
1464 * semantics.scm (semantic-compile): Change arg sem-code-list to
1466 (semantic-attrs): Ditto.
1467 * iformat.scm (ifmt-analyze): Update.
1468 (ifmt-compute!): Update.
1469 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1471 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1472 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1473 * semantics.scm (rtx-simplify): Ditto.
1474 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1475 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1476 (-simplify-expr-fn): Move to rtl-xform.scm.
1477 (-solve-expr-fn, rtx-solve): Ditto.
1478 * rtl-xform.c: New file.
1479 * read.scm: Load it.
1481 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1482 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1483 (-rtx-traverse, rtx-traverse): Ditto.
1485 2009-06-20 Doug Evans <dje@sebabeach.org>
1487 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1489 * configure.in: Update version to 1.1.
1490 * configure: Regenerate.
1491 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1493 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1494 Doug Evans <dje@sebabeach.org>
1496 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1497 (cgen-desc.c): Ditto.
1498 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1499 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1500 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1501 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1502 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1503 (cgen-cpuall.h, cgen-ops.c): Ditto.
1504 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1505 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1506 (cgen-sem-switch.c): Ditto.
1507 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1508 * sim-model.c (cgen-model.c): Ditto.
1510 2009-06-18 Doug Evans <dje@sebabeach.org>
1512 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1514 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1516 * dev.scm (cload): Change #:arch argument to take the path to the
1517 .cpu file instead of just the name of the architecture.
1518 * read.scm (arch-path): Remove trailing '/'.
1519 (cpu-load): Set `arch-path' to directory of .cpu file.
1520 (-cgen): Don't set `arch-path' here.
1522 * doc/porting.texi: Update.
1524 2009-06-14 Doug Evans <dje@sebabeach.org>
1526 * gen-all-doc: Use files in ../cpu where possible.
1528 * Makefile.am (ARCHFILE): Fix path.
1529 * Makefile.in: Regenerate.
1530 * html.scm: Use "pre" instead of "plaintext".
1532 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1533 * doc/app.texi: Cleanup pass.
1534 * doc/cgen.texi: Cleanup pass.
1535 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1536 * doc/intro.texi: Cleanup pass.
1537 * doc/mdate-sh: New file.
1538 * doc/opcodes.texi: Cleanup pass.
1539 * doc/pmacros.texi: Cleanup pass.
1540 * doc/porting.texi: Cleanup pass.
1541 * doc/rtl.texi: Cleanup pass.
1542 * doc/running.texi: Cleanup pass. Document more runtime options.
1543 * doc/stamp-vti: Update.
1544 * doc/version.texi: Update.
1546 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1547 (GUILE): Fix definition.
1548 * Makefile.in: Regenerate with automake 1.9.6.
1549 * aclocal.m4: Regenerate with aclocal 1.9.6.
1550 * configure.in (AC_PREREQ): Set to 2.59.
1551 (GENINSRC_NEVER): Define.
1552 * configure: Regenerate with autoconf 2.59.
1553 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1554 (cgen.info,cgen.dvi): Delete.
1555 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1556 (noinst_TEXINFOS): Add cgenint.texi.
1557 (DOCFILES): Add missing files.
1558 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1559 * doc/Makefile.in: Regenerate with automake 1.9.6.
1561 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1563 * attr.scm: Removing trailing whitespace.
1564 * cgen-intrinsics.scm: Ditto.
1565 * cgen-sim.scm: Ditto.
1571 2009-05-28 DJ Delorie <dj@redhat.com>
1573 * cpu/mep.opc (parse_signed16_range): New.
1574 (parse_unsigned16_range): New.
1575 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1577 2009-05-26 DJ Delorie <dj@redhat.com>
1579 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1581 (f-ivc2-ccrn-c3hi): New.
1582 (f-ivc2-ccrn-c3lo): New.
1583 (f-ivc2-ccrn-c3): New.
1584 (ivc2c3ccrn): Use it.
1586 2009-05-22 DJ Delorie <dj@redhat.com>
1588 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1589 (mep_config_map): Regenerate.
1591 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1592 ivc2-specific names.
1594 (cmovc): move to after field definitions, use ivc2-specific
1596 (cpmovi_b_P0S_P1): New.
1598 2009-05-19 DJ Delorie <dj@redhat.com>
1600 * cpu/mep.opc: Regenerate configuration.
1601 (parse_cdisp10): Only check CPU flags, not COP flags.
1602 (check_configured_mach): Likewise.
1604 2009-05-13 DJ Delorie <dj@redhat.com>
1606 * intrinsics.scm (insns.md): Add RTL predicates.
1607 (intrinsics.h): Remove old C intrinsics.
1609 2009-04-29 DJ Delorie <dj@redhat.com>
1611 * mep-ivc2.cpu: New.
1612 * mep-core.cpu: Regenerated. Add support for deferred register
1614 (SLOT): Add IVC2 slot types.
1615 (sim-syscall): Rename to something more appropriate.
1616 * mep-ext-cop.cpu: Regenerate.
1617 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1618 (print_slot_insn): New.
1619 (mep_examine_ivc2_insns): New.
1620 (mep_print_insn_set_ivc2_mode): New.
1621 (mep_print_insn): Support IVC2 slotting.
1623 2009-04-20 DJ Delorie <dj@redhat.com>
1625 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1626 (guess-mode): Drop COP* syntax.
1627 (need-insn): Add "--syscall--" to the list.
1628 (enum-type): Drop COP* syntax.
1629 (intrinsics.h): Likewise.
1630 (intrinsic-protos.h): Change file header to allow it to be
1633 2009-04-17 DJ Delorie <dj@redhat.com>
1635 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1636 (lhucpm1): Limit to C5 mach.
1637 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1638 * cpu/mep-core.cpu (extend-cdisp10): New.
1639 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1641 2009-04-08 DJ Delorie <dj@redhat.com>
1643 * cpu/mep-c5.cpu: New.
1644 * cpu/mep-core.cpu: Add C5 support.
1645 * cpu/mep.opc: Likewise.
1647 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1649 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1650 about calling memset with a zero length.
1652 2009-02-03 DJ Delorie <dj@redhat.com>
1654 * cpu/mep-core.cpu: Update to new MeP configuration.
1655 * cpu/mep-ext-cop.cpu: Likewise.
1656 * cpu/mep.opc: Likewise.
1658 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1660 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1662 2008-06-17 Dave Brolley <brolley@redhat.com>
1664 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1667 2007-11-13 Dave Brolley <brolley@redhat.com>
1669 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1671 2007-11-05 Dave Brolley <brolley@redhat.com>
1673 * intrinsics.scm,cgen-intrinsics.scm: New application which
1674 generates code to support intrinsic functions for insns in the
1675 mep architecture in gcc.
1677 2007-09-21 Dave Brolley <brolley@redhat.com>
1679 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1680 (rn3us): CDATA attribute now LONG.
1682 2007-08-21 Dave Brolley <brolley@redhat.com>
1684 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1687 2007-07-05 Nick Clifton <nickc@redhat.com>
1689 * utils.scm (copyright-fsf): Update copyright notice to refer to
1692 2007-05-22 Nick Clifton <nickc@redhat.com>
1694 * doc/cgen.texi: Use @copying around the copyright notice.
1695 * doc/internals.texi: Likewise.
1697 2007-02-05 Dave Brolley <brolley@redhat.com>
1699 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1701 2007-02-05 Dave Brolley <brolley@redhat.com>
1703 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1704 in the generated code for @arch@_cgen_init_asm if it is defined.
1706 * Contribute the following changes:
1707 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1709 * attr.scm (<string-attribute>): New attribute class.
1710 (attr-kind): Handle <string-attribute>.
1711 (parse-simple-attribute): New function.
1712 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1713 (<bitset-attribute> 'parse-value): Likewise.
1714 (<boolean-attribute> 'parse-value): Likewise.
1715 (<enum-attribute> 'parse-value): Likewise.
1716 (<string-attribute> 'parse-value): New function.
1717 (-attr-parse): Handle <string-attribute>.
1718 (-attr-read): Likewise.
1719 (<string-attribute> 'gen-value-for-defn-raw): New function.
1720 (<string-attribute> 'gen-value-for-defn): New function.
1722 2006-11-07 Dave Brolley <brolley@redhat.com>
1724 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1727 2006-10-18 Dave Brolley <brolley@redhat.com>
1729 * Contribute the following changes:
1731 2006-07-11 Dave Brolley <brolley@redhat.com>
1733 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1735 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1736 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1737 hardware or memory mode which was used.
1738 * sid-cpu.scm (hw-need-write-stack?): New function.
1739 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1740 identify hardware which uses write stacks.
1741 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1742 Initialized to an empty list.
1743 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1744 hw-need-write-stack?.
1745 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1746 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1747 (used-in-delay-rtl?): New method of <hardware-base>.
1748 (hw-used-in-delay-rtl?): New function.
1750 2006-06-20 Dave Brolley <brolley@redhat.com>
1752 * sid.scm (gen-attr-type): Removed.
1753 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1754 (SH2a-MACH): Add sh5.
1755 (sh2a-nofpu-models): Add units for sh5.
1756 (sh2a-fpu-models): Likewise.
1758 2006-06-15 Dave Brolley <brolley@redhat.com>
1760 * cpu/sh-sim.cpu: New file.
1761 * cpu/sh-sid.cpu: New file.
1762 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1763 (All fields): Remap for (insn-lsb0? #f)
1764 (All insns): Add timing specs.
1765 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1766 'xattrs' and .splice it in.
1767 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1768 (h-frc,h-drc): Add PROFILE attribute.
1770 (h-vbr): New hardware.
1771 (All fields): Remap for (insn-lsb0? #f)
1772 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1773 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1774 (fpscr): Use h-fpscr.
1775 (fsdm,fsdn): Use h-fsd.
1776 (dshci): Add xtiming argument and splice it in.
1777 (dr,xd): pmacros removed.
1778 (All insns): Add timing specs, *-MACH attribibutes,
1779 SH4{A}-GROUP attributes.
1780 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1781 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1782 we're being processed for sim or sid.
1783 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1784 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1785 (define-isa compact): Add (isa-parallel-insns 2).
1786 (define-isa media): Add (isa-parallel-insns 2). Add
1787 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1788 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1790 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1791 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1792 (SH4al-MACH, SH5-MACH): New pmacros.
1793 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1794 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1795 (sh5-media-fp-units, common-model, common-model-with-fp)
1796 (sh3-model, sh3e-model): New pmacros.
1797 (define-model sh2): New model.
1798 (define-model sh2e): New model.
1799 (define-model sh3): New model.
1800 (define-model sh3e): New model.
1801 (define-model sh2a-nofpu): New model.
1802 (define-model sh2a-fpu): New model.
1803 (define-model sh4-nofpu): New model.
1804 (define-model sh4): New model.
1805 (define-model sh4a-nofpu): New model.
1806 (define-model sh4a): New model.
1807 (define-model sh4al): New model.
1808 (define-model sh5-media): New model.
1809 (define-model sh5): Add all units.
1810 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1811 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1812 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1813 (h-pc): Add PROFILE attribute.
1816 (h-gr,h-grc): Likewise.
1817 (h-cr): Set h-sr in setter.
1818 (h-frbit): Get/Set h-fpscr.
1819 (h-szbit,h-prbit): Likewise.
1820 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1821 Add getter and setter.
1822 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1823 Adjust getter and setter.
1824 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1825 Adjust getter and setter.
1826 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1827 (h-fsd,h-fmov): New hardware.
1829 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1831 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1832 doc/notes.texi, doc/porting.texi, doc/running.texi,
1833 doc/sim.texi: Fix some typos.
1835 2006-07-14 Dave Brolley <brolley@redhat.com>
1837 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1838 hardware or memory mode which was used.
1839 * sid-cpu.scm (hw-need-write-stack?): New function.
1840 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1841 identify hardware which uses write stacks.
1842 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1843 Initialized to an empty list.
1844 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1845 hw-need-write-stack?.
1846 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1847 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1848 (used-in-delay-rtl?): New method of <hardware-base>.
1849 (hw-used-in-delay-rtl?): New function.
1851 2006-06-20 Dave Brolley <brolley@redhat.com>
1853 * sid.scm (gen-attr-type): Removed.
1855 2006-05-10 Dave Brolley <brolley@redhat.com>
1857 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1858 support for (if (application-is? <appname>) (...) (...)).
1859 (-cgen): Add trailing "/" to arch-path.
1860 * utils.scm (dirname): Removed. dirname is a primitive function.
1862 2006-05-09 Dave Brolley <brolley@redhat.com>
1864 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1865 'entire_insn' not 'base_insn'.
1866 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1868 * sim.scm (-gen-arch-model-decls): Likewise.
1869 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1870 abuf->written if profiling.
1871 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1872 object->string om the mode.
1873 (-hw-gen-write-stack-decl): Likewise.
1874 * read.scm (include): Use arch-path as file location.
1875 (arch-path): Define it with a default setting.
1876 (-cgen): Update arch-path when "-a" option is specified.
1877 * utils.scm (dirname): New function.
1879 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1881 * configure.in: Remove AC_ARG_PROGRAM.
1882 * configure: Regenerate with autoconf 2.59.
1884 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1886 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1889 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1891 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1892 or an error message otherwise.
1893 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1894 Fix up comments to correctly describe the functions.
1896 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1897 Anil Paranjape <anilp1@kpitcummins.com>
1898 Shilin Shakti <shilins@kpitcummins.com>
1900 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1902 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1904 2006-02-10 Nick Clifton <nickc@redhat.com>
1906 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1908 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1910 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1912 (-hw-gen-write-stack-decl): Likewise.
1914 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1916 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1917 non-(adata-integral-insn? CURRENT-ARCH) case.
1919 2005-10-28 Dave Brolley <brolley@redhat.com>
1921 Contribute the following changes:
1922 2005-09-19 Dave Brolley <brolley@redhat.com>
1924 * attr.scm (gen-value-for-defn-raw): New methods.
1925 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1926 gen-value-for-defn-raw.
1927 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1929 2002-12-13 Dave Brolley <brolley@redhat.com>
1931 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1932 (-gen-attr-accessors): New function.
1933 (gen-obj-attr-defn): Update terminating initializer.
1934 (gen-obj-attr-end-defn): New function.
1935 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1936 * sid-cpu.scm (cgen-desc.h): Generate code to include
1937 "opcode/cgen-bitset.h"
1938 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1940 * desc.scm ('gen-defn): Update terminating initializer.
1941 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1942 terminatinig initializer.
1943 (gen-hw-decls): Ditto.
1944 (gen-operand-decls): Ditto.
1945 (gen-insn-decls): Ditto.
1946 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1947 (gen-insn-table): Update terminating initializer.
1948 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1949 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1950 * attr.scm (charmask-bytes): New function.
1951 (bitset-attr->charmask): New function.
1952 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1953 differences for SID-SIMULATOR.
1954 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1955 (<enum-attribute>): Ditto.
1957 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1959 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1961 2005-10-24 DJ Delorie <dj@redhat.com>
1963 * operand.scm (-anyof-merge-syntax): Print a more useful error
1966 2005-10-19 Nick Clifton <nickc@redhat.com>
1968 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1971 2005-10-18 Andreas Schwab <schwab@suse.de>
1973 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1975 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1977 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1980 2005-08-02 Dave Brolley <brolley@redhat.com>
1982 * rtl-c.scm (s-unop): Don't dereference
1983 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1984 (s-binop, s-convop, s-cmpop): Likewise.
1986 2005-07-29 Dave Brolley <brolley@redhat.com>
1988 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1989 if with-profile or with-parallel-write.
1990 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1991 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1994 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1996 * cpu/fr30.opc (print_register_list): Correct format strings.
1997 * cpu/ip2k.opc: Likewise.
1999 2005-07-05 Nick Clifton <nickc@redhat.com>
2001 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2002 unsigned in order to avoid compile time warnings about sign
2005 2005-07-01 Nick Clifton <nickc@redhat.com>
2007 * desc-cpu.scm: Update to ISO C90 function declaration style.
2008 * opc-asmdis.scm: Likewise.
2009 * opc-ibld.scm: Likewise.
2010 * opc-itab.scm: Likewise.
2011 * cpu/fr30.opc: Likewise.
2012 * cpu/i960.opc: Likewise.
2013 * cpu/ip2k.opc: Likewise.
2014 * cpu/iq2000.opc: Likewise.
2015 * cpu/m32r.opc: Likewise.
2016 * cpu/openrisc.opc: Likewise.
2017 * cpu/sh.opc: Likewise.
2018 * cpu/sparc.opc: Likewise.
2019 * cpu/xstormy16.opc: Likewise.
2021 2005-06-15 Dave Brolley <brolley@redhat.com>
2023 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2024 (cgen-cpu.h): Call it.
2026 Contributed on behalf of Graydon Hoare
2027 2001-06-05 graydon hoare <graydon@redhat.com>
2029 * utils.scm (foldl): Define.
2033 (intersection): Simplify.
2034 * sid.scm : Set APPLICATION to SID-SIMULATOR.
2035 (-op-gen-delayed-set-maybe-trace): Define.
2036 (<operand> 'gen-set-{quiet,trace}): Delegate to
2037 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2038 up and needs cleaning.
2039 (-with-parallel?): Hardwire with-parallel to #t.
2040 (<operand> 'cxmake-get): Replace with lookahead-aware code
2041 * sid-decode.scm: Remove per-insn writeback fns.
2042 (-gen-idesc-decls): Redefine sem_fn type.
2043 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2044 with write stack stuff.
2045 (cgen-write.cxx): Replace per-insn writebacks with single write
2046 stack writeback. Add write stack reset function.
2047 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2049 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2050 estate attribute set.
2051 (delay): Set #:delayed attribute to calculated delay, update
2052 maximum delay of cpu, check (delay ...) usage.
2053 * operand.scm (<operand>): Add delayed slot to <operand>.
2054 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2055 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2056 * doc/rtl.texi (Expressions): Add section on (delay ...).
2058 2005-06-13 Jim Blandy <jimb@redhat.com>
2060 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2063 2005-06-07 Zack Weinberg <zack@codesourcery.com>
2065 * doc/porting.texi: Change all mention of md_apply_fix3 and
2066 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2069 2005-05-18 Dave Brolley <brolley@redhat.com>
2071 * utils-sim.scm (-gen-decode-default-entry): New function.
2072 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2073 code to check that all opcodes bits match.
2074 (-gen-decoder-switch): Use -gen-decode-default-entry.
2076 2005-05-16 Jim Blandy <jimb@redhat.com>
2078 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2079 fetched by one of our GETIMEM* methods.
2080 * utils-gen.scm (-extract-chunk-specs): Always fetch full
2081 base-insn-sized chunks.
2083 2005-05-10 Nick Clifton <nickc@redhat.com>
2085 * Update the address and phone number of the FSF organization in
2086 the GPL notices in the following files:
2087 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2088 cpu/powerpc.cpu, slib/random.scm
2090 2005-05-06 Jim Blandy <jimb@redhat.com>
2092 * pprint.scm, cos-pprint.scm: Add documentation.
2094 * pprint.scm (pprint): Don't wipe out elide-table after each call.
2096 * pprint.scm, cos-pprint.scm: New files.
2098 2005-04-04 Nick Clifton <nickc@redhat.com>
2100 * opcodes.scm (-gen-parse-address): Initialise value to zero to
2101 avoid a compile time warning.
2103 2005-03-18 Nick Clifton <nickc@redhat.com>
2105 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2106 "percent-operand" from "%operand" as the latter confuses xgettext
2107 into thinking that it is a C printf formating directive, which
2108 prevents proper translation.
2110 2005-02-23 Nick Clifton <nickc@redhat.com>
2112 * opcodes.scm (gen-parse-number): Add a cast to the desired
2113 pointer signed'ness in order to prevent compile time warnings.
2114 * cpu/ip2k.opc: Fixed compile time warnings about differing
2115 signed'ness of pointers passed to functions.
2116 * cpu/iq2000.opc: Likewise.
2117 * cpu/m32r.opc: Likewise.
2118 * cpu/openrisc.opc: Likewise.
2119 * cpu/xstormy16.opc: Likewise.
2121 2005-02-22 Alan Modra <amodra@bigpond.net.au>
2123 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2124 (cgen-desc.h): ..to here, after opcode/cgen.h include.
2126 2005-02-16 Dave Brolley <brolley@redhat.com>
2128 * utils.scm: Update copyright years.
2129 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2130 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2131 * operand.scm (-derived-operand-parse): Move logit message from level 1
2134 2005-02-15 Nick Clifton <nickc@redhat.com>
2136 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2137 prevent compile time warning messages.
2138 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2139 * utils-gen.scm (attr-int-gen-defn): Likewise.
2140 (attr-gen-defn): Likewise.
2141 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2142 (print_dollarhex16): Remove unused function.
2144 2005-02-15 Jim Blandy <jimb@redhat.com>
2146 * guile.scm (cgen-call-with-debugging): Doc fix.
2148 Make backtraces work more reliably.
2149 * guile.scm: Set up debugging parameters, and enable debugging and
2150 source positions while loading.
2151 (cgen-call-with-debugging, cgen-debugging-stack-start): New
2153 * read.scm: Don't set debugging parameters here.
2154 (catch-with-backtrace): Function deleted.
2155 (-cgen): Simply note the presence or absence of the -b option.
2156 Pass the flag to cgen-call-with-debugging, so debugging is turned
2157 off here if the user didn't request it, for faster computation.
2158 (cgen): Call cgen-debugging-stack-start here, instead of
2159 catch-with-backtrace.
2161 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2163 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2164 Don't write out the trailing -s here.
2165 * Makefile.in: Regenerated.
2166 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2167 fixup.scm here; let the caller decide which Scheme's customization
2169 * dev.scm: Load guile.scm, not fixup.scm.
2170 * fixup.scm: Deleted; contents have all moved to guile.scm.
2173 * guile.scm (debug-write): New function.
2175 2005-02-14 Jim Blandy <jimb@redhat.com>
2177 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2178 transformer procedure, not eval. Transformer procedures take one
2181 2005-02-11 Nick Clifton <nickc@redhat.com>
2183 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2184 to 'bfd_vma *' in order avoid compile time warning message.
2186 2005-02-09 Jim Blandy <jimb@redhat.com>
2188 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
2189 corresponding change in the sim/common directory.)
2191 2005-02-07 Jim Blandy <jimb@redhat.com>
2193 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
2194 changes in the opcodes directory.)
2196 * guile.scm: New file, containing Guile-specific definitions and
2197 adaptations. This is loaded by the app-specific shell scripts.
2198 Initially identical to fixup.scm.
2199 * cgen-sid.scm: Don't load fixup.scm here.
2201 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2204 2005-01-27 Jim Blandy <jimb@redhat.com>
2206 * utils.scm (string/symbol->append): Renamed from 'concat'.
2207 * opcodes.scm (gen-switch): Use new name.
2208 * insn.scm (-sub-insn-make!): Same.
2209 * rtl.scm (rtx-dump): Same.
2210 * semantics.scm (semantic-compile): Same.
2212 2005-01-20 Jim Blandy <jimb@redhat.com>
2214 * opcodes.scm (gen-switch): Use concat instead of string-map.
2216 * utils.scm (concat): New function.
2217 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2218 * rtl.scm (rtx-dump): Same.
2219 * semantics.scm (semantic-compile): Same.
2221 2004-12-16 Jim Blandy <jimb@redhat.com>
2223 * utils-cgen.scm (parse-name): Don't assume that string-map can be
2224 applied to symbols. Process everything as strings, and then
2225 convert to a symbol at the end.
2227 * read.scm (debug-repl): Temporarily redirect input and output to
2228 /dev/tty while we debug, so we don't interfere with whatever CGEN
2229 is reading or writing.
2230 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2233 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
2235 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2236 will work with newer versions of guile.
2238 2004-10-27 Nick Clifton <nickc@redhat.com>
2240 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2241 * cpu/iq2000.cpu: Likewise.
2243 2004-07-21 DJ Delorie <dj@redhat.com>
2245 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2247 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2249 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2250 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2252 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2254 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2256 2004-03-22 Dave Brolley <brolley@redhat.com>
2258 * utils.scm (copyright-fsf): Update copyright years.
2259 (copyright-red-hat): Ditto.
2260 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2262 (-op-gen-set-trace-parallel): Ditto.
2264 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2266 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2267 disassembling codes for 0x*2 addresses.
2269 2004-01-29 Dave Brolley <brolley@redhat.com>
2271 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2272 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2273 in the extra bit positions.
2275 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2277 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2279 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2281 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2282 "short" being 16 bit.
2283 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2284 internationalize error message.
2285 (parse_lo16): Likewise. Remove useless code.
2287 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2289 * cpu/m32r.cpu : Add new model m32r2.
2290 Add new instructions.
2291 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2292 Changed PIPE attr of push from O to OS.
2293 Care for Little-endian of M32R.
2294 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2295 Care for Little-endian of M32R.
2296 (parse_slo16): signed extension for value.
2298 2003-10-26 Dave Brolley <brolley@redhat.com>
2300 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2301 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2302 (-gen-extract-fn): Call -gen-record-profile-args.
2304 2003-10-21 Dave Brolley <brolley@redhat.com>
2306 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2308 * decode.scm (-opcode-slots): Correct typo in logit call.
2310 2003-10-09 Jim Blandy <jimb@redhat.com>
2312 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2313 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2315 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2317 2003-10-06 Dave Brolley <brolley@redhat.com>
2319 * gen-all-doc: Add fr550.
2321 2003-09-11 Doug Evans <dje@sebabeach.org>
2323 * Makefile.am (ARCHFILE): New var.
2324 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2325 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2326 * Makefile.in: Regenerate.
2328 2003-09-08 Dave Brolley <brolley@redhat.com>
2330 On behalf of Doug Evans <dje@sebabeach.org>
2331 Pass in paths to input files, instead of assuming they live in
2332 $srcdir/cpu. Plus misc. option processing cleanup.
2333 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2334 Add pre-process pass to all options.
2335 * cgen-gas.scm (gas-arguments): Ditto.
2336 * cgen-sid.scm (sim-arguments): Ditto.
2337 * cgen-sim.scm (sim-arguments): Ditto.
2338 * cgen-stest.scm (stest-arguments): Ditto.
2339 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2340 (-opc-file-path): New global.
2341 (opc-file-path): New fn.
2342 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2343 All callers updated.
2344 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2345 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2346 Replace srcdir arg with opc-file. All callers updated.
2347 * read.scm (-opt-spec-update): Delete.
2348 (opt-get-first-pass,opt-get-second-pass): New fns.
2349 (-cgen): Process application-specific arguments in two passes.
2351 2003-08-29 Dave Brolley <brolley@redhat.com>
2353 * cpu/frv.cpu: Removed.
2354 * cpu/frv.opc: Removed.
2356 2003-08-21 Nick Clifton <nickc@redhat.com>
2358 * cpu/frv.cpu (mbtoh): Replace input parameter to
2359 u-media-dual-expand and u-media-dual-btoh with output parameter.
2360 (cmbtoh): Add profiling hack.
2362 2003-08-19 Michael Snyder <msnyder@redhat.com>
2364 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2366 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2368 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2369 the elements for the END record of CGEN_OPINST, silencing warnings.
2371 2003-07-15 Doug Evans <dje@sebabeach.org>
2373 Add guile 1.6.4 support.
2374 - empty list must be quoted
2375 - string functions have stricter type checking
2376 - eval now takes a second argument
2377 - symbol-bound? is deprecated
2378 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2379 (bitset-attr->list): Ensure arg to string-cut is a string.
2380 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2381 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2382 * cos.scm (-class-list): Must quote empty list.
2383 (-class-parent-classes,-class-compute-class-desc): Ditto.
2384 (class-make,make,object-reset!): Ditto.
2385 (method-make-make!): Call eval1 instead of eval.
2386 (method-make-forward!,method-make-virtual-forward!): Ditto.
2387 * decode.scm (subdtable-add): Use stringsym-append instead of
2389 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2390 (-build-decode-table-entry): Fetch string name of insn.
2391 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2392 (-gen-mach-table-defns): Ditto for mach.
2393 (gen-ifld-defns): Ditto for ifld.
2394 (gen-hw-table-defns): Ditto for hw.
2395 (gen-operand-table): Ditto for op.
2396 (gen-insn-table-entry): Ditto for insn.
2397 * desc.scm (gen-attr-table-defn): Ditto for attr.
2398 (<keyword>,gen-defn): Don't pass symbols to string-append.
2399 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2401 (enum-vals-upcase): Use symbol-upcase to build result.
2402 (-enum-parse): Use stringsym-append to build errtxt.
2403 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2404 (eval1): New function.
2405 (symbol-bound?): Provide own version if >= guile 1.6.
2406 * hardware.scm (define-keyword): Use string-append instead of
2408 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2409 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2411 (gen-list-entry): Handle either symbol or string `name' arg.
2412 (gen-obj-doc-header): Fetch string name of `o' arg.
2413 (define-cpu-intro): Ditto for cpu.
2414 (gen-mach-intro): Ditto for mach.
2415 (gen-model-intro): Ditto for model.
2416 (gen-isa-intro): Ditto for isa.
2417 (gen-machine-doc-1): Ditto for isa.
2418 (gen-reg-doc-1): Convert mach to string first.
2419 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2420 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2422 (gen-insn-categories): Fetch string name of mach. Convert
2423 enum-val-name to string first.
2424 (gen-insn-docs): Fetch string name of mach.
2425 * ifield.scm (ifld-ilk): Result is a string.
2426 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2427 Fetch string name of ifld.
2428 (-sfmt-search-key): Similarily for ifld and op.
2429 * insn.scm (syntax-make): Fetch string name of syntax element.
2430 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2431 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2432 * mode.scm (mode:c-type): Result is a string.
2433 (mode:enum): Fetch string name of mode.
2434 (-mode-parse): Use stringsym-append to build errtxt.
2435 * model.scm (model:enum): Fetch string name of model.
2436 (-model-parse): Use stringsym-append to build errtxt.
2437 (parse-insn-timing): Must quote empty list.
2438 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2439 (-gen-minsn-opcode-entry): Ditto.
2440 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2442 (read-cpu.opc): Convert current-arch-name to a string before using.
2443 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2444 (<derived-operand>): Must quote empty list.
2445 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2446 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2448 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2449 (-pmacro-sym): Must convert symbols to strings before passing to
2451 (-pmacro-str): Ditto.
2452 (pmacros-init!): Use eval1 instead of eval.
2453 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2454 (keep-isa-atlist?): Ditto.
2455 (cmd-if): Use eval1 instead of eval.
2456 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2457 (-rtl-c-get): Fetch string name of src.
2458 (s-unop): Ditto for mode.
2459 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2460 (-gen-par-temp-defns,subword): Ditto.
2461 (join): Use stringsym-append instead of string-append.
2462 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2463 (rtx-traverse-debug): Fetch string name of rtx-obj.
2464 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2465 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2466 (rtx-pretty-name): Result is a string.
2467 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2468 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2469 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2471 (-gen-sfrag-case): Fetch string name of user.
2472 * sid-model.scm (unit:enum): Fetch string name of unit.
2473 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2474 (<hw-memory>,gen-set-quiet): Ditto.
2475 (gen-mode-defs): Ditto.
2476 (sim-finish!): Convert current-arch-name to a string before using.
2477 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2478 (-gen-no-scache-semantic-fn): Ditto.
2479 (cgen-defs.h): Fetch string name of isa.
2480 (cgen-read.c): Convert current-arch-name to a string before using.
2481 (cgen-write.c): Ditto.
2482 * sim-model.scm (unit:enum): Fetch string name of unit.
2483 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2484 (-gen-model-timing-table): Fetch string name of model.
2485 (-gen-mach-model-table): Ditto.
2486 (-gen-mach-defns): Fetch string name of mach.
2487 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2488 (<hw-memory>,cxmake-get): Fetch string name of mode.
2489 (<hw-memory>,gen-set-quiet): Ditto.
2490 (gen-mode-defs): Ditto.
2491 (sim-finish!): Must quote empty list.
2492 * utils-cgen.scm (<ident>): Must quote empty list.
2493 (obj:str-name): New fn.
2494 (parse-comment): Result is a string.
2495 (parse-symbol): Result is a symbol.
2496 (parse-string): Result is a string.
2497 (keyword-list?): Convert arg to string before calling string-ref.
2498 (keyword-list->arg-list): Ditto.
2499 (gen-attr-name): Convert attr-name to string first.
2500 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2501 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2502 (gen-define-ifmt-ifields): Ditto for fld.
2503 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2505 (gen-file-name): Ditto.
2506 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2507 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2508 (reduce): Call eval1 instead of eval.
2509 * cpu/m32r.cpu (addi): Don't use `#.'.
2511 * gen-all-sim: Fix some typos.
2513 2003-07-08 Doug Evans <dje@sebabeach.org>
2515 * gen-all-doc: Ensure run from cgen src dir.
2516 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2517 * gen-all-sid: Similarily, in ./tmp-sid.
2518 * gen-all-sim: Similarily, in ./tmp-sim.
2520 2003-06-20 Doug Evans <dje@sebabeach.org>
2522 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2524 2003-06-19 Doug Evans <dje@sebabeach.org>
2526 * mach.scm (-ifld-already-defined?): New proc.
2527 (current-ifld-add!): Use it.
2528 (-op-already-defined?): New proc.
2529 (current-op-add!): Use it.
2530 (-insn-already-defined?): New proc.
2531 (current-insn-add!): Use it.
2532 (-minsn-already-defined?): New proc.
2533 (current-minsn-add!): Use it.
2534 (obj-isa-list): New proc.
2535 (isa-supports?): Use it.
2537 2003-06-10 Doug Evans <dje@sebabeach.org>
2539 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2540 * cpu/m32r.cpu (all insns): Ditto.
2542 * mach.scm (current-*-add!): Disallow redefinition. Make result
2545 * gen-all-doc: Split arm and frv docs up a bit.
2547 * cpu/arm.cpu: Add IDOC attribute.
2548 * cpu/frv.cpu: Ditto.
2549 * cpu/i960.cpu: Ditto.
2550 * cpu/openrisc.cpu: Ditto.
2551 * cpu/xstormy16.cpu: Ditto.
2552 * cpu/m32r.cpu: Ditto.
2553 (all insns): Explicitly specify IDOC attribute.
2555 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2556 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2557 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2558 * Makefile.in: Regenerate.
2559 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2560 (-attr-read): Defer computing default value until we know the type.
2561 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2562 (<attr-list>:attr-present?): New method.
2563 (atlist-attr-present?,obj-attr-present?): New fns.
2564 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2565 (attr-builtin!): New insn attr IDOC.
2566 * cgen-doc.scm (doc-arguments): New args -I,-N.
2567 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2568 Support comment as fourth element of enum value.
2569 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2570 * html.scm (gen-html-header): New arg kind, all callers updated.
2571 (gen-table-of-contents): New arg insn-file, all callers updated.
2572 (gen-list-entry,gen-doc-header): New fn.
2573 (get-operands): Delete.
2574 (gen-iformat-table): Rewrite.
2575 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2576 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2577 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2578 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2579 (get-insns-for-category,gen-categories-insn-lists): New fns.
2580 (gen-insn-docs): Simplify each insn's semantics first.
2581 Print insn tables sorted by IDOC categories.
2582 (*insn-html-file-name*): New global.
2583 (cgen-insn.html): New fn.
2585 * insn.scm (<insn>): Create a setter for the `tmp' member.
2586 * semantics.scm (insn-build-known-values): Renamed from
2587 -build-known-values. All callers updated.
2589 * rtl.scm: Move traveral/evaluation support to ...
2590 * rtl-traverse.scm: New file.
2591 * read.scm: Maybe-load rtl-traverse.scm.
2593 * rtl.scm (-rtx-valid-types): Add SETRTX.
2595 * rtx-funcs.scm (nop,parallel): Fix mode.
2597 * utils.scm (eqv-lookup-index): New fn.
2598 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2600 * dev.scm (load-doc): Set APPLICATION.
2602 2003-06-10 Dave Brolley <brolley@redhat.com>
2604 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2605 * sid-decode.scm: Generate #include of config.h into
2606 @prefix@-decode.cxx.
2607 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2609 2003-06-07 Doug Evans <dje@sebabeach.org>
2611 * gen-all-sid: New file.
2612 * gen-all-opcodes: New file.
2614 2003-06-05 Nick Clifton <nickc@redhat.com>
2616 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2617 version of the FRinti operand.
2618 (FRintjeven): Likewise for FRintj.
2619 (FRintkeven): Likewise for FRintk.
2620 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2621 media-quad-arith-sat-semantics, media-quad-arith-sat,
2622 conditional-media-quad-arith-sat, mdunpackh,
2623 media-quad-multiply-semantics, media-quad-multiply,
2624 conditional-media-quad-multiply, media-quad-complex-i,
2625 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2626 conditional-media-quad-multiply-acc, munpackh,
2627 media-quad-multiply-cross-acc-semantics, mdpackh,
2628 media-quad-multiply-cross-acc, mbtoh-semantics,
2629 media-quad-cross-multiply-cross-acc-semantics,
2630 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2631 media-quad-cross-multiply-acc-semantics, cmbtoh,
2632 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2633 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2634 cmhtob): Use new operands.
2635 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2636 (parse_even_register): New function.
2638 2003-06-04 Doug Evans <dje@sebabeach.org>
2640 Better handling of 64 bit and mixed 32/64 bit architectures.
2641 * hardware.scm (hw-update-word-modes!): New fn.
2642 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2643 hw-update-word-modes!.
2644 (state-word-bitsize): Replace FIXME with requested check.
2645 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2646 * mode.scm (mode-find): Ignore INT,UINT.
2647 (-mode-word-sizes-kind): New global.
2648 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2649 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2650 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2652 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2653 unusable, correct values set later.
2654 (mode-finish!): Remove cruft.
2655 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2656 * opcodes.scm (opcodes-init!): Ditto.
2657 * rtx-funcs.scm (annul): Fix mode of pc.
2658 * cpu/ia64.cpu: Remove cruft that sets word modes.
2659 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2661 2003-06-03 Nick Clifton <nickc@redhat.com>
2663 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2664 immediate value not unsigned.
2666 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2668 * cpu/sh.cpu: Amend comments to refer to SuperH.
2669 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2670 * cpu/sh64-media.cpu: Likewise.
2671 (Saturation): Update manual reference.
2673 2003-05-15 Doug Evans <dje@sebabeach.org>
2675 * Makefile.am (srcroot): New var.
2677 * Makefile.in: Regenerate.
2678 * cgen-doc.scm: New file.
2679 * html.scm: New file.
2680 * gen-all-doc: New file.
2681 * dev.scm (cload): Handle DOC application.
2683 * machs.scm (machs-for-cpu): New fn.
2684 * model.scm (models-for-cpu): New fn.
2685 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2687 (iota): Rewrite to be identical to pmacro version. All uses updated.
2688 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2690 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2691 (-gen-decode-bits): Instead put in better fix here.
2693 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2695 2003-05-01 DJ Delorie <dj@redhat.com>
2697 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2699 (set-alignfix-mem): Likewise.
2701 2003-04-16 Dave Brolley <brolley@redhat.com>
2703 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2704 * utils.scm (copyright-fsf): Update generate copyright years.
2705 (copyright-cygnus): Ditto.
2706 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2708 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2710 (<operand>'gen-profile-code): New parameter 'when'.
2711 (<iunit>'gen-profile-code): Ditto.
2712 (<insn>'gen-profile-code): Ditto.
2713 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2714 'insn_reference' for the 'after' function.
2715 * model.scm (unit:enum): Moved to sim-model.scm.
2716 * sim-model.scm (unit:enum): Moved from model.scm.
2717 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2718 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2719 * sid-model.scm (unit:enum): New version for sid.
2720 (gen-model-class-name): New function.
2721 (gen-model-unit-fn-decl): New function.
2722 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2723 (gen-model-unit-fn-name): New parameter 'when'.
2724 (-gen-model-insn-fn-name): Ditto.
2725 (-gen-model-insn-qualified-fn-name): New function.
2726 (-gen-model-insn-fn-decl): New function.
2727 (-gen-model-insn-fn-decls): New function.
2728 (-gen-model-insn-fn): New parameter 'when'. Call
2729 -gen-model-insn-qualified-fn-name.
2730 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2731 functions for modelling insn before and after execution.
2732 (-gen-model-class-decls): New function.
2733 (" (gen-model-class-name model) "): New function.
2734 (gen-model-classes): New function.
2735 (-gen-insn-timing): Generate functions for modelling insn before and after
2737 (-gen-insn-unit-timing): Generate class-qualified names.
2738 (-gen-model-timing-table): Ditto.
2739 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2740 not needed (yet) by sid.
2741 (cgen-model.h): New function.
2743 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2745 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2746 * cpu/sh64-compact.cpu: Likewise.
2747 * cpu/sh64-media.cpu: Likewise.
2749 2003-03-21 DJ Delorie <dj@redhat.com>
2751 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2752 which indicates if the sign flag is set from bit 15 or 7.
2754 (set-psw): New argument ws, propogate it.
2755 (set-psw-nowrite): Likewise.
2756 (set-mem-psw): Likewise.
2757 (set-psw-carry): Likewise. Use temporaries to prevent
2758 prematurely overwriting needed inputs.
2759 (set-psw-rrotate17): Fix logic.
2760 (shrgrgr): Preserve carry for zero-bit shifts.
2761 (shrgrimm): Likewise.
2762 (shlgrgr): Likewise.
2763 (shlgrimm): Likewise.
2764 (asrgrgr): Likewise.
2765 (asrgrimm): Likewise.
2768 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2770 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2772 2002-03-05 DJ Delorie <dj@redhat.com>
2774 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2775 prematurely overwriting needed inputs.
2776 (set-psw-sub): Likewise.
2778 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2780 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2782 2003-02-18 DJ Delorie <dj@redhat.com>
2784 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2785 (movlmemimm): Just mask the address.
2786 (movhmemimm): Likewise.
2787 (movlmemgr): Likewise.
2788 (movhmemgr): Likewise.
2789 (set-psw): Always set the psw last.
2790 (set-psw-carry): Likewise.
2791 (set-psw-add): Likewise.
2792 (set-psw-sub): Likewise.
2794 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2795 of 16 patterns from the set-psw-rotate17 function.
2796 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2797 movgriipostincgr, movgriipredecgr): Set psw correctly.
2798 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2799 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2800 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2802 2003-02-11 Dave Brolley <brolley@redhat.com>
2804 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2805 @arch@_cgen-ifld_table.
2806 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2807 @arch@_cgen-ifld_table.
2809 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2811 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2813 2003-01-09 Graydon Hoare <graydon@redhat.com>
2815 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2818 2003-01-07 Graydon Hoare <graydon@redhat.com>
2820 * utils-gen.scm (attr-int-gen-defn): Define.
2822 2002-12-21 Doug Evans <dje@sebabeach.org>
2824 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2825 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2827 * dev.scm (cload): Update location of .cpu files.
2829 2002-12-19 Doug Evans <dje@sebabeach.org>
2831 * utils-sim.scm (gen-profile-sym): New fn.
2832 (<operand>,sbuf-profile-sym): New method.
2833 (<operand>,sbuf-profile-elm): Use it.
2834 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2835 of hardcoding symbol name.
2836 (<operand>,gen-profile-code): Ditto.
2837 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2840 * mode.scm (mode-sem-mode): New fn.
2841 * operand.scm (op:new-mode): Update. mode-name.
2842 (op-natural-mode?) New fn.
2843 * rtl.scm (hw): Set hw-name,mode-name.
2845 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2847 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2848 as size of IDESC-TABLE-VAR.
2849 (@prefix@_init_idesc_table): Ditto.
2850 * sim-model.scm (-gen-mach-defns): Ditto.
2851 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2853 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2855 * insn.scm (-parse-insn-format-symbol): Improve error message.
2856 (-parse-insn-format): Ditto.
2858 * gen-all-sim: New script.
2860 2002-12-16 DJ Delorie <dj@delorie.com>
2862 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2864 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2866 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2867 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2868 (parse_immediate16): Handle immediate16 values, which now include
2869 @hi(label) and @lo(label)
2871 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2873 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2874 Add braces and cast for union field.
2875 (gen-multi-ifield-nodes): Add braces and cast for union field.
2876 (cgen_operand_table): Similarly fix sentinel.
2877 (cgen_cpu_close): Constify "insns". Formatting.
2878 (cgen-desc.c): Include xregex.h.
2879 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2881 <opc.c>: Include safe-ctype.h.
2882 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2883 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2884 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2885 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2886 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2887 (parse_addr16): Correct type of "value". Formatting.
2888 (parse_addr16_p): Likewise.
2889 (parse_addr16_cjp): Likewise.
2890 (parse_lit8): Likewise.
2891 (parse_bit3): Formatting.
2892 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2893 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2894 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2896 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2897 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2898 (print_dollarhex8): Likewise.
2899 (print_dollarhex16): Likewise.
2900 (print_dollarhex_addr16h): Likewise.
2901 (print_dollarhex_addr16l): Likewise.
2902 (print_dollarhex_p): Likewise.
2903 (print_dollarhex_cj): Likewise.
2904 (print_decimal): Likewise.
2905 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2907 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2909 * doc/rtl.texi (Model variants): Mention current limitations for
2910 unit inputs and outputs.
2911 (Hardware elements) <attribute PROFILE>: Be slightly more
2913 (Instructions) <timing>: input/output overrides have a direction
2916 2002-11-25 DJ Delorie <dj@redhat.com>
2918 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2920 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2922 * cpu/iq10.cpu: New file.
2923 * cpu/iq2000.cpu: Likewise.
2924 * cpu/iq2000.opc: Likewise.
2925 * cpu/iq2000m.cpu: Likewise.
2927 2002-11-19 DJ Delorie <dj@redhat.com>
2929 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2931 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2933 * dev.scm: Call getenv with a string, not a symbol.
2935 2002-10-08 Doug Evans <dje@transmeta.com>
2936 Hans-Peter Nilsson <hp@axis.com>
2938 * types.scm (bitrange-overlap?): Handle lsb0?.
2940 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2942 From Robert Cragie <rcc@jennic.com>:
2943 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2945 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2946 Ben Elliston <bje@redhat.com>
2947 John Healy <jhealy@redhat.com>
2948 Jeff Johnston <jjohnstn@redhat.com>
2949 Alan Lehotsky <alehotsky@redhat.com>
2950 Ubicom Inc. <SupportDesk@ubicom.com>
2952 * cpu/ip2k.cpu: New file.
2953 * cpu/ip2k.opc: Likewise.
2955 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2957 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2959 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2961 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2962 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2963 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2964 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2965 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2966 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2967 (-sthi-byte): If there is a single byte to store, store it at
2969 (sthil, sthiq): Fix big-endian behaviour.
2970 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2971 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2972 (saturate): Use Dimode to check if saturation operation is required.
2973 (usaturate): Likewise.
2975 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2976 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2977 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2978 (msadubq): Fix subword index in second operand of first subtraction.
2980 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2982 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2985 2002-06-18 Dave Brolley <brolley@redhat.com>
2987 * cpu/frv.cpu: New cpu description.
2988 * cpu/frv.opc: New cpu support code.
2990 2002-05-21 Dave Brolley <brolley@redhat.com>
2992 * decode.scm (-opcode-slots): Don't consider bits beyond the
2995 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2997 * cpu/powerpc.cpu: New file.
2999 2002-05-01 Graydon Hoare <graydon@redhat.com>
3001 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3003 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
3005 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3006 results are expanded recursively.
3008 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
3010 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3011 call scan-symbol on it, to enable recursive macro-expansion.
3013 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
3015 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3016 for multiple-isa configurations.
3017 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3019 2002-02-04 Ben Elliston <bje@redhat.com>
3021 * cpu/sh.cpu, cpu/sh.opc: New files.
3022 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3024 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
3026 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3027 (Enumerated constants): Mention that an ifield must not specify a
3029 (Instruction operands): Ditto for index.
3030 (Expressions) <parallel>: Remove misplaced mention of local
3032 <if>: Mention that mode must be specified and non-VOID when the
3035 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
3037 * doc/porting.texi: When referring to *.opc, mention they are in
3038 the cpu subdir. Call top-level directory toplevel, not devo.
3039 Close string in define-normal-insn example.
3041 * doc/pmacros.texi: Fix .substr typo to .substring.
3042 Mention that .sym expansions are not further expanded.
3044 2002-01-22 Graydon Hoare <graydon@redhat.com>
3046 * desc-cpu.scm (ifld-number-cache): Add.
3048 (gen-maybe-multi-ifld-of-op): Add.
3049 (gen-maybe-multi-ifld): Add.
3050 (gen-multi-ifield-nodes): Add.
3051 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3053 2002-01-10 matthew green <mrg@redhat.com>
3055 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3056 (gr-Rb-names): ... to this.
3057 (h-Rb): New hardware piece.
3058 (h-Rbj): Use gr-Rb-names.
3060 (holdx): New instruction.
3062 2002-01-07 Ben Elliston <bje@redhat.com>
3064 * utils.scm (package-cygnus-simulators): Rename from this ..
3065 (package-red-hat-simulators): .. to this.
3066 * opcodes.scm (option-set!): Use package-red-hat-simulators.
3067 * sid-cpu.scm (cgen-desc.h): Likewise.
3068 (cgen-cpu.h): Likewise.
3069 (cgen-defs.h): Likewise.
3070 (cgen-write.cxx): Likewise.
3071 (cgen-semantics.cxx): Likewise.
3072 (cgen-sem-switch.cxx): Likewise.
3073 * sid-decode.scm (cgen-decode.h): Likewise.
3074 (cgen-decode.cxx): Likewise.
3075 * sid-model.scm (cgen-model.cxx): Likewise.
3076 * sid.scm (option-set!): Likewise.
3077 * sim.scm (option-set!): Likewise.
3079 2002-01-07 Ben Elliston <bje@redhat.com>
3081 * utils.scm (copyright-fsf): Add 2002.
3082 (copyright-cygnus): Rename to copyright-red-hat.
3083 (copyright-red-hat): Add 2002.
3084 (CURRENT-COPYRIGHT): Update comment.
3085 * opcodes.scm (option-set!): Update callers.
3086 * sid-model.scm (cgen-model.cxx): Likewise.
3087 * sid-cpu.scm: Likewise.
3088 * sid-decode.scm: Likewise.
3089 * sid.scm (option-set!): Handle "redhat" as an option for
3090 "copyright"; use copyright-red-hat.
3091 * sim.scm (option-set!): Likewise.
3093 2002-01-03 Dave Brolley <brolley@redhat.com>
3095 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3096 number of insns in the list. Update the population count function to
3097 identify and prioritize 3 catgories of useful bits.
3098 (-population-top-few): Don't consider bits with a population count of
3100 (-build-decode-table-entry): Don't call
3101 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
3102 identical insns at the next tree level.
3103 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3104 this function is no longer used.
3105 (filter-non-specialized-ambiguous-insns): New function.
3106 (filter-identical-ambiguous-insns): New function.
3107 (find-identical-insn): New function.
3108 (filter-harmlessly-ambiguous-insns): Removed.
3110 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
3111 matthew green <mrg@redhat.com>
3112 Frank Ch. Eigler <fche@redhat.com>
3113 Nick Clifton <nickc@cambridge.redhat.com>
3115 * cpu/xstormy16.cpu: New file.
3116 * cpu/xstormy16.opc: New file.
3118 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
3120 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3122 2001-11-14 Dave Brolley <brolley@redhat.com>
3124 * utils-gen.scm (-gen-extract-word): Correct computation of the length
3125 of the field being extracted.
3127 2001-10-29 Johan Rydberg <johan@rydberg.com>
3129 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3130 (cos ...) and (sin ..) rtx.
3132 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
3134 * desc-cpu.scm: Do not include ctype.h in generated desc
3135 files. They will inherit safe-ctype.h instead.
3137 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
3139 * desc-cpu.scm: Add missing function prototypes (for generated
3140 C files). Fix compile time warning messages about unused
3141 parameters (for generated C files).
3142 * opc-asmdis.scm: The same.
3143 * opc-ibld.c: The same.
3144 * opc-itab.scm: The same.
3145 * cpu/fr30.opc: The same.
3146 * cpu/m32r.opc: The same.
3147 * cpu/openrisc.opc: The same.
3149 2001-09-17 graydon hoare <graydon@redhat.com>
3151 * insn.scm (syntax-break-out): Correct logic in handling escaped
3154 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
3156 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3157 call @arch@_cgen_build_insn_regex now that regex support is in
3160 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
3162 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3163 (mask-superset?): Look for strict supersets to allow rejection of
3166 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3168 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3169 (cgen-desc.h): Call it.
3170 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3172 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3173 entire_insn for extraction, if it's shorter than base-insn-bitsize.
3175 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3177 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3178 mach->cpu insn-chunk-bitsize.
3179 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3180 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3181 * mach.scm (<cpu>): New field insn-chunk-bitsize.
3182 (-cpu-parse, -cpu-read): Parse/initialize it.
3183 * doc/rtl.texi (define-cpu): Document it.
3185 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
3187 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3189 2001-07-06 Ben Elliston <bje@redhat.com>
3191 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3193 2001-07-05 Ben Elliston <bje@redhat.com>
3197 * read.scm (include): Include files from srcdir/cpu.
3198 (-cgen): Likewise for loading .cpu files.
3199 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3200 * *.cpu: Move all cpu descriptions into cpu subdirectory.
3202 * simplify.inc: Likewise.
3204 2001-07-04 Ben Elliston <bje@redhat.com>
3206 * read.scm (include): Log "Including file" message at level 1,
3207 rather than outputting it with (display).
3208 (cpu-load): Log "Loading cpu description" and "Processing cpu
3209 description" messages at levels 1 and 2, respectively, rather than
3212 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
3214 * desc.scm (<keyword> 'gen-defn): Add extra zero into
3215 CGEN_KEYWORD_ENTRY initializers.
3217 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3218 (<operand> 'test-data): Involve both the index and the hardware
3219 in testcase generation.
3220 (<hw-indx> 'test-data): Generate test data from the underlying
3222 (<ifield> 'test-data): Generate test data by computing bit
3223 patterns for the field, then decoding them.
3224 (<hw-address> 'test-data): Allow for new calling convention.
3225 (<hw-iaddress> 'test-data): Likewise.
3226 (<keyword> 'test-data): Convert index values into keywords.
3227 (<hw-asm> 'test-data): Convert index values into integer strings.
3229 * gas-test.scm (cgen-build.sh): Escape '.' as well.
3231 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
3233 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3234 is required for multi-mode hw types (memory).
3236 2001-05-11 Ben Elliston <bje@redhat.com>
3238 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3239 when generating allinsn.d from objdump output. Without it, the
3240 testsuite will treat $ as the regular expression for end of line.
3242 2001-05-09 Ben Elliston <bje@redhat.com>
3244 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3245 with `cgen_cpu_open'; documentation had become out of date.
3246 * doc/rtl.texi (Instruction operands): Likewise.
3248 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3250 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3251 various-base-length instruction sets.
3253 2001-04-02 Ben Elliston <bje@redhat.com>
3255 * sid-cpu.scm (-last-insn): New function.
3256 (-gen-sem-switch-engine): Loop through idesc while less than or
3257 equal to the last instruction enum, not less than the MAX enum.
3258 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3259 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3260 table's size to be the last instruction enum plus one, not
3262 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3263 instruction onto the instruction list.
3265 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3266 using the size of the table and its elements.
3267 (-gen-decode-insn-globals): Define the idesc table's size to be
3268 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3269 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3270 last instruction enum plus one, not @CPU@_INSN_MAX.
3272 2001-03-28 Ben Elliston <bje@redhat.com>
3274 * doc/version.texi (UPDATED, EDITION): Update.
3275 * doc/stamp-vti: Likewise.
3277 2001-03-26 Ben Elliston <bje@redhat.com>
3279 * doc/credits.texi (Credits): Update.
3281 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3282 specified prefix and, if necessary, escape `$' in gas-build.sh to
3283 prevent unwanted shell variable expansion.
3285 2001-03-24 Ben Elliston <bje@redhat.com>
3287 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3288 (<keyword>,test-data): Likewise.
3289 (<hw-address>,test-data): Likewise.
3290 (<hw-iaddress>,test-data): Likewise.
3291 (-collate-test-set): New function.
3292 (build-test-set): Use it.
3293 (gen-gas-test): Generate five test cases per instruction.
3294 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3296 * read.scm: Load "slib/random" if random is not defined.
3297 * slib/random.scm: New file.
3299 * utils.scm: Remove comments about the Hobbit compiler.
3300 (copyright-cygnus): Add 2001.
3301 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3302 (package-gnu-simulators): Tidy.
3304 2001-03-23 Ben Elliston <bje@redhat.com>
3306 * cgen-gas.scm: Inline documentation improvements.
3308 2001-03-21 Ben Elliston <bje@redhat.com>
3310 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3311 given in a syntax string is undefined.
3313 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3314 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3316 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3318 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3319 for arg_type CGEN_CPU_OPEN_BFDMACH.
3321 2001-03-20 Ben Elliston <bje@redhat.com>
3323 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3324 instruction onto the instruction list. Define MAX_INSNS to be the
3325 value of the last instruction enum plus one.
3327 2001-03-14 Nick Clifton <nickc@redhat.com>
3329 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3331 2001-03-05 Dave Brolley <brolley@redhat.com>
3333 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3334 if the number of ifields is greater than zero.
3336 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3338 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3339 Emit LIKELY/UNLIKELY branch probability hints.
3340 * sid-decode.cpu (-gen-record-args): Ditto.
3342 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3344 * desc-cpu.scm (-gen-hash-defines): Rename
3345 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3347 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3349 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3351 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3352 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3354 * sid.scm (<operand> gen-write): Use unsigned long long expression
3356 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3357 (<unit> gen-profile-code): Ditto.
3359 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3361 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3364 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3366 * operand.scm (<operand> pretty-sem-name): New field.
3367 (<operand> make): Initialize it from hw-name.
3368 (op:set-pretty-sem-name!): New function.
3369 (<operand> gen-pretty-name): Default to fetching new field.
3370 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3371 sem-name setting from -rtx-hw-name.
3373 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3375 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3376 its subsequent gen-pretty-name.
3378 * read.scm: Increase thread working stack limit and backtrace
3381 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3383 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3385 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3387 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3388 current insn plus 4.
3389 (h-delay-insn): New hardware register.
3390 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3394 * openrisc.opc (parse_hi16): Sign extend value.
3395 (parse_lo16): Likewise.
3397 2001-01-06 Ben Elliston <bje@redhat.com>
3399 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3400 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3401 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3402 (-gen-semantic-fn-table): Likewise.
3403 (-gen-scache-semantic-fn): Likewise.
3404 (-gen-no-scache-semantic-fn): Likewise.
3405 (cgen-read.c): Likewise.
3406 (cgen-sem-switch.c): Likewise.
3407 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3408 is a filename prefix.
3409 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3410 (-gen-decode-insn-globals): Likewise.
3411 (-gen-idesc-decls): Likewise.
3412 (cgen-decode.h): Likewise.
3413 (cgen-decode.c): Likewise.
3414 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3415 (gen-cpu-insn-enum): Likewise.
3416 (sim-finish!): Likewise.
3418 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3420 * openrisc.cpu: New file.
3421 * openrisc.opc: Likewise.
3423 2000-12-12 Ben Elliston <bje@redhat.com>
3425 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3427 2000-12-07 Ben Elliston <bje@redhat.com>
3429 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3430 "insn" when there are zero ifields to extract.
3432 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3434 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3435 used by simple/non-scache simulators.
3436 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3437 regardless of with-scache?.
3438 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3440 2000-12-03 Ben Elliston <bje@redhat.com>
3442 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3443 (cgen-desc.c): Likewise.
3445 2000-12-01 Greg McGary <greg@mcgary.org>
3447 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3449 2000-12-01 Ben Elliston <bje@redhat.com>
3451 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3452 definitions if run without with-multipla-isa?.
3453 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3454 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3456 2000-11-24 Ben Elliston <bje@redhat.com>
3458 * sim-cpu.scm (-gen-hardware-struct): New function.
3459 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3460 hardware elements wich have share one or more ISAs with the ISAs
3463 * sim.scm (-with-multiple-isa?): New symbol.
3464 (with-multiple-isa?): New function.
3465 (option-init!): Initialise -with-multiple-isa?.
3466 (option-set!): Handle with-multiple-isa option.
3468 2000-11-21 Ben Elliston <bje@redhat.com>
3470 * utils.scm (copyright-fsf): Add the year 2000.
3472 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3474 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3475 unneeded "\n\n" from F() macro definition.
3477 2000-11-15 Greg McGary <greg@mcgary.org>
3479 * utils-cgen.scm (gen-define-with-symcat): New function.
3480 * desc-cpu.scm (gen-ifld-defns): Use it.
3481 (gen-hw-table-defns): Use it.
3482 (-gen-hash-defines): Use it.
3483 (gen-operand-table): Use it.
3484 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3485 * opc-itab.scm (-gen-ifmt-table): Use it.
3486 (-gen-insn-opcode-table): Use it.
3487 (-gen-macro-insn-table): Use it.
3488 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3489 * sim-cpu.scm (cgen-semantics.c): Use it.
3490 (cgen-sem-switch.c): Use it.
3492 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3494 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3495 request to emit calls to insn extractors as functions rather than
3496 branches to inline blocks.
3497 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3498 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3500 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3501 to extractor clauses.
3503 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3505 * decode.scm (-distinguishing-bit-population): Significantly
3506 improve popularity heuristic. Renamed from
3507 (-mask-bit-population): Gone.
3508 (-population-above-threshold): Sort new bit numbers in order of
3510 (-population-top-few): Allow up to three more bits to be selected
3511 than requested. Correct selection order to prefer better bits.
3512 Correct bug in fewer-than-requested case. Keep threshold as
3514 (decode-best-get-bits): Pass also the insn-values.
3516 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3517 future optimization.
3519 * utils.scm (message): Format nested lists better.
3521 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3523 * dev.scm: Add srcdir to %load-path.
3525 * rtx-funcs.scm (subword): Mode of argument can be different
3526 than mode of result, so don't use OP0 to specify argument's mode.
3528 2000-11-02 Ben Elliston <bje@redhat.com>
3530 * doc/porting.texi (Building a GAS test suite): Document my change
3533 2000-11-01 Ben Elliston <bje@redhat.com>
3535 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3537 2000-10-31 Ben Elliston <bje@redhat.com>
3539 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3540 with no command line arguments if the gas build directory can be
3543 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3545 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3546 op-ifld -> op-ifield.
3548 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3550 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3552 2000-10-13 matthew green <mrg@cygnus.com>
3554 * utils-cgen.scm (get-ifetch): Move from here ...
3555 * sim.scm (get-ifetch): ... to here.
3556 * sid.scm (get-ifetch): Copy and port to c++.
3558 2000-10-06 Dave Brolley <brolley@redhat.com>
3560 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3561 ifld-start + ifld-word-offset.
3562 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3563 the field is beyond the base number of bits.
3564 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3565 (gen-extract-ifields): Ditto.
3566 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3567 characters in the regular expression.
3569 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3571 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3572 preprocessor constant.
3574 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3576 * slib/logical.scm: New file from slib. Provides robust bitwise
3577 logical operations for large integers.
3578 * read.scm: maybe-load it.
3580 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3582 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3583 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3584 single-isa predicate, but support keep-isa filtering.
3586 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3588 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3589 statement-expression and comma-expression contexts.
3590 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3592 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3594 * decode.scm (-population-top-few): Signal error gracefully if
3595 decoding is about to become ambiguous.
3597 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3599 * doc/rtl.texi (decode-assist): Describe this field as optional.
3601 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3603 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3606 2000-09-05 Dave Brolley <brolley@redhat.com>
3608 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3609 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3611 2000-08-29 Dave Brolley <brolley@redhat.com>
3613 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3614 adata-integral-insn is true for this architecture.
3616 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3618 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3619 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3620 * rtl-c.scm (-c-rtl-get): Improve an error message.
3621 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3623 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3625 * Makefile.in (DIST_COMMON): Regenerated.
3626 * ifield.scm (<derived-ifield> needed-iflds): New method.
3627 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3628 sfmts built from <derived-ifield>s.
3629 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3630 type symbol 'derived-ifield, not an unparseable string.
3631 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3632 (-sfmt-contents): Add tracing.
3634 From Doug Evans <dje@transmeta.com>:
3635 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3638 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3640 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3641 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3642 (-rtl-c-get): Rename from rtl-c-get.
3643 (rtl-c-get): New fn for getter logging.
3645 2000-07-28 Ben Elliston <bje@redhat.com>
3649 2000-07-25 Ben Elliston <bje@redhat.com>
3651 * doc/credits.texi (Credits): Add Frank Eigler.
3653 2000-07-24 Dave Brolley <brolley@redhat.com>
3655 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3657 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3658 (<keyword>): Initialize all elements fully.
3659 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3661 (-gen-mach-table-defns): Ditto.
3662 (-gen-ifld-defns): Ditto.
3663 (-gen-operand-table): Ditto.
3664 (-gen-insn-table): Ditto.
3665 (-gen-cpu-open): Nothing to do for the mach table.
3667 2000-07-13 Ben Elliston <bje@redhat.com>
3669 * doc/version.texi (UPDATED): Update.
3671 2000-07-05 Ben Elliston <bje@redhat.com>
3673 * configure.in (AC_PATH_PROG): Remove.
3674 * configure: Regenerate.
3675 * Makefile.am (GUILE): Locate guile dynamically.
3676 * Makefile.in: Regenerate.
3677 * doc/Makefile.in: Likewise.
3679 2000-07-03 Ben Elliston <bje@redhat.com>
3681 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3682 * opc-itab.scm (cgen-opc.c): Likewise.
3684 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3686 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3687 guile 1.4 compatibility.
3688 (rtx-env-dump): Comment out buggy display calls.
3690 2000-06-15 matthew green <mrg@redhat.com>
3692 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3694 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3696 * Makefile.in: Regenerated.
3698 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3699 (gen-ifld-defns): Ditto.
3700 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3701 * rtl.c (rtl-finish!): Ditto.
3702 * opc-itab.scm (-gen-ifield-decls): Ditto.
3703 * opcodes.scm (gen-switch): Exclude derived operands.
3704 * operand.scm (op-iflds-used): Expand derived operands.
3705 (hw-index-derived): New dummy function to create dummy object.
3706 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3707 constructor. Set object's hw-name and index fields.
3708 (-anyof-merge-subchoices): Set instance object's index also.
3709 (-anyof-name): New helper function.
3710 (anyof-merge-semantics): Correct replacement of operand names in
3712 (op-ifield): Tolerate derived-operands and their funny indices better.
3713 * ifield.scm (ifld-known-values): Expand derived ifields.
3714 (non-multi-ifields, non-derived-ifields): New utility functions.
3715 (ifld-decode-mode): Tolerate objects with unbound decode field.
3716 * iformat.scm (compute-insn-length): Expand derived ifields.
3717 (compute-insn-base-mask): Ditto.
3718 * insn.scm (insn-base-ifields): Remove.
3719 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3720 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3721 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3722 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3723 (-frag-test-data): Ditto.
3724 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3725 (-gen-sem-switch-engine); Ditto.
3726 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3727 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3728 (-gen-record-args): Tolerate unbound op-ifield.
3729 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3730 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3731 Exclude multi-insns.
3732 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3733 * utils-sim.scm (op-extract?): Handle derived operands.
3735 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3736 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3737 * hardware.scm (hardware-for-mode): New function.
3739 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3740 cleaning up decode tables.
3741 (mask-superset?): Little helper function for above.
3742 * decode.scm (-build-decode-table-entry): Call it.
3743 (-opcode-slots): Add some more tracing.
3744 * arm.cpu: Disable decode-splits construct due to implementation
3745 conflict with `filter-harmlessly-ambiguous-insns'
3747 * decode.scm (-population-top-few): New function for better decode
3748 bit generation. Includes minor helper functions.
3749 (decode-get-best-bits): Call it instead.
3750 (OLDdecode-get-best-bits): Renamed previous version of above.
3753 2000-06-13 Ben Elliston <bje@redhat.com>
3755 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3756 for the Guile library directory.
3757 * configure: Regenerate.
3758 * Makefile.in, doc/Makefile.in: Regenerate.
3760 * Makefile.in, doc/Makefile.in: Regenerate.
3761 * configure.in: Remove unnecessary tests. Move to version 1.0.
3762 * acconfig.h, config.in: Remove.
3763 * configure, aclocal.m4: Regenerate.
3764 * doc/stamp-vti, doc/version.texi: Likewise.
3765 * AUTHORS: New file.
3767 2000-06-07 Ben Elliston <bje@redhat.com>
3769 * fixup.scm (symbol-bound?): Reduce debugging output.
3771 2000-06-02 matthew green <mrg@redhat.com>
3773 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3774 a given instruction, replacing derived fields with their subfields.
3775 (insn-value): Use `insn-base-ifields' to find all constant values.
3776 (multi-insn-instantiate!): Comment some debug messages.
3778 2000-06-01 Ben Elliston <bje@redhat.com>
3780 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3781 symbol names used in a (c-call ..) rtx.
3783 * sim-test.scm (build-test-set): Return (()) for an instruction
3784 with no operands, so it too is included in the generated test set.
3786 2000-05-31 Ben Elliston <bje@redhat.com>
3788 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3789 (sim-test): Likewise.
3790 * Makefile.in: Regenerate.
3792 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3794 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3795 stack traceback, in an order that resembles gdb's `bt'.
3797 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3799 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3800 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3801 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3803 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3805 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3806 * iformat.scm (ifmt-expanded-ifields): Gone.
3807 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3809 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3812 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3815 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3817 * sid.scm (with-any-profile?): New function clone.
3819 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3821 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3823 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3825 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3826 (-multi-ifield-read): Parse them.
3827 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3828 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3829 (multi-ifield gen-extract): Add decode hook.
3830 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3832 * insn.scm (syntax-break-out): More correctly handle \-escaped
3834 (syntax-make-elements): Ditto.
3835 * opc-itab.scm (compute-syntax): Ditto.
3837 2000-05-17 Ben Elliston <bje@redhat.com>
3839 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3841 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3843 * gas-test.scm (build-test-set): Return (()) for an instruction
3844 with no operands, so it too is included in the generated test set.
3846 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3848 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3849 IFMT_OPERANDS and SYNTAX_BYTES.
3851 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3853 * sim.scm (with-any-profile?): New function.
3854 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3855 to decide whether or not to include profiling counters.
3857 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3859 Fuller derived-operand support for opcodes.
3860 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3861 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3862 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3863 (gen-operand-table): Omit derived- and anyof- operands from table.
3864 (gen-insn-table): Omit multi-insns from table.
3865 * iformat.scm (ifmt-expanded-fields): New function to expand
3866 subfields of derived-ifields.
3867 (ifmt-compute!): Ignore remaining multi-insns.
3868 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3870 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3871 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3872 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3873 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3874 (gen-switch): Omit anyof-operands.
3875 * operand.scm (-anyof-syntax): New function.
3876 (-anyof-merge-syntax): Call it.
3877 * utils.scm (collect): New idiomatic function.
3879 2000-05-10 Ben Elliston <bje@redhat.com>
3881 * m68k.cpu: New file (work in progress).
3883 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3885 * Makefile.am (all-local): New target. Create stamp-cgen.
3886 * Makefile.in: Regenerated.
3887 * doc/Makefile.in: Regenerated.
3889 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3891 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3892 (-operand-parse-setter): Ditto.
3893 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3894 for CACHE-ADDR operands.
3895 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3896 trace entries. Widen byte-wide values for printing.
3897 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3898 Widen byte-wide values for printing. Hexify memory addresses.
3900 2000-04-23 matthew green <mrg@redhat.com>
3902 * m32r.cpu: Fix a typo.
3904 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3906 * ia64.cpu (define-model): Change merced to Itanium.
3907 (f-qp): Change quilifying to qualifying.
3908 (movbr_ph, movbr_pvec): Delete.
3909 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3911 2000-04-07 Ben Elliston <bje@redhat.com>
3913 * doc/porting.texi (Building a simulator test suite): Clarify
3914 where generated test cases are placed.
3916 2000-04-07 Ben Elliston <bje@redhat.com>
3918 * Makefile.am (gas-test): Remove dependency on `cgen'.
3920 * Makefile.in: Regenerate.
3922 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3924 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3925 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3926 type reconfiguration.
3927 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3930 2000-03-30 Ben Elliston <bje@redhat.com>
3932 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3934 2000-03-24 Ben Elliston <bje@redhat.com>
3936 * Makefile.am (stamp-cgen): Reinstate target.
3937 * Makefile.in: Regenerate.
3939 2000-03-22 Ben Elliston <bje@redhat.com>
3941 * slib/ppfile.scm: Remove; unused.
3942 * slib/defmacex.scm: Likewise.
3944 2000-03-21 Ben Elliston <bje@redhat.com>
3946 * doc/internals.texi (Source file overview): Document.
3948 * Makefile.am (GUILEDIR): Remove.
3949 (CGEN): Ditto. Callers use $(GUILE) instead.
3950 (GUILEFLAGS): Ditto.
3952 (APPDESCFILES): Ditto.
3953 (OPCODESFILES): Ditto.
3955 (pkgdata_SCRIPTS): Ditto.
3956 (stamp-cgen): Remove target.
3957 * Makefile.in: Regenerate.
3959 * configure.in: Remove header and library tests.
3960 * configure: Regenerate.
3961 * config.in: Likewise.
3963 2000-03-20 Ben Elliston <bje@redhat.com>
3965 * read.scm: Cease loading "hob-sup.scm".
3966 * utils.scm: Inherit the fastcall family of procedures (for now).
3967 * hob-sup.scm: Remove.
3969 2000-03-20 Ben Elliston <bje@redhat.com>
3971 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3972 * configure: Regenerate.
3973 * gdbinit.in: Remove.
3975 2000-03-17 Ben Elliston <bje@redhat.com>
3977 * Makefile.am (CGEN): Use guile, not cgen.
3978 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3979 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3980 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3981 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3982 (HOB_OBJS): Likewise.
3983 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3984 (CGENOBJS): Likewise.
3985 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3986 (hobbit, hobbit.o, hobbit.c): Remove targets.
3987 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3988 (CLEANFILES): Update.
3989 * acconfig.h (WITH_HOBBIT): Remove.
3990 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3991 option --with-cgen-hobbit.
3992 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3993 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3994 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3995 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3996 * Makefile.in: Regenerate.
3997 * config.in: Likewise.
3998 * aclocal.m4: Likewise.
3999 * configure: Likewise.
4000 * README (Hobbit support): Remove.
4001 * doc/internals.texi (Conventions): Do not mention Hobbit.
4002 * doc/porting.texi (Supported Guile versions): Likewise.
4004 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
4006 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4007 callback convention to new sid sidutil::basic_cpu code.
4008 (-gen-sfrag-engine-fn): Ditto.
4009 * sid.scm (-create-virtual-insns!): Ditto.
4010 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4012 (cxmake-skip): Implement properly for pbb mode.
4014 2000-03-03 Ben Elliston <bje@redhat.com>
4016 * doc/internals.texi: New file.
4018 2000-02-29 Ben Elliston <bje@redhat.com>
4020 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4021 * doc/porting.texi: Formatting tweaks.
4023 2000-02-25 Nick Clifton <nickc@cygnus.com>
4025 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4028 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
4030 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4033 2000-02-23 Andrew Haley <aph@cygnus.com>
4035 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4038 2000-02-24 Ben Elliston <bje@redhat.com>
4040 * doc/rtl.texi (Derived operands): Add some cindex entries.
4042 2000-02-23 Ben Elliston <bje@redhat.com>
4044 * ia32.cpu (dndo): Move general purpose macro from here ..
4045 * simplify.inc (dndo): .. to here.
4047 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
4049 * arm.cpu (h-tbit): Add c-call setter function.
4052 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
4054 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4055 (-frag-cost-compute!): Ditto.
4056 * utils.scm (copyright-cygnus): Add Y2K.
4057 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4059 2000-01-25 Nick Clifton <nickc@cygnus.com>
4061 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4062 flags field of the CGEN_CPU_TABLE structure.
4064 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
4066 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4067 All references updated.
4069 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
4071 * ia32.cpu: Rewrite addressing mode support.
4073 * ifield.scm (<ifield>): New member `follows'.
4074 (ifld-known-values): New proc.
4075 (<ifield>): New method set-word-offset!.
4076 (ifld-set-word-offset!): New proc.
4077 (ifld-new-word-offset): New proc.
4078 (<ifield>): New method next-word.
4079 (<multi-ifield>): New method next-word.
4080 (ifld-next-word): New proc.
4081 (ifld-precedes?): New proc.
4082 (-ifield-parse): New args word-offset,word-length,follows.
4083 All callers updated. Handle CISC-style vs RISC-style ifields.
4084 (-ifield-read): Recognize word-offset,word-length,follows specs.
4085 (-ifld-parse-follows): New proc.
4086 (-multi-ifield-make-default-insert): New proc.
4087 (-multi-ifield-make-default-extract): New proc.
4088 (-multi-ifield-parse): Provide default values for insert,extract
4089 handlers if not specified.
4090 (<derived-ifield>): New class.
4091 (derived-ifield?): New predicate.
4092 (ifld-derived-operand?): New predicate.
4093 (f-anyof): New global.
4094 (ifld-anyof?,ifld-anyof-operand?): New predicates.
4095 (f-derived,ifld-derived?): Delete.
4096 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
4097 * insn.scm (-sub-insn-ifields): New proc.
4098 (-sub-insn-make!): New proc.
4099 (multi-insn-instantiate!): Provide initial implementation.
4100 (-insn-parse): If insn contains "anyof" operands, create a
4101 <multi-insn> object instead of a plain <insn>.
4102 (-parse-insn-format-symbol): Rewrite derived operand handling.
4103 Add anyof operand handling.
4104 (-parse-insn-format-ifield-spec): Rewrite.
4105 (-parse-insn-format-operand-spec): Delete.
4106 (-parse-insn-format-list): Delete support for `(operand value)'.
4107 (anyof-operand-format?): Replaces derived-operand-format?.
4108 * operand.scm (-operand-parse-getter): Improve error messages.
4109 (-operand-parse-setter): Ditto.
4110 (<derived-operand>): New members args,syntax,base-ifield,encoding,
4112 (<anyof-operand>): Change baseclass from <derived-operand> to
4113 <operand>. Delete member values. New members base-ifield,choices.
4114 (anyof-operand?): New predicate.
4115 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4116 (-derived-operand-parse): Rewrite.
4117 (-derived-operand-read): Rewrite.
4118 (-anyof-parse-choice): New proc.
4119 (-anyof-operand-parse): Rewrite.
4120 (-anyof-operand-read,define-anyof-operand): New procs.
4121 (<anyof-value>): Rewrite.
4122 (-anyof-initial-known): New proc.
4123 (anyof-satisfies-assertions?): New proc.
4124 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4125 (-anyof-merge-getter,-anyof-merge-setter): New procs.
4126 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4127 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4128 (-anyof-value-from-derived): New proc.
4129 (-anyof-all-choices-1,anyof-all-choices): New procs.
4130 (operand-init!): Create define-anyof-operand reader command.
4132 * insn (syntax-break-out): Take syntax as argument instead of insn.
4133 All callers updated.
4134 (syntax-make): Move here, from ???.
4136 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4137 bitrange-foo. All uses updated.
4138 (bitrange-next-word): New proc.
4140 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4142 * rtl.scm (rtx-canonicalize): Provide initial implementation.
4143 (rtx-make-const,rtx-make-enum): New procs.
4144 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
4145 (rtx-mem-addr,rtx-mem-sel): New procs.
4146 (rtx-change-address): New proc.
4147 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4148 (rtx-make-set,rtx-single-set?): New procs.
4149 (rtx-combine): New proc.
4151 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
4152 (rtx-traverse-with-locals): Ditto.
4153 (-rtx-traverse,-rtx-traverse-*): Ditto.
4155 * rtl.scm (define-subr): New proc.
4156 (rtl-init!): Create reader command `define-subr'.
4158 * cos.c (_object_mi_p): Ensure argument is an object.
4159 (indent): New function.
4160 (_object_print_elms): Add pretty-printing support.
4161 (_object_print): Ditto.
4163 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4164 (*floats-s->c-fun-table*): Ditto.
4165 * hobbit.c,hobbit.h: Rebuild.
4166 * hob-sup.c (fastcall7): New proc.
4167 * hob-sup.h (fastcall7): Declare.
4168 * hob-sup.scm (fastcall7): New macro.
4170 * mach.scm (<arch>): New member subr-list.
4171 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4172 (arch-finish!): Reverse recorded subr list.
4174 * read.scm (debug-env): New global.
4175 (debug-var-names,debug-var,debug-repl-env): New procs.
4176 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
4177 (debug-quit): Renamed from `continue'.
4179 * simplify.inc (dsmf): New pmacro.
4181 * utils.scm (plus-scan): New proc.
4182 (split-bits): Rewrite.
4183 (split-value): New proc.
4185 1999-10-13 Doug Evans <devans@casey.cygnus.com>
4187 * doc/Makefile.am (DOCFILES): Add notes.texi.
4188 * doc/Makefile.in: Rebuild.
4190 1999-10-11 Doug Evans <devans@casey.cygnus.com>
4192 * ifield.scm (ifld-derived?): New proc.
4193 (f-derived): New global.
4194 (ifield-builtin!): Create ifield f-derived.
4195 (<multi-insn>): New class.
4196 (multi-insn?): New predicate.
4197 (multi-insn-instantiate!): New proc.
4198 (-insn-parse): Create <multi-insn> objects for insns with derived
4200 (-parse-insn-format-symbol): Handle derived ifields.
4201 (-parse-insn-format-ifield-spec): New proc.
4202 (-parse-insn-format-operand-spec): New proc.
4203 (-parse-insn-format-list): Simplify.
4204 (-parse-insn-format): No longer allow (ifield-object value) spec.
4205 (derived-operand-format?): New proc.
4206 (insn-alias?): New proc.
4207 (non-alias-insns): Rewrite.
4208 (insn-real?): Renamed from real-insn?, all callers updated.
4209 (virutal-insns): Rewrite.
4210 (multi-insns): New proc.
4211 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4212 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4213 Return #f if operand doesn't have an index or if index is not an
4215 (hw-index-anyof): New proc.
4216 (-operand-parse): Allow integer indices.
4217 (<derived-operand>): New class.
4218 (derived-operand?): New predicate.
4219 (<anyof-operand>): New class.
4220 (<anyof-value>): New class.
4221 (-anyof-parse-value,-anyof-operand-parse): New procs.
4222 (-derived-operand-parse,-derived-operand-read): New procs.
4223 (define-derived-operand,define-full-derived-operand): New procs.
4224 (operand-init!): New reader command define-derived-operand.
4226 * utils.scm (list-take): Handle negative amount.
4227 (element?): Rewrite.
4229 1999-10-10 Doug Evans <devans@casey.cygnus.com>
4231 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4233 1999-10-04 Richard Henderson <rth@cygnus.com>
4235 * ia64.cpu: Checkpoint.
4237 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4239 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4241 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4242 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4244 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4246 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4247 PC returned by sim_engine_invalid_insn.
4249 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4251 * ia32.cpu: New file.
4253 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4255 * utils.scm (bit-set?): Fix off by one error.
4257 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4259 * rtl.scm (hw): Check for valid hardware element before trying to
4262 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4263 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4264 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4265 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4266 compute_operand2_foo.
4268 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4269 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4270 Call delayed_branch/branch methods instead of assigning to `vpc'.
4271 (<hw-pc>,cxmake-skip): Call skip method.
4272 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4273 (<pc>,cxmake-skip): Ditto.
4274 (-create-virtual-insns!): Ditto.
4275 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4277 (op:record-profile): Specify #:output-language "c++".
4278 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4280 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4282 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4283 (gen-semantic-code): Ditto.
4284 (-gen-sem-case,-gen-sfrag-code): Ditto.
4285 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4286 (cgen-cpu.h): File is now #included by main cpu class, rather than
4288 (cgen-defs.h): New proc.
4289 (-gen-scache-semantic-fn): Change result type to sem_status.
4290 New local `status'. Call done_cti_insn/done_insn method at end.
4291 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4293 (cgen-sem-switch.cxx): Ditto.
4294 * sid-decode.scm (-gen-idesc-decls): Update return type of
4296 (cgen-decode.h): Add using namespace @arch@.
4297 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4299 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4300 (estate-output-language-c?,estate-output-language-c++?): New procs.
4301 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4302 (estate-make-for-normal-rtl-c++): New proc.
4303 (rtl-c++-parsed,rtl-c++): New proc.
4304 (s-c-call): Invoke cpu class method if c++.
4305 (join): Use s-c-raw-call.
4307 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4310 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4311 * rtl.scm (<eval-state>): New member `modifiers'.
4312 (<eval-state>,vmake!): Handle #:modifiers.
4313 (estate-with-modifiers): New proc.
4315 * rtl.scm (rtx-side-effects?): New proc.
4316 (rtx-canonical-bool): Don't change expr if it has side effects.
4317 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4320 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4322 * sim.scm (gen-scache-type): Fix typo in last patch.
4324 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4326 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4328 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4330 * sid.scm (<hw-pc>,cxmake-skip): New method.
4331 (<pc>,cxmake-skip): New method.
4333 * decode.scm (decode-build-table): Delete args startbit,index-list.
4334 All callers updated.
4335 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4336 All callers updated.
4337 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4338 to decode-get-best-bits.
4339 * sid-decode.scm (-gen-decode-fn): Ditto.
4341 * hardware.scm (hw-bits): New proc.
4342 (-hw-parse): New arg layout. All callers updated.
4343 (define-full-hardware): New arg layout. All callers updated.
4344 (-hw-validate-layout): New proc.
4345 (-hw-create-[gs]etter-from-layout): New procs.
4346 (<hw-register>,parse!): Handle layout spec.
4347 * types.scm (type-bits): New proc.
4349 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4350 UNARY, BINARY, TRINARY rtxs.
4352 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4353 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4354 Support '- as "unused spot" indicator.
4356 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4358 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4360 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4362 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4364 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4366 (tstate-make): New arg `depth'. All callers updated.
4367 (tstate-depth,tstate-set-depth!): New procs.
4368 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4369 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4370 (-rtx-traverse): Ditto. Keep track of traversal depth.
4372 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4374 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4375 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4376 * utils-sim.scm: Decoder generator support moved here.
4377 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4378 (-gen-decoder-switch): Sort entries for more fall-throughs.
4380 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4381 * Makefile.in: Rebuild.
4382 * sim-test.scm (build-sim-testcase): Add logging message.
4383 * dev.scm (cload): Recognize SIM-TEST application.
4384 (load-stest): Set APPLICATION to SIM-TEST.
4386 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4388 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4389 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4390 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4392 * insn.scm (syntax-break-out): Handle ${foo}.
4394 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4396 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4397 (bin_PROGRAMS): Define.
4398 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4399 (cgen-hob.c): Prepend $(srcdir)/ here.
4400 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4401 (libcpu_a_SOURCES): Delete.
4402 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4403 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4404 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4405 Add AC_CHECK_LIB(guile,main).
4406 * Makefile.in: Rebuild.
4407 * doc/Makefile.in: Rebuild.
4408 * aclocal.m4: Rebuild.
4409 * config.in: Rebuild.
4410 * configure: Rebuild.
4412 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4414 Rename rtx functions from name: to name, accept optional leading
4416 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4417 * attr.scm (-attr-eval): Update.
4418 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4419 (<hw-register>,mode-ok?): Disallow VOID.
4420 (<hw-immediate>,mode-ok?): Disallow VOID.
4421 (<hw-address>,mode-ok?): Disallow VOID.
4422 * mode.scm (mode-name?): New proc.
4423 (VOID): Renamed from VM.
4424 (DFLT): Renamed from DM.
4425 (mode-builtin!): Update.
4426 * opcodes.scm (<ifield>,gen-insert): Update.
4427 (<ifield>,gen-extract): Update.
4428 (<multi-ifield>,gen-insert,gen-extract): Update.
4429 * operand.scm (op:mode): Update.
4430 (<pc>,make!): Update.
4431 (op:new-mode): Update.
4432 (-operand-read): Update.
4433 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4434 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4435 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4436 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4437 (rtx-make): Call -rtx-munge-mode&options.
4438 (rtx accessors): Rewrite.
4439 (rtx-pretty-name): Update.
4440 (-rtx-traverse-*): Update.
4441 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4442 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4443 (-rtx-make-traverse-table): Update.
4444 (-rtx-traverse-operands): Update.
4445 (-rtx-option?,-rtx-option-list?): New procs.
4446 (-rtx-munge-mode&options): New proc.
4447 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4448 (-rtx-traverse): Update.
4449 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4450 (rtx-compile-time-constant?): Update.
4451 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4452 (rtx-value): Update.
4453 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4454 * rtx-funcs.scm (*): Update.
4455 * rtl-c.scm (rtl-c-get): Update.
4456 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4457 (s-c-call,s-c-raw-call): Update.
4458 (s-boolifop,s-convop,s-if,s-cond): Update.
4459 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4460 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4461 (s-parallel,s-sequence): Update.
4462 (rtl-c-build-table): Update.
4463 * sem-frags.scm (-frag-hash-compute!): Update.
4464 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4465 for temporary bug compatibility with previous version.
4466 (-frag-expr-locals,-frag-expr-stmts): Update.
4467 (-frag-compute-desired-frags,-frag-pick-best): Update.
4468 * semantics.scm (-simplify-expr-fn): Update.
4469 (rtx-simplify): Update.
4470 (-rtx-ref-type): Update. Account for modifiers.
4471 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4472 (-build-ifield-operand!): Update.
4473 (-build-known-values): Update.
4474 (semantic-compile): Update.
4475 (-gen-reg-access-defns): Update.
4476 (gen-semantic-code,-gen-sem-case): Update.
4477 (-gen-sfrag-code,-gen-sfrag-case): Update.
4478 * sim-cpu (gen-semantic-code): Update.
4479 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4480 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4481 (-hw-cxmake-get): Update.
4482 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4483 (<hw-index>,cxmake-get): Update.
4484 (<operand>,gen-type,gen-read,cxmake-get): Update.
4485 (<operand>,gen-set-quiet,gen-set-trace): Update.
4486 (<pc>,cxmake-get): Update.
4487 (sim-finish!): Update.
4488 * utils-gen.scm (-gen-ifld-extract-base): Update.
4489 (-gen-ifld-extract-beyond): Update.
4490 (gen-multi-ifld-extract): Update.
4491 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4492 * sid.scm (<hw-pc>,gen-write): Update.
4493 (-gen-decode-insn-globals): Update.
4494 (-hw-cxmake-get): Update.
4495 (<hw-register>,cxmake-get-raw): Update.
4496 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4497 (<hw-index>,cxmake-get): Update.
4498 (<operand>,gen-type,gen-read,cxmake-get): Update.
4499 (<operand>,gen-set-quiet,gen-set-trace): Update.
4500 (<pc>,cxmake-get): Update.
4501 (-create-virtual-insns!): Update.
4502 (-decode-split-build-assertion): Update.
4504 * simplify.inc: Update.
4506 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4508 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4509 Prefix queue function name with sim_ instead of @cpu@_.
4511 * sim.scm (-with-parallel-only?): New global.
4512 (option-init!): Initialize it.
4513 (option-set!): Set it.
4514 (with-parallel-only?): New proc.
4515 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4516 and writeback markers if with-parallel-only.
4517 (-gen-idesc-init-fn): Update.
4518 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4521 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4523 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4524 with the invalid insn handler.
4526 * utils.scm (list-maybe-ref): New proc.
4528 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4530 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4532 * i960.cpu (test*-*): Delete `expr' arg.
4533 (test-op,branch-op): Update.
4535 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4537 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4538 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4540 (gen-reg-access-defn): Ditto.
4541 (-gen-hw-addr): Rewrite.
4542 (-op-gen-queued-write): Rewrite.
4543 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4544 (-gen-scache-semantic-fn): Handle with-generic-write.
4545 (-gen-no-scache-semantic-fn): Ditto.
4547 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4549 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4551 * sim.scm (-with-generic-write?): New global.
4552 (option-init!): Initialize it.
4553 (option-set!): Set it.
4554 (with-generic-write?): New proc.
4555 (-gen-hw-addr): New proc.
4556 (-op-gen-queued-write): New proc.
4557 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4559 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4561 (-gen-sem-switch): Preserve existing with-parallel? value.
4562 (-gen-sem-parallel-switch): Ditto.
4563 (-gen-write-case): Add /indent support.
4564 (cgen-write.c): Rewrite.
4566 * utils.scm (-current-print-state): New global.
4567 (make-print-state): New proc.
4568 (pstate-indent,pstate-set-indent!): New procs.
4569 (pstate-cmd?,pstate-cmd-do): New procs.
4570 (/indent): New global.
4571 (/indent-set,/indent-add): New procs.
4572 (string-write): Set -current-print-state.
4573 (-string-write): New arg pstate, all callers updated.
4574 Handle print-state commands.
4575 (-string-list-flatten): New proc.
4576 (string-list->string): Use it.
4578 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4579 (-gen-sem-fn-table-entry): New proc.
4580 (-gen-semantic-fn-table): New proc.
4581 (-gen-scache-semantic-fn): Make fn static.
4582 (-gen-no-scache-semantic-fn): Ditto.
4583 (cgen-semantics.c): Define macro SEM_FN_NAME.
4584 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4585 FAST,FULL. Update @cpu@_insn_sem contents.
4586 (-gen-semf-fn-name): Delete.
4587 (-gen-sem-fn-decls): Delete.
4588 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4589 @cpu@_semf_init_idesc_table.
4590 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4592 (cgen-decode.h): Print sfmt enum.
4593 * sid-decode.scm (-gen-semf-fn-name): Delete.
4594 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4596 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4597 (ifmt-compute!): Ditto.
4598 * sim-decode.scm (-gen-decoder-switch): Ditto.
4599 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4600 (-gen-decoder-switch): Ditto.
4602 * insn.scm (insn-virtual?): New proc.
4604 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4606 * mach.scm (<arch>): attr-list is now a pair of lists.
4607 (current-attr-list): Rewrite.
4608 (current-attr-add!,current-attr-lookup): Rewrite.
4609 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4611 1999-08-06 Richard Henderson <rth@cygnus.com>
4613 * ia64.cpu: Initial checkpoint.
4615 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4617 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4618 (pmacros-init!): Update .apply help string.
4620 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4622 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4623 (<hw-pc>,cxmake-skip): New method.
4624 (<pc>,cxmake-skip): New method.
4625 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4626 (gen-argbuf-type): New member `skip_count'.
4627 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4628 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4630 * utils-sim.scm: New file.
4631 * dev.scm (load-sim): Load it.
4632 (load-sid): Load it.
4633 * cgen-sid.scm: Load it.
4634 * cgen-sim.scm: Load it.
4635 * iformat.scm (<sformat>): New member sbuf, not initialized by
4637 * rtx-funcs.scm (skip): Rewrite.
4638 * rtl-c.scm (skip): Rewrite.
4639 * m32r.cpu (sc,snc): Update `skip' usage.
4640 * mode.scm (mode-real-mode): New proc.
4641 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4642 Distinguish fragments by the <sformat-abuf> they use.
4643 * sim.scm (gen-profile-index-type): Delete.
4644 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4645 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4646 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4647 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4648 (-gen-argbuf-elm): Rewrite.
4649 (-gen-argbuf-hw-elm): Delete.
4650 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4652 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4653 (sim-init!): Initialize them.
4654 (sim-analyze-insns!): Set them.
4655 (current-sbuf-list): New proc.
4656 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4657 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4658 * sim-model.scm (-gen-model-insn-fn): Ditto.
4659 * sim-decode.scm (-gen-extract-decls): Delete.
4660 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4661 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4663 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4664 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4665 (-gen-op-extract,-gen-op-trace-extract): New procs.
4666 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4667 gen-sfmt-argvars-foo and rewrite.
4668 (-gen-record-args): Rewrite.
4669 (-gen-extract-case): Tweak.
4670 * sid.scm (gen-profile-index-type): Delete.
4671 (ifield argbuf support): Move to utils-sim.scm.
4672 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4673 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4674 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4675 (-sim-sformat-argbuf-list): New global.
4676 (sim-init!): Initialize it.
4677 (sim-analyze-insns!): Set it.
4678 (current-sbuf-list): New proc.
4679 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4680 (-gen-argbuf-hw-elm): Delete.
4681 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4683 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4684 (-gen-extract-decls): Delete.
4685 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4687 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4688 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4689 (-gen-op-extract,-gen-op-trace-extract): New procs.
4690 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4691 gen-sfmt-argvars-foo and rewrite.
4692 (-gen-record-args): Rewrite.
4693 (-gen-extract-case): Tweak.
4695 * cgen-gh.c (gh_putc,gh_puts): New functions.
4696 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4697 * cos.c (_object_print_elms,_object_print): Use them.
4698 * hob-sup.c (fastcall_print): Use them.
4699 * configure.in: Check for scm_gen_puts, scm_puts.
4700 * config.in: Rebuild.
4701 * configure: Rebuild.
4702 * aclocal.m4: Rebuild.
4703 * Makefile.in: Rebuild.
4705 * dev.scm (load-opc): Use load instead of maybe-load.
4706 (load-gtest,load-sim,load-stest): Ditto.
4709 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4711 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4712 up to avoid g++ 'goto crosses initialization' warning.
4713 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4714 (-gen-sfrag-case): Update use of NEXT_FRAG.
4716 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4718 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4720 * read.scm: Load sem-frags.scm.
4721 * sem-frags.scm (*): Lots rewritten.
4722 * sid.scm (-with-sem-frags?): New global
4723 (with-sem-frags?): New proc.
4724 (option-init!): Initialize -with-sem-frags?.
4725 (option-set!): Recognize with-sem-frags.
4726 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4727 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4729 (-gen-sfrag-engine-decls): New proc.
4730 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4731 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4732 (-gen-sfrag-engine): New proc.
4733 (-gen-sem-case): Emit setup-semantics if specified.
4734 (-gen-sem-switch-engine): Update init/use of computed goto label.
4735 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4737 (-gen-idesc-decls): Replace sem_address with cgoto.
4738 (-gen-scache-decls): Rewrite definition of `execute' member.
4739 * arm.cpu (arm isa): Enable decode-splits.
4740 * arm7.cpu (multiply insns): Rename result to mul-result.
4742 Rename decode-specialize to decode-split.
4743 * decode.scm (*): Update.
4744 * insn.scm (*): Update.
4745 * mach.scm (*): Update.
4746 * sid.scm (*): Update.
4748 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4750 Record objects as a smob.
4751 * cos.c (scm_tc16_object): New static global.
4752 (cos_init): Initialize it.
4753 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4754 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4755 (_object_tag): Delete.
4756 (_object_make_smob): New function.
4757 (_object_make_x,_object_make_with_values_x): Rewrite.
4758 (_object_elements,_object_class_desc): Rewrite.
4759 (_object_copy,object_p): Rewrite.
4760 (_object_specialize): Rewrite.
4761 (_object_print_elms,_object_print): New functions.
4762 (object_smob): New static global.
4763 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4765 * cos.c (_make_x_symbol): New static global.
4766 (object_make): Use it.
4767 (cos_init): Initialize it.
4769 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4771 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4772 instead to determine whether to use FLD macro.
4773 (<rtl-c-eval-state>): New member ifield-var?.
4774 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4775 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4776 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4778 * rtl.scm (rtx-sequence-assq-locals): New proc.
4780 * cos.scm (-object-error): Don't crash on non-objects.
4782 * Makefile.am (CLEANFILES): Add hobbit.
4783 * Makefile.in: Rebuild.
4785 * rtl-c.scm (s-c-call): Delete unnecessary code.
4787 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4789 * rtl-c.scm (ifield): Always reference value via `FLD'.
4791 * cos.c (elm_bound_p): Return problem SCM boolean values.
4793 * utils-cgen.scm (display-argv): New proc.
4794 * cgen-opc.scm (cgen): Call it.
4795 * cgen-sim.scm (cgen): Ditto.
4796 * cgen-gas.scm (cgen): Ditto.
4797 * cgen-stest.scm (cgen): Ditto.
4798 * cgen-sid.scm (cgen): Ditto.
4800 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4802 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4803 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4804 (-gen-extract-switch): Initialize result to 1.
4805 * opcodes.scm (gen-ifield-default-type): New proc.
4806 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4808 (<hw-index>,gen-insert): Handle non-ifield indices.
4809 (<hw-index>,gen-extract): Ditto.
4810 (<hw-asm>,gen-parse): Ditto.
4811 (<hw-asm>,gen-print): Ditto.
4812 (<keyword>,gen-parse): Ditto.
4813 (<keyword>,gen-print): Ditto.
4814 (<operand>,gen-fget): Ditto.
4815 (<operand>,gen-fset): Ditto.
4817 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4818 (-gen-hw-index): Ditto.
4819 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4820 (-gen-hw-index): Ditto.
4822 * sem-frags.scm: New file.
4824 * attr.scm (attr-parse): Add better checking of input.
4826 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4828 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4830 * ifield.scm (ifld-nil?): New proc.
4832 * operand.scm (<operand>): New members getter,setter.
4833 (<operand>,make!): New args getter,setter. All uses updated.
4834 (op:getter,op:setter): New procs.
4835 (<hw-index>,field-start): Return 0 for non-ifield indices.
4836 (<hw-index>,field-length): Return 0 for non-ifield indices.
4837 (-operand-parse-getter,-operand-parse-setter): New procs.
4838 (-operand-parse): New args getter,setter. All callers updated.
4839 Always use hw-index-scalar for scalar operands.
4840 (-operand-read): Handle getter,setter.
4841 (define-full-operand): New args getter,setter. All uses updated.
4842 * semantics.scm (-build-ifield-operand!): Update.
4843 (-build-index-of-operand!): Update.
4844 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4845 * simplify.inc (define-normal-operand): Update.
4847 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4848 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4849 (s-binop,s-cmpop,s-convop): Ditto.
4850 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4851 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4852 (fcc-tests): New insn-enum.
4853 (fcc-value): Rename from fcc-type.
4854 * sparcfpu.cpu: New file. All fp support moved here.
4856 * rtl.scm (<rtx-func>): New member class.
4857 (rtx-class-*?): New procs.
4858 (def-rtx-node): New arg class. All callers updated.
4859 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4860 * rtx-funcs.scm (*): Specify class.
4862 * utils-cgen.scm (context-make-reader): New proc.
4864 * utils.scm (assert-fail-msg): New variable.
4866 (list-drop,list-tail-drop): New procs.
4868 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4870 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4871 CGEN_MIN_INSN_SIZE deleted on March 22.
4873 * ifield.scm (<ifield>,needed-iflds): New method.
4874 (<multi-ifield>,needed-iflds): New method.
4875 (ifld-needed-iflds): New proc.
4876 (multi-ifield?): New proc.
4877 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4878 (-sfmt-search-key): Include insn length in key.
4879 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4880 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4881 (-ifmt-lookup-ifmt!): Compute key here.
4882 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4883 All callers updated.
4884 (ifmt-build): Delete arg desc. New args search-key,iflds.
4885 All callers updated.
4886 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4887 in-ops,out-ops,sorted-used-iflds. All callers updated.
4888 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4890 * operand.scm (op-iflds-used): New proc.
4891 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4893 And from sid.scm,sid-cpu.scm as well.
4894 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4895 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4896 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4897 (gen-extracted-ifld-value): Ditto.
4898 (-extract-chunk-specs): Ditto.
4899 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4900 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4901 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4902 (-extract-insert-subfields): New function.
4903 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4904 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4905 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4906 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4908 (-gen-no-scache-semantic-fn): Ditto.
4909 (-gen-sem-case): Ditto.
4910 (-gen-read-case): Update calls to gen-define-ifields,
4911 gen-extract-ifields.
4912 * sim-decode.scm (-gen-record-args): Update.
4913 (-gen-sfmt-argvars-assigns): Update.
4914 (-gen-extract-case): Update.
4915 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4916 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4918 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4919 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4920 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4921 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4922 gen-define-ifields, gen-extract-ifields.
4923 (-gen-record-args): Update.
4924 (gen-sfmt-argvars-assigns): Update.
4925 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4926 with gen-define-ifields. Ditto for gen-extract-foo.
4927 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4928 procs rather than method calls.
4930 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4932 * sid.scm (-create-virtual-insns!): New local `context', pass it
4935 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4936 (operand name) not (operand object), (local name) not (local object).
4937 (rtx-traverse-with-locals): New proc.
4938 (-compile-expr-fn): New proc.
4939 (rtx-compile): Rewrite.
4940 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4941 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4942 (rtl-c-set-trace): Ditto.
4943 (operand define-fn): Recognize operand name argument.
4944 (local define-fn): Recognize sequence temp name argument.
4945 * rtx-funcs.scm (operand): Argument is operand name, not object,
4946 so call current-op-lookup.
4947 (local): Similarily, so call rtx-temp-lookup.
4949 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4950 (rtx-operand?): Ditto.
4951 (rtx-pretty-name): Ditto.
4952 (rtx-local-obj): Flag symbol argument as an error.
4953 (rtx-local-name): New proc.
4954 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4956 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4958 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4961 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4964 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4965 (*floats-s->c-fun-table*): Ditto.
4966 * hobbit.c,hobbit.h: Rebuild.
4967 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4968 * semantics.scm (rtx-simplify): Use /fastcall-make.
4970 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4972 * insn.scm (<insn>): Delete members condition, compiled-condition.
4973 (<insn>,make!): Update
4974 (<insn> getters,setters): Update.
4975 (-insn-parse,insn-read,define-full-insn): Update.
4976 * minsn.scm (minsn-make-alias): Update.
4977 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4978 (ifmt-compute!): Ditto.
4979 * sim.scm (sim-finish!): Update.
4980 * simplify.inc: (define-normal-insn): Update.
4981 * sid-cpu.scm (gen-semantic-code): Update.
4983 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4984 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4985 (ifmt-compute!): Ditto.
4987 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4989 * minsn.scm (minsn-compute-iflds): Print better error message for
4992 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4994 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4996 * Makefile.am (HOBFLAGS): New variable.
4997 (cgen-hob.c): Use it.
4999 (libcpu_a_SOURCES): Add hob-sup.c.
5000 (hob-sup.o): New rule.
5001 * Makefile.in: Rebuild.
5002 * cgen.c: #include hob-sup.h.
5003 (cgen_init_c): Call hobbit_init_support.
5004 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5005 (*special-scm->c-functions*): Add them.
5006 (display-c-expression): Handle *c-symbol*.
5007 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5008 (*floats-s->c-fun-table*): Ditto.
5009 (normalize): Recognize /fastcall-make.
5010 (normalize-fastcall-make): New proc.
5011 * hobbit.c,hobbit.h: Rebuild.
5012 * hob-sup.scm: New file.
5013 * hob-sup.c: New file.
5014 * hob-sup.h: New file.
5015 * read.scm: Load hob-sup.scm.
5016 * rtl.scm (-rtx-name-list): New variable.
5017 (rtx-name-list): New proc.
5018 (rtx-lookup): Try symbol first.
5019 (def-rtx-node): Add name to -rtx-name-list.
5020 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5021 (-rtx-traverse-anymode): New proc.
5022 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5023 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5024 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5025 (-rtx-traverse-{symornum,object}): New procs.
5026 (-rtx-make-traverse-table): Rewrite.
5027 (-rtx-traverse-operands): Rewrite arg-types handling.
5028 Handle #f result of traverser.
5029 (-rtx-traverse): Renamed from -rtx-traverse-normal.
5030 Move debug handling here.
5031 (-rtx-traverse-debug): Delete.
5032 (rtl-finish!): Change -rtx-traverse-table into list of handlers
5034 * semantics.scm (semantic-compile:process-expr!): Fix call to
5036 * utils.scm (map1-improper): New proc.
5038 1999-06-08 Doug Evans <devans@casey.cygnus.com>
5040 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5042 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5043 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5044 (<operand>,cxmake-get): Tweak.
5045 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
5047 1999-06-07 Doug Evans <devans@casey.cygnus.com>
5049 * thumb.cpu (dnti): Delete timing spec.
5052 * arm.cpu (arm isa): New fields condition, setup-semantics.
5053 (thumb isa): New field setup-semantics.
5054 (h-gr): Add attribute CACHE-ADDR.
5055 * arm7.cpu (dnai): Delete condition.
5056 (eval-cond): Delete.
5058 * mach.scm (<isa>): New member setup-semantics.
5059 (-isa-parse-setup-semantics): New proc.
5060 (-isa-parse): New arg setup-semantics.
5061 (-isa-read): Recognize setup-semantics.
5063 * sid-cpu.scm (gen-extract-fields): Split into two:
5064 gen-extract-ifields, gen-extract-ifmt-ifields.
5065 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
5066 tracing begin/end messages (done by caller now).
5067 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
5068 tracing begin/end messages (done by x-before,x-after virtual insns).
5069 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
5070 end so don't have to look it up again next time.
5071 * sid-decode.scm (-decode-expr-ifield-values): New proc.
5072 (-decode-expr-ifield-tracking-key): New proc.
5073 (-decode-expr-ifield-tracking): New proc.
5074 (-decode-expr-ifield-values-used): New proc.
5075 (-decode-expr-ifield-mark-used!): New proc.
5076 (-gen-decode-expr-set-itype): New proc.
5077 (-gen-decode-expr-entry): Rewrite.
5078 (-gen-decode-table-entry): New proc.
5079 (-gen-decoder-switch): Use it.
5080 (-gen-virtual-insn-finder): New proc.
5081 (-gen-argbuf-elm): Move here from sid.scm.
5082 (-gen-argbuf-hw-elm): Ditto.
5083 (-gen-argbuf-fields-union): Add entries for chain,before insns.
5084 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5085 conditional-execution isas.
5086 (-gen-decode-fn): Record conditional-exec ifield.
5087 * sid.scm (-current-pbb-engine?): New global.
5088 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5089 (<ifield>,gen-ifld-extract): New arg `indent'.
5090 (<multi-ifield>,gen-ifld-extract): Ditto.
5091 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
5092 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5093 (-gen-arch-model-decls): Only scan real insns.
5094 (scache-engine-insns,pbb-engine-insns): New procs.
5095 (-create-virtual-insns!): New proc.
5096 (sim-finish!): Call it.
5097 (-decode-specialize-insn?): New proc.
5098 (-decode-specialize-build-assertion): New proc.
5099 (-decode-specialize-insn-1): New proc.
5100 (-decode-specialize-insn): New proc.
5101 (-fill-sim-insn-list!): New proc.
5102 (sim-analyze!): Create copies of insns to be specialized.
5103 * utils-cgen.scm (obj-set-name!): New proc.
5105 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5106 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5108 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
5110 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5111 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5112 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5113 (attr): Rewrite test for insn owner.
5114 (member): New rtx function.
5115 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5116 as separate function.
5117 (rtx-ifield?,rtx-ifield-name): New procs.
5118 (rtx-operand-obj): Rewrite.
5119 (rtx-operand-name): New proc.
5120 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5121 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5122 (tstate-make): New args owner, known. All callers updated.
5123 (tstate-known-lookup): New proc.
5124 (rtx-traverse): New arg owner. All callers updated.
5125 (rtx-make-bool): New proc.
5126 (rtl-find-ifields): Rewrite.
5127 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5128 * semantics.scm: ... here.
5129 (rtx-const-equal,rtx-const-list-equal): New procs.
5130 (-build-known-values): New proc.
5131 (semantic-compile): New arg `insn'. Call rtx-simplify.
5132 (semantic-attrs): Ditto.
5133 * rtx-funcs.scm (member,number-list): New rtx functions.
5135 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5136 Rewrite. Delete arg `all-attrs'. All callers updated.
5137 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
5139 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5141 * decode.scm (subdtable-add): Handle `expr' entries.
5142 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
5143 (exprtable-entry-*): Update.
5144 (exprtable-entry-iflds): New proc.
5145 (exprentry-cost): New proc.
5146 (exprtable-sort,-gen-exprtable-name): New procs.
5147 (exprtable-make): New arg `name'. All callers updated. use vector.
5148 (exprtable-*): Update.
5149 (-build-decode-table-entry): Don't issue collision warning if all are
5150 specialized insns. Sort exprtable entries before building table.
5152 * read.scm (-reader-process-expanded-1): Move pretty printing of
5153 input to logging level 4.
5155 * utils.scm (string-list->string): New proc.
5157 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5159 (insn-read): Delete leading '-' in name. All callers updated.
5160 (real-insn?): New proc.
5161 (real-insns): Rewrite.
5162 (insn-has-ifield?): New proc.
5163 (insn-builtin!): Create insn attribute SPECIALIZED.
5165 * mach.scm (<arch>): Delete member app-data.
5166 (current-raw-insn-list): New proc.
5167 (insn-list-car,insn-list-splice!): New procs.
5168 (<decode-specialize>): New class.
5169 (-isa-parse-decode-specialize): New proc.
5170 (-isa-parse-decode-specializes): New proc.
5171 (<isa>): New members `condition', `decode-specializes'.
5172 (-isa-parse-condition): New proc.
5173 (-isa-parse): New args condition, decode-specializes.
5174 (-isa-read): Recognize condition, decode-specializes.
5175 (-isa-add-decode-specialize!): New proc.
5176 (modify-isa): New proc.
5177 (isa-conditional-exec?,state-conditional-exec?): New procs.
5178 (arch-init!): New reader command `modify-isa'.
5180 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5181 (mode-signed,mode-unsigned?): New procs.
5183 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
5185 * types.scm (<array>): New method get-shape.
5186 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5188 (hw-shape,hw-num-elms): New procs.
5189 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5190 if there's more than 255 registers.
5191 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5193 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5196 1999-05-21 Doug Evans <devans@casey.cygnus.com>
5198 * cgen-sid.scm (sim-arguments): Add -X.
5199 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5200 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5201 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
5202 Simplify by supporting pbb engine only.
5203 (-gen-sem-switch-init): New proc.
5204 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5205 (cgen-sem-switch.cxx): New proc.
5206 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5207 with with-pbb?. Support dual scache/pbb engines.
5208 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5209 Support dual scache/pbb engines.
5210 (cgen-decode.h): Generate semantic fn decls if with-scache?.
5211 * sid.scm (*) with-pbb? replaces with-sem-switch?.
5212 (sim-finish!): Create pbb support virtual insns if with-pbb?.
5214 1999-05-10 Ben Elliston <bje@cygnus.com>
5216 * arm7.cpu: Remove coprocessor related fields, operands and insn
5217 definitions for now. Take the undefined instruction trap instead.
5218 (ldmda-wb): New instruction.
5219 (ldmib-wb): Likewise.
5220 (ldmdb-wb): Likewise.
5221 (stmdb-wb): Likewise.
5222 (stmib-wb): Likewise.
5223 (stmda-wb): Likewise.
5225 1999-05-08 Doug Evans <devans@casey.cygnus.com>
5227 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5228 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5230 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5231 hobbit can't handle optional third arg.
5233 1999-05-07 Doug Evans <devans@casey.cygnus.com>
5235 * arm.cpu (h-tbit): Delete set spec.
5236 (h-mbits): Don't call arm_mbits_set in set spec.
5237 * arm.sim: New file.
5238 * hardware.scm (modify-hardware): New proc.
5239 (hardware-init!): Add modify-hardware command.
5240 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5241 (-hw-gen-set-quiet): Ditto.
5242 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5243 hardware attribute. Load $arch.sim file if present.
5244 * utils-cgen.scm (keyword-list?): New proc.
5245 (keyword-list->arg-list,arg-list-validate-name): New procs.
5246 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5248 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5250 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5253 * attr.scm (obj-prepend-atlist!): New proc.
5255 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5257 * sid.scm (<operand>,profilable?): Use op:type.
5258 * sim.scm (<operand>,profilable?): Use op:type.
5260 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5262 * utils.scm (find-index,find): Be more stack friendly.
5264 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5267 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5269 * arm.cpu (h-gr-usr): New hardware element.
5270 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5271 (arm-mode): New keyword.
5272 (h-mbits): Add set spec.
5273 (h-spsr): Implement get/set specs.
5275 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5276 (-reader-process-expanded-1): Pretty print logging output.
5278 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5279 (cgen-cpu.h): Print enums before hardware elements.
5280 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5281 * sid-decode.scm (cgen-decode.cxx): Ditto.
5282 * sid-model.scm (cgen-model.cxx): Ditto.
5284 * utils-cgen.scm (context-error): Accept variable number of
5287 * rtx-funcs.scm (error:): New rtx function.
5288 * rtl-c.scm (s-case-vm): New proc.
5289 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5290 (s-case): Simplify, handle non-VM result.
5291 (error:): New rtx function.
5293 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5295 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5296 (test-hi,test-ls): Fix cbit handling.
5297 (shift-type,h-operand2-shifttype): Move here ...
5298 * arm7.cpu: ... from here.
5299 (set-cond,set-cond-maybe,dnix): Delete, unused.
5300 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5301 * arm.cpu: ... to here.
5302 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5303 (alu-cmn): Use set-add-flags.
5304 (alu-tst): Use set-zn-flags.
5305 (alu-cmp): Use set-sub-flags.
5306 (lsl,lsr,asr): Set condition codes.
5307 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5308 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5310 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5311 All callers updated.
5312 (sub-sp): Rename from add-sp-neg.
5313 (f-lbwl-offset): Delete.
5314 (f-lbwl-hi,f-lbwl-lo): New ifields.
5315 (lbwl-hi,lbwl-lo): Update.
5316 (bl-hi): Add 4 to pc.
5317 (push-reg,pop-reg): Simplify.
5318 (push,push-lr): Push registers in correct order.
5319 (pop,pop-pc): Pop registers in correct order.
5320 (save-reg-inc,load-reg-inc): Simplify.
5321 (ldmia): Save registers in correct order.
5323 1999-04-30 Ben Elliston <bje@cygnus.com>
5325 * arm7.cpu (f-op-hdt): Remove; unused.
5326 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5327 (f-ror-imm8): New multi-ifield.
5328 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5330 (f-uimm12): New field.
5331 (ror-imm8): New operand.
5333 (hdt-offset8): Reinstate operand.
5334 (offset4-hi,offset4-lo): Remove.
5335 (set-cond): Remove macro; unused.
5336 (set-cond-maybe): Likewise.
5337 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5338 (store-word/byte): Likewise.
5339 (load-halfword): Use hdt-offset8 multifield operand instead of two
5340 4-bit operands that are explicitly combined by semantic code.
5341 (do-halfword-store): Bug fix. Set address when not preindexing.
5342 (store-halfword): Also use hdt-offset8 operand.
5343 (arith-op): Avoid clobbering source registers when one of them is
5344 the destination register.
5345 (arith-imm-op): Likewise.
5346 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5347 (teq-imm): Likewise.
5348 (ldm-p): Rename to ldmdb.
5349 (stm-pw): Rename to stmdb-wb.
5350 (multi-action): New macro; test reg-list bits and execute a
5351 semantic fn if the bit is set.
5352 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5353 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5354 (all insns): Use dnai entries for simplicity rather than dni.
5355 (*): Use short-form of (const ..).
5357 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5359 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5360 member eval to evaluator.
5361 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5362 (tstate-make): Delete arg op-fn. All callers updated.
5363 (tstate-op-fn,tstate-set-op-fn!): Delete.
5364 (rtx-traverse): Delete op-fn arg. All callers updated.
5365 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5366 split out of -simplify-for-compilation.
5368 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5369 (cgen_DEPENDENCIES): Add stamp-cgen.
5370 (stamp-cgen): New rule.
5371 * Makefile.in: Rebuild.
5373 * rtl-c.scm (enum:): Define emitter for.
5374 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5376 (rtx-constant-value,rtx-enum-value): New procs.
5377 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5378 (rtx-compile-time-constant?): Return #t for enums.
5379 (rtx-true?,rtx-false?): Handle enums.
5380 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5381 building result by hand.
5382 (rtx-simplify-eq-attr-insn): Ditto.
5383 * rtx-funcs.scm (enum:,enum): New rtx functions.
5385 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5387 (arch-analyze-insns!): New proc.
5388 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5389 of calling ifmt-compute! directly.
5390 * sid.scm (-sim-insns-analyzed?): Delete.
5391 (sim-analyze!): Call arch-analyze-insns! instead of calling
5392 ifmt-compute! directly.
5393 * sim.scm (-sim-insns-analyzed?): Delete.
5394 (sim-analyze!): Call arch-analyze-insns! instead of calling
5395 ifmt-compute! directly.
5397 * utils.scm (string-take-with-filler): New proc.
5398 (string-take): Use it.
5400 * pgmr-tools.scm: New file.
5401 * read.scm: Load it.
5402 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5404 * insn.scm (insn-base-mask): Renamed from insn:mask.
5405 All callers updated.
5406 (insn-base-mask-length): Renamed from insn:mask-length.
5407 All callers updated.
5408 (insn-foo): Renamed from insn:foo. All callers updated.
5409 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5410 * iformat.scm (compute-insn-base-mask-length): Renamed from
5411 compute-insn-mask-length. All callers updated.
5412 (compute-insn-base-mask): Renamed from compute-insn-mask.
5413 All callers updated.
5415 * enum.scm (-enum-parse-prefix): New proc.
5416 (<enum>,make!): Don't parse enum values here.
5417 (-enum-parse): Do it here. Call -enum-parse-prefix.
5418 (define-full-insn-enum): Ditto.
5419 (enum-vals-upcase): New proc.
5420 * hardware.scm (define-keyword): Make enum prefix uppercase.
5421 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5423 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5424 (<ifield>,field-extract): New method.
5425 (<multi-ifield>,field-extract): New method.
5426 (ifld-extract): New proc.
5427 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5428 (ifld-extract-fn-name): Renamed from ifld-extract.
5430 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5431 All callers updated.
5433 * ifield.scm (ifld-lsb0?): New proc.
5434 (sort-ifield-list): New arg up?. All callers updated.
5435 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5436 rather than global state.
5438 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5440 * insn.scm (pretty-print-insn-format): New proc.
5442 * Makefile.in: Rebuild.
5443 * aclocal.m4: Rebuild
5444 * configure: Rebuild.
5446 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5448 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5449 * configure: Rebuild.
5450 * aclocal.m4: Rebuild.
5451 * Makefile.in: Rebuild.
5452 * doc/Makefile.in: Rebuild.
5453 * doc/version.texi: Rebuild.
5455 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5457 * utils.scm (bits->bools): New proc.
5459 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5461 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5462 subfield's gen-ifld-extract-decl method.
5464 1999-04-23 Ben Elliston <bje@cygnus.com>
5466 * arm7.cpu (ldrsh-pu): Remove.
5467 (do-halfword-load): New pmacro.
5468 (load-halfword): Likewise.
5469 (do-halfword-store): Likewise.
5470 (store-halfword): Likewise.
5471 (strh-*): New instructions.
5472 (ldrsb-*): Likewise.
5474 (ldrsh-*): Likewise.
5476 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5478 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5481 * arm7.cpu (do-word/byte-store): Fix typo.
5483 1999-04-22 Ben Elliston <bje@cygnus.com>
5485 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5486 register is the program counter (R15).
5488 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5489 (str-*): Implement using store-word-byte. Remove older versions.
5490 (bic): Use the `inv' rtx for obtaining bitwise complements.
5491 (bic-imm): Likewise.
5493 (mvn-imm): Likewise.
5494 (store-indev-reg): Remove crufty pmacro.
5495 (load-indiv-reg): Likewise.
5496 (ldm-p): Reverse the order of register processing for decrement.
5498 (stbi): Remove; handled by the str-* insns.
5500 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5502 * thumb.cpu (cmp): Fix carry bit computation.
5505 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5507 * arm.cpu (h-tbit): Specify set spec.
5509 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5510 (set-sub-flags): Interpret "carry bit" as a borrow.
5511 (all sub/cmp insns): Carry bit is actually a borrow bit.
5512 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5513 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5515 (hireg-add,hireg-cmp,hireg-move): Ditto.
5517 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5518 (-CGEN-LANG-VERSION): Ditto.
5520 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5522 * pmacros.scm (-pmacro-make): New arg `default-values',
5523 all callers updated.
5524 (-pmacro-default-values): New proc.
5525 (-pmacro-process-keyworded-args): New proc.
5526 (-pmacro-process-args): New proc.
5527 (-pmacro-invoke): Process arguments before expanding macro.
5528 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5529 (define-pmacro): Handle default values specified in arg list.
5530 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5531 (rtx-boolif-op-arg[01]): New procs.
5532 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5533 (rtx-simplify): Handle not,orif,andif.
5534 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5535 * utils.scm (alist-copy): New proc.
5536 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5538 (swi): Explicitly set pc.
5540 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5542 1999-04-17 Ben Elliston <bje@cygnus.com>
5544 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5545 correctly adjusts the program counter now.
5547 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5548 (f-signed?): Rename from `f-hdt-signed?'.
5549 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5550 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5551 (f-hdt-offset8): Use new field names.
5552 (ldr): Use `imm12' field, not `offset12', since we do our own
5554 (str, str-*): Likewise.
5555 (ldu-*): Remove most; better not implemented than broken.
5557 (ldrsh-pu): New insn.
5561 (ldm-p): Likewise; replace (load-indiv-reg) version.
5563 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5565 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5566 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5567 (*): Explicitly specify mode in c-call.
5568 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5570 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5571 (arith-imm-op): New pmacro.
5572 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5573 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5575 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5577 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5579 * rtl.scm (rtl-find-ifields): Implement.
5581 * utils-gen.scm: New file.
5582 * read.scm: Load it.
5583 * desc.scm: Move generic attribute code to utils-gen.scm.
5584 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5585 * Makefile.in: Rebuild.
5587 * arm7.cpu (R15-OFFSET): New attribute.
5589 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5590 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5591 for reg-shift version.
5593 (data processing insns): Reorganize. Use dnai.
5595 * attr.scm (attr-kind): New proc.
5596 (attr-list-enum-list): Rewrite.
5597 (-attr-sort): Split result into two lists, bools and non-bools.
5598 (current-attr-list-for): Update.
5600 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5601 * sid-cpu.scm (-gen-attr-decls): New proc.
5602 (-gen-insn-attr-decls): New proc.
5603 (cgen-desc.h): New proc.
5604 (cgen-cpu.h): Put everything in @cpu@ namespace.
5605 (gen-parallel-exec-type): Change prefix of parexec struct from
5607 (-gen-trace-record-type): Ditto for trace_record struct.
5608 (-gen-write-case): Update.
5609 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5610 @prefix@. Update scache struct references.
5611 (-gen-sem-case): Update scache struct references.
5612 (-gen-sem-switch-fn): Update idesc struct reference.
5613 Update insn_type enum reference.
5614 (cgen-write.cxx): Update scache,argbuf references.
5615 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5616 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5617 from @cpu@ to @prefix@.
5618 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5619 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5620 from @CPU@ to @PREFIX@.
5621 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5622 from @CPU@ to @PREFIX@.
5623 (-gen-decode-insn-globals): Generate insn attributes.
5624 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5625 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5626 semantic fn typedef.
5627 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5628 Change prefix of scache struct from @cpu@ to @prefix@.
5629 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5630 Change prefix of idesc struct from @cpu@ to @prefix@.
5631 Change prefix of insn_type enum from @cpu@ to @prefix@.
5632 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5633 from @cpu@ to @prefix@.
5634 (-gen-scache-decls): Change prefix of scache struct from
5635 @cpu@ to @prefix@. Update idesc struct name.
5636 Update decode,execute methods.
5637 (-gen-extract-case): Update to type name changes.
5638 (-gen-decode-fn): Ditto.
5639 (cgen-decode.h): Put everything in @cpu@ namespace (except
5640 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5641 (cgen-decode.cxx): Add using namespace @cpu@.
5642 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5643 model_mark_get/set from @cpu@ to @prefix@.
5644 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5646 (gen-model-fn-decls): Update idesc struct name. Change prefix
5647 of model_insn_before/after from @cpu@ to @prefix@.
5648 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5649 Update insn_word type name.
5650 (-gen-model-timing-table): Update INSN_TIMING struct name.
5651 (-gen-model-init-fn): Update MODEL_DATA struct name.
5652 (-gen-mach-defns): Update name of init_idesc_table fn.
5653 (cgen-model.cxx): Add using namespace @cpu@.
5654 * sid.scm (gen-cpu-class): Delete.
5655 (gen-attr-type): New proc.
5656 (gen-obj-attr-sid-defn): New proc.
5657 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5658 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5660 (gen-cpu-insn-enum): Update name of insn enum.
5661 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5663 (swi): Rename @cpu@_swi to @prefix@_swi.
5665 * decode.scm (-build-decode-table-entry): Remove heuristic for
5666 distinguishing insns, and use insn ifield-assertion specs.
5668 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5669 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5670 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5671 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5672 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5673 all callers updated.
5674 (gen-attr-name): New proc
5675 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5676 (gen-obj-attr-defn): Delete num_nonbools count.
5678 * iformat.scm (ifmt-analyze): Handle insn-condition.
5679 (ifmt-compute!): Ditto.
5680 * insn.scm (<insn>): Specify default value for condition,
5681 post-cond-trap,compiled-condition,compiled-semantics.
5682 (<insn>,make!): New arg condition.
5683 (<insn>): Add getters for condition,compiled-condition.
5684 (-insn-parse): New arg condition, all callers updated.
5685 (-insn-read): Recognize condition spec.
5686 (define-full-insn): New arg condition.
5687 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5688 * semantics.scm (semantic-compile): Change arg sem-code to
5690 (semantic-attrs): Ditto.
5691 * sim.scm (sim-finish!): Update calls to define-full-insn.
5692 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5693 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5694 * sid.scm (sim-finish!): Update call to define-full-insn.
5696 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5698 * Makefile.am (sim-cpu): Allow specification of ISA.
5699 * Makefile.in: Rebuild.
5701 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5703 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5705 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5707 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5709 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5711 * attr.scm (atlist?): New proc.
5712 (-attr-eval): Rewrite.
5713 (attr-parse): New proc.
5714 (atlist-parse): Use it.
5716 * decode.scm (exprtable-entry-make): New proc.
5717 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5718 (exprtable-make,exprtable-insns): New procs.
5720 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5722 (hardware-builtin!): Make h-memory a vector.
5724 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5725 All callers updated.
5726 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5728 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5730 (-insn-parse): Set semantics to #f if not specified.
5731 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5733 (-parse-insn-format): Recognize `=' iformat spec.
5735 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5736 (isa-max-insn-bitsize): Ditto.
5738 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5740 (<ifield>,gen-extract): Ditto.
5741 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5742 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5743 (gen-define-ifmt-ifields): New proc.
5744 (gen-semantic-code): Rewrite.
5745 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5746 (-gen-decoder-switch): Handle expression tables.
5747 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5749 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5750 instead of gen-define-fields.
5751 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5753 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5754 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5755 (-gen-ifld-extract-beyond): Ditto.
5756 (<multi-ifield>,gen-ifld-extract): Ditto.
5757 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5758 rtl evaluation code.
5759 (op:read): Build an <eval-state> to pass to gen-read.
5760 (op:write): Build an <eval-state> to pass to gen-write.
5761 (op:record-profile): Build an <eval-state> to pass to
5763 * sim-cpu.scm (gen-semantic-code): Rewrite.
5764 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5766 (-gen-ifld-extract-beyond): Ditto.
5767 (<multi-ifield>,gen-ifld-extract): Ditto.
5768 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5769 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5770 rtl evaluation code.
5771 (op:read): Build an <eval-state> to pass to gen-read.
5772 (op:write): Build an <eval-state> to pass to gen-write.
5773 (op:record-profile): Build an <eval-state> to pass to
5776 * operand.scm (<operand>): Give `selector' default value of #f.
5777 Give `num' default value of -1. Give `cond?' default value of #f.
5778 (op:new-mode): Delete arg `set?', all uses updated.
5780 * read.scm (reader-error): Handle #f return from port-filename.
5781 (-init-parse-cpu!): Call rtl-c-init!.
5782 (reader-install-builtin!): Call rtl-builtin!.
5784 * rtl-c.scm: New file.
5785 * semantics.scm: New file.
5786 * read.scm: Load them.
5787 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5789 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5791 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5792 (-rtx-num-text,-rtx-max-num): New globals.
5793 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5794 (-rtx-macro-lookup): New proc.
5795 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5796 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5797 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5798 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5799 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5800 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5801 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5802 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5803 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5804 (rtx-pretty-name): New proc.
5805 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5806 (rtx-traverse-*): Rewrite rtx traversing.
5807 (rtx-eval-*): Rewrite rtx evaluation.
5808 (rtx-compile): New proc.
5809 (rtx-simplify): New proc.
5810 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5811 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5812 (ifield,index-of): Rewrite.
5813 (name): Renamed from `operand:'.
5814 (operand,xop,local): New rtx's.
5815 (current-insn): Rewrite.
5816 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5817 (cgen-hob.h): Remove rule for.
5818 (cgen-hob.o): Depend on cgen-hob.c only.
5819 * Makefile.in: Rebuild.
5821 * utils-cgen.scm (vmake): New proc.
5822 (<context>): New class.
5823 (context-make-prefix,context-error): New procs.
5825 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5827 * i960.cpu: Add some ??? comments.
5828 (xnor, ornot): New instructions.
5829 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5831 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5833 * cos.scm (-object-error): Print better error message.
5835 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5836 (-pmacro-env-ref): Renamed from -env-ref.
5838 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5840 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5842 (hardware-builtin!): Delete h-pc builtin.
5843 * arm.cpu (h-pc): Define.
5844 (h-gr): Delete get,set specs. Make array of 16 regs again.
5845 * arm7.cpu (set-logical-cc-maybe): Delete.
5846 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5847 (data processing insns): Rewrite.
5848 * m32r.cpu (h-pc): Define.
5849 * fr30.cpu (h-pc): Define.
5850 * i960.cpu (h-pc): Define.
5851 * sparc.cpu (h-pc): Define.
5853 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5854 (s-parallel): Replace do {...} while (0) with {...}.
5855 (s-sequence): Ditto.
5857 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5859 (-gen-write-case,-gen-sem-case): Ditto.
5860 (-gen-sem-case): Only specify `written' if profiling or
5861 parallel-write-back.
5862 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5863 (-gen-sem-switch-fn): New proc.
5864 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5865 based on with-sem-switch option.
5866 * sid-decode.scm (-gen-decode-insn-globals): Only define
5867 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5868 addresses in idesc_table if !with-sem-switch.
5869 (-gen-sem-fn-decls): Rewrite.
5870 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5871 member based on with-sem-switch. Only define
5872 `idesc_table_initialized_p' member if with-sem-switch.
5873 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5874 * sid.scm (-with-sem-switch?): New variable.
5875 (option-init!): Initialize it.
5876 (option-set!): Set it.
5877 (with-sem-switch?): New proc.
5878 (-op-gen-set-trace): Only emit `written' reference if profiling.
5879 (sim-finish!): Use h_pc_set to set pc.
5881 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5883 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5884 All callers updated.
5885 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5887 * sid.scm (gen-argbuf-type): Delete.
5888 (-gen-argbuf-fields-union): Move to ...
5889 * sid-decode.scm: ... here.
5891 * read.scm (-reader-process-expanded-1): New proc.
5892 (-reader-process-expanded): Call it to catch nested begin's.
5893 (reader-process): Move `begin' handling to -reader-process-expanded.
5895 * insn.scm (-insn-read): Fix name of `format' spec.
5897 * pmacros.scm (.pmacro): New builtin.
5898 (scan-symbol): If procedure macro, return macro rather than its symbol.
5899 (check-macro): Don't do lookup, instead check if (car expr) is
5901 (scan-list): Handle .pmacro.
5902 (scan): No longer re-examine text for another macro invocation.
5903 (-pmacro-build-lambda): New proc.
5904 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5905 another, fetch the other's value (rather than doing it during
5908 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5910 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5911 * Makefile.in: Rebuild.
5913 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5914 (-fill-slot!): Simplify.
5915 (-build-slots): Simplify.
5917 * dev.scm (load-sid): Don't load sid-arch.scm.
5919 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5921 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5924 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5926 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5927 * decode.scm: ... here. New file.
5928 * sid-decode.scm: Use decoder computation code in decode.scm.
5929 * read.scm: Load decode.scm.
5931 * arm.cpu (arm710 model): Add u-exec function unit.
5932 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5933 Add get/set specs to redirect reg 15 to h-pc.
5934 (h-*): Indicate for both ARM and THUMB isas.
5935 (cbit,nbit,vbit,zbit): Ditto.
5936 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5937 (h-cpsr): Make virtual. Add get/set specs.
5938 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5939 (h-spsr): New virtual reg.
5940 * arm7.cpu (shift-type): New explicitly defined keyword.
5941 (h-operand2-shifttype): Use it.
5942 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5943 All callers updated. Don't set cbit.
5944 (logical-op): Add rm to ifield list. Change case to case:. Use
5945 shift-type enum as case choices. Set cbit.
5946 (and,orr,eor,add-imm): Uncomment out.
5947 (undefined): Temporarily comment out.
5948 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5949 (lda-pc,lda-sp): Ditto.
5950 (ldr-pc): Rename from ldr.
5951 (cbranch): Mark insns as being thumb insns.
5953 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5955 * cgen-sid.scm: Don't load sid-arch.scm.
5956 (sim-arguments): Delete unused entries.
5957 * sid-arch.scm: Delete.
5959 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5960 (<insn>,ifld-assertions): New member.
5961 (<insn>,make!): New arg ifld-assertions, all callers updated.
5962 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5963 (insn:fields): Delete.
5964 (-insn-parse): New arg ifld-assertions. All callers updated.
5965 (-insn-read,define-insn): New procs.
5966 (define-full-insn): New arg ifld-assertions. All callers updated.
5967 (insn-init!): New comment define-insn.
5969 * model.scm (-model-parse): Ensure at least one unit specified.
5971 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5972 (<c-expr-temp>,get-name): New method.
5973 (-rtx-make-current-closure,s-closure): New proc.
5974 (hw:): Wrap rtx indices in a closure.
5975 (-gen-case-prefix): New proc.
5977 * rtx-funcs.scm (case:): Fix call to s-case.
5978 (closure): New rtx func.
5980 * hardware.scm (<hardware-base>): New member isas-cache.
5981 (<hardware-base>,get-isas): New method.
5982 (hardware-builtin): Indicate for all isas.
5983 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5984 * mach.scm (current-arch-mach-name-list): Return list of names.
5985 (current-isa-mach-name-list): Ditto.
5986 (define-arch): Install builtin objects here.
5987 * read.scm (keep-atlist?): Only keep if both mach and isa are
5989 (keep-mach-atlist?): New proc.
5990 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5991 (reader-install-builtin!): Renamed from -install-builtin!.
5992 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5993 -gen-cpu-reg-access-defns. Rewrite.
5994 (gen-reg-access-defn): Delete.
5995 (-gen-hardware-struct): New proc.
5996 (-gen-hardware-types): Simplify. Add multiple-isa support.
5997 (gen-semantic-fn,-gen-all-semantics): Delete.
5998 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5999 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6000 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6001 Call sem-analyze-insns!.
6002 (cgen-semantics.cxx): Add multiple-isa support.
6003 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6004 (-gen-scache-decls,-gen-decode-fn): Ditto.
6005 (cgen-decode.h): Call sem-analyze-insns!.
6006 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6007 * sid.scm (-with-multiple-isa?): New variable.
6008 (option-init!): Initialize it.
6009 (option-set!): Set it.
6010 (with-multiple-isa?): New proc.
6011 (gen-cpu-ref): New arg isas. All callers updated.
6012 (gen-cpu-class): New proc.
6013 (*-get-macro,*-set-macro): Delete.
6014 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6015 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6016 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6017 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6018 (-sim-insns-analyzed): New global variable.
6019 (sim-init!): Reset it.
6020 (sim-analyze-insns!): New proc.
6021 (sim-analyze!): Don't do instruction analysis here.
6022 (sim-finish!): Specify isa of x-invalid insn.
6023 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6025 1999-03-22 Doug Evans <devans@casey.cygnus.com>
6027 * thumb.cpu (cpu,mach,model): Delete.
6028 (dntf): New pmacro. Use it for all field definitions.
6029 (dntop): New pmacro. Use it for all operand definitions.
6030 (asr): Correct field list.
6031 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6033 * utils-cgen.scm (define-getters): New macro to simplify
6034 writing class accessors.
6035 (define-setters): Ditto.
6036 (sanitize): Recognize isa elements.
6038 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6039 state-parallel-exec?.
6040 * sid-model.scm (*): Ditto.
6041 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
6042 state-decode-assist.
6044 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6045 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6046 * sim-decode.scm (-gen-decode-switch): Ditto.
6048 * sim-arch.scm (-regs-for-access-fns): Delete.
6049 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6050 (-gen-arch-reg-access-defns): Delete.
6052 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6053 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6054 with state-parallel=exec?.
6055 (cgen-*): Call sim-analyze-insns! here.
6056 * sim-decode.scm (cgen-*): Ditto.
6057 * sim-model.scm (cgen-*): Ditto.
6058 * sim.scm (-sim-insns-analyzed): New global variable.
6059 (sim-init!): Reset it.
6060 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
6061 already done the analysis.
6063 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6066 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6067 (arm arch): Update isa spec.
6068 (arm,thumb isas): Define.
6069 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6070 (arm7tdmi mach): Add isa spec.
6071 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
6072 `const' on word number.
6073 * fr30.cpu (fr30 arch): Update isa spec.
6075 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6077 * i960.cpu (i960 arch): Update isa spec.
6079 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6080 liw-insns,parallel-insns moved to isas spec.
6081 * m32r.cpu (m32r arch): Update isas spec.
6083 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6084 liw-insns,parallel-insns moved to isa spec.
6085 * sparc.cpu (sparc arch): Update isas spec.
6086 (sparc isa): Define.
6087 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6088 decode-assist moved to isa spec.
6089 * sparc64.cpu (sparc64 cpu): Ditto.
6090 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6091 * desc-cpu.scm (-gen-isa-table-defns): New proc.
6092 (-gen-mach-table-defns): Output mach table.
6093 (-gen-hash-defines): Delete insn size macros, except for
6095 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
6096 (cgen-desc.h): Define MAX_ISAS.
6097 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
6098 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
6099 (arch-* accessors): Renamed from arch:*. All callers updated.
6100 (current-arch-isa-name-list): New proc.
6101 (-arch-parse-isas): Renamed from -arch-parse-isa.
6102 (def-isa-attr!): Rewrite.
6103 (<iframe>): New class.
6104 (<itype>): New class.
6106 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6107 (isa-integral-insn?,isa-parallel-exec?): New procs.
6108 (-isa-parse,-isa-read,define-isa): New proc.
6109 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6110 liw-insns moved to <isa>.
6111 (cpu-* accessors): Renamed from cpu:*. All callers updated.
6112 (-cpu-parse,-cpu-read): Update.
6113 (state-*): Renamed from state:*. All callers updated.
6114 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6116 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6117 (state-decode-assist): New proc.
6118 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6119 (-adata-set-derived!): Rewrite.
6120 (adata-integral-insn?): Renamed from adata:integral-insn?. All
6122 (arch-init!): Add define-isa command.
6123 * read.scm (<reader>): Default keep-isa member to (all).
6124 (reader-* accessors): Renamed from reader:*. All callers updated.
6125 (-keep-isa-set!): Call string->symbol on isa name list.
6126 (keep-isa-validate!): Rewrite.
6127 (current-isa): New proc.
6128 (keep-isa?): Recognize "all".
6129 (-init-parse-cpu!): New arg keep-isa. All callers updated.
6130 Call -keep-isa-set!.
6131 (cmd-if): Recognize keep-isa?.
6132 (cpu-load): New arg keep-isa. All callers updated.
6133 (-opt-spec-update): New proc.
6134 (common-arguments): First arg is string, not symbol.
6135 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
6137 * rtl.scm (rtx-get): Default mode of string arg is INT.
6139 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
6141 * rtx-funcs.scm (join:): Pass cpu to handler.
6143 * configure.in (guile_include_dir): Delete.
6144 * configure: Rebuild.
6145 * Makefile.in: Rebuild.
6146 * doc/Makefile.in: Rebuild.
6148 * sid-cpu.scm (-extract-chunk-specs): New proc.
6149 (gen-define-fields): Use it.
6150 (-extract-chunk): New proc.
6151 (-gen-extract-beyond-var-list): Use it.
6152 (gen-extract-fields): Simplify.
6154 1999-03-22 Ben Elliston <bje@cygnus.com>
6156 * arm7.cpu (ldri-p): New instruction.
6157 (swi): Do not vector through 0x8 yet--there is nothing there.
6160 (all): Use (const x) in subreg expressions.
6162 1999-03-19 Ben Elliston <bje@cygnus.com>
6164 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6167 1999-03-17 Doug Evans <devans@casey.cygnus.com>
6169 * fr30.cpu (define-arch): Specify "forced" default-alignment.
6170 * mach.scm (-parse-alignment): Recognize "forced" alignment.
6171 * sim-cpu.scm (-extract-chunk-specs): New proc.
6172 (gen-define-fields): Use it.
6173 (-extract-chunk): New proc.
6174 (-gen-extract-beyond-var-list): Use it.
6175 (gen-extract-fields): Simplify.
6177 Port to guile 1.3.1.
6178 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6179 (LIBIBERTY): New var.
6180 (HOB_OBJS): Add cgen-gh.o.
6181 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6182 * Makefile.in: Rebuild.
6183 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6184 * config.in: Rebuild.
6185 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6186 libncurses, libtermcap.
6187 Add checks for needed functions in guile 1.2 not in guile 1.3,
6188 and vice versa. Add test for 3 argument scm_make_vector.
6189 * configure: Rebuild.
6190 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6191 definitions if guile doesn't have them.
6192 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6193 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
6194 with gh_vector_set_x.
6195 (cgh_qsort): Replace gh_list_length with gh_length.
6196 * cgen-gh.h: Add decls for added functions.
6197 (cgh_qsort): Don't declare if IN_HOBBIT.
6198 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
6199 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6200 scm_make_vector with gh_make_vector.
6201 * cos.scm: Use vector-length instead of length on vectors.
6202 * dev.scm (cload): Make varargs proc with keyword/value args.
6203 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
6204 provide version that works with guile 1.2 or 1.3.
6205 Include private copy of scmhob.h.
6206 * scmhob.h: New file. Keep our own copy for now.
6208 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
6210 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6212 (-rtx-traverse-operands): Dump cx temp stack if debugging.
6213 (-cx-temp-dump-stack): Pretty up output.
6215 * arm.cpu: comment out thumb.cpu until isa support ready.
6216 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6217 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6218 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6220 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6222 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6224 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6225 (<hw-address>,mode-ok?): unsigned/signed are compatible.
6227 * operand (op:new-mode): Improve error message.
6229 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
6230 * arm7.cpu: New file.
6232 1999-03-12 Ben Elliston <bje@cygnus.com>
6234 * arm.cpu: Lots of minor fixes after desk checking.
6236 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6238 * thumb.cpu: snapshot of current work
6240 * rtl.scm (rtx-get): Tweak error message.
6242 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6244 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6245 * Makefile.in: Rebuild.
6247 * cos.c (cos_vector_copy): New function.
6248 (_object_copy): Use it.
6250 * mode.scm (mode:eq?): Clean up.
6251 * rtl.scm (cx-new-mode): Copy attributes.
6252 (rtx-get): Don't make copy if <c-expr> with identical mode.
6254 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6256 (gr-names): h-gr register names moved here.
6258 (cr-names): h-cr register names moved here.
6260 (dr-names): h-dr register names moved here.
6262 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6263 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6264 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6266 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6268 (gr-names): h-gr register names moved here.
6270 (cr-names): h-cr register names moved here.
6272 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6273 (h-accums,h-psw): Ditto.
6274 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6276 (gr-names): h-gr register names moved here.
6277 (h-gr-indices): Delete.
6278 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6279 (sparc64 h-gr): Ditto.
6280 (h-y): Add get/set specs.
6282 (fp operands): Rewrite.
6283 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6284 (h-tbr,h-cwp,h-wim): Ditto.
6285 * sparc64.cpu (h-fpsr): Add get/set specs.
6286 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6287 (fp-ld-op): New arg `dest', all callers updated.
6288 (*): Replace `make-di' with `join'.
6290 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6292 (gen-semantic-code): Save/restore rtl generator state.
6293 (cgen-cpu.h): Call rtl-gen-init!.
6294 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6295 (-gen-ifld-extract-beyond): Ditto.
6296 (<multi-ifield>,gen-ifld-extract): Ditto.
6297 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6299 (-hw-gen-set-quiet-pc): Ditto.
6300 (<hw-pc>,gen-write): Ditto.
6301 (-hw-cxmake-get): Ditto. Call getter function if present.
6302 (<hw-register>,cxmake-get-raw): New method.
6303 (<hw-register>,gen-set-quiet-raw): New method.
6304 (-hw-gen-set-quiet): New arg `gstate'.
6305 (hw-fun-access?): Delete.
6306 (gen-reg-access-defn): Output function contents.
6307 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6309 (-gen-hw-index): Ditto.
6310 (op:read): Update gen-read invocation.
6311 (op:write): Update gen-write invocation.
6312 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6314 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6315 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6316 (<unit>,gen-profile-code): Update to sim.scm version.
6318 * sim-arch.scm (-regs-for-access-fns): New proc.
6319 (-biggest-reg-mode): New proc.
6320 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6321 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6322 virtual regs separately.
6323 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6325 (gen-semantic-code): Save/restore rtl generator state.
6326 (cgen-cpu.h): Call rtl-gen-init!.
6327 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6328 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6329 renamed to mach-bfd-name.
6330 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6331 (-gen-ifld-extract-beyond): Ditto.
6332 (<multi-ifield>,gen-ifld-extract): Ditto.
6333 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6334 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6335 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6337 (hw-fun-access?): Delete.
6338 (-hw-gen-set-quiet-pc): New arg `gstate'.
6339 (<hw-register>,gen-get-macro): Rewrite.
6340 (<hw-register>,gen-set-macro): Rewrite.
6341 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6342 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6343 (<hw-register>,cxmake-get-raw): New method.
6344 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6345 (<hw-register>,gen-set-quiet-raw): New method.
6346 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6348 (-gen-hw-index): Ditto.
6349 (<hw-index>): New arg `gstate'.
6350 (-gen-hw-selector): Update call to rtx-c.
6351 (<pc>): New arg `gstate'.
6352 (op:read): Update gen-read invocation.
6353 (op:write): Update gen-write invocation.
6354 (<operand>,cxmake-get): Handle raw-reg.
6355 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6356 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6357 (<operand>,gen-set-quiet): Handle raw-reg.
6358 (<operand>,gen-set-trace): Handle raw-reg.
6359 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6361 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6362 cgen_operand_type enum.
6363 (gen-operand-table): Add operand type enum. Replace pointer to
6364 hardware element with its enum. Null terminate table.
6365 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6366 Build operand table.
6367 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6368 * mach.scm (<arch-data>): New member `isas'.
6369 (adata-isas): New accessor.
6371 (isa-default-insn-word-bitsize): New accessor.
6372 (isa-enum): New proc.
6373 (current-arch-default-insn-word-bitsize): Delete.
6374 (current-isa-list,current-isa-lookup): New procs.
6375 (-arch-parse-isa): New proc.
6376 (-arch-parse): Rewrite.
6377 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6378 (define-arch): Define ISA attribute.
6379 (def-isa-attr!,isa-supports?): New procs.
6380 (<mach>): New member `isas'.
6381 (mach-isas): New accessor.
6382 (-mach-parse): New arg `isas', all callers updated.
6383 (-mach-read): Recognize `isas'.
6384 (arch-finish!): Rewrite.
6385 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6386 @arch@_cgen_get_{int,vma}_operand.
6387 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6388 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6389 of pointer to table entry.
6390 * opcodes.scm (gen-switch): Handle multiply defined operands.
6391 * operand.scm (op-sort): New proc.
6393 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6394 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6395 (hw-enum): Accept symbol argument.
6396 (hardware-builtin!): Delete attribute FUN-ACCESS.
6397 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6399 * attr.scm (atlist-source-form): New proc.
6400 (attr-builtin!): New attr `PRIVATE'.
6401 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6402 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6403 if they have `PRIVATE' attribute.
6404 (gen-hw-table-defns): Output definitions of explicitly defined
6406 * hardware.scm (<keyword>): New member print-name. Rename member
6407 `value' to `values', all uses updated.
6408 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6409 (keyword-parse): Rewrite.
6410 (-keyword-read): New proc.
6411 (define-keyword): New proc.
6412 (-hw-parse-keyword): New proc.
6413 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6415 (-hw-parse-values): Ditto.
6416 (-hw-parse-get,-hw-parse-set): Rewrite.
6417 (hardware-init!): Add new comment define-keyword.
6418 * mach.scm (<arch>): New member `kw-list'.
6419 (arch:kw-list,arch_set-kw-list!): New accessors.
6420 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6422 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6423 * mode.scm (mode-class-integral?): New proc.
6424 (mode-class-float?,mode-class-numeric?): New procs.
6425 (mode-integral?,mode-float?,mode-numeric?): New procs.
6426 (mode-compatible?): New proc.
6427 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6429 (<ifield>,gen-extract): Ditto.
6430 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6431 (<gstate>): New class.
6432 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6433 (gstate-context,gstate-set-context!): New accessors.
6434 (gstate-macro?,gstate-set-macro?!): New accessors.
6435 (gstate-make,gstate-copy): New procs.
6436 (-rtl-current-gstate): New global.
6437 (current-gstate-simulator?): New proc.
6438 (current-gstate-context,current-gstate-macro?): New procs.
6439 (current-gstate,current-gstate-set!): New procs.
6440 (rtl-gen-init!): Rewrite.
6441 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6442 (tstate-make): New arg `gstate', all callers updated.
6443 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6444 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6445 (tstate-gstate,tstate-set-gstate!): New accessors.
6446 (tstate-copy): New proc.
6447 (tstate-new-cond?,tstate-new-set?): Rewrite.
6448 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6449 (rtx-traverse): New arg `gstate', all callers updated.
6450 (rtx-strdump): New proc.
6451 (-simplify-for-compilation): New arg `gstate', all callers updated.
6452 (semantic-in-out-operands): Ditto.
6453 (semantic-attrs): Ditto.
6454 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6455 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6456 (rtx-value): Rewrite.
6457 (<c-expr>,gen-name): New method.
6458 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6459 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6460 (cx-new-mode): New proc.
6461 (-rtx-c-with-tstate): New proc.
6462 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6464 (-rtx-mode): Rewrite.
6465 (-rtx-mode-compatible?): New proc.
6466 (<c-expr-temp>): New member `value'.
6467 (cx-temp:value): New accessor.
6468 (<c-expr-temp>,make!): Override default method.
6469 (<c-expr-temp>,cxmake-get): Rewrite.
6470 (<c-expr-temp>,gen-set-quiet): Rewrite.
6471 (<c-expr-temp>,gen-set-trace): Rewrite.
6472 (gen-temp-defs): Use cx-temp:value.
6473 (record-temp!): New arg value, all callers updated.
6474 (cx-temp:cx:make): Delete.
6475 (-cx-temp-dump-stack): New proc.
6476 (rtx-get): New arg `gstate', all callers updated. Do mode
6477 compatibility checks. Ensure result has specified mode.
6478 (rtx-set-quiet): New arg `gstate', all callers updated.
6479 (rtx-set-trace): Ditto.
6480 (s-c-call): New arg `tstate', all callers updated.
6481 (s-c-raw-call): Ditto.
6482 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6483 (s-cmpop,s-if,e-if): Ditto.
6484 (s-subreg): New proc.
6485 (-par-new-temp!): New proc.
6486 (-par-next-temp!): Rewrite.
6487 (-par-replace-set-dests): Use -par-new-temp!.
6488 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6489 (s-sequence): Use -rtx-c-with-state.
6490 * rtx-funcs.scm (*): Update.
6491 (raw-reg:): New rtx function.
6493 (join:,subreg:): New rtx functions.
6495 * insn.scm (<insn>): New members pre-cond-trap, condition,
6496 post-cond-trap, compiled-condition.
6498 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6500 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6502 * utils-cgen.scm (parse-symbol): New proc.
6503 (parse-string): New proc.
6504 (gen-get-macro,gen-set-macro): New arg `index-args'.
6505 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6506 Prepend \ to newlines.
6508 * utils.scm (alist-remove-duplicates): Delete.
6510 * sid.scm (sim-init!): Delete private debugging code.
6512 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6514 * cgen-sid.scm: New file for C++ simulator application.
6515 * sid-arch.scm: Ditto.
6516 * sid-cpu.scm: Ditto.
6517 * sid-decode.scm: Ditto.
6518 * sid-model.scm: Ditto.
6520 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6522 1999-03-05 Ben Elliston <bje@cygnus.com>
6524 * arm.cpu: New file.
6526 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6528 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6529 * Makefile.in: Rebuild.
6531 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6532 (-attr-parse): Validate default value.
6534 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6535 (-CGEN-LANG-VERSION): Ditto.
6536 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6537 (<reader>): New member keep-isa plus accessors.
6538 (-keep-isa-set!,keep-isa-validate!): New procs.
6539 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6540 (common-arguments): New variable.
6541 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6542 (-debug-repl,continue): New procs.
6543 (-cgen,cgen): New procs.
6544 * cgen-gas.scm: Rewrite.
6545 * cgen-opc.scm: Rewrite.
6546 * cgen-sim.scm: Rewrite.
6547 * cgen-stest.scm: Rewrite.
6549 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6550 (gas-test-finish!): Call opcodes-finish!.
6551 (gas-test-analyze!): Call opcodes-analyze!.
6552 (<hw-asm>): New method test-data.
6553 (<operand>,testdata): Rewrite.
6554 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6555 (sim-test-finish!): Call opcodes-finish!.
6556 (sim-test-analyze!): Call opcodes-analyze!.
6557 (<hw-asm>): New method test-data.
6558 (<operand>,testdata): Rewrite.
6560 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6562 * fixup.scm (reverse!): Define if missing.
6563 * *.scm: Use reverse! instead of list-reverse!.
6565 * utils.scm (leading-id-char?): New proc.
6566 (id-char?): Rewrite.
6567 (chars-until-delimiter): New proc.
6568 * opc-itab.scm (extract-syntax-operands): Rewrite.
6569 (strip-mnemonic): Rewrite.
6570 (compute-syntax): Rewrite.
6572 * pmacros.scm (-pmacro-substr): New proc.
6573 (pmacros-init!): Add builtin .substr.
6575 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6577 * thumb.cpu: New file.
6579 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6581 * Makefile.am (CGENCFLAGS): New variable.
6582 (WITH_HOBBIT): Use automake conditional.
6583 (CGEN_HOB_SRC): New variable.
6584 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6585 (*.o): Compile with CGENCFLAGS.
6586 (cgen-hob.c): Simplify.
6587 (cgen-nohob.c): New rule.
6588 (hobbit): Renamed from hob.x.
6589 (CLEANFILES): Add cgen-nohob.c.
6590 * Makefile.in: Rebuild.
6591 * doc/Makefile.in: Rebuild.
6592 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6593 (WITH_HOBBIT): Use AM_CONDITIONAL.
6594 * configure: Rebuild.
6595 * aclocal.m4: Rebuild.
6597 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6598 with string-write-map.
6600 * sim-cpu.scm (hw-need-storage?): New proc.
6601 (-gen-hardware-types): Use it.
6602 (gen-parallel-exec-elm): Call op-save-index?.
6604 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6606 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6608 (-gen-ifld-extract-beyond): Ditto.
6609 (<integer>): Delete all references.
6610 (<sim-hardware>): Delete.
6611 (hw-profilable?): New proc.
6612 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6613 (<hw-register>): Rename method get-index-mode to save-index?.
6614 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6615 (<hw-register>,gen-sym-decl): Make virtual.
6616 (<hw-memory>,gen-sym-decl): Make virtual.
6617 (<hw-memory>): Rename method get-index-mode to save-index?.
6618 (<hw-address>,gen-sym-decl): Make virtual.
6619 (<operand>): New method save-index?.
6620 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6622 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6623 prefix added. All uses updated.
6625 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6626 rather than pointer to table entry.
6628 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6629 Remove all hw-asm,op-asm support.
6630 (-gen-parse-number,-gen-parse-address): New procs.
6631 (<keyword>,gen-parse): Redo function name computation.
6632 (<keyword>,gen-print): Ditto.
6633 (<operand>,gen-function-name): Rewrite.
6634 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6635 (opcodes-init!): Delete call to add-parser!.
6637 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6638 Define enum using hardware semantic name.
6639 (-gen-hw-decl,-gen-hw-defn): New procs.
6640 (gen-hw-table-decls): Use -gen-hw-decl.
6641 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6642 CGEN_HW_ENTRY structs.
6643 (gen-operand-table): Output hw's enum, not pointer to table entry.
6644 (-gen-cpu-open): Build table of selected hardware elements.
6646 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6647 (<hardware> support): Delete.
6648 (<hw-asm>): Delete, moved to hardware.scm.
6649 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6650 (<hw-asm>,gen-table-entry): New method.
6651 (<hw-asm>,parse!): Delete.
6652 (<keyword>,gen-table-entry): New method.
6653 (<keyword>,parse!): Delete.
6654 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6655 for gen-decl,gen-defn,gen-ref,gen-init.
6656 (desc-init!): Don't create parser for operand asm specs.
6658 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6659 * ifield.scm (<ifield>): New member `mode'.
6660 (<ifield>,make!): New arg `mode'.
6661 (ifld-mode): Rewrite.
6662 (ifld-hw-type): Rewrite.
6663 (<ifield>,min-value): Rewrite.
6664 (<ifield>,max-value): Rewrite.
6665 (-ifield-parse): New arg `mode'.
6666 (-ifield-read): Update.
6667 (define-full-ifield): New arg `mode'.
6668 (define-full-multi-ifield): Ditto.
6669 (-multi-ifield-parse): Ditto.
6670 (-multi-ifield-read): Update.
6671 (define-full-multi-ifield): New arg `mode'.
6672 (ifield-builtin!): Update definition of f-nil.
6673 * simplify.inc (define-normal-ifield): Update call to
6675 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6676 (define-normal-hardware): Delete arg asm. New args indices, values,
6677 handlers. Update call to define-full-hardware.
6678 (define-simple-hardware,dsh): New pmacros.
6679 (define-normal-operand): Update call to define-full-operand.
6680 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6681 Specify INT/UINT mode instead.
6682 (h-gr,h-cr): Use "indices" instead of "asm".
6683 (h-dr,h-ps): Update keyword syntax.
6684 (h-r13,h-r14,h-r15): Ditto.
6685 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6686 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6687 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6688 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6689 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6690 Specify INT/UINT mode instead.
6691 (h-gr): Use "indices" instead of "asm".
6692 (h-cc): Update keyword syntax.
6693 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6694 Specify INT/UINT mode instead.
6695 (h-hi16,h-slo16,h-ulo16): Update.
6696 (h-gr,h-cr): Use "indices" instead of "asm".
6697 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6698 (h-accums): Update keyword syntax.
6699 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6700 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6701 Specify INT/UINT mode instead.
6702 (h-gr-indices): New pmacro.
6703 (h-gr32,h-gr64): Split up from h-gr.
6704 (h-a): Update type spec. Use values instead of asm spec.
6705 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6706 (h-y,h-annul-p): Ditto.
6707 (h-asr): Update keyword spec.
6708 (h-lo10,h-lo13,h-hi22): Update.
6709 (get-freg-spec,set-freg-spec): New pmacros.
6710 (h-fr32,h-fr64): Split up from h-fr.
6711 (rdd): Comment out get/set specs.
6712 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6713 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6714 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6715 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6716 UNSIGNED. Specify INT/UINT mode instead.
6717 (h-*): Use dsh instead of dnh where appropriate.
6718 (h-ixcc): Update type spec. Use "values" instead of "asm".
6719 (h-p,h-membarmask): Ditto.
6720 (membarmask): Use "handlers" instead of "asm".
6722 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6723 values,handlers,getters,setters plus accessors.
6724 (hw-mode-ok?,hw-default-mode): New procs.
6725 (<hardware-base>): Rename method new-mode to mode-ok?
6726 (<hardware-base>): New method get-index-mode.
6727 (hw-index-mode): New proc.
6728 (pc?): Delete, moved to operand.scm.
6729 (address?): New proc.
6730 (<hardware>): Delete.
6731 (<hw-asm>): Definition moved here from desc.scm.
6732 (keyword-parse): New proc.
6733 (hardware-parsers): Delete.
6734 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6735 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6736 (-hw-parse-get,-hw-parse-set): New procs.
6737 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6738 indices,values,handlers,get,set. Rewrite.
6739 (-hw-read-extra): Delete.
6741 (define-hardware): Don't add object if not selected.
6742 (define-full-hardware): Ditto.
6743 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6744 (<hw-register>): Member `type' moved to baseclass. Delete member
6746 (<hw-register>,parse!): Rewrite.
6747 (<hw-register>): Delete methods get-rank,get-mode.
6748 (<hw-register>): Method new-mode renamed to mode-ok?
6749 (<hw-register>): New method get-index-mode.
6750 (<hw-pc>,parse!): Rewrite.
6751 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6752 (<hw-memory>,parse!): Rewrite.
6753 (<hw-memory>): Delete methods get-rank,get-mode.
6754 (<hw-memory>): Method new-mode renamed to mode-ok?
6755 (<hw-memory>): New method get-index-mode.
6756 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6758 (<hw-immediate>,parse!): Rewrite.
6759 (<hw-immediate>): Delete methods get-rank,get-mode.
6760 (<hw-immediate>): Method new-mode renamed to mode-ok?
6761 (<hw-address>): Delete member hw-asm.
6762 (<hw-address>,parse!): Rewrite.
6763 (<hw-address>): Delete methods get-rank,get-mode.
6764 (<hw-address>): Method new-mode renamed to mode-ok?
6765 (hw-profilable?): Delete.
6766 (hardware-init!): Delete hardware-parsers reference.
6767 Update argument specs of command define-full-hardware.
6768 (hardware-builtin!): Update definitions of hardware builtins.
6769 * operand.scm (<operand>): New members hw-name,mode-name.
6770 Delete member op-asm. New member handlers.
6771 (<operand>,make!): Update.
6772 (op:hw-name,op:mode-name,op:handlers): New procs.
6775 (<operand>): New method get-index-mode.
6776 (<pc>,make!): Update.
6777 (op:new-mode): Rewrite.
6778 (operand-parsers): Delete.
6779 (-operand-parse): Rewrite. Return #f if insn not selected.
6780 (-op-read-extra): Delete.
6781 (-operand-read): Update.
6782 (define-operand,define-full-operand): Update.
6783 (operand-init!): Delete operand-parsers reference.
6784 Update syntax of define-full-operand command.
6786 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6787 (define-full-insn): Update.
6788 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6789 (define-full-minsn): Update.
6791 * mode.scm (<mode>): New member class.
6792 (mode:class): New proc.
6794 (-mode-parse): New arg class.
6795 (define-full-mode): Update.
6796 (mode-find): Rewrite.
6797 (mode-make-int,mode-make-uint): New procs.
6798 (mode-init!): Update syntax of define-full-mode command.
6799 (mode-builtin!): Update definitions of builtin modes.
6801 * model.scm (<profile>): Delete.
6803 * read.scm (keep-atlist?): New proc.
6804 (keep-multiple?): New proc.
6805 (<parser-list>): Delete.
6806 (add-parser!,parse-spec!): Delete.
6808 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6809 (def-rtx-syntax-node): Ditto.
6810 (-rtx-traverse-debug?): New variable.
6811 (tstate-make): New proc.
6812 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6813 (tstate-new-cond?,tstate-new-set?): New procs.
6814 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6815 tstate. All callers updated.
6816 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6817 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6818 (-build-operand!): Replace arg cond? with tstate.
6819 (-build-reg-operand!,-build-mem-operand!): Ditto.
6820 (-build-index-of-operand!): Update making of <operand> object.
6821 (s-ifield): New arg tstate. All callers updated.
6822 (hw:): New arg tstate. All callers updated. Replace call to
6823 current-hw-lookup with current-hw-sem-lookup-1.
6824 (s-index-of): New arg tstate. All callers updated.
6826 (-rtx-use-sem-fn?): New proc.
6827 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6829 (s-convop): Only use semantic mode when using semantic cover fns.
6830 (s-cmpop): Call -rtx-use-sem-fn?.
6831 (s-cond,s-case): New arg tstate. All callers updated.
6832 (s-parallel,s-sequence): Ditto.
6834 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6836 * types.scm (<scalar>): Rewrite implementation.
6837 (<integer>): Delete.
6838 (parse-type): Rewrite.
6840 * utils-cgen.scm (parse-handlers): New proc.
6842 * utils.scm (!=): New proc.
6844 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6846 * pmacros.scm (-pmacro-expand): Fix typo.
6848 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6850 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6851 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6852 * i960.cpu (build-hex2): New pmacro.
6853 (insn-opcode): Simplify.
6854 (insn-opcode2): Ditto.
6856 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6857 * cgen-stest.scm (catch-with-backtrace): Ditto.
6859 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6861 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6862 All callers updated.
6863 (-pmacro-invoke): New proc.
6864 (-pmacro-sym,-pmacro-str): New procs.
6865 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6866 (pmacros-init!): Install builtins .iota, .map, .apply.
6867 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6868 (h-fr): Simplify register name spec.
6869 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6870 * utils.scm (num-args-ok?): New proc.
6872 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6874 * pmacros.scm (-pmacro-error): New proc.
6875 (-pmacro-expand): Use it.
6876 (-pmacro-splice): New proc.
6877 (pmacros-init!): Install new builtin .splice.
6879 * sparc.cpu: Include sparc64.cpu when appropriate.
6880 (f-mmask,f-simm11): Moved to sparc64.cpu.
6881 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6882 (ANNUL attribute): Delete.
6883 (test-* pmacros): New arg cc, all callers updated.
6884 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6885 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6887 (ldstub,swap): Moved to sparccom.cpu.
6888 * sparc64.cpu: Add more insns.
6890 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6892 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6894 (cgen-sem-switch.c): Ditto.
6895 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6896 moved to cgen-engine.h.
6897 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6898 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6899 global. Cache attributes and insn length in IDESC.
6900 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6901 @cpu@_opcode renamed to @cpu@_get_idata.
6902 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6903 done later underneath sim_resume.
6904 (@mach@_mach): Record @cpu@_prepare_run.
6905 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6907 (-hw-gen-set-quiet-pc): Ditto.
6908 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6909 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6910 (<hw-addr>,cxmake-get): Ditto.
6911 (<hw-iaddr>,cxmake-get): Ditto.
6912 (<pc>,cxmake-get): Ditto.
6913 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6914 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6915 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6916 (<hw-pc>,gen-write): Use hw-selector-default.
6917 (<hw-register>,gen-write): Ditto.
6918 (<hw-memory>,gen-write): Ditto.
6919 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6920 (-gen-hw-selector): New proc.
6922 * desc.scm: New file.
6923 * desc-cpu.scm: New file.
6924 * opcodes.scm: Split up into several smaller files.
6925 * opc-asmdis.scm: New file.
6926 * opc-ibld.scm: New file.
6927 * opc-itab.scm: New file.
6928 * opc-opinst.scm: New file.
6929 * Makefile.am (desc): New target.
6930 (opcodes): Update args to cgen-opc.scm.
6931 * Makefile.in: Rebuild.
6932 * aclocal.m4: Rebuild.
6933 * config.in: Rebuild.
6934 * configure.in: Update arg to AC_INIT.
6935 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6936 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6938 * configure: Rebuild.
6939 * cgen-gas.scm: Update files to load.
6940 * cgen-opc.scm: Ditto. Reorganize option letters.
6941 * cgen-sim.scm: Update files to load.
6942 * cgen-stest.scm: Ditto.
6943 * dev.scm (cload): New app "DESC".
6944 (load-opc): Update files to load.
6945 (load-gtest,load-sim,load-stest): Ditto.
6947 * attr.scm (bool-attr?): New proc.
6948 (attr-list-enum-list): New proc.
6949 (-attr-sort): Rewrite.
6950 (attr-builtin!): Give ALIAS attribute a fixed index.
6951 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6952 calculate attribute enum list.
6953 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6955 * insn.scm (-insn-parse): Renamed from parse-insn.
6957 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6960 * mode.scm (-mode-parse): Renamed from parse-mode.
6962 * operand.scm (<operand>): New member `selector'.
6963 (<operand>,make!): Use default selector.
6964 (hw-selector-default): New variable.
6965 (hw-selector-default?): New proc.
6967 * pmacros.scm (pmacros-init!): New proc.
6968 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6969 (-env-set!): Delete.
6970 (-pmacro-expand): New proc apply-macro.
6971 Use it in scan-list,scan. Scan list first, then see if macro
6973 (define-pmacro): Rewrite.
6974 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6976 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6977 selected if (current-mach) seen.
6978 (rtx?): Renamed from rtx-uneval?, all callers updated.
6979 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6981 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6982 selector, all callers updated.
6983 (hw:): New arg selector, all callers updated. Delete old comments
6985 (reg:,mem:): Handle selectors
6986 * rtx-funcs.scm (reg:): Handle selectors.
6988 * read.scm: Renamed from cpu.scm.
6989 (<command>): New class.
6990 (<reader>): New member commands.
6991 (reader-add-command!): New proc.
6992 (reader-lookup-command): New proc.
6993 (reader-error,-reader-process-expanded,reader-process): New procs.
6994 (reader-read-file!): New proc.
6995 (include): Call reader-read-file!.
6997 (cpu-load): Call reader-read-file!.
6998 * utils.scm (num-args): New proc.
6999 * simplify.inc: New file.
7000 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
7001 procs. Move define-normal-foo procs (and abbreviated forms) to
7002 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
7004 * fr30.cpu: Include simplify.inc.
7005 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7006 * i960.cpu: Include simplify.inc.
7007 * m32r.cpu: Include simplify.inc.
7008 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7009 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7010 * sparc.cpu: Include simplify.inc.
7011 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7012 * utils-cgen.scm (parse-error): Moved to read.scm.
7013 (sanitize): Rewrite.
7014 (utils-init!): New proc.
7016 1999-02-02 Doug Evans <devans@casey.cygnus.com>
7018 * sparc.cpu: New file.
7019 * sparc32.cpu: New file.
7020 * sparc64.cpu: New file.
7021 * sparccom.cpu: New file.
7022 * sparc.opc: New file.
7024 1999-01-27 Frank Eigler <fche@cygnus.com>
7026 * utils.scm (gen-copyright): New proc.
7028 1999-01-27 Doug Evans <devans@casey.cygnus.com>
7030 Parameterize rtl parsing, rather than having lots of little handlers.
7031 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7032 Delete member traverse.
7033 (rtx:set-traverse!): Delete.
7034 (-rtx-valid-types,-rtx-valid-matches): New variables.
7035 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7036 instead of expression. All callers updated.
7037 (def-rtx-node): New args arg-types,arg-modes.
7038 (def-rtx-syntax-node): Ditto.
7039 (def-rtx-dual-mode): Ditto.
7040 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7041 All callers updated.
7042 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7043 All callers updated.
7044 (rtx-macro-expand): New proc.
7045 (-rtx-traverse-check-args): Delete.
7046 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7047 an rtx specific traverser.
7048 (-rtx-any-mode?,-rtx-symornum?): New procs.
7049 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7050 (-rtx-traverse-no-mode): Delete.
7051 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7052 (-rtx-traverse-operands): Rewrite.
7053 (-rtx-traverse-expr): Rewrite.
7054 (rtx-traverse): Don't expand macros here, leave for caller to do.
7055 (rtx-simplify): Delete.
7056 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
7058 (rtx-true?,rtx-false?): Ditto.
7059 (-rtx-ref-type): Set dest is operand 1 now.
7060 (-simplify-for-compilation): New proc.
7061 (semantic-in-out-operands): Recognize regno as an alias for index-of.
7062 Expand macros before calling rtx-traverse. Sort operands by name
7063 to avoid unnecessary semantic formats.
7064 (semantic-attrs): New proc.
7065 (rtx-uneval?): Handle (<rtx-func> ...).
7066 (s-boolifop): Delete arg mode. All callers updated.
7067 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7068 (eq-attr): New arg obj.
7070 * m32r.cpu (rach): Update calls to andif.
7072 * minsn.scm (-minsn-parse-expansion): Renamed from
7073 parse-minsn-expansion.
7074 (-minsn-parse): Renamed from parse-minsn.
7075 (-minsn-read): Renamed from read-minsn.
7076 (def-minsn): Don't check APPLICATION here.
7077 (def-full-minsn): New proc.
7078 (define-macro-insn): Check APPLICATION here. Expand macros.
7079 (define-normal-macro-insn): Ditto.
7081 * utils.scm (word-value): New arg start-lsb?.
7082 (word-mask,word-extract): Ditto.
7083 (split-bits,powers-of-2): Use integer-expt instead of expt.
7084 (bit-set?): Handle 32 bit values (which are bignums).
7085 (cg-logand,cg-logxor): New functions.
7086 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7087 (<ifield>,field-value): Update call to word-value.
7088 (<ifield>,min-value): Use integer-expt instead of expt.
7089 (<ifield>,max-value): Ditto.
7091 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7093 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7095 Compute raw instruction format in addition to semantic based format.
7096 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7097 (<iformat> accessors): Rename accessors to ifmt-*.
7098 (<sformat>): New class.
7099 (fmt-enum): Renamed from fmt:enum.
7100 (-ifmt-search-key): Rewrite.
7101 (-sfmt-search-key): New proc.
7102 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7103 Compute iformat and sformat search keys.
7104 (ifmt-build): Update.
7105 (sfmt-build): New proc.
7106 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7107 (ifmt-compute!): Compute instruction format <iformat> based on
7108 instruction fields alone. Compute new semantic format <sformat>
7109 based on instruction fields and semantic information.
7110 (ifmt:lookup): Delete.
7111 * mach.scm (<arch>): New member sfmt-list, plus accessors.
7112 (current-sfmt-list): New proc.
7113 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7114 Rename member fmt to ifmt. New members fmt-desc, sfmt.
7115 (insn-length,insn-length-bytes): Update.
7116 (insn:mask-length,insn:mask): Update.
7117 (insn-lookup-op): Update.
7118 * gas-test.scm (gas-test-analyze!): Update.
7119 (gen-gas-test): Ditto.
7120 * sim-test.scm (sim-test-analyze!): Update.
7121 (gen-sim-test): Ditto.
7122 * opcodes.scm (gen-operand-instance-table): Update.
7123 (gen-operand-instance-ref): Ditto.
7124 (max-operand-instances): Use heuristic if semantics not parsed.
7125 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7126 (opcodes-analyze!): Only scan semantics of building operand instance
7128 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7129 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7130 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7131 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7132 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7133 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7134 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7136 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7137 New arg lsb0? All callers updated.
7138 (decode-bits): New arg lsb0?. All callers updated.
7139 (opcode-slots): Update call to bit-set?. Call integer-expt instead
7141 (-gen-decode-bits): New arg lsb0?. All callers updated.
7142 (build-slots): Call integer-expt instead of expt.
7143 (build-decode-table-entry): Handle crossing word boundaries better.
7144 (-gen-decode-switch): New arg lsb0?. All callers updated.
7145 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7147 * enum.scm (define-enum): Rewrite.
7148 (define-normal-enum): Ditto.
7149 (def-full-insn-enum): New proc.
7150 (define-normal-insn-enum): Rewrite.
7152 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7154 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7156 * dev.scm: Add sid support.
7158 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7159 (CLEANFILES): Add tmp-*.
7160 * Makefile.in: Rebuild.
7162 * doc/Makefile.am: New file.
7163 * doc/Makefile.in: New file.
7164 * doc/cgen.texi: New file.
7165 * Makefile.am (SUBDIRS): Define.
7166 * Makefile.in: Rebuild.
7167 * configure.in: Create doc/Makefile.
7168 * configure: Rebuild.
7170 1999-01-18 Doug Evans <devans@casey.cygnus.com>
7172 * insn.scm (insn:syn): Delete.
7174 1999-01-15 Doug Evans <devans@casey.cygnus.com>
7176 * fr30.cpu (model fr30-1): Add state variables load-regs,
7177 load-regs-pending. Delete h-gr. Clean up operand names of all units.
7178 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7179 (model m32rx): Ditto.
7180 (addi): Simplify function unit usage spec.
7181 (ld-plus): Rewrite operand names in function unit usage spec.
7182 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7183 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7184 overridden. Allow operand to appear in input and output spec.
7185 (<insn>,gen-profile-code): string-append -> string-list.
7187 * ifield.scm (define-ifield): Call pmacro-expand.
7188 (define-full-ifield,define-normal-ifield): Ditto.
7189 (define-multi-ifield,define-normal-multi-ifield): Ditto.
7191 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7192 with-scache and without-scache cases.
7194 1999-01-14 Doug Evans <devans@casey.cygnus.com>
7196 * fr30.cpu (fr30-1): Add state variable h-gr.
7197 Add units u-cti, u-load, u-store, u-ldm, u-stm.
7198 (all insns): First pass at providing cycle counts.
7199 * sim.scm (<unit>,gen-profile-code): Only check for output operands
7200 when initializing unit output operands, ditto for input operands.
7202 * insn.scm (insn-length,insn-length-bytes): New procs.
7203 * mach.scm (-adata-set-derived!): Use them.
7204 * sim-cpu.scm (-gen-sem-case): Ditto.
7206 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7207 (-gen-write-case): Ditto.
7208 (gen-semantic-fn): Ditto. Split into two:
7209 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
7211 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
7212 scache/no-scache appropriately. All callers updated.
7213 (-gen-sem-case): PCADDR->IADDR.
7214 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7216 * sim-decode.scm (*): Replace string-append,string-map with
7217 string-list,string-list-map where the result is sufficiently large.
7218 (-gen-decode-insn-table): Go back to simple version for non-scache
7219 case: just record IDESC in decoder tables and leave field extraction
7221 (-gen-decode-switch): Ditto.
7222 (-gen-decode-fn): Ditto.
7223 (-gen-extract-decls): Only emit format enum if with-scache?.
7224 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7226 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7227 (-gen-insn-timing): Ditto.
7228 * sim.scm (gen-argbuf-type): Only output sem_fields union in
7231 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7232 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7234 1999-01-12 Doug Evans <devans@casey.cygnus.com>
7236 * cpu.scm (keep-mach-validate!): New proc.
7237 (include): New proc.
7239 * mach.scm (current-arch-mach-name-list): New proc.
7240 (-parse-arch-machs): Always return canonical form.
7241 (def-arch): Validate user specified machs to be kept.
7242 (def-mach-attr!): Simplify.
7244 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7245 (option-init!): Initialize it.
7246 (option-set!): Set it.
7247 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7248 output operand instance tables.
7249 (cgen-opc.in): Only output operand instance tables if asked to.
7251 * sim.scm (option-init!,option-set!): Clarify returned value.
7253 * sim.scm (gen-mach-bfd-name): Move from here.
7254 * utils-cgen.scm: To here.
7256 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7258 * fr30.cpu (ilm): Fix comment field.
7259 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7262 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7263 (rtx-true?, rtx-false?): New procs.
7264 * rtx-funcs.scm (annul): Rename vpc to pc.
7265 (-rtx-traverse-if): Improve determination of whether then/else parts
7266 are conditionally executed.
7268 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7270 (gen-argbuf-type): Simplify generated definition (big sem_fields
7271 union moved outside).
7273 1999-01-11 Ben Elliston <bje@cygnus.com>
7275 * doc/porting.texi: New file.
7277 * doc/intro.texi: New file.
7278 (Layout): Use @example to insert preformatted ASCII text (such as
7279 diagrams). @code is inappropriate here.
7281 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7283 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7285 * m32r.opc (print_hash): Cast dis_info.
7287 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7288 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7291 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7293 * i960.cpu (f-br-disp): Remove RELOC attribute.
7294 (f-ctrl-disp): Ditto.
7295 (callx-disp): set-quiet -> set for (reg h-gr 2).
7296 (callx-indirect,callx-indirect-offset): Ditto.
7298 * Makefile.am (gas-test): Fix dependencies.
7299 * Makefile.in: Rebuild.
7300 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7301 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7302 (gas-test-analyze!): Use syntax-break-out.
7303 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7304 (sim-test-analyze!): Use syntax-break-out.
7305 (cgen-build.sh): Use gen-file-name.
7306 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7307 * insn.scm (syntax-break-out): New proc.
7308 * utils.scm (gen-file-name): New proc.
7310 * fixup.scm (nil,<?,<=?,>?): Delete.
7312 * utils.scm (count-true): Rewrite.
7314 * slib/sort.scm: Move sort.scm to slib directory.
7317 * iformat.scm (ifmt-compute!): Record empty format.
7319 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7320 internal procs outside. Handle expression register numbers.
7323 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7325 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7327 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7328 (gen-semantic-fn,-gen-sem-case): Ditto.
7329 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7330 (cgen-semantics.c): Ditto.
7331 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7332 (gen-ifmt-argvars-defns): New proc.
7333 (gen-ifmt-argvars-assigns): New proc.
7334 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7335 (-gen-decode-fn): Handle non-with-scache case.
7336 (cgen-decode.c): Define WANT_CPU to @cpu@.
7337 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7338 (cgen-model.c): Define WANT_CPU to @cpu@.
7339 * sim.scm (gen-ifld-extract-argvar): New proc.
7340 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7341 with FUN-ACCESS specified.
7342 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7343 (<hw-register>,gen-extract): New arg local?.
7344 (<hw-address>,gen-extract): Ditto.
7345 (-hw-cxmake-get): Handle non-with-scache case.
7346 (-hw-gen-set-quiet): Ditto.
7347 (<hw-address>,cxmake-get): Handle non-with-scache case.
7348 (gen-op-extract-argvar): New proc.
7349 (<operand>,gen-record-profile): Rewrite.
7350 (<operand>,gen-profile-code): Rewrite.
7351 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7352 (gen-argbuf-fields-union): New proc.
7353 (gen-argbuf-type): Use it. Handle non-scache case.
7355 * *.scm: class:foo procs renamed to class-foo.
7356 * attr.scm (<attribute>): New member `for'.
7357 (-attr-parse): New first value in list for default if
7359 (non-bool-attr-list,attr:add!): Delete.
7360 (def-attr): Use current-attr-add!.
7361 (atlist-attr-value-no-default): New proc.
7362 (attr-lookup-default): Handle boolean attributes.
7363 (gen-attr-enum): New proc.
7364 (-attr-remove-meta-attrs-alist): New proc.
7365 (attr-nub): New proc.
7366 (current-attr-list-for): New proc.
7367 (current-{ifld,hw,op,insn}-attr-list): New procs.
7368 (attr-builtin!): New proc.
7369 * cpu.scm (keep-obj?): Rewrite.
7370 (-init-parse-cpu!): Call arch-init!.
7371 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7372 (-finish-parse-cpu!): Call arch-finish!.
7373 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7374 (def-enum,def-full-enum): Use current-enum-add!.
7375 (gen-obj-list-enums): New proc.
7376 * hardware.scm (hw:add!,hw:lookup): Delete.
7377 (def-hardware,def-hardware-ext): Use current-hw-add!.
7378 (hw:std-attrs,hw:attr-list): Delete.
7379 (hardware-builtin!): Define builtin hardware attributes.
7380 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7381 (def-ifield,def-full-ifield): Use current-ifld-add!.
7382 (ifld:std-attrs,ifld:attr-list): Delete.
7383 (ifield-builtin!): New proc.
7384 * insn.scm (insn:add!,insn:lookup): Delete.
7385 (def-full-insn): Use current-insn-add!.
7386 (insn:std-attrs): Delete.
7387 (insn-builtin!): New proc.
7388 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7390 (<arch-data>): New member machs.
7391 (current-attr-list,current-enum-list): New procs.
7392 (current-op-list,current-minsn-list): New procs.
7393 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7394 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7396 (-parse-arch-machs): New proc.
7397 (-arch-parse): New arg machs, all callers updated.
7398 (-arch-read): Handle machs spec.
7399 (def-arch): Define MACH attribute here.
7400 (mach-init!,mach-finish!): Not here.
7401 (cpu:add!,cpu:lookup): Delete.
7402 (def-cpu): Use current-cpu-add!.
7403 (<mach>): New member bfd-name.
7404 (-mach-parse): New arg bfd-name, all callers updated.
7405 (-mach-read): Handle bfd-name spec.
7406 (mach:add!,mach:lookup): Delete.
7407 (def-mach): Use current-mach-add!.
7408 (def-mach-attr!): New proc.
7409 (arch-init!): New proc.
7410 (arch-finish!): New proc. Reverse all object lists here.
7411 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7412 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7413 (define-normal-macro-insn): Ignore minsn if mach not kept.
7414 * mode.scm (mode-builtin!): New proc.
7415 * model.scm (model:add!,model:lookup): Delete.
7416 (def-model): Use current-model-add!.
7417 * opcodes.scm (insn:attr-list): Delete.
7418 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7419 (gen-attr-table-defn): Emit value for default.
7420 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7421 (op:attr-list): Delete.
7422 (gen-operand-decls,gen-insn-decls): New proc.
7423 (compute-insn-attr-list): Delete.
7424 (cgen-opc.h): Reorganize and simplify.
7425 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7426 (def-operand,def-full-operand): Use current-op-add!.
7427 (op:std-attrs): Delete.
7428 (operand-enum): Delete.
7429 (operand-builtin!): Define builtin operand attrs.
7430 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7431 (gen-attr-enum-decl): Use gen-obj-list-enums.
7432 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7434 * fr30.cpu (define-arch): Add machs spec.
7435 (f-i4): SIGNED attribute -> !UNSIGNED.
7436 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7437 (HASH-PREFIX): Define operand attribute.
7438 (NOT-IN-DELAY-SLOT): Define insn attribute.
7439 * i960.cpu (define-arch): Add machs spec.
7440 * m32r.cpu (define-arch): Add machs spec.
7441 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7442 (HASH-PREFIX): Define operand attribute.
7443 (FILL-SLOT): Define insn attribute.
7445 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7447 * fr30.cpu (stilm): Correct mask for and operation.
7449 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7451 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7452 Replace START/EXIT with start/pass.
7453 (gen-sim-test): Delete ".text".
7455 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7457 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7459 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7461 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7462 (h-sbit): Make it FUN-ACCESS.
7463 (h-gr): Reorder so that general regs are always printed by number.
7465 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7467 * i960.cpu (flushreg): Use nop.
7469 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7471 * m32r.cpu (default-alignment): Specify.
7472 * mach.scm (<arch-data>): New member default-alignment.
7473 (adata:default-alignment): New proc.
7474 (current-arch-default-alignment): New proc.
7475 (-arch-parse): New arg default-alignment.
7476 (parse-alignment): New proc.
7477 (-arch-read): Handle default-alignment spec.
7479 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7481 * insn.scm (f-%): Delete.
7482 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7483 be readded if proved useful.
7484 (gen-extract-fields): Ditto. Use gen-ifetch.
7485 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7486 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7488 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7490 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7492 1998-12-14 Dave Brolley <brolley@cygnus.com>
7494 * fr30.cpu: Remove stub macros.
7495 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7496 (div2): Don't use addc/subc.
7498 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7500 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7503 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7505 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7507 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7509 * cpu.scm (keep-all?): New proc.
7510 (assert-keep-all): Use it.
7511 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7512 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7513 Check for spelling errors.
7515 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7517 * rtl.scm (s-convop): Call -rtx-sem-mode.
7519 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7521 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7522 (-parse-hw-profile): Ditto.
7523 (<hw-register>, parse!): Return `void' result.
7524 (<hw-pc>, parse!): Ditto.
7525 (<hw-memory>, parse!): Ditto.
7526 (<hw-immediate>, parse!): Ditto.
7527 (<hw-address>, parse!): Ditto.
7529 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7530 (-ifld-parse-encode-decode): New proc.
7531 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7532 (-multi-ifield-parse): Set encode/decode to #f.
7533 (ifld:decode-mode): New proc.
7534 * utils.scm (nub): Rewrite.
7535 * operand.scm (op-nub): Rewrite.
7536 * sim.scm (<ifield>, gen-type): Rewrite.
7537 (-gen-ifld-argbuf-defn): New proc.
7538 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7539 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7540 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7541 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7542 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7543 New method gen-trace-extract.
7544 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7545 from gen-argbuf-elm, return "" if not caching register address.
7546 Rewrite gen-extract. New method gen-trace-extract.
7547 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7548 gen-extract, gen-trace-extract, cxmake-get.
7549 (<hw-iaddress>): New method cxmake-get.
7550 (op-needed-iflds): New proc.
7551 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7552 (-gen-op-argbuf-defn): New proc.
7553 (gen-op-extract): Renamed from op:extract.
7554 (gen-op-trace-extract): Renamed from op:trace-extract.
7555 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7557 (gen-argbuf-elm): Rewrite.
7558 * sim-decode.scm (-gen-record-args): Update.
7560 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7562 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7563 argument position. Flag symbolic macros in function position as
7565 (define-pmacro): Handle quoting in definition of symbolic macros.
7566 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7568 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7570 * fr30.opc (parse_register_list): Account for reverse masks
7572 (print_register_list): Ditto.
7573 (parse_low_register_list_ld): New function.
7574 (parse_hi_register_list_ld): New function.
7575 (parse_low_register_list_st): New function.
7576 (parse_hi_register_list_st): New function.
7577 (print_hi_register_list_ld): New function.
7578 (print_hi_register_list_st): New function.
7579 (print_low_register_list_ld): New function.
7580 (print_low_register_list_st): New function.
7581 * fr30.cpu (ldr15dr): Implement workaround.
7582 (ldm0,ldm1,stm0,stm1): Implemented.
7584 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7586 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7587 * configure: Regenerate.
7588 * Makefile.am (WITH_HOBBIT): Update.
7589 (cgen-hob.c): Remove Makefile dependency.
7590 (cgen.o): Depend on cgen-gh.h, config.h.
7591 * Makefile.in: Regenerate.
7592 * aclocal.m4: Regenerate.
7594 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7596 * i960.cpu, i960.opc: New files.
7598 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7600 * fr30.opc (parse_register_number): New function.
7601 (parse_register_list): New function.
7602 (parse_low_register_list): Use parse_register_list.
7603 (parse_hi_register_list): Use parse_register_list.
7604 * fr30.cpu (sth): Fix assembler syntax. Implement more
7607 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7609 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7610 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7611 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7612 (-op-gen-set-trace-parallel): Ditto.
7613 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7615 * fr30.cpu (call,calld): Fix setting of pc.
7616 (f-op5): Fix start bit number.
7618 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7620 * fr30.cpu (st): Fix operand ordering. Implement more
7623 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7625 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7626 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7627 (fmt-semantic-operands): Move to sim.scm.
7628 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7629 * operand.scm (<hw-index>): New member `name'. All builders updated.
7630 (<hw-index>): New method get-name.
7631 (op-profilable?): Moved to sim.scm.
7633 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7634 (op-profilable?): Moved here from operand.scm.
7635 (gen-extract-type): Delete.
7636 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7637 (-gen-argfld-ref): New proc.
7638 (-gen-ifld-argfld-name): New proc.
7639 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7640 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7641 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7642 (<hardware-base>): Delete method gen-extract-type. New method
7644 (<hw-register): Ditto. Update method gen-extract.
7645 (<operand>, method gen-argbuf-elm): Rewrite.
7646 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7647 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7648 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7650 * sim-decode.scm (-gen-record-args): Tweak.
7652 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7654 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7656 * doc/porting: Fix typo: gas->sim.
7657 * fr30.opc (print_m4): New function.
7658 * fr30.cpu: Implemented many insns.
7660 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7662 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7664 * fr30.cpu (f-rel9): Delete RELOC attribute.
7665 (f-rel12): Add PCREL-ADDR attribute.
7666 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7667 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7668 * fr30.opc (print_label9): Delete.
7670 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7671 code for CTI indicators.
7672 * insn.scm (insn-cti?): Simplify.
7673 * utils-cgen.scm (atlist:cti?): New proc.
7675 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7677 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7678 (f-i20-4,f-i20-16,f-i20): New fields.
7684 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7685 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7686 * mach.scm (arch-data): Ditto.
7687 (current-arch-default-insn-word-bitsize): Renamed from
7688 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7689 (-arch-read): Update.
7691 * hardware.scm (hw:attr-list): Move here ...
7692 * opcodes.scm: ... from here.
7694 * ifield.scm (fld:bitrange): Delete.
7695 (fld:word-offset,fld:word-length): New procs.
7696 (ifield?): Use class-instance.
7697 (<ifield>, method field-start): Rewrite.
7698 (ifld:enum): New proc.
7699 (<ifield>, methods field-mask,field-value): Rewrite.
7700 (-ifield-parse): Rewrite.
7701 (<multi-ifield> support): Rewrite.
7702 (ifld-beyond-base?): Rewrite.
7703 (ifld:std-attrs): New variable.
7704 (ifld:attr-list): New proc.
7705 * iformat.scm (-compute-insn-mask): Rewrite.
7706 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7708 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7709 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7711 (<operand>): Ditto. Forward onto index instead.
7712 (gen-ifld-decls,gen-ifld-defns): New procs.
7713 (ifld:insert,ifld:extract): New procs.
7714 (<ifield>): New methods gen-insert, gen-extract.
7715 (<multi-ifield>): Ditto.
7716 (<hw-index>): Forward gen-insert,gen-extract onto value.
7717 (<hw-asm>): Delete insert/extract support.
7718 (<hw-register,hw-memory,hw-immediate>): Ditto.
7719 (gen-hash-defines): Use string-list.
7720 Define CGEN_MAX_IFMT_OPERANDS.
7721 (gen-switch): Use string-list,string-list-map.
7722 (gen-fget-switch,gen-fset-switch): Use string-list.
7723 (gen-parse-switch,gen-insert-switch): Ditto.
7724 (gen-extract-switch,gen-print-switch): Ditto.
7725 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7726 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7727 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7728 (gen-ivalue-entry): New proc.
7729 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7730 computation. Use 0 for operand ref table if ALIAS insn.
7731 (gen-minsn-table-entry): Use string-list.
7732 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7733 (gen-opcode-open): Record address of ifield table.
7734 (cgen-opc.h): Call gen-ifld-decls.
7735 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7736 * types.scm (<bitrange>): New members word-offset,word-length.
7737 Delete member total-length. Delete methods start,mask,value.
7738 (bitrange:word-offset,bitrange:word-length): New procs.
7739 * sim-cpu.scm (gen-define-fields): Simplify.
7740 (gen-extract-fields): Simplify.
7741 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7742 (<ifield>): New methods gen-ifld-extract-decl.
7743 Delete method gen-ifld-extract-beyond.
7744 (<multi-ifield>): New methods gen-ifld-extract-decl.
7745 (<multi-ifield>, method gen-ifld-extract): Implement.
7746 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7747 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7749 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7750 (-rtx-traverse-syntax-no-mode): New proc.
7751 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7752 (s-ifield): New proc.
7753 (s-shop): Don't prepend `unsigned' for unsigned modes.
7754 * rtx-funcs.scm (ifield): New rtx function.
7755 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7756 (delay): New rtx function.
7757 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7759 * cos.scm (-elm-make-method-getter): Fix typo.
7761 * utils.scm (backslash): Handle lists of strings.
7763 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7765 * fr30.cpu (f-rel9): Correct for pc+2.
7766 (label9): Use print_label9.
7767 * fr30.opc (print_label9): New function.
7769 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7771 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7772 * fr30.opc (parse_low_register_list): Renamed.
7773 (parse_hi_register_list): Renamed.
7774 (print_hi_register_list): Renamed.
7775 (print_low_register_list): Renamed.
7777 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7779 * fr30.cpu (f-rel9): Now a pc relative offset.
7781 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7783 * opcodes.scm (op-asm): Move to here, from operands.scm.
7784 (<op-asm>, method parse!): Validate arguments.
7785 (<operand>, method gen-function-name): Fix thinko.
7786 * operand.scm (<operand>, method make!): Don't set op-asm here.
7787 * utils.scm (list-elements-ok?): New proc.
7789 * opcodes.scm: Clean up pass.
7791 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7793 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7794 the fr30_int function.
7795 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7796 (h-dr): Add FUN-ACCESS attribute.
7798 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7800 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7801 for C symbol for models array.
7803 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7805 * fr30.opc (parse_reglist_low): New function.
7806 (parse_reglist_hi): New function.
7807 (print_reglist_low): New function.
7808 (print_reglist_hi): New function.
7809 * fr30.cpu: Finish remaining insn stubs.
7811 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7813 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7815 * fr30.cpu (ldi32m): Don't use for disassembly.
7817 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7819 * fr30.cpu (int): Implement it.
7821 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7823 * rtx-funcs.scm (nop): Fix C code.
7825 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7827 * fr30.cpu (f-i32): New ifield.
7830 (ldi32m): New macro insn.
7831 (inte): Provide simple version for now.
7833 * sim-arch.scm: New file.
7834 * sim.scm: Move architecture support generation to sim-arch.scm.
7835 * cgen-sim.scm: Load sim-arch.scm.
7838 * hardware.scm (pc?) New proc.
7839 (class <hardware-base>): Rewrite method 'pc?.
7840 (class <hardware>): Forward 'pc? to the hardware type.
7841 (class <hw-pc>): New method 'pc?.
7843 Add support for variable length ISAs.
7844 * ifield.scm (ifld-beyond-base?): New proc.
7845 * m32r.cpu: Remove integral-insn? spec.
7846 * mach.scm (arch:derived,arch:set-derived!): New procs.
7847 (arch:app-data,arch:set-app-data!): New procs.
7848 (class <arch>): New members derived, app-data.
7849 (class <cpu>): Delete member integral-insn?.
7850 (cpu:integral-insn?): Delete.
7851 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7852 (-cpu-read): Delete integral-insn? support.
7853 (state:decode-assist): Delete.
7854 (state:int-insn?): Delete.
7855 (<derived-arch-data>): New class.
7856 (-adata-set-derived!): New proc.
7857 (mach-finish!): Call it.
7858 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7859 (gen-operand-instance): Add COND_REF support.
7860 (gen-operand-instance-table): Ditto.
7861 (gen-hash-defines): Update.
7862 (gen-extract-switch): Update type of `insn_value' arg.
7863 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7864 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7866 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7867 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7868 beyond the base insn (for large insns).
7869 (-gen-extract-beyond-var-list): New proc.
7870 (gen-extract-fields): Handle large insns.
7871 (-gen-write-case): Update sem_arg computation.
7872 Update initial vpc computation.
7873 (gen-semantic-fn): Ditto. Update type of `insn'.
7874 (-gen-sem-case): Update sem_arg computation.
7875 Update initial vpc computation.
7876 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7877 (-gen-extract-word): New proc.
7878 (<ifield>): New method gen-ifld-extract-beyond.
7879 (gen-ifld-extract-beyond): New proc.
7880 * types.scm (bitrange-overlap?): New proc.
7882 * utils.scm (bits->bytes): New proc.
7883 (bytes->bits): New proc.
7885 Move extraction support into decoder.
7886 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7887 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7888 support to sim-decode.scm.
7889 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7890 be array of IDESC,FMT entries. Make the array const.
7891 (-gen-gcc-label-table): Make array const.
7892 (-gen-decode-switch): Branch to extraction code after insn has been
7894 (-gen-decode-insn-globals): Delete extract handler from
7896 (gen-decode-fn): Add extraction support.
7897 (-gen-sem-fn-decls): Delete extraction fn decls.
7898 (-gen-idesc-decls): Update @cpu@_decode decl.
7899 (-gen-idesc-init-fn): Delete extraction support.
7900 (-gen-extract-decls): New proc.
7902 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7903 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7905 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7906 All callers updated.
7907 (table-entry:make): Record insn value as insn object, not name.
7910 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7911 collision with C function.
7912 (path_dirname): Similarily.
7913 * hobbit.c,hobbit.h: Rebuild.
7915 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7917 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7919 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7921 * fr30.cpu: Implement more instruction stubs.
7923 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7925 * fr30.cpu: Implement more instruction stubs.
7927 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7929 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7931 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7933 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7934 (op:std-attrs): Ditto.
7935 * opcodes.scm (gen-operand-instance): Ditto.
7936 (gen-switch): Ditto.
7937 * m32r.cpu (condbit,accum): Update.
7938 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7940 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7942 * enum.scm (-enum-read): Fix typo.
7944 * iformat.scm (-ifmt-search-key): Simplify a little.
7946 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7948 * doc/porting: semantics.c -> sem.c.
7949 * Makefile.in: Regenerate.
7950 * fr30.cpu (add): Change ADD to add. Add more registers and set
7951 status bits on 'add' instruction.
7953 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7955 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7958 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7960 * minsn.scm (minsn:enum): Update, call current-arch-name.
7962 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7964 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7965 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7966 (ARCH,CGEN,CGENFLAGS): New variables.
7967 (gas-test,sim-test): New rules.
7968 * Makefile.in: Rebuild.
7969 * configure.in (arch): Define.
7970 * configure: Rebuild.
7972 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7973 * All .scm files: Ditto.
7975 * dev.scm: Fix gas-test call to cpu-load.
7976 * gas-test.scm: Clean up pass to remove bit-rot.
7977 * sim-test.scm: Ditto.
7979 * enum.scm (read-enum): Fix typo in `vals' handling.
7981 * hardware.scm (-parse-hw-type): Fix typo.
7982 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7983 (def-hardware,define-normal-hardware): Ditto.
7985 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7986 (display-var): Use it.
7987 * hobbit.c: Rebuild.
7988 * hobbit.h: Rebuild.
7990 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7991 avoid hobbit problem.
7992 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7993 `parallel-insns-' to avoid hobbit problem.
7995 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7997 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7998 (parse_slo16,parse_ulo16): Ditto.
7999 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8001 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
8003 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8004 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8005 * Makefile.in: Rebuild.
8006 * insn.scm (define-normal-insn): Expand pmacros.
8007 * mode.scm (<mode>): New member `host?'. All uses updated.
8008 (mode:host?): New proc.
8009 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8010 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8011 (define-rtx-dual-mode): Ditto.
8012 (s-index-of): New proc.
8013 (s-unop): Use plain C for host mode operations.
8014 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8015 * rtx-funcs.scm (index-of): New rtx function.
8016 * sim.scm (<hw-index>): New method cxmake-get.
8018 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
8020 * sim-cpu.scm (-gen-engine-decls): Delete.
8022 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
8024 * doc/rtl (Example): Correct Typo.
8025 * doc/porting: Add 'make dep' step to opcodes port instructions.
8026 * fr30.opc: New file.
8027 * fr30.cpu: New file.
8029 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
8031 * configure.in: Handle guile $exec_prefix = $prefix/foo.
8032 * Makefile.am (GUILEINCDIR): New variable.
8034 * configure: Regenerate.
8035 * Makefile.in: Ditto.
8036 * aclocal.m4: Ditto.
8038 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
8040 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8041 (cgen-semantics.c): Ditto.
8042 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8043 * sim-model.scm (cgen-model.c): Ditto.
8044 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8045 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8047 * opcodes.scm (read-cpu.opc): Handle empty file.
8049 * cos.scm (-elm-make-method-setter): Fix typo.
8051 * cpu.scm (-init-parse-cpu!): Call types-init!.
8052 (-finish-parse-cpu!): Call types-finish!.
8053 * ifield.scm (<ifield>): Delete members start,length.
8054 New member bitrange.
8055 (<ifield>, methods field-start,field-length): Update.
8056 (fld:start): New arg insn-len. All callers updated.
8057 (<ifield>, methods field-mask,field-value): Update.
8058 (-ifield-parse): Update.
8059 (ifield-init!): Update.
8060 * iformat.scm (compute-insn-length): Simplify.
8061 (compute-insn-mask): Update.
8062 * insn.scm (insn:value): Update.
8063 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8064 (current-arch-default-insn-bitsize): New proc.
8065 (current-arch-insn-lsb0?): New proc.
8066 (-arch-parse,-arch-read): Update.
8067 (<cpu>): New member file-transform.
8068 (-cpu-parse,-cpu-read): Update.
8069 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8070 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8071 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8072 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8073 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8074 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8075 * operand.scm (op:start): Update call to field-start method.
8076 * sim-decode.scm (opcode-slots): New arg lsb0?.
8077 (fill-slot!,build-slots): Ditto.
8078 (build-decode-table-entry,build-decode-table-guts): Ditto.
8079 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8080 (gen-decode-fn): Ditto.
8081 (cgen-decode.c): Update call to gen-decode-fn.
8082 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8083 (-gen-cpu-header,-gen-cpuall-includes): New procs.
8084 (cgen-cpuall.h): Call -gen-cpuall-includes.
8085 * types.scm (<bitrange>): New class.
8086 (types-init!,types-finish!): New procs.
8087 * utils-cgen.scm (parse-number): New proc.
8088 (parse-boolean): New proc.
8089 * utils.scm (word-value): Renamed from shift-bits, rewrite.
8090 (word-mask): Rewrite.
8091 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8092 (m32rxf): New field `file-transform'.
8093 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8095 * hobbit.h: Fix include file name.
8097 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
8099 * slib: New directory of slib files used by cgen/hobbit.
8100 * hobbit.scm: New file.
8101 * hobbit.c: New file.
8102 * hobbit.h: New file.
8103 * hobscmif.h: New file.
8104 * hob-main.c: New file.
8105 * hobslib.scm: New file.
8107 * Makefile.am: Add support for compiling hobbit, and using compiled
8108 version of hobbit to compile cgen.
8109 * Makefile.in: Regenerate.
8110 * configure.in: Support --with-hobbit.
8111 * configure: Regenerate.
8112 * acconfig.h (WITH_HOBBIT): Add.
8113 * config.in: Regenerate.
8115 * rtl.scm: New file, was cdl-c.scm.
8116 Definition of rtx funcs moved to rtx-funcs.scm.
8117 (semantic-in-out-operands): Rewrite to compute object form of
8119 * rtx-funcs.scm: New file.
8121 * cgen-gh.c: #include "config.h".
8122 (gh_cadddr,gh_cddddr): New fns.
8123 (cgh_vector_to_list): New fn.
8124 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8125 (cgh_init): Prefix qsort procs with "cgh-".
8126 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8127 * cgen.c: #include "config.h".
8129 * attr.scm (bitset-attr?): New proc.
8130 (<bitset-attribute>, method parse-value): Value syntax changed from
8131 (val1 val2 ...) to val1,val2,....
8132 (<bitset-attribute>): New method gen-value.
8133 (<integer-attribute>): New method gen-value.
8134 (<enum-attribute>): New method gen-value.
8135 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8136 (<reader>): New class.
8137 (CURRENT-ARCH,CURRENT-READER): New globals.
8138 (keep-mach?): Move here from mach.scm.
8139 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8140 (<arch>): New class.
8141 (<arch-data>): New class.
8142 (<cpu>): Make subclass of <ident>.
8143 (*ENDIAN* variables): Delete.
8144 (process-state-vars): Delete.
8145 (mach-finish!): Add `base' value to MACH attribute.
8146 * hardware.scm (<hardware>): Make subclass of <ident>.
8147 (hw:std-attrs): New global.
8148 (hw-profilable?): New proc.
8149 * ifield.scm (<ifield>): Make subclass of <ident>.
8150 (sort-ifield-list): Move here from iformat.scm.
8151 * iformat.scm (<iformat>): Renamed from <insn-format>.
8152 Make subclass of <ident>.
8153 (-ifmt-search-key): Include cti? in categorization of formats.
8154 (ifmt-analyze): Compile semantics (turn to object form).
8155 * insn.scm (<insn>): Make subclass of <ident>.
8156 New member compiled-semantics.
8157 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8158 * mode.scm (<mode>): Make subclass of <ident>.
8160 * model.scm (<unit>): Make subclass of <ident>.
8161 New members inputs,outputs.
8162 (<model>): Make subclass of <ident>. New member state.
8163 (-unit-parse): Parse inputs,outputs.
8164 (<iunit>): New class.
8165 (-insn-timing-parse-model): New proc.
8166 (parse-insn-timing): Function unit spec rewritten.
8167 * operand.scm (<operand>): Make subclass of <ident>.
8168 New members sem-name,num,cond? New method gen-pretty-name.
8169 (hw-index-scalar): New global.
8170 (op-nub-hw): Move here from rtl.scm.
8171 (op:lookup-sem-name,op-profilable?): New procs.
8172 * pmacros.scm: Rewrite to pass through hobbit.
8173 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8174 * utils.scm (logit): Make a macro.
8175 (bit-set?): Rewrite.
8176 (high-part): Rewrite.
8178 * m32r.cpu (define-arch): Move to top of file.
8179 (cpu family m32rbf): Renamed from m32rb.
8180 (model m32r/d): Function unit spec rewritten.
8181 (all insns): Ditto. Replace UBI with BI.
8183 * opcodes.scm (gen-attr-table-decls): Declare
8184 @arch@_cgen_hw_attr_table.
8185 (gen-attr-table-defns): Generate hw attribute table.
8187 * sim-cpu.scm (-gen-engine-decls): New proc.
8188 (-gen-model-decls): New proc.
8189 (gen-parallel-exec-type): Add new member `written' to struct parexec.
8190 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8191 (-gen-record-profile-args): Simplify.
8192 (-gen-parallel-sem-case): Delete.
8193 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8194 New local `written'. Delete profiling code.
8195 (-gen-sem-case): Ditto.
8196 (-uncond-written-mask,-any-cond-written?): New procs.
8197 (cgen-sem-switch.c): Include duplicates of insns that can be executed
8198 parallelly or serially, and write-back handlers for all parallel insns.
8199 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8200 support to initialization of struct insn_sem.
8201 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8202 (-gen-insn-sem-type): Add parallel write-back support to struct
8204 (-gen-idesc-init-fn): Add support for virtual insns.
8205 Add parallel write-back support.
8206 * sim-model.scm (gen-model-profile-fn): Delete
8207 (-gen-model-fn-decls): New proc.
8208 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8209 (-gen-model-init-fn): New proc.
8210 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8211 members in @mach@_init_cpu.
8212 (cgen-model.c): Generate model handlers for each insn.
8213 * sim.scm (gen-define-field-macro): Cti insns handled differently.
8214 (<hw-pc>): New method gen-write.
8215 (<hw-register>, method gen-write): New arg `mode'.
8216 (<hw-register>): Delete method gen-record-profile!.
8217 New method gen-profile-index-type.
8218 (<hw-memory>, method gen-write): New arg `mode'.
8219 (<hw-address>, method gen-extract): Delete.
8220 (<hw-address>, method gen-write): New arg `mode'.
8221 (<hw-index>, method get-write-index): Rewrite.
8222 (<pc>, method cxmake-get-direct): Delete.
8223 (<pc>): New method cxmake-get. Comment out methods
8224 gen-set-quiet,gen-set-trace.
8225 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8226 gen-profile-index-type,gen-profile-code.
8227 Delete method gen-pretty-name. Rewrite method gen-write.
8228 Delete method cxmake-get-direct.
8229 (-op-gen-set-trace): Update `written'.
8230 (-op-gen-set-trace-parallel): Ditto.
8231 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8232 (gen-cpu-insn-enum-decl): Add extra entries for parallel
8233 insns and their write-back handlers.
8234 (insn-op-lookup): New proc.
8235 (<unit>): New method gen-profile-code.
8236 (<iunit>): New method gen-profile-code.
8237 (gen-argbuf-elm): Add profiling elements.
8238 (gen-argbuf-type): Define cti insns separately in their own struct.
8239 Add member `addr_cache' to this struct. Add entries for pbb virtual
8240 insns. Move semantic entries here from struct scache.
8241 Delete everything from struct scache except argbuf.
8242 (<insn>, method gen-profile-locals): Rewrite.
8243 (<insn>, method gen-profile-code): Rewrite.
8244 (sim-finish!): Create virtual pbb insns.
8246 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8248 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8249 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8250 (h-psw,h-bpsw,h-bbpsw): Define.
8251 (rte,trap): Handle bbpc,bbpsw.
8252 * opcodes.scm (max-operand-instances): Fix typo.
8253 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8254 hardware elements to be fun-access.
8255 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8257 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8259 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8261 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8263 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8265 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8267 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8269 (mach m32r): Update.
8271 * mach.scm (mach:supports?): New proc.
8272 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8273 gen-reg-access-{decls,defns}.
8274 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8275 (gen-mach-bfd-name): New proc.
8276 (gen-arch-reg-access-{decls,defns}): New procs.
8277 (cgen-arch.[ch]): Output register access cover fns.
8279 * hardware.scm (hardware-builtin!): Set print handlers for
8281 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8283 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8284 (my_print_insn): Ditto. Delete args buf, buflen.
8285 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8286 (-hw-asm-specs): Add `handlers' spec.
8287 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8289 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8291 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8292 (<hw-asm>, parse!): New method.
8293 (gen-insn-table-entry): Print semantics.
8294 (gen-opcode-open): Renamed from gen-opcode-table.
8296 * utils.scm (string-write): No longer a macro.
8297 (-string-write): Handle procedure args.
8298 * opcodes.scm: Update all calls to string-write.
8299 * sim-cpu.scm: Ditto.
8300 * sim-decode.scm: Ditto.
8301 * sim-model.scm: Ditto.
8304 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8306 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8307 (-gen-insn-builders,-gen-insn-builder): New procs.
8309 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8311 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8312 (gen-opcode-table): Properly terminate comment.
8314 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8317 Clean up pass over everything, so starting fresh.