1 2010-01-19 Doug Evans <dje@sebabeach.org>
3 * testsuite/pmacros-1.test: Add more .splice tests.
5 * read.scm (/cmd-include): Fix absolute path handling.
7 2010-01-05 Doug Evans <dje@sebabeach.org>
9 * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
11 (mode:non-mode-c-type): Delete.
12 (mode:c-type): Update.
13 * rtl-c.scm (s-shop): Fix casting of DI mode values.
15 2010-01-04 Doug Evans <dje@sebabeach.org>
17 * gen-all (all_cgen_cpus): Add sh.
19 2010-01-02 Doug Evans <dje@sebabeach.org>
21 * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
23 2009-12-17 Doug Evans <dje@sebabeach.org>
25 * mep.opc: Apply patches from opcodes to compile with -Wshadow.
26 mep-asm.c now regenerates correctly again.
28 * gen-all: Add support for building gcc/newlib.
29 Specify --prefix and install all built tools.
31 2009-12-16 Doug Evans <dje@sebabeach.org>
33 * sim.scm (/op-gen-written-update): Disable operand number is too
34 large warning, for now.
36 2009-12-11 Nick Clifton <nickc@redhat.com>
38 * cpu/fr30.opc: Fix shadowed variable warnings.
40 2009-12-10 Doug Evans <dje@sebabeach.org>
42 * gen-all: Rewrite. Build more ports. Split out building of sid.
44 2009-11-23 Doug Evans <dje@sebabeach.org>
46 * hardware.scm (hw-pc?): New function.
47 * ifield.scm (ifld-signed?): New function.
48 * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
49 * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
50 (insn-cti?): New function.
51 * rtl.scm (/hw): Create <pc> object for pcs.
52 * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
53 All callers updated. Watch for sets to the pc.
54 (semantic-attrs): Watch for sets to the pc.
55 * sid.scm (<pc> cxmake-get): Handle raw-reg.
56 * sim.scm (<pc> cxmake-get): Handle raw-reg.
57 (<operand> cxmake-get): Add debugging printf.
58 * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
59 EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
60 (/gen-extract-word): Ditto.
62 * utils.scm (gen-c-hex-constant): New function.
63 * utils-sim.scm (/gen-decode-insn-entry): Call it.
65 2009-11-22 Doug Evans <dje@sebabeach.org>
67 * insn.scm (/parse-insn-format): Watch for duplicate ifields.
68 * read.scm (parse-error-continuable): New function.
69 (define /continuable-error-found?): New variable.
70 (/init-reader!): Initialize it.
71 (/finish-reader!): New function.
73 * utils-cgen.scm (obj-list-nub): New function.
75 * mach.scm (<derived-arch-data>): New member large-insn-word?.
76 (/adata-set-derived!): Set it.
77 (adata-large-insn-word?): New function.
78 * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
80 * sim-cpu.scm (cgen-cpu.h): #include it here.
81 (/gen-cpu-defines): Define CGEN_INSN_WORD.
82 (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
84 * sim-decode.scm (/gen-idesc-decls): Ditto.
85 (/gen-extract-case, /gen-decode-fn): Ditto.
86 * sim-model.scm (/gen-model-insn-fn): Ditto.
87 * sim.scm (gen-argbuf-type): Ditto.
89 * rtl-c.scm (/use-gcc-stmt-expr?): New function.
90 (s-sequence): Call it.
92 2009-11-21 Doug Evans <dje@sebabeach.org>
94 * rtl-c.scm (s-sequence): Use gcc's statement expressions for
95 non-VOID-mode expressions with multiple statements.
97 * sim.scm (/operand-number-elaboration-written?): New variable.
98 (/op-gen-written-update op): New function.
99 (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
101 * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
103 * operand.scm (op-nub): Delete.
105 * dev-utils.scm: New file.
106 * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
107 load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
108 * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
109 /loaded-file-record!, maybe-load): Delete.
110 Load cgen files directly instead of via maybe-load.
112 2009-11-14 Doug Evans <dje@sebabeach.org>
114 * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
115 expressions used in a void context.
117 * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
119 * cpu/xc16x.cpu: Delete, use copy in ../cpu.
120 * cpu/xc16x.opc: Ditto.
122 2009-11-12 Doug Evans <dje@sebabeach.org>
124 * rtl-c.scm (s-parallel): Use map-in-order instead of map.
126 * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
127 eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
129 2009-11-11 Doug Evans <dje@sebabeach.org>
131 * html.scm (gen-insn-docs): Add logging message.
133 2009-11-05 Doug Evans <dje@sebabeach.org>
135 * utils-cgen.scm (gen-set-macro2): New function.
136 * sim.scm (<hw-register> gen-get-macro): Call it.
138 * co-for-gen-all: New file.
140 * testsuite/name-comments-1.test: Update call to current-insn-lookup.
142 * utils.scm (reduce): Delete.
144 * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
146 * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
147 regarding PREFIX attribute handling.
149 * operand.scm (<hw-index>): Add enum to possible types, all uses
151 (hw-index-constant?, hw-index-constant-value): New functions.
152 (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
153 hw-index-enum-obj): New functions.
154 (/operand-parse): Handle enum indices.
155 * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
156 hw-index-constant-value.
157 * rtl.scm (rtx-constant-value): Fix handling of enums.
158 * rtx-funcs.scm (enum): Ditto.
159 * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
160 currently supported here.
162 2009-11-02 Doug Evans <dje@sebabeach.org>
164 Specify isa(s) when doing ifield, operand, insn lookups.
165 ACU = all callers updated.
166 * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
167 * enum.scm (define-full-insn-enum): Pass isa-name-list to
169 * html.scm (get-insn-properties): Pass isa-name-list to
171 * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
172 * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
173 (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
174 (/parse-insn-format, syntax-break-out): Ditto.
175 * mach.scm (obj-filter-by-isa): New function.
176 (current-ifld-lookup): New optional arg maybe-isa-name-list.
177 (/ifld-already-defined?, /op-already-defined?): Simplify.
178 (current-op-lookup): New optional arg maybe-isa-name-list.
179 (current-insn-lookup): New arg isa-name-list, ACU.
180 (/insn-already-defined?, /minsn-already-defined?): Simplify.
181 (current-minsn-lookup): New arg isa-name-list, ACU.
182 * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
184 * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
185 (gen-syntax-entry): Ditto.
186 * operand.scm (/operand-parse): Pass isa-name-list to
188 (/derived-parse-encoding): New arg isa-name-list, ACU.
189 (/derived-parse-ifield-assertion): Ditto.
190 (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
191 (/anyof-parse-choice): Ditto.
192 (anyof-satisfies-assertions?): Pass context to rtx-solve.
193 (/anyof-merge-syntax): New arg container, ACU.
194 (operand-builtin!): Add pc to all isas.
195 * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
196 (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
197 (rtl-c-parsed, rtl-c++-parsed): Ditto.
198 (rtl-c): New arg isa-name-list, ACU.
199 (rtl-c-expr, rtl-c++): Ditto.
200 (closure): New arg isa-name-list, ACU.
201 * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
202 (/cstate-isas): New function.
203 (/rtx-canon-symbol-list): New function.
204 (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
206 (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
207 (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
208 (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
209 (rtx-canonicalize): New arg isa-name-list, ACU.
210 (rtx-canonicalize-stmt): Delete.
211 (tstate-make): New arg isas, ACU.
212 (tstate-isas, tstate--set-isas!): New functions.
213 (tstate-env-stack): Renamed from tstate-env, ACU.
214 (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
215 (tstate-make-closure): Renamed from tstate-new-env, new arg
217 (/rtx-traverse-env): Delete.
218 (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
220 (/rtx-traverse): Include conditional flag in dump output.
221 Update isa,envstack for closures. Pass isa list to current-op-lookup.
222 (<eval-state>): New member isas. Rename env to env-stack.
223 (<eval-state> vmake!): Handle #:isas. #:env renamed to #:env-stack.
224 (<eval-state>): New getter/setter for isas. Rename env getter/setter
226 (estate-make-for-eval): Provide #:isas.
227 (estate-make-closure): Renamed from estate-new-env. New arg
229 * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
230 (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST.
231 (/rtx-trim-for-doc): Handle closures.
232 * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION,
234 (rtx-env-var-list): Delete.
235 (rtx-env-make): Handle already-compiled environments.
236 (rtx-var-alist-to-env): New function.
237 (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
238 (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
239 (rtx-operand-obj): New arg isa-name-list, ACU.
240 (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
242 * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
243 * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
244 (/frag-compute-desired-frags): Minor simplification.
245 (/frag-pick-best): Ditto.
246 * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
247 (/gen-sfrag-code): Update.
248 * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
249 * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
250 * utils.scm (non-null-intersection?): New function.
252 * gen-all (do_src): Manually run cgen-all for sid.
254 2009-11-01 Doug Evans <dje@sebabeach.org>
258 * rtl-traverse.scm (/rtx-canon): Issue better error message for
259 invalid rtx function names.
261 2009-10-28 Doug Evans <dje@sebabeach.org>
263 * cos.scm (object-assign!): New function.
264 * mode.scm (/mode-set-word-params!): Call it.
266 2009-10-25 Doug Evans <dje@sebabeach.org>
268 Record bitset attributes internally as a list.
269 Record rtx attribute values internally as ((rtx-expr)).
270 * attr.scm (bitset-attr?): Delete, unused.
271 (<bitset-attribute> parse-value): Rewrite.
272 (/attr-parse): Rewrite bitset default value processing.
273 (/attr-read): Pick out values of scalar attributes to distinguish
274 them from bitset values which are a list.
275 Fix spelling errors for processing of default values.
276 Handle string attributes.
277 (bitset-attr->list): Delete, all callers updated.
278 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
280 (atlist-source-form): Rewrite.
281 * hardware.scm (<hardware-base> 'get-isas): Update recognition
283 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
285 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
286 values are now lists.
287 * mach.scm (def-isa-attr!): Update, bitset attribute values,
288 including the default, are now lists.
289 (all-isas-attr-value): Result is now a list.
290 * doc/rtl.texi: Clean up pass over attribute docs.
292 Change internal representation of rtx attribute values.
293 * attr.scm (/attr-val-is-rtx?): New function.
294 (attr-value): Call it.
295 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
296 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
297 Disallow rtx values for bitset attributes.
298 (/attr-read): Record rtx in default value as ((rtx-expr)).
299 (/attr-eval): Update.
301 2009-10-24 Doug Evans <dje@sebabeach.org>
303 * gen-all-doc: Add sh.cpu.
304 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
305 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
307 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
308 (/gen-sfrag-case): Ditto.
309 * sim-cpu.scm (/gen-sem-case): Ditto.
311 * doc/rtl.texi: Add note that different ifields, operands, insns,
312 and minsns may occur with the same name in different isas.
313 Add note on the canonical form of rtl expressions.
315 2009-10-23 Doug Evans <dje@sebabeach.org>
317 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
318 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
320 * decode.scm: Tweak various comments.
321 (/opcode-slots): Add FIXME.
322 (/build-decode-table-guts): Add assert.
323 * utils-sim.scm (/gen-set-itype-and-extract): New function.
324 (/gen-bracketed-set-itype-and-extract): New function.
325 (/gen-decode-default-entry): Rewrite.
326 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
327 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
328 updated. Don't unnecessarily emit check for whether all opcode bits
330 (/gen-decode-expr-set-itype): Delete.
331 (/gen-decode-expr-entry): Update.
332 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
333 updated. Keep track of decoder tables used thus far.
334 (/gen-decoder-switch): Ditto.
335 * utils.scm (word-bit-value): New function.
337 2009-10-14 Doug Evans <dje@sebabeach.org>
339 * ifield.scm (<ifield>, value): Provide default initial value.
340 (ifield-encode-mode): Delete
341 (ifield-decode-mode): Delete duplicate definition.
342 (<derived-ifield>, 'make!): Initialize members encode, decode.
343 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
345 (<multi-ifield>, 'gen-insert): Ditto.
347 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
349 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
350 for @foo@_init_idesc_table.
352 2009-09-30 Doug Evans <dje@sebabeach.org>
354 * doc/intro.texi: Mention SID.
355 * doc/sim.texi: Ditto.
356 * doc/porting.text (Doing a simulator port): Add some text.
358 2009-09-27 Doug Evans <dje@sebabeach.org>
360 * cos.scm (/class-table): New global.
361 (/class-uid, /class-set-uid!): New functions.
362 (/class-parent-name): Renamed from /class-parents.
363 (/class-make!): Change parents arg to parent-name, all callers updated.
365 (/class-lookup-uid): New function.
366 (/class-parent-classes): Rewrite.
367 (/class-mi?): Delete.
368 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
370 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
371 (/class-compute-class-desc, class-desc-dump): Update.
372 (/object-make!): Update.
373 (/object-make-with-values!): Delete arg class-desc, all callers
375 (/object-copy): Delete arg top?, all callers updated.
376 (/object-specialize): Delete.
377 (/object-elements, /object-top-class): Delete.
378 (/object-class-name, /object-class-desc): Update.
379 (/object-class-uid): New function.
380 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
381 class-make, /class-subclass? /class-lookup-element,
383 (/elm-delta, elm-list): Delete.
384 (/elm-make-method-getter, elm-get, elm-xget): Update.
385 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
386 (elm-make-getter, elm-make-setter): Update.
387 (/method-lookup-next): Update.
388 (send): Don't specialize class passed to method.
389 (send-next): New arg class-name, all callers updated.
390 (/class-parent, /class-parent-via-path, object-parent): Delete.
391 (class-cons-parent!, class-append-parent!): Delete.
392 (object-reset!): Init /class-table.
394 * cos.scm (/object-debug-classes): Delete.
395 (/object-debug-elements, /object-debug-methods): Delete.
397 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
398 (method-proc): Delete.
399 (method-make-virtual!, method-make-virtual-forward!): Delete.
400 * ifield.scm (<ifield> field-start): Update.
401 (<ifield> field-length, pretty-print): Update.
402 (<multi-ifield> field-length, field-start, pretty-print): Update.
403 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
404 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
405 (<array> gen-sym-defn): Ditto.
406 (<hardware-base> gen-defn): Renamed from gen-defn.
407 (<hw-register> gen-type): Update.
408 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
409 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
410 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
411 (<hw-immediate> gen-type): Update.
412 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
413 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
414 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
415 (<array> gen-sym-defn): Ditto.
416 (<hardware-base> gen-defn): Renamed from gen-defn.
417 (<hw-register> gen-type): Update.
418 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
419 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
420 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
421 (<hw-immediate> gen-type): Update.
422 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
424 2009-09-25 Doug Evans <dje@sebabeach.org>
426 * operand.scm (/anyof-merge-setter): Handle set-quiet.
427 * rtl.scm (rtx-single-set?): Handle set-quiet.
429 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
430 rtl-cover-fns?, macro?. All callers updated.
431 (estate-make-for-normal-rtl-c): Delete, have all callers call
432 estate-make-for-rtl-c directly.
433 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
434 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
436 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
437 replaces /par-replace-set-dests.
438 (/par-replace-set-src-expr-fn): New function, replaces
439 /par-replace-set-srcs.
440 (s-parallel): Rewrite.
442 * rtl.scm (rtx-pretty-strdump): New function.
443 * rtl-traverse.scm (/rtx-canon-error): Use it.
444 (<eval-state>): New member outer-expr.
445 (estate-error): Include outer expression in error message if present.
447 2009-09-23 Doug Evans <dje@sebabeach.org>
449 * xc16x.cpu (h-cr): New hardware.
450 (muls): Comment out parts that won't compile, add fixme.
451 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
452 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
453 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
455 Rewrite rtl processing to require it to be "canonicalized" first,
456 and write a full canonicalizer / expression checker.
457 Remove all appearances of DFLT in canonical rtl.
458 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
460 * iformat.scm (ifmt-analyze) Use canonical semantics.
461 * insn (<insn>): New member canonical-semantics.
462 * mach.scm (<arch>): New member multi-insns-instantiated?.
463 (/instantiate-multi-insns!): New function.
464 (/canonicalize-insns!): New function.
465 (arch-analyze-insns!): Canonicalize insn semantics before processing
467 * mode.scm (/mode-set-word-params!): New function.
468 (mode-void?): New function.
469 (mode-compatible?): VOID is compatible with VOID.
470 (/mode-word-sizes-defined?): New global.
471 (mode-set-word-modes!): Use/set it.
472 (mode-ensure-word-sizes-defined): Update.
473 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
474 Redo WI/UWI/AI/IAI handling.
475 (op:new-mode): No longer accept DFLT.
476 (<derived-operand> constructor): Ensure all fields are initialized.
477 (<anyof-operand> constructor): Ditto.
478 (/derived-parse-ifield-assertion): Delete arg `args'.
480 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
481 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
482 (rtl-c-expr, rtl-c++): Ditto.
483 (/rtl-c-get): Use mode of operand, not containing expression.
484 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
485 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
486 estate-for-insn? instead.
487 (s-unop): Use mode of expression, not first operand.
488 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
489 (s-sequence): Remove DFLT support.
490 (ifield): Use mode of expression, not UINT.
491 (pc): Comment out, unused.
492 (int-attr): New rtx kind.
494 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
495 * rtl-traverse.scm (/rtx-canon-debug?): New global.
496 (/make-cstate): New function.
497 (/cstate-context, /cstate-outer-expr): New functions.
498 (/rtx-canon-error): New function.
499 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
500 /rtx-get-last-cond-case-rtx): New functions.
501 (/rtx-canon-*): New functions.
502 (/rtx-canner-table, /rtx-operand-canoners): New globals.
503 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
504 (/rtx-option, /rtx-option-list?): Rewrite.
505 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
506 Rewritten, all callers updated.
507 (/rtx-canon-expr, /rtx-canon): New functions.
508 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
509 (rtx-canonicalize-stmt): New function.
510 (tstate-make): Remove arg `set?'. All callers updated.
511 (tstate-new-set?): Delete.
512 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
513 moved to /rtx-canon-*.
514 (/rtx-traverse-normal-operand): New function.
515 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
516 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
517 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
518 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
520 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
521 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
522 (/rtx-make-traverser-table): Update.
523 (/rtx-traverse-operands): Remove mode processing, now done during
525 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
526 (/rtx-traverse): Ditto.
527 (rtx-init-traverser-tables!): New function.
528 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
529 (rtx-verify-no-dflt-modes): New function.
530 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
531 (rtx-simplify-insn): Use insn-canonical-semantics.
532 (rtx-canonicalize): Moved to rtl-traverse.scm.
533 (/compile-expr-fn, rtx-compile): Delete.
534 (/rtx-trim-rtx-list): New function.
535 (/rtx-trim-for-doc): Handle set, if.
536 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
537 (/rtx-valid-mode-types): Update.
538 (/rtx-valid-matches): Update.
539 (/rtx-find-matchexpr-index): New function.
540 (rtx-lookup): Require rtx-kind to be the rtx name.
541 (def-rtx-node): New arg result-mode, all callers updated.
542 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
543 (rtx-lazy-sem-mode): Delete.
544 (/rtx-closure-make): New arg `mode', all callers updated.
545 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
546 (rtx-operand-obj): Rewrite.
547 (rtx-make-xop): New functions.
548 (/hw): Renamed from `hw', all callers updated.
549 Use the correct mode instead of DFLT for the index.
550 (rtl-builtin!): Call rtx-init-traversal-tables!.
551 (rtl-finish!): Update.
552 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
553 Update mode arg-type.
555 (int-attr): New rtx kind.
557 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
558 (/frag-cost-compute!): Ditto.
559 * semantics.scm (/build-operand!): Delete args op-name, op.
560 New arg op-expr. All callers updated.
561 (/build-mem-operand!): Remove DFLT support.
562 (semantic-compile): Update process-expr!, mode arg deleted.
563 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
565 (/gen-sem-case, /gen-sfrag-code): Ditto.
566 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
567 (/op-gen-set-trace): New function. If not doing profiling, or using
568 the pbb engine, call /op-gen-set-quiet.
569 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
570 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
571 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
572 * utils.scm (find-first-index): New function.
573 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
575 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
577 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
579 2009-09-21 Doug Evans <dje@sebabeach.org>
581 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
582 All callers updated. Add FIXME.
583 (all rtx functions): Rename local estate to *estate*. It's an
584 artificial argument added to the rtx, so make it stand out.
586 * openrisc.cpu (or32 isa): Fix setup-semantics.
588 * rtl.scm (rtx-class-*?): Delete, unused.
589 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
591 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
592 (init-reader!): Set /CGEN-RTL-VERSION to default.
594 * read.scm (cpu-load): Print load parameters.
596 * dev.scm (load-doc): Set verbose-level to 2.
598 2009-09-20 Doug Evans <dje@sebabeach.org>
600 * rtl.scm (rtx-strdump): Use write instead of display.
602 2009-09-17 Doug Evans <dje@sebabeach.org>
604 * utils-cgen.scm (obj-csv-names): New function.
605 * utils-sim.scm (/sfmt-contents): Use it in logging message.
607 2009-09-12 Doug Evans <dje@sebabeach.org>
609 Clean up pass of mode handling.
610 Make use of mode name vs <mode> object more consistent and clear.
611 * hardware.scm (/keyword-read): Default mode to the mode name,
612 not the <mode> object.
613 (/hw-parse-indices): Parse mode name and pass mode object to
614 <hw-asm> constructor.
615 (/hw-parse-values): Ditto.
616 (<hw-register> parse!): Pass mode name to /hw-parse-indices
617 and /hw-parse-values.
618 (<hw-memory> parse!): Ditto.
619 (<hw-address> parse!): Ditto.
620 * mode.scm (/mode-table): New global, replaces mode-list.
621 Modes stored in hashtable instead of list.
622 (/mode-class-table): New global.
623 (mode-list-non-alias-values): Update.
624 (mode:eq?, mode-compatible?, mode:add!): Update.
625 (mode:lookup): Restrict arg to the mode's name. All callers updated.
626 (mode-maybe-lookup): New function.
627 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
628 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
629 (mode-find, mode-set-word-modes!): Update
630 (mode-ensure-word-sizes-defined): Update.
631 (/sort-mode-classes!): New function.
632 (mode-builtin!): Update. Sort mode classes here.
633 (mode-finish!): Sort mode classes here too.
634 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
636 (rtl-c-set-quiet): Allow mode to be name of object.
637 (rtl-c-set-trace): Ditto.
638 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
639 <mode> object. All callers updated.
640 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
641 (rtx-lazy-sem-mode): Ditto.
642 (<rtx-temp> make!): Assert mode arg is a <mode> object.
643 (rtx-env-make): Allow var-list modes to be name or object.
644 * sem-frags.scm (/frag-expr-assq-locals): New function.
645 (/frag-compute-locals!): Call it.
646 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
648 * semantics.scm (/build-mem-operand!): Handle mode aliases.
650 * sim-test.scm (*): Symbols no longer can be passed to string-append.
652 2009-09-10 Doug Evans <dje@sebabeach.org>
654 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
655 Improve error message for missing or too many bits.
656 (/insn-parse): Don't verify iformat for virtual insns.
658 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
660 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
661 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
662 * sid.scm (pbb-engine-insns): Ditto.
663 * sim-decode.scm (cgen-decode.c): Ditto.
665 2009-09-09 Doug Evans <dje@sebabeach.org>
667 * rtl-traverse.scm: Comment tweaks.
668 * rtl-xform.scm: Comment and reformatting tweaks.
669 * doc/rtl.texi: Add text to docs on ifield-assertions.
671 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
674 Add support for controlling warnings/errors.
675 Add tests for iformat description errors.
676 * dev.scm (cload): New option #:diag.
677 * read.scm (<reader>): New member verify-iformat?.
678 (/parse-diagnostic, parse-warning): New functions.
679 (parse-error): Guts moved to /parse-diagnostic.
680 (/set-diagnostic-options!): New function.
681 (cpu-load): New arg diagnostic-options, all callers updated.
682 Recognize -w diagnostic-option-list.
683 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
684 (ifld-simple-ifields, ifields-simple-ifields): New function.
685 * insn.scm (/parse-insn-format-iflds): New function.
686 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
687 New arg isa, all callers updated. Do some basic validation of the
688 ifield list if requested.
689 * mach.scm (/sanity-check-insns): Improve error message text.
690 * doc/running.texi: Document -w option.
691 * doc/porting.texi: Document #:trace, #:diag options to cload.
693 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
695 * dev.scm (*): Change default verbosity level to 2.
697 * ifield.scm (<ifield> pretty-print): New method.
698 (ifld-pretty-print): New function.
699 (<multi-ifield> pretty-print): New method.
701 * ifield.scm (<ifield> field-start): Delete word-len arg.
704 (<multi-ifield> field-start): Ditto.
705 * operand.scm (<hw-index> field-start): Ditto.
707 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
708 total-bitsize. All callers updated.
709 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
710 New member /insn-base-value.
711 (insn-base-value): New function.
712 * mach.scm (/sanity-check-insns): New function.
713 (arch-analyze-insns!): Call it.
715 2009-09-08 Doug Evans <dje@sebabeach.org>
717 * iformat.scm (ifields-base-ifields): Simplify.
718 (compute-insn-length): Simplify, call ifields-base-ifields.
719 (compute-insn-base-mask): Ditto.
720 * ifield.scm (ifld-known-values): Ditto.
721 (ifld-base-ifields): Ditto.
722 * insn.scm (insn-value): Ditto.
723 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
725 2009-09-08 DJ Delorie <dj@redhat.com>
727 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
728 preprocessor macro, not an enum.
730 2009-09-08 Doug Evans <dje@sebabeach.org>
732 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
734 (*): Remove trailing ":" from error messages passed to estate-error.
736 2009-09-07 Doug Evans <dje@sebabeach.org>
738 * types.scm (<struct>): Delete.
740 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
742 (/pmacro-loc-error): New function.
744 * mach.scm (/isa-parse-decode-assist): New function.
745 (/isa-parse): Call it.
747 * decode.scm (/get-subopcode-value): New function.
748 (/opcode-slots): Call it.
749 (/fill-slot!): Add logging message.
751 * cos.scm (/object-error): Convert symbols to strings before passing
754 * read.scm (rtl-version-equal?): New function.
755 (rtl-version-at-least?, rtl-version-older?): New functions.
757 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
758 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
760 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
762 2009-09-03 Doug Evans <dje@sebabeach.org>
764 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
767 2009-09-01 DJ Delorie <dj@redhat.com>
769 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
770 (parse_unsigned16_range): Likewise.
771 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
774 2009-09-01 Doug Evans <dje@sebabeach.org>
776 Pmacro .equals -> .equal?
777 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
778 -pmacro-builtin-equals. All callers updated.
779 (pmacros-init!): Rename .equals to .equal?.
780 * doc/pmacros.texi: Update.
781 * testsuite/pmacros-1.test: Update.
783 * doc/porting.texi: Work around texi2html bug where it doesn't
784 properly escape <> inside double-quotes inside @code.
786 * doc/porting.texi (Doing an opcodes port): Add step to specify
789 2009-08-29 Doug Evans <dje@sebabeach.org>
791 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
793 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
795 2009-08-27 Doug Evans <dje@sebabeach.org>
797 Add do-count rtl function.
798 * rtl-c.scm (s-do-count): New function.
799 (do-count): New rtl handler.
800 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
801 (-rtx-make-traverser-table): Add ITERATION.
802 * rtl.scm (rtx-make-iteration-limit-var): New function.
803 (rtx-env-make-iteration-locals): New function.
804 * rtx-funcs.scm (do-count): New rtl function.
805 * cpu/play.cpu: Add do-count-test insn.
806 * doc/rtl.texi: Add docs on do-count.
808 2009-08-26 Doug Evans <dje@sebabeach.org>
810 * read.scm (parse-error): Change error message output format
811 to match context-owner-error.
812 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
813 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
814 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
815 (operand): Call estate-error instead of context-error.
816 (local, delay): Ditto.
817 (ref, attr): Call estate-error instead of error.
818 * rtl-traverse.scm (tstate-error): New function.
819 (-rtx-traverse-error): Call tstate-error instead of context-error.
820 (-rtx-traverse-operands, -rtx-traverse): Ditto.
821 (estate-error): New function.
822 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
824 (e-if): Call estate-error instead of error.
825 * rtx-funcs.scm (error): Call estate-error instead of context-error.
827 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
828 Rewrite to call context-owner-error.
829 (context-owner-error): New function.
831 * ifield.scm (<ifield> constructor): New arg `location',
833 * insn.scm (<insn> constructor): Ditto.
834 (<multi-insn> constructor): Ditto.
835 * minsn.scm (<macro-insn> constructor): Ditto.
836 * operand.scm (<operand> constructor): Ditto.
837 * utils-cgen.scm (builtin-location): New function.
838 (<source-ident>): Fix default value of member `location'.
839 (source-ident?): New function.
841 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
842 (estate-push-env, estate-with-modifiers): Ditto.
843 (estate-deepen): New function.
845 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
847 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
848 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
851 2009-08-25 Doug Evans <dje@sebabeach.org>
853 * doc/pmacros.texi (pmacro default argument values): Add text.
855 2009-08-23 Doug Evans <dje@sebabeach.org>
857 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
858 Rename member prefix -> name-prefix.
859 (<keyword> getters): Update.
860 (-keyword-parse): Update. Default enum-prefix to NAME-.
861 (-keyword-read): Update. Don't compute default value for
863 (define-keyword): Update.
864 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
865 * read.scm (cgen-rtl-version): New function.
866 (-supported-rtl-versions): Add (0 8).
867 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
868 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
869 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
870 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
871 Update, print-name -> enum-prefix, make uppercase.
872 Remove unnecessary name-prefix spec.
873 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
874 * cpu/ip2k.cpu (register-names): Ditto.
875 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
876 * cpu/sparc.cpu (gr-names): Ditto.
877 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
878 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
879 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
880 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
881 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
882 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
883 prefix -> name-prefix.
884 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
885 Update, print-name -> enum-prefix, make uppercase.
886 (drc-names, xf-names): Ditto.
887 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
888 * doc/rtl.texi (Keywords): New section.
889 (hardware indices): Update text.
890 (rtl versions): Add 0.8.
892 Add define-rtl-version.
893 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
894 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
895 (cgen-lang-fixlevel): Delete.
896 (-supported-rtl-versions): New variable.
897 (-cmd-define-rtl-version): New function.
898 (init-reader!): New command define-rtl-version.
899 (-cgen): Add rtl version to --version output.
900 * doc/rtl.texi: Document rtl version support.
901 * cpu/play.cpu: Add define-rtl-version.
903 2009-08-22 Doug Evans <dje@sebabeach.org>
905 * Makefile.am (OPTIONS): Define.
906 (desc): Just generate <arch>-desc.[ch] files.
907 * Makefile.in: Regenerate.
908 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
910 (cgen-desc.c): Similarly.
911 * gen-all-desc: New file.
912 * opcodes.scm (opc-file-provided?): New function.
914 * mach.scm (current-*-add!): Update calls to parse-error.
915 * operand.scm (op:new-mode): Update call to parse-error.
916 * utils-cgen.scm (make-obj-context): New function.
918 * NEWS: Copy over entries from 1.1 branch.
920 2009-08-20 Doug Evans <dje@sebabeach.org>
922 * gas-test.scm (<keyword> test-data): Catch invalid requests,
923 flag a warning and compensate.
924 (<hw-address test-data): Tweak for readability.
925 (<hw-iaddress test-data): Ditto.
926 (cgen-build.sh): Convert symbols to strings before passing to
928 (cgen-allinsn.exp): Ditto.
930 * doc/pmacros.texi (.splice): Add more text.
932 2009-08-19 Doug Evans <dje@sebabeach.org>
934 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
935 distinguish from 1.1.
936 * configure: Regenerate.
937 * read.scm (-CGEN-VERSION): Update.
938 * doc/version.texi: Update.
940 New builtin .pmacro?.
941 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
942 (pmacros-init!): Add .pmacro?.
943 * doc/pmacros.text: Document .pmacro?.
944 * testsuite/pmacros-1.test: Test .pmacro?.
946 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
947 of a pmacro begins before its arguments are evaluated, improves
950 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
951 * testsuite/pmacros-1.test: Ditto. Add better tests.
953 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
955 (Operands): Similarly.
957 2009-08-18 Doug Evans <dje@sebabeach.org>
959 * ifield.scm (ifld-encode-mode): Add FIXME.
960 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
962 (<ifield> gen-extract): Similarly.
964 * read.scm (parse-error): Handle #f for context-location.
965 * utils-cgen.scm (unspecified-location): Fix building of
968 * doc/rtl.texi: Document how to write hex and boolean values.
970 * gas-test.scm (<hw-asm> test-data): Handle () values.
971 (<keyword> test-data): Convert symbols to strings before passing
973 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
976 * operand.scm (hw-index-scalar): Set `name'.
977 (hw-index-anyof, hw-index-derived): Ditto.
979 2009-08-17 Doug Evans <dje@sebabeach.org>
981 * pmacros.scm (-pmacro-builtin-internal-test): New function.
982 (pmacros-init!): Add .internal-test.
983 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
984 * testsuite/testsuite.cpu (internal-verify): New pmacro.
985 * doc/pmacros.text: Document .internal-test.
987 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
988 (parse-comment): Allow numbers.
989 * doc/porting.texi: Document that names and comments may be lists.
991 * insn.scm (-insn-parse): Fix typo.
993 Rename .eval -> .exec. Add new .eval.
994 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
995 (-pmacro-builtin-eval): New function.
996 (pmacros-init!): Add .exec.
997 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
998 * testsuite/location-1.test: Update.
999 * testsuite/pmacros-1.test: Add test for .eval.
1001 2009-08-16 Doug Evans <dje@sebabeach.org>
1003 * doc/porting.texi: Remove support for Guile 1.4.
1005 * read.scm (current-reader-location): Return unspecified location
1006 if reader hasn't been initialized yet.
1008 2009-08-13 Doug Evans <dje@sebabeach.org>
1010 * dev.scm: Document tracing options.
1012 * pmacros.scm (pmacro-dump): New function.
1013 (check-pmacro): Tweak debugging output.
1014 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1015 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1017 Add .let* pmacro builtin.
1018 * pmacros.scm (-pmacro-builtin-let*): New function.
1019 (pmacros-init!): Add .let*.
1020 * doc/pmacros.texi: Document .let*.
1021 * testsuite/pmacros-1.test: Test .let*.
1023 2009-08-12 Doug Evans <dje@sebabeach.org>
1025 Clean up cpu file parsing, pass context consistently instead of the
1026 old "errtxt" argument.
1027 NOTE: ACU == "All Callers Updated".
1028 * attr.scm (-parse-simple-attribute): Renamed from
1029 parse-simple-attribute, ACU.
1030 (-attr-parse): Change errtxt argument to context, ACU.
1031 (-attr-read): Ditto.
1032 (atlist-parse): Ditto. Put context arg first.
1033 (attr-parse): Use parse-error instead of context-error.
1034 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1035 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1036 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1037 `context' arg is now a <context> object. ACU.
1038 (-keyword-read): `context' arg is now a <context> object. ACU.
1039 (-hw-parse-indices): Change errtxt argument to context, ACU.
1040 (-hw-parse-values, -hw-parse-handlers): Ditto.
1041 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1042 (-hw-validate-layout, -hw-create-getter-from-layout,
1043 -hw-create-setter-from-layout): Ditto.
1044 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1045 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1046 (<hw-address>:parse!): Ditto.
1047 * ifield.scm (-ifield-parse, ifield-read): Ditto.
1048 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1049 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1050 (-multi-ifield-parse, -multi-ifield-read): Ditto.
1051 * insn.scm (-insn-parse, -insn-read): Ditto.
1052 (parse-syntax): Ditto. Put context arg first.
1053 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1054 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1055 (-parse-insn-format): Ditto.
1056 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1057 (-arch-parse-isas): Ditto.
1058 (-isa-read): Add context arg, ACU.
1059 (-cpu-parse, -cpu-read, -mach-read): Ditto.
1060 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1062 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1063 (minsn-make-alias): Ditto.
1064 * mode.scm (-mode-parse): Ditto.
1065 (parse-mode-name): Ditto. Put context arg first.
1066 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1067 errtxt argument to context, ACU.
1068 (-unit-parse, -model-parse, -model-read): Ditto.
1069 * operand.scm (-operand-parse-getter): Use parse-error instead of
1071 (-operand-parse-setter): Ditto.
1072 (-operand-parse): Change errtxt argument to context, ACU.
1073 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1074 (-anyof-operand-parse, -anyof-operand-read): Ditto.
1075 * read.scm (reader-error): Delete. Use parse-error instead.
1076 (parse-error): Change errtxt argument to context, ACU. Split args
1077 argument into expr and maybe-help-text.
1078 (-reader-process-expanded-1!): Reorganize.
1079 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1080 * types.scm (parse-type): Ditto.
1081 * utils-cgen.scm (single-location->simple-string): New function.
1082 (<context>): Replace members file,lineno with location.
1083 (make-prefix-context): Renamed from context-make-prefix, ACU.
1084 (make-current-context): New function.
1085 (context-append, context-append-name): New functions.
1086 (context-make-reader): Delete.
1087 (parse-name): Change errtxt argument to context, ACU.
1088 Put context arg first.
1089 (parse-comment): Ditto.
1090 (parse-number): Change errtxt argument to context, ACU.
1091 (arg-list-validate-name, arg-list-check-no-args,
1092 arg-list-symbol-arg): Ditto.
1094 * read.scm (-cmd-if): Don't assume test is a list.
1096 * html.scm (get-insn-properties): Delete errtxt, unused.
1098 2009-08-11 Doug Evans <dje@sebabeach.org>
1100 * doc/rtl.texi (hardware types): Add pc.
1102 2009-08-07 Doug Evans <dje@sebabeach.org>
1104 Add -t option for tracing things like commands, pmacro expansion.
1105 * dev.scm (cload): New arg #:trace.
1106 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1107 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
1108 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1109 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1110 (-reader-process-expanded-1!): Trace commands if requested.
1111 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1112 (-set-trace-options!): New function.
1113 (-init-reader!): New function.
1114 (cpu-load): New arg trace-options, all callers updated.
1115 Call -init-reader! and -set-trace-options!.
1116 (cgen-usage): Improve output formatting.
1117 (common-arguments): New option -t.
1118 (-cgen): Process -t.
1119 * utils-cgen.scm (single-location->string): Renamed from
1120 pretty-print-single-location. All callers updated.
1121 (location->string): Renamed from pretty-print-location.
1122 All callers updated.
1123 (source-properties-location->string): New function.
1124 * doc/running.texi: Document -t.
1126 2009-08-06 Doug Evans <dje@sebabeach.org>
1128 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1129 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1130 * utils.scm: ... here.
1132 2009-08-05 Doug Evans <dje@sebabeach.org>
1134 Track source location better, for better error messages.
1135 * pmacros.scm (-pmacro-eval): Delete, unused.
1136 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1137 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1138 (scan-list, scan): Ditto.
1139 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1140 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1141 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1142 (scan-list1): New function.
1143 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
1144 * read.scm (<reader>): New member `location'.
1145 (-reader-lookup-command): Renamed from reader-lookup-command,
1146 all callers updated.
1147 (reader-error): Rewrite to produce better source location info.
1148 (current-reader-location): New function.
1149 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1150 All callers updated. Record source location of expression.
1151 (reader-process-expanded!): Renamed from reader-process-expanded.
1152 All callers updated.
1153 (-reader-process!): Renamed from reader-process. New arg `loc'.
1154 All callers updated. Record source location of define-pmacro.
1155 * utils-cgen.scm (<location>): New class.
1156 (single-location): New (pseudo) class.
1157 (pretty-print-single-location, pretty-print-location): New functions.
1158 (location-top, location-push-single, location-push): New functions.
1159 (unspecified-location, current-input-location): New functions.
1160 (location-property): New object property.
1161 (location-property-set!): New function.
1162 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
1164 * testsuite/location-1.test: New testcase.
1165 * testsuite/run-tests.sh: Fix fail count handling.
1166 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
1167 to expect cgen to fail.
1169 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1171 * read.scm (-cmd-include): Renamed from include. All callers updated.
1172 (-cmd-if): Renamed from cmd-if. All callers updated.
1173 Use reader-process-expanded! on then/else clauses instead of eval1.
1175 2009-07-22 Doug Evans <dje@sebabeach.org>
1177 * modes.scm (TI,OI): New modes.
1178 * types.scm (parse-type): Improve error checking. Don't hardwire
1180 * utils.scm (non-negative-integer?): New function.
1182 * pmacros.scm (-pmacro-builtin-find): New predicate.
1183 (pmacros-init!): Add .find.
1184 * doc/pmacros.tex: Document .find.
1185 * testsuite/pmacros-1.test: Test .find.
1187 2009-07-20 Doug Evans <dje@sebabeach.org>
1189 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1190 commented out printfs.
1191 * rtl.scm (rtl-finish!): Whitespace tweaks.
1192 * model.scm (parse-insn-timing): Tweak logging message.
1193 * operand.scm: Comment and whitespace tweaks.
1194 (op:type): Tweak error message.
1195 (op-ifield): Tweak logging message.
1196 (-derived-operand-parse, anyof-merge-semantics): Ditto.
1197 * read.scm: Whitespace cleanup.
1198 * utils.scm: Whitespace cleanup.
1200 2009-07-19 Doug Evans <dje@sebabeach.org>
1202 Fix binding of nested pmacro parameters.
1203 * pmacros.scm (-pmacro-env-make): New arg prev-env.
1204 All callers updated.
1205 (-pmacro-bulid-lambda): Ditto.
1206 * doc/pmacros.texi: Update.
1207 * testsuite/pmacros-1.test: Add testcase.
1209 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1211 (-multi-ifield-make-default-extract): Ditto.
1213 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1214 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1215 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1217 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1218 * doc/rtl.texi: Update.
1220 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1222 Rename builtin boolean pmacros, for consistency with rtl.
1223 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1224 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1225 * doc/pmacros.texi: Update.
1226 * testsuite/pmacros-1.test: Update.
1228 2009-07-17 Doug Evans <dje@sebabeach.org>
1230 Use hash tables to record ifields, operands, insns, macro-insns.
1231 * attr.scm (attr-builtin!): Tweak some comments.
1232 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1233 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1235 (<multi-ifield>): New constructor.
1236 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1237 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1239 (-sub-insn-make!): Add hack to avoid differences in generated code.
1240 (multi-insn-instantiate!): Add total number of multi-insns to
1242 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1243 minsn-list to foo-table. New member next-ordinal.
1244 Update getters/setters.
1245 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1247 (-get-next-ordinal!, -get-lowest-ordinal): New function.
1248 (-make-ident-object-table, -ident-object-table->list,
1249 -ident-object-table-add!, -ident-object-table-lookup): New functions.
1250 (current-ifld-list, current-ifld-add! current-ifld-lookup,
1251 -ifld-already-defined?): Rewrite.
1252 (current-op-list, current-op-add! current-op-lookup,
1253 -op-already-defined?): Rewrite.
1254 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1255 (current-insn-list, current-insn-add! current-insn-lookup,
1256 -insn-already-defined?): Rewrite.
1257 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1258 -minsn-already-defined?): Rewrite.
1259 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1260 (MAX-VIRTUAL-INSNS): Define.
1261 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1262 Update use of arch-insn-list.
1263 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1264 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1266 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1267 <ident>. New constructor.
1268 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1270 * sid.scm (-virtual-insn-add!): New function.
1271 (-create-virtual-insns!): Call it.
1272 (-fill-sim-insn-list!): Rewrite.
1273 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1274 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1275 * utils-cgen.scm (<ordered-ident>): New class.
1276 (obj-ordinal, obj-set-ordinal!): New functions.
1277 (add-ident-methods!): Delete.
1279 * model.scm (parse-insn-timing): Change logging message to level 3.
1281 2009-07-16 Doug Evans <dje@sebabeach.org>
1283 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1284 add a link to define-normal-insn-enum.
1286 * doc/porting.texi (Conventions): Add docs on writing integers.
1288 * cpu/simplify.inc (*): One line doc strings don't need \n.
1289 (df): Invoke define-full-ifield instead of claiming it's an alias.
1291 (dnop): Mark as deprecated.
1293 * cpu/play.cpu: Add example of hardware `layout'.
1294 * doc/porting.tex: Add docs on simplify.inc.
1295 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1298 * ifield.scm: Whitespace/formatting cleanup.
1300 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1302 * read.scm (parse-error): Don't print single entry args as a list.
1303 (-reader-process-expanded-1): Convert symbol to string for
1306 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1308 2009-07-15 Doug Evans <dje@sebabeach.org>
1310 * cpu/simplify.inc (dno): New pmacro.
1311 * doc/porting.texi: Add section on simplify.inc.
1312 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1314 2009-07-15 Doug Evans <devans@sourceware.org>
1316 * gen-all-doc: Generate index.html.
1318 2009-07-13 Doug Evans <dje@sebabeach.org>
1320 Extend pmacro language, add testsuite.
1321 * Makefile.am (SUBDIRS): Add testsuite.
1322 * Makefile.in: Regenerate.
1323 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1324 testsuite/test-utils.sh.
1325 * configure: Regenerate.
1326 * dev.scm (cload): Handle testsuite app.
1327 (load-testsuite): New function.
1328 * pmacros.scm: (-pmacro-debug?): New global.
1329 (-smacro-table): New global.
1330 (-smacro-lookup, -smacro-set!): New functions.
1331 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1332 (-pmacro-syntactic-form?): New function.
1333 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1334 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1335 (-pmacro-expected-non-negative-integer): New function.
1336 (-pmacro-verify-non-negative-integer): New function.
1337 (-pmacro-expand-expr-list): New function.
1338 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1339 (-pmacro-process-args): Renamed from -pmacro-invoke.
1340 (-pmacro-apply, -smacro-apply): New functions.
1341 (-pmacro-expand): Rewrite syntactic form processing.
1342 (-pmacro-build-lambda): Reformat.
1343 (define-pmacro): Watch for more errors in definition.
1344 (pmacro-debug): New function.
1345 (pmacro-trace): Set/reset -pmacro-debug?.
1346 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1347 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1348 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1349 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1350 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1351 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1352 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1353 (pmacros-init!): Initialize -smacro-table.
1354 Rewrite pmacro initialization.
1355 * read.scm (reader-process-expanded): Renamed from
1356 -reader-process-expanded. All callers updated.
1357 Recognize () as a no-op.
1358 (cpu-load): Tweak logging messages.
1359 * utils.scm (message): Add comment.
1360 * cpu/play.cpu: Add some instructions to play with .let.
1361 * doc/cgenint.texi: Move some debugging related docs to here from
1363 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1364 * testsuite/Makefile.am: New file.
1365 * testsuite/Makefile.in: New file.
1366 * testsuite/test-utils.sh.in: New file.
1367 * testsuite/run-tests.sh: New file.
1368 * testsuite/testsuite.cpu: New file.
1369 * testsuite/pmacros-1.test: New file.
1371 * decode.scm: Comment and formatting tweaks.
1372 (-build-decode-table-guts): Add more data to logging message.
1374 2009-07-12 Doug Evans <dje@sebabeach.org>
1376 Delete files that now live in ../cpu.
1377 * cpu/iq10.cpu: Delete.
1378 * cpu/iq2000.cpu: Delete.
1379 * cpu/iq2000.opc: Delete.
1380 * cpu/iq2000m.cpu: Delete.
1381 * cpu/m32r.cpu: Delete.
1382 * cpu/m32r.opc: Delete.
1384 2009-07-09 Doug Evans <dje@sebabeach.org>
1386 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1387 All callers updated. Work around -ve shifts by referencing the
1390 * utils.scm (message): Handle pairs.
1392 2009-07-08 DJ Delorie <dj@redhat.com>
1394 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1395 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1396 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1399 2009-07-07 Doug Evans <dje@sebabeach.org>
1401 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1402 * cpu/play.opc: New file.
1404 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1405 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1406 * doc/rtl.texi (Instructions): Update.
1408 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1409 (opc-arguments, -OPC): Call set-opc-file-path!.
1410 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1411 (set-opc-file-path!): New function.
1412 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1414 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1415 before passing to gen-c-args.
1417 2009-07-06 DJ Delorie <dj@redhat.com>
1419 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1420 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1421 unspecified accesses to control registers.
1423 2009-07-01 DJ Delorie <dj@redhat.com>
1425 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1426 unspecified accesses to control registers.
1428 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1429 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1431 2009-06-27 Doug Evans <dje@sebabeach.org>
1433 * gen-all-intrinsics: New file.
1435 2009-06-24 Doug Evans <dje@sebabeach.org>
1437 * All *.scm files: Update copyright year.
1438 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1440 2009-06-23 DJ Delorie <dj@redhat.com>
1442 * intrinsics.scm: Updates to support IVC2.
1443 (belongs-to-group?): Check IVC2 slots.
1444 (-slots-attribute): New.
1445 (targets::attributes): Add SLOTS.
1446 (target:add-well-known-intrinsics): Add CPMOV.
1447 (md-insn): Add CPTYPE and CRET?.
1448 (add-md-insn): Likewise.
1449 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1450 duplicate insns with different bit patterns.
1451 (write-cgen-insn?): Add cret? support.
1452 (intrinsics.h): Add vector types.
1453 (runtime-op): Add vector support.
1454 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1456 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1457 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1458 (h-cr-ivc2): Default to typeless.
1459 (h-ccr-ivc2): Fix register width.
1460 (SLOTS): Fix values and default.
1461 (ivc2_*): Add control register names.
1462 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1464 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1465 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1467 2009-06-22 Doug Evans <dje@sebabeach.org>
1469 * semantics.scm (insn-build-known-values): Fix typo in comment.
1471 2009-06-21 Doug Evans <dje@sebabeach.org>
1473 * rtl-xform.scm (rtx-simplify-insn): New function.
1474 * html.scm (gen-insn-docs): Call it.
1475 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1476 * iformat.scm (ifmt-analyze): Minor simplification.
1478 * semantics.scm (semantic-compile): Change arg sem-code-list to
1480 (semantic-attrs): Ditto.
1481 * iformat.scm (ifmt-analyze): Update.
1482 (ifmt-compute!): Update.
1483 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1485 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1486 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1487 * semantics.scm (rtx-simplify): Ditto.
1488 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1489 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1490 (-simplify-expr-fn): Move to rtl-xform.scm.
1491 (-solve-expr-fn, rtx-solve): Ditto.
1492 * rtl-xform.c: New file.
1493 * read.scm: Load it.
1495 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1496 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1497 (-rtx-traverse, rtx-traverse): Ditto.
1499 2009-06-20 Doug Evans <dje@sebabeach.org>
1501 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1503 * configure.in: Update version to 1.1.
1504 * configure: Regenerate.
1505 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1507 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1508 Doug Evans <dje@sebabeach.org>
1510 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1511 (cgen-desc.c): Ditto.
1512 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1513 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1514 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1515 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1516 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1517 (cgen-cpuall.h, cgen-ops.c): Ditto.
1518 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1519 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1520 (cgen-sem-switch.c): Ditto.
1521 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1522 * sim-model.c (cgen-model.c): Ditto.
1524 2009-06-18 Doug Evans <dje@sebabeach.org>
1526 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1528 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1530 * dev.scm (cload): Change #:arch argument to take the path to the
1531 .cpu file instead of just the name of the architecture.
1532 * read.scm (arch-path): Remove trailing '/'.
1533 (cpu-load): Set `arch-path' to directory of .cpu file.
1534 (-cgen): Don't set `arch-path' here.
1536 * doc/porting.texi: Update.
1538 2009-06-14 Doug Evans <dje@sebabeach.org>
1540 * gen-all-doc: Use files in ../cpu where possible.
1542 * Makefile.am (ARCHFILE): Fix path.
1543 * Makefile.in: Regenerate.
1544 * html.scm: Use "pre" instead of "plaintext".
1546 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1547 * doc/app.texi: Cleanup pass.
1548 * doc/cgen.texi: Cleanup pass.
1549 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1550 * doc/intro.texi: Cleanup pass.
1551 * doc/mdate-sh: New file.
1552 * doc/opcodes.texi: Cleanup pass.
1553 * doc/pmacros.texi: Cleanup pass.
1554 * doc/porting.texi: Cleanup pass.
1555 * doc/rtl.texi: Cleanup pass.
1556 * doc/running.texi: Cleanup pass. Document more runtime options.
1557 * doc/stamp-vti: Update.
1558 * doc/version.texi: Update.
1560 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1561 (GUILE): Fix definition.
1562 * Makefile.in: Regenerate with automake 1.9.6.
1563 * aclocal.m4: Regenerate with aclocal 1.9.6.
1564 * configure.in (AC_PREREQ): Set to 2.59.
1565 (GENINSRC_NEVER): Define.
1566 * configure: Regenerate with autoconf 2.59.
1567 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1568 (cgen.info,cgen.dvi): Delete.
1569 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1570 (noinst_TEXINFOS): Add cgenint.texi.
1571 (DOCFILES): Add missing files.
1572 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1573 * doc/Makefile.in: Regenerate with automake 1.9.6.
1575 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1577 * attr.scm: Removing trailing whitespace.
1578 * cgen-intrinsics.scm: Ditto.
1579 * cgen-sim.scm: Ditto.
1585 2009-05-28 DJ Delorie <dj@redhat.com>
1587 * cpu/mep.opc (parse_signed16_range): New.
1588 (parse_unsigned16_range): New.
1589 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1591 2009-05-26 DJ Delorie <dj@redhat.com>
1593 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1595 (f-ivc2-ccrn-c3hi): New.
1596 (f-ivc2-ccrn-c3lo): New.
1597 (f-ivc2-ccrn-c3): New.
1598 (ivc2c3ccrn): Use it.
1600 2009-05-22 DJ Delorie <dj@redhat.com>
1602 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1603 (mep_config_map): Regenerate.
1605 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1606 ivc2-specific names.
1608 (cmovc): move to after field definitions, use ivc2-specific
1610 (cpmovi_b_P0S_P1): New.
1612 2009-05-19 DJ Delorie <dj@redhat.com>
1614 * cpu/mep.opc: Regenerate configuration.
1615 (parse_cdisp10): Only check CPU flags, not COP flags.
1616 (check_configured_mach): Likewise.
1618 2009-05-13 DJ Delorie <dj@redhat.com>
1620 * intrinsics.scm (insns.md): Add RTL predicates.
1621 (intrinsics.h): Remove old C intrinsics.
1623 2009-04-29 DJ Delorie <dj@redhat.com>
1625 * mep-ivc2.cpu: New.
1626 * mep-core.cpu: Regenerated. Add support for deferred register
1628 (SLOT): Add IVC2 slot types.
1629 (sim-syscall): Rename to something more appropriate.
1630 * mep-ext-cop.cpu: Regenerate.
1631 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1632 (print_slot_insn): New.
1633 (mep_examine_ivc2_insns): New.
1634 (mep_print_insn_set_ivc2_mode): New.
1635 (mep_print_insn): Support IVC2 slotting.
1637 2009-04-20 DJ Delorie <dj@redhat.com>
1639 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1640 (guess-mode): Drop COP* syntax.
1641 (need-insn): Add "--syscall--" to the list.
1642 (enum-type): Drop COP* syntax.
1643 (intrinsics.h): Likewise.
1644 (intrinsic-protos.h): Change file header to allow it to be
1647 2009-04-17 DJ Delorie <dj@redhat.com>
1649 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1650 (lhucpm1): Limit to C5 mach.
1651 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1652 * cpu/mep-core.cpu (extend-cdisp10): New.
1653 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1655 2009-04-08 DJ Delorie <dj@redhat.com>
1657 * cpu/mep-c5.cpu: New.
1658 * cpu/mep-core.cpu: Add C5 support.
1659 * cpu/mep.opc: Likewise.
1661 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1663 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1664 about calling memset with a zero length.
1666 2009-02-03 DJ Delorie <dj@redhat.com>
1668 * cpu/mep-core.cpu: Update to new MeP configuration.
1669 * cpu/mep-ext-cop.cpu: Likewise.
1670 * cpu/mep.opc: Likewise.
1672 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1674 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1676 2008-06-17 Dave Brolley <brolley@redhat.com>
1678 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1681 2007-11-13 Dave Brolley <brolley@redhat.com>
1683 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1685 2007-11-05 Dave Brolley <brolley@redhat.com>
1687 * intrinsics.scm,cgen-intrinsics.scm: New application which
1688 generates code to support intrinsic functions for insns in the
1689 mep architecture in gcc.
1691 2007-09-21 Dave Brolley <brolley@redhat.com>
1693 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1694 (rn3us): CDATA attribute now LONG.
1696 2007-08-21 Dave Brolley <brolley@redhat.com>
1698 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1701 2007-07-05 Nick Clifton <nickc@redhat.com>
1703 * utils.scm (copyright-fsf): Update copyright notice to refer to
1706 2007-05-22 Nick Clifton <nickc@redhat.com>
1708 * doc/cgen.texi: Use @copying around the copyright notice.
1709 * doc/internals.texi: Likewise.
1711 2007-02-05 Dave Brolley <brolley@redhat.com>
1713 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1715 2007-02-05 Dave Brolley <brolley@redhat.com>
1717 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1718 in the generated code for @arch@_cgen_init_asm if it is defined.
1720 * Contribute the following changes:
1721 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1723 * attr.scm (<string-attribute>): New attribute class.
1724 (attr-kind): Handle <string-attribute>.
1725 (parse-simple-attribute): New function.
1726 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1727 (<bitset-attribute> 'parse-value): Likewise.
1728 (<boolean-attribute> 'parse-value): Likewise.
1729 (<enum-attribute> 'parse-value): Likewise.
1730 (<string-attribute> 'parse-value): New function.
1731 (-attr-parse): Handle <string-attribute>.
1732 (-attr-read): Likewise.
1733 (<string-attribute> 'gen-value-for-defn-raw): New function.
1734 (<string-attribute> 'gen-value-for-defn): New function.
1736 2006-11-07 Dave Brolley <brolley@redhat.com>
1738 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1741 2006-10-18 Dave Brolley <brolley@redhat.com>
1743 * Contribute the following changes:
1745 2006-07-11 Dave Brolley <brolley@redhat.com>
1747 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1749 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1750 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1751 hardware or memory mode which was used.
1752 * sid-cpu.scm (hw-need-write-stack?): New function.
1753 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1754 identify hardware which uses write stacks.
1755 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1756 Initialized to an empty list.
1757 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1758 hw-need-write-stack?.
1759 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1760 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1761 (used-in-delay-rtl?): New method of <hardware-base>.
1762 (hw-used-in-delay-rtl?): New function.
1764 2006-06-20 Dave Brolley <brolley@redhat.com>
1766 * sid.scm (gen-attr-type): Removed.
1767 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1768 (SH2a-MACH): Add sh5.
1769 (sh2a-nofpu-models): Add units for sh5.
1770 (sh2a-fpu-models): Likewise.
1772 2006-06-15 Dave Brolley <brolley@redhat.com>
1774 * cpu/sh-sim.cpu: New file.
1775 * cpu/sh-sid.cpu: New file.
1776 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1777 (All fields): Remap for (insn-lsb0? #f)
1778 (All insns): Add timing specs.
1779 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1780 'xattrs' and .splice it in.
1781 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1782 (h-frc,h-drc): Add PROFILE attribute.
1784 (h-vbr): New hardware.
1785 (All fields): Remap for (insn-lsb0? #f)
1786 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1787 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1788 (fpscr): Use h-fpscr.
1789 (fsdm,fsdn): Use h-fsd.
1790 (dshci): Add xtiming argument and splice it in.
1791 (dr,xd): pmacros removed.
1792 (All insns): Add timing specs, *-MACH attribibutes,
1793 SH4{A}-GROUP attributes.
1794 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1795 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1796 we're being processed for sim or sid.
1797 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1798 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1799 (define-isa compact): Add (isa-parallel-insns 2).
1800 (define-isa media): Add (isa-parallel-insns 2). Add
1801 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1802 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1804 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1805 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1806 (SH4al-MACH, SH5-MACH): New pmacros.
1807 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1808 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1809 (sh5-media-fp-units, common-model, common-model-with-fp)
1810 (sh3-model, sh3e-model): New pmacros.
1811 (define-model sh2): New model.
1812 (define-model sh2e): New model.
1813 (define-model sh3): New model.
1814 (define-model sh3e): New model.
1815 (define-model sh2a-nofpu): New model.
1816 (define-model sh2a-fpu): New model.
1817 (define-model sh4-nofpu): New model.
1818 (define-model sh4): New model.
1819 (define-model sh4a-nofpu): New model.
1820 (define-model sh4a): New model.
1821 (define-model sh4al): New model.
1822 (define-model sh5-media): New model.
1823 (define-model sh5): Add all units.
1824 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1825 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1826 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1827 (h-pc): Add PROFILE attribute.
1830 (h-gr,h-grc): Likewise.
1831 (h-cr): Set h-sr in setter.
1832 (h-frbit): Get/Set h-fpscr.
1833 (h-szbit,h-prbit): Likewise.
1834 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1835 Add getter and setter.
1836 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1837 Adjust getter and setter.
1838 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1839 Adjust getter and setter.
1840 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1841 (h-fsd,h-fmov): New hardware.
1843 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1845 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1846 doc/notes.texi, doc/porting.texi, doc/running.texi,
1847 doc/sim.texi: Fix some typos.
1849 2006-07-14 Dave Brolley <brolley@redhat.com>
1851 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1852 hardware or memory mode which was used.
1853 * sid-cpu.scm (hw-need-write-stack?): New function.
1854 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1855 identify hardware which uses write stacks.
1856 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1857 Initialized to an empty list.
1858 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1859 hw-need-write-stack?.
1860 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1861 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1862 (used-in-delay-rtl?): New method of <hardware-base>.
1863 (hw-used-in-delay-rtl?): New function.
1865 2006-06-20 Dave Brolley <brolley@redhat.com>
1867 * sid.scm (gen-attr-type): Removed.
1869 2006-05-10 Dave Brolley <brolley@redhat.com>
1871 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1872 support for (if (application-is? <appname>) (...) (...)).
1873 (-cgen): Add trailing "/" to arch-path.
1874 * utils.scm (dirname): Removed. dirname is a primitive function.
1876 2006-05-09 Dave Brolley <brolley@redhat.com>
1878 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1879 'entire_insn' not 'base_insn'.
1880 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1882 * sim.scm (-gen-arch-model-decls): Likewise.
1883 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1884 abuf->written if profiling.
1885 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1886 object->string om the mode.
1887 (-hw-gen-write-stack-decl): Likewise.
1888 * read.scm (include): Use arch-path as file location.
1889 (arch-path): Define it with a default setting.
1890 (-cgen): Update arch-path when "-a" option is specified.
1891 * utils.scm (dirname): New function.
1893 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1895 * configure.in: Remove AC_ARG_PROGRAM.
1896 * configure: Regenerate with autoconf 2.59.
1898 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1900 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1903 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1905 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1906 or an error message otherwise.
1907 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1908 Fix up comments to correctly describe the functions.
1910 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1911 Anil Paranjape <anilp1@kpitcummins.com>
1912 Shilin Shakti <shilins@kpitcummins.com>
1914 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1916 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1918 2006-02-10 Nick Clifton <nickc@redhat.com>
1920 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1922 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1924 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1926 (-hw-gen-write-stack-decl): Likewise.
1928 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1930 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1931 non-(adata-integral-insn? CURRENT-ARCH) case.
1933 2005-10-28 Dave Brolley <brolley@redhat.com>
1935 Contribute the following changes:
1936 2005-09-19 Dave Brolley <brolley@redhat.com>
1938 * attr.scm (gen-value-for-defn-raw): New methods.
1939 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1940 gen-value-for-defn-raw.
1941 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1943 2002-12-13 Dave Brolley <brolley@redhat.com>
1945 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1946 (-gen-attr-accessors): New function.
1947 (gen-obj-attr-defn): Update terminating initializer.
1948 (gen-obj-attr-end-defn): New function.
1949 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1950 * sid-cpu.scm (cgen-desc.h): Generate code to include
1951 "opcode/cgen-bitset.h"
1952 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1954 * desc.scm ('gen-defn): Update terminating initializer.
1955 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1956 terminatinig initializer.
1957 (gen-hw-decls): Ditto.
1958 (gen-operand-decls): Ditto.
1959 (gen-insn-decls): Ditto.
1960 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1961 (gen-insn-table): Update terminating initializer.
1962 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1963 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1964 * attr.scm (charmask-bytes): New function.
1965 (bitset-attr->charmask): New function.
1966 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1967 differences for SID-SIMULATOR.
1968 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1969 (<enum-attribute>): Ditto.
1971 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1973 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1975 2005-10-24 DJ Delorie <dj@redhat.com>
1977 * operand.scm (-anyof-merge-syntax): Print a more useful error
1980 2005-10-19 Nick Clifton <nickc@redhat.com>
1982 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1985 2005-10-18 Andreas Schwab <schwab@suse.de>
1987 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1989 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1991 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1994 2005-08-02 Dave Brolley <brolley@redhat.com>
1996 * rtl-c.scm (s-unop): Don't dereference
1997 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1998 (s-binop, s-convop, s-cmpop): Likewise.
2000 2005-07-29 Dave Brolley <brolley@redhat.com>
2002 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
2003 if with-profile or with-parallel-write.
2004 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
2005 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
2008 2005-07-15 Alan Modra <amodra@bigpond.net.au>
2010 * cpu/fr30.opc (print_register_list): Correct format strings.
2011 * cpu/ip2k.opc: Likewise.
2013 2005-07-05 Nick Clifton <nickc@redhat.com>
2015 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2016 unsigned in order to avoid compile time warnings about sign
2019 2005-07-01 Nick Clifton <nickc@redhat.com>
2021 * desc-cpu.scm: Update to ISO C90 function declaration style.
2022 * opc-asmdis.scm: Likewise.
2023 * opc-ibld.scm: Likewise.
2024 * opc-itab.scm: Likewise.
2025 * cpu/fr30.opc: Likewise.
2026 * cpu/i960.opc: Likewise.
2027 * cpu/ip2k.opc: Likewise.
2028 * cpu/iq2000.opc: Likewise.
2029 * cpu/m32r.opc: Likewise.
2030 * cpu/openrisc.opc: Likewise.
2031 * cpu/sh.opc: Likewise.
2032 * cpu/sparc.opc: Likewise.
2033 * cpu/xstormy16.opc: Likewise.
2035 2005-06-15 Dave Brolley <brolley@redhat.com>
2037 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2038 (cgen-cpu.h): Call it.
2040 Contributed on behalf of Graydon Hoare
2041 2001-06-05 graydon hoare <graydon@redhat.com>
2043 * utils.scm (foldl): Define.
2047 (intersection): Simplify.
2048 * sid.scm : Set APPLICATION to SID-SIMULATOR.
2049 (-op-gen-delayed-set-maybe-trace): Define.
2050 (<operand> 'gen-set-{quiet,trace}): Delegate to
2051 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2052 up and needs cleaning.
2053 (-with-parallel?): Hardwire with-parallel to #t.
2054 (<operand> 'cxmake-get): Replace with lookahead-aware code
2055 * sid-decode.scm: Remove per-insn writeback fns.
2056 (-gen-idesc-decls): Redefine sem_fn type.
2057 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2058 with write stack stuff.
2059 (cgen-write.cxx): Replace per-insn writebacks with single write
2060 stack writeback. Add write stack reset function.
2061 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2063 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2064 estate attribute set.
2065 (delay): Set #:delayed attribute to calculated delay, update
2066 maximum delay of cpu, check (delay ...) usage.
2067 * operand.scm (<operand>): Add delayed slot to <operand>.
2068 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2069 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2070 * doc/rtl.texi (Expressions): Add section on (delay ...).
2072 2005-06-13 Jim Blandy <jimb@redhat.com>
2074 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2077 2005-06-07 Zack Weinberg <zack@codesourcery.com>
2079 * doc/porting.texi: Change all mention of md_apply_fix3 and
2080 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2083 2005-05-18 Dave Brolley <brolley@redhat.com>
2085 * utils-sim.scm (-gen-decode-default-entry): New function.
2086 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2087 code to check that all opcodes bits match.
2088 (-gen-decoder-switch): Use -gen-decode-default-entry.
2090 2005-05-16 Jim Blandy <jimb@redhat.com>
2092 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2093 fetched by one of our GETIMEM* methods.
2094 * utils-gen.scm (-extract-chunk-specs): Always fetch full
2095 base-insn-sized chunks.
2097 2005-05-10 Nick Clifton <nickc@redhat.com>
2099 * Update the address and phone number of the FSF organization in
2100 the GPL notices in the following files:
2101 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2102 cpu/powerpc.cpu, slib/random.scm
2104 2005-05-06 Jim Blandy <jimb@redhat.com>
2106 * pprint.scm, cos-pprint.scm: Add documentation.
2108 * pprint.scm (pprint): Don't wipe out elide-table after each call.
2110 * pprint.scm, cos-pprint.scm: New files.
2112 2005-04-04 Nick Clifton <nickc@redhat.com>
2114 * opcodes.scm (-gen-parse-address): Initialise value to zero to
2115 avoid a compile time warning.
2117 2005-03-18 Nick Clifton <nickc@redhat.com>
2119 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2120 "percent-operand" from "%operand" as the latter confuses xgettext
2121 into thinking that it is a C printf formating directive, which
2122 prevents proper translation.
2124 2005-02-23 Nick Clifton <nickc@redhat.com>
2126 * opcodes.scm (gen-parse-number): Add a cast to the desired
2127 pointer signed'ness in order to prevent compile time warnings.
2128 * cpu/ip2k.opc: Fixed compile time warnings about differing
2129 signed'ness of pointers passed to functions.
2130 * cpu/iq2000.opc: Likewise.
2131 * cpu/m32r.opc: Likewise.
2132 * cpu/openrisc.opc: Likewise.
2133 * cpu/xstormy16.opc: Likewise.
2135 2005-02-22 Alan Modra <amodra@bigpond.net.au>
2137 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2138 (cgen-desc.h): ..to here, after opcode/cgen.h include.
2140 2005-02-16 Dave Brolley <brolley@redhat.com>
2142 * utils.scm: Update copyright years.
2143 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2144 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2145 * operand.scm (-derived-operand-parse): Move logit message from level 1
2148 2005-02-15 Nick Clifton <nickc@redhat.com>
2150 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2151 prevent compile time warning messages.
2152 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2153 * utils-gen.scm (attr-int-gen-defn): Likewise.
2154 (attr-gen-defn): Likewise.
2155 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2156 (print_dollarhex16): Remove unused function.
2158 2005-02-15 Jim Blandy <jimb@redhat.com>
2160 * guile.scm (cgen-call-with-debugging): Doc fix.
2162 Make backtraces work more reliably.
2163 * guile.scm: Set up debugging parameters, and enable debugging and
2164 source positions while loading.
2165 (cgen-call-with-debugging, cgen-debugging-stack-start): New
2167 * read.scm: Don't set debugging parameters here.
2168 (catch-with-backtrace): Function deleted.
2169 (-cgen): Simply note the presence or absence of the -b option.
2170 Pass the flag to cgen-call-with-debugging, so debugging is turned
2171 off here if the user didn't request it, for faster computation.
2172 (cgen): Call cgen-debugging-stack-start here, instead of
2173 catch-with-backtrace.
2175 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2177 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2178 Don't write out the trailing -s here.
2179 * Makefile.in: Regenerated.
2180 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2181 fixup.scm here; let the caller decide which Scheme's customization
2183 * dev.scm: Load guile.scm, not fixup.scm.
2184 * fixup.scm: Deleted; contents have all moved to guile.scm.
2187 * guile.scm (debug-write): New function.
2189 2005-02-14 Jim Blandy <jimb@redhat.com>
2191 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2192 transformer procedure, not eval. Transformer procedures take one
2195 2005-02-11 Nick Clifton <nickc@redhat.com>
2197 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2198 to 'bfd_vma *' in order avoid compile time warning message.
2200 2005-02-09 Jim Blandy <jimb@redhat.com>
2202 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
2203 corresponding change in the sim/common directory.)
2205 2005-02-07 Jim Blandy <jimb@redhat.com>
2207 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
2208 changes in the opcodes directory.)
2210 * guile.scm: New file, containing Guile-specific definitions and
2211 adaptations. This is loaded by the app-specific shell scripts.
2212 Initially identical to fixup.scm.
2213 * cgen-sid.scm: Don't load fixup.scm here.
2215 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2218 2005-01-27 Jim Blandy <jimb@redhat.com>
2220 * utils.scm (string/symbol->append): Renamed from 'concat'.
2221 * opcodes.scm (gen-switch): Use new name.
2222 * insn.scm (-sub-insn-make!): Same.
2223 * rtl.scm (rtx-dump): Same.
2224 * semantics.scm (semantic-compile): Same.
2226 2005-01-20 Jim Blandy <jimb@redhat.com>
2228 * opcodes.scm (gen-switch): Use concat instead of string-map.
2230 * utils.scm (concat): New function.
2231 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2232 * rtl.scm (rtx-dump): Same.
2233 * semantics.scm (semantic-compile): Same.
2235 2004-12-16 Jim Blandy <jimb@redhat.com>
2237 * utils-cgen.scm (parse-name): Don't assume that string-map can be
2238 applied to symbols. Process everything as strings, and then
2239 convert to a symbol at the end.
2241 * read.scm (debug-repl): Temporarily redirect input and output to
2242 /dev/tty while we debug, so we don't interfere with whatever CGEN
2243 is reading or writing.
2244 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2247 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
2249 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2250 will work with newer versions of guile.
2252 2004-10-27 Nick Clifton <nickc@redhat.com>
2254 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2255 * cpu/iq2000.cpu: Likewise.
2257 2004-07-21 DJ Delorie <dj@redhat.com>
2259 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2261 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2263 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2264 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2266 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2268 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2270 2004-03-22 Dave Brolley <brolley@redhat.com>
2272 * utils.scm (copyright-fsf): Update copyright years.
2273 (copyright-red-hat): Ditto.
2274 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2276 (-op-gen-set-trace-parallel): Ditto.
2278 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2280 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2281 disassembling codes for 0x*2 addresses.
2283 2004-01-29 Dave Brolley <brolley@redhat.com>
2285 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2286 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2287 in the extra bit positions.
2289 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2291 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2293 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2295 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2296 "short" being 16 bit.
2297 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2298 internationalize error message.
2299 (parse_lo16): Likewise. Remove useless code.
2301 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2303 * cpu/m32r.cpu : Add new model m32r2.
2304 Add new instructions.
2305 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2306 Changed PIPE attr of push from O to OS.
2307 Care for Little-endian of M32R.
2308 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2309 Care for Little-endian of M32R.
2310 (parse_slo16): signed extension for value.
2312 2003-10-26 Dave Brolley <brolley@redhat.com>
2314 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2315 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2316 (-gen-extract-fn): Call -gen-record-profile-args.
2318 2003-10-21 Dave Brolley <brolley@redhat.com>
2320 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2322 * decode.scm (-opcode-slots): Correct typo in logit call.
2324 2003-10-09 Jim Blandy <jimb@redhat.com>
2326 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2327 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2329 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2331 2003-10-06 Dave Brolley <brolley@redhat.com>
2333 * gen-all-doc: Add fr550.
2335 2003-09-11 Doug Evans <dje@sebabeach.org>
2337 * Makefile.am (ARCHFILE): New var.
2338 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2339 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2340 * Makefile.in: Regenerate.
2342 2003-09-08 Dave Brolley <brolley@redhat.com>
2344 On behalf of Doug Evans <dje@sebabeach.org>
2345 Pass in paths to input files, instead of assuming they live in
2346 $srcdir/cpu. Plus misc. option processing cleanup.
2347 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2348 Add pre-process pass to all options.
2349 * cgen-gas.scm (gas-arguments): Ditto.
2350 * cgen-sid.scm (sim-arguments): Ditto.
2351 * cgen-sim.scm (sim-arguments): Ditto.
2352 * cgen-stest.scm (stest-arguments): Ditto.
2353 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2354 (-opc-file-path): New global.
2355 (opc-file-path): New fn.
2356 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2357 All callers updated.
2358 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2359 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2360 Replace srcdir arg with opc-file. All callers updated.
2361 * read.scm (-opt-spec-update): Delete.
2362 (opt-get-first-pass,opt-get-second-pass): New fns.
2363 (-cgen): Process application-specific arguments in two passes.
2365 2003-08-29 Dave Brolley <brolley@redhat.com>
2367 * cpu/frv.cpu: Removed.
2368 * cpu/frv.opc: Removed.
2370 2003-08-21 Nick Clifton <nickc@redhat.com>
2372 * cpu/frv.cpu (mbtoh): Replace input parameter to
2373 u-media-dual-expand and u-media-dual-btoh with output parameter.
2374 (cmbtoh): Add profiling hack.
2376 2003-08-19 Michael Snyder <msnyder@redhat.com>
2378 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2380 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2382 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2383 the elements for the END record of CGEN_OPINST, silencing warnings.
2385 2003-07-15 Doug Evans <dje@sebabeach.org>
2387 Add guile 1.6.4 support.
2388 - empty list must be quoted
2389 - string functions have stricter type checking
2390 - eval now takes a second argument
2391 - symbol-bound? is deprecated
2392 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2393 (bitset-attr->list): Ensure arg to string-cut is a string.
2394 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2395 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2396 * cos.scm (-class-list): Must quote empty list.
2397 (-class-parent-classes,-class-compute-class-desc): Ditto.
2398 (class-make,make,object-reset!): Ditto.
2399 (method-make-make!): Call eval1 instead of eval.
2400 (method-make-forward!,method-make-virtual-forward!): Ditto.
2401 * decode.scm (subdtable-add): Use stringsym-append instead of
2403 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2404 (-build-decode-table-entry): Fetch string name of insn.
2405 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2406 (-gen-mach-table-defns): Ditto for mach.
2407 (gen-ifld-defns): Ditto for ifld.
2408 (gen-hw-table-defns): Ditto for hw.
2409 (gen-operand-table): Ditto for op.
2410 (gen-insn-table-entry): Ditto for insn.
2411 * desc.scm (gen-attr-table-defn): Ditto for attr.
2412 (<keyword>,gen-defn): Don't pass symbols to string-append.
2413 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2415 (enum-vals-upcase): Use symbol-upcase to build result.
2416 (-enum-parse): Use stringsym-append to build errtxt.
2417 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2418 (eval1): New function.
2419 (symbol-bound?): Provide own version if >= guile 1.6.
2420 * hardware.scm (define-keyword): Use string-append instead of
2422 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2423 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2425 (gen-list-entry): Handle either symbol or string `name' arg.
2426 (gen-obj-doc-header): Fetch string name of `o' arg.
2427 (define-cpu-intro): Ditto for cpu.
2428 (gen-mach-intro): Ditto for mach.
2429 (gen-model-intro): Ditto for model.
2430 (gen-isa-intro): Ditto for isa.
2431 (gen-machine-doc-1): Ditto for isa.
2432 (gen-reg-doc-1): Convert mach to string first.
2433 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2434 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2436 (gen-insn-categories): Fetch string name of mach. Convert
2437 enum-val-name to string first.
2438 (gen-insn-docs): Fetch string name of mach.
2439 * ifield.scm (ifld-ilk): Result is a string.
2440 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2441 Fetch string name of ifld.
2442 (-sfmt-search-key): Similarily for ifld and op.
2443 * insn.scm (syntax-make): Fetch string name of syntax element.
2444 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2445 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2446 * mode.scm (mode:c-type): Result is a string.
2447 (mode:enum): Fetch string name of mode.
2448 (-mode-parse): Use stringsym-append to build errtxt.
2449 * model.scm (model:enum): Fetch string name of model.
2450 (-model-parse): Use stringsym-append to build errtxt.
2451 (parse-insn-timing): Must quote empty list.
2452 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2453 (-gen-minsn-opcode-entry): Ditto.
2454 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2456 (read-cpu.opc): Convert current-arch-name to a string before using.
2457 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2458 (<derived-operand>): Must quote empty list.
2459 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2460 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2462 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2463 (-pmacro-sym): Must convert symbols to strings before passing to
2465 (-pmacro-str): Ditto.
2466 (pmacros-init!): Use eval1 instead of eval.
2467 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2468 (keep-isa-atlist?): Ditto.
2469 (cmd-if): Use eval1 instead of eval.
2470 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2471 (-rtl-c-get): Fetch string name of src.
2472 (s-unop): Ditto for mode.
2473 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2474 (-gen-par-temp-defns,subword): Ditto.
2475 (join): Use stringsym-append instead of string-append.
2476 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2477 (rtx-traverse-debug): Fetch string name of rtx-obj.
2478 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2479 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2480 (rtx-pretty-name): Result is a string.
2481 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2482 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2483 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2485 (-gen-sfrag-case): Fetch string name of user.
2486 * sid-model.scm (unit:enum): Fetch string name of unit.
2487 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2488 (<hw-memory>,gen-set-quiet): Ditto.
2489 (gen-mode-defs): Ditto.
2490 (sim-finish!): Convert current-arch-name to a string before using.
2491 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2492 (-gen-no-scache-semantic-fn): Ditto.
2493 (cgen-defs.h): Fetch string name of isa.
2494 (cgen-read.c): Convert current-arch-name to a string before using.
2495 (cgen-write.c): Ditto.
2496 * sim-model.scm (unit:enum): Fetch string name of unit.
2497 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2498 (-gen-model-timing-table): Fetch string name of model.
2499 (-gen-mach-model-table): Ditto.
2500 (-gen-mach-defns): Fetch string name of mach.
2501 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2502 (<hw-memory>,cxmake-get): Fetch string name of mode.
2503 (<hw-memory>,gen-set-quiet): Ditto.
2504 (gen-mode-defs): Ditto.
2505 (sim-finish!): Must quote empty list.
2506 * utils-cgen.scm (<ident>): Must quote empty list.
2507 (obj:str-name): New fn.
2508 (parse-comment): Result is a string.
2509 (parse-symbol): Result is a symbol.
2510 (parse-string): Result is a string.
2511 (keyword-list?): Convert arg to string before calling string-ref.
2512 (keyword-list->arg-list): Ditto.
2513 (gen-attr-name): Convert attr-name to string first.
2514 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2515 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2516 (gen-define-ifmt-ifields): Ditto for fld.
2517 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2519 (gen-file-name): Ditto.
2520 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2521 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2522 (reduce): Call eval1 instead of eval.
2523 * cpu/m32r.cpu (addi): Don't use `#.'.
2525 * gen-all-sim: Fix some typos.
2527 2003-07-08 Doug Evans <dje@sebabeach.org>
2529 * gen-all-doc: Ensure run from cgen src dir.
2530 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2531 * gen-all-sid: Similarily, in ./tmp-sid.
2532 * gen-all-sim: Similarily, in ./tmp-sim.
2534 2003-06-20 Doug Evans <dje@sebabeach.org>
2536 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2538 2003-06-19 Doug Evans <dje@sebabeach.org>
2540 * mach.scm (-ifld-already-defined?): New proc.
2541 (current-ifld-add!): Use it.
2542 (-op-already-defined?): New proc.
2543 (current-op-add!): Use it.
2544 (-insn-already-defined?): New proc.
2545 (current-insn-add!): Use it.
2546 (-minsn-already-defined?): New proc.
2547 (current-minsn-add!): Use it.
2548 (obj-isa-list): New proc.
2549 (isa-supports?): Use it.
2551 2003-06-10 Doug Evans <dje@sebabeach.org>
2553 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2554 * cpu/m32r.cpu (all insns): Ditto.
2556 * mach.scm (current-*-add!): Disallow redefinition. Make result
2559 * gen-all-doc: Split arm and frv docs up a bit.
2561 * cpu/arm.cpu: Add IDOC attribute.
2562 * cpu/frv.cpu: Ditto.
2563 * cpu/i960.cpu: Ditto.
2564 * cpu/openrisc.cpu: Ditto.
2565 * cpu/xstormy16.cpu: Ditto.
2566 * cpu/m32r.cpu: Ditto.
2567 (all insns): Explicitly specify IDOC attribute.
2569 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2570 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2571 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2572 * Makefile.in: Regenerate.
2573 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2574 (-attr-read): Defer computing default value until we know the type.
2575 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2576 (<attr-list>:attr-present?): New method.
2577 (atlist-attr-present?,obj-attr-present?): New fns.
2578 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2579 (attr-builtin!): New insn attr IDOC.
2580 * cgen-doc.scm (doc-arguments): New args -I,-N.
2581 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2582 Support comment as fourth element of enum value.
2583 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2584 * html.scm (gen-html-header): New arg kind, all callers updated.
2585 (gen-table-of-contents): New arg insn-file, all callers updated.
2586 (gen-list-entry,gen-doc-header): New fn.
2587 (get-operands): Delete.
2588 (gen-iformat-table): Rewrite.
2589 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2590 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2591 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2592 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2593 (get-insns-for-category,gen-categories-insn-lists): New fns.
2594 (gen-insn-docs): Simplify each insn's semantics first.
2595 Print insn tables sorted by IDOC categories.
2596 (*insn-html-file-name*): New global.
2597 (cgen-insn.html): New fn.
2599 * insn.scm (<insn>): Create a setter for the `tmp' member.
2600 * semantics.scm (insn-build-known-values): Renamed from
2601 -build-known-values. All callers updated.
2603 * rtl.scm: Move traveral/evaluation support to ...
2604 * rtl-traverse.scm: New file.
2605 * read.scm: Maybe-load rtl-traverse.scm.
2607 * rtl.scm (-rtx-valid-types): Add SETRTX.
2609 * rtx-funcs.scm (nop,parallel): Fix mode.
2611 * utils.scm (eqv-lookup-index): New fn.
2612 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2614 * dev.scm (load-doc): Set APPLICATION.
2616 2003-06-10 Dave Brolley <brolley@redhat.com>
2618 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2619 * sid-decode.scm: Generate #include of config.h into
2620 @prefix@-decode.cxx.
2621 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2623 2003-06-07 Doug Evans <dje@sebabeach.org>
2625 * gen-all-sid: New file.
2626 * gen-all-opcodes: New file.
2628 2003-06-05 Nick Clifton <nickc@redhat.com>
2630 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2631 version of the FRinti operand.
2632 (FRintjeven): Likewise for FRintj.
2633 (FRintkeven): Likewise for FRintk.
2634 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2635 media-quad-arith-sat-semantics, media-quad-arith-sat,
2636 conditional-media-quad-arith-sat, mdunpackh,
2637 media-quad-multiply-semantics, media-quad-multiply,
2638 conditional-media-quad-multiply, media-quad-complex-i,
2639 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2640 conditional-media-quad-multiply-acc, munpackh,
2641 media-quad-multiply-cross-acc-semantics, mdpackh,
2642 media-quad-multiply-cross-acc, mbtoh-semantics,
2643 media-quad-cross-multiply-cross-acc-semantics,
2644 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2645 media-quad-cross-multiply-acc-semantics, cmbtoh,
2646 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2647 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2648 cmhtob): Use new operands.
2649 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2650 (parse_even_register): New function.
2652 2003-06-04 Doug Evans <dje@sebabeach.org>
2654 Better handling of 64 bit and mixed 32/64 bit architectures.
2655 * hardware.scm (hw-update-word-modes!): New fn.
2656 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2657 hw-update-word-modes!.
2658 (state-word-bitsize): Replace FIXME with requested check.
2659 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2660 * mode.scm (mode-find): Ignore INT,UINT.
2661 (-mode-word-sizes-kind): New global.
2662 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2663 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2664 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2666 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2667 unusable, correct values set later.
2668 (mode-finish!): Remove cruft.
2669 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2670 * opcodes.scm (opcodes-init!): Ditto.
2671 * rtx-funcs.scm (annul): Fix mode of pc.
2672 * cpu/ia64.cpu: Remove cruft that sets word modes.
2673 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2675 2003-06-03 Nick Clifton <nickc@redhat.com>
2677 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2678 immediate value not unsigned.
2680 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2682 * cpu/sh.cpu: Amend comments to refer to SuperH.
2683 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2684 * cpu/sh64-media.cpu: Likewise.
2685 (Saturation): Update manual reference.
2687 2003-05-15 Doug Evans <dje@sebabeach.org>
2689 * Makefile.am (srcroot): New var.
2691 * Makefile.in: Regenerate.
2692 * cgen-doc.scm: New file.
2693 * html.scm: New file.
2694 * gen-all-doc: New file.
2695 * dev.scm (cload): Handle DOC application.
2697 * machs.scm (machs-for-cpu): New fn.
2698 * model.scm (models-for-cpu): New fn.
2699 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2701 (iota): Rewrite to be identical to pmacro version. All uses updated.
2702 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2704 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2705 (-gen-decode-bits): Instead put in better fix here.
2707 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2709 2003-05-01 DJ Delorie <dj@redhat.com>
2711 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2713 (set-alignfix-mem): Likewise.
2715 2003-04-16 Dave Brolley <brolley@redhat.com>
2717 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2718 * utils.scm (copyright-fsf): Update generate copyright years.
2719 (copyright-cygnus): Ditto.
2720 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2722 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2724 (<operand>'gen-profile-code): New parameter 'when'.
2725 (<iunit>'gen-profile-code): Ditto.
2726 (<insn>'gen-profile-code): Ditto.
2727 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2728 'insn_reference' for the 'after' function.
2729 * model.scm (unit:enum): Moved to sim-model.scm.
2730 * sim-model.scm (unit:enum): Moved from model.scm.
2731 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2732 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2733 * sid-model.scm (unit:enum): New version for sid.
2734 (gen-model-class-name): New function.
2735 (gen-model-unit-fn-decl): New function.
2736 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2737 (gen-model-unit-fn-name): New parameter 'when'.
2738 (-gen-model-insn-fn-name): Ditto.
2739 (-gen-model-insn-qualified-fn-name): New function.
2740 (-gen-model-insn-fn-decl): New function.
2741 (-gen-model-insn-fn-decls): New function.
2742 (-gen-model-insn-fn): New parameter 'when'. Call
2743 -gen-model-insn-qualified-fn-name.
2744 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2745 functions for modelling insn before and after execution.
2746 (-gen-model-class-decls): New function.
2747 (" (gen-model-class-name model) "): New function.
2748 (gen-model-classes): New function.
2749 (-gen-insn-timing): Generate functions for modelling insn before and after
2751 (-gen-insn-unit-timing): Generate class-qualified names.
2752 (-gen-model-timing-table): Ditto.
2753 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2754 not needed (yet) by sid.
2755 (cgen-model.h): New function.
2757 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2759 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2760 * cpu/sh64-compact.cpu: Likewise.
2761 * cpu/sh64-media.cpu: Likewise.
2763 2003-03-21 DJ Delorie <dj@redhat.com>
2765 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2766 which indicates if the sign flag is set from bit 15 or 7.
2768 (set-psw): New argument ws, propogate it.
2769 (set-psw-nowrite): Likewise.
2770 (set-mem-psw): Likewise.
2771 (set-psw-carry): Likewise. Use temporaries to prevent
2772 prematurely overwriting needed inputs.
2773 (set-psw-rrotate17): Fix logic.
2774 (shrgrgr): Preserve carry for zero-bit shifts.
2775 (shrgrimm): Likewise.
2776 (shlgrgr): Likewise.
2777 (shlgrimm): Likewise.
2778 (asrgrgr): Likewise.
2779 (asrgrimm): Likewise.
2782 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2784 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2786 2002-03-05 DJ Delorie <dj@redhat.com>
2788 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2789 prematurely overwriting needed inputs.
2790 (set-psw-sub): Likewise.
2792 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2794 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2796 2003-02-18 DJ Delorie <dj@redhat.com>
2798 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2799 (movlmemimm): Just mask the address.
2800 (movhmemimm): Likewise.
2801 (movlmemgr): Likewise.
2802 (movhmemgr): Likewise.
2803 (set-psw): Always set the psw last.
2804 (set-psw-carry): Likewise.
2805 (set-psw-add): Likewise.
2806 (set-psw-sub): Likewise.
2808 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2809 of 16 patterns from the set-psw-rotate17 function.
2810 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2811 movgriipostincgr, movgriipredecgr): Set psw correctly.
2812 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2813 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2814 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2816 2003-02-11 Dave Brolley <brolley@redhat.com>
2818 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2819 @arch@_cgen-ifld_table.
2820 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2821 @arch@_cgen-ifld_table.
2823 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2825 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2827 2003-01-09 Graydon Hoare <graydon@redhat.com>
2829 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2832 2003-01-07 Graydon Hoare <graydon@redhat.com>
2834 * utils-gen.scm (attr-int-gen-defn): Define.
2836 2002-12-21 Doug Evans <dje@sebabeach.org>
2838 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2839 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2841 * dev.scm (cload): Update location of .cpu files.
2843 2002-12-19 Doug Evans <dje@sebabeach.org>
2845 * utils-sim.scm (gen-profile-sym): New fn.
2846 (<operand>,sbuf-profile-sym): New method.
2847 (<operand>,sbuf-profile-elm): Use it.
2848 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2849 of hardcoding symbol name.
2850 (<operand>,gen-profile-code): Ditto.
2851 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2854 * mode.scm (mode-sem-mode): New fn.
2855 * operand.scm (op:new-mode): Update. mode-name.
2856 (op-natural-mode?) New fn.
2857 * rtl.scm (hw): Set hw-name,mode-name.
2859 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2861 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2862 as size of IDESC-TABLE-VAR.
2863 (@prefix@_init_idesc_table): Ditto.
2864 * sim-model.scm (-gen-mach-defns): Ditto.
2865 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2867 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2869 * insn.scm (-parse-insn-format-symbol): Improve error message.
2870 (-parse-insn-format): Ditto.
2872 * gen-all-sim: New script.
2874 2002-12-16 DJ Delorie <dj@delorie.com>
2876 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2878 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2880 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2881 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2882 (parse_immediate16): Handle immediate16 values, which now include
2883 @hi(label) and @lo(label)
2885 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2887 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2888 Add braces and cast for union field.
2889 (gen-multi-ifield-nodes): Add braces and cast for union field.
2890 (cgen_operand_table): Similarly fix sentinel.
2891 (cgen_cpu_close): Constify "insns". Formatting.
2892 (cgen-desc.c): Include xregex.h.
2893 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2895 <opc.c>: Include safe-ctype.h.
2896 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2897 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2898 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2899 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2900 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2901 (parse_addr16): Correct type of "value". Formatting.
2902 (parse_addr16_p): Likewise.
2903 (parse_addr16_cjp): Likewise.
2904 (parse_lit8): Likewise.
2905 (parse_bit3): Formatting.
2906 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2907 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2908 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2910 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2911 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2912 (print_dollarhex8): Likewise.
2913 (print_dollarhex16): Likewise.
2914 (print_dollarhex_addr16h): Likewise.
2915 (print_dollarhex_addr16l): Likewise.
2916 (print_dollarhex_p): Likewise.
2917 (print_dollarhex_cj): Likewise.
2918 (print_decimal): Likewise.
2919 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2921 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2923 * doc/rtl.texi (Model variants): Mention current limitations for
2924 unit inputs and outputs.
2925 (Hardware elements) <attribute PROFILE>: Be slightly more
2927 (Instructions) <timing>: input/output overrides have a direction
2930 2002-11-25 DJ Delorie <dj@redhat.com>
2932 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2934 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2936 * cpu/iq10.cpu: New file.
2937 * cpu/iq2000.cpu: Likewise.
2938 * cpu/iq2000.opc: Likewise.
2939 * cpu/iq2000m.cpu: Likewise.
2941 2002-11-19 DJ Delorie <dj@redhat.com>
2943 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2945 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2947 * dev.scm: Call getenv with a string, not a symbol.
2949 2002-10-08 Doug Evans <dje@transmeta.com>
2950 Hans-Peter Nilsson <hp@axis.com>
2952 * types.scm (bitrange-overlap?): Handle lsb0?.
2954 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2956 From Robert Cragie <rcc@jennic.com>:
2957 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2959 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2960 Ben Elliston <bje@redhat.com>
2961 John Healy <jhealy@redhat.com>
2962 Jeff Johnston <jjohnstn@redhat.com>
2963 Alan Lehotsky <alehotsky@redhat.com>
2964 Ubicom Inc. <SupportDesk@ubicom.com>
2966 * cpu/ip2k.cpu: New file.
2967 * cpu/ip2k.opc: Likewise.
2969 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2971 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2973 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2975 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2976 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2977 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2978 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2979 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2980 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2981 (-sthi-byte): If there is a single byte to store, store it at
2983 (sthil, sthiq): Fix big-endian behaviour.
2984 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2985 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2986 (saturate): Use Dimode to check if saturation operation is required.
2987 (usaturate): Likewise.
2989 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2990 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2991 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2992 (msadubq): Fix subword index in second operand of first subtraction.
2994 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2996 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2999 2002-06-18 Dave Brolley <brolley@redhat.com>
3001 * cpu/frv.cpu: New cpu description.
3002 * cpu/frv.opc: New cpu support code.
3004 2002-05-21 Dave Brolley <brolley@redhat.com>
3006 * decode.scm (-opcode-slots): Don't consider bits beyond the
3009 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
3011 * cpu/powerpc.cpu: New file.
3013 2002-05-01 Graydon Hoare <graydon@redhat.com>
3015 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3017 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
3019 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3020 results are expanded recursively.
3022 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
3024 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3025 call scan-symbol on it, to enable recursive macro-expansion.
3027 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
3029 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3030 for multiple-isa configurations.
3031 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3033 2002-02-04 Ben Elliston <bje@redhat.com>
3035 * cpu/sh.cpu, cpu/sh.opc: New files.
3036 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3038 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
3040 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3041 (Enumerated constants): Mention that an ifield must not specify a
3043 (Instruction operands): Ditto for index.
3044 (Expressions) <parallel>: Remove misplaced mention of local
3046 <if>: Mention that mode must be specified and non-VOID when the
3049 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
3051 * doc/porting.texi: When referring to *.opc, mention they are in
3052 the cpu subdir. Call top-level directory toplevel, not devo.
3053 Close string in define-normal-insn example.
3055 * doc/pmacros.texi: Fix .substr typo to .substring.
3056 Mention that .sym expansions are not further expanded.
3058 2002-01-22 Graydon Hoare <graydon@redhat.com>
3060 * desc-cpu.scm (ifld-number-cache): Add.
3062 (gen-maybe-multi-ifld-of-op): Add.
3063 (gen-maybe-multi-ifld): Add.
3064 (gen-multi-ifield-nodes): Add.
3065 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3067 2002-01-10 matthew green <mrg@redhat.com>
3069 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3070 (gr-Rb-names): ... to this.
3071 (h-Rb): New hardware piece.
3072 (h-Rbj): Use gr-Rb-names.
3074 (holdx): New instruction.
3076 2002-01-07 Ben Elliston <bje@redhat.com>
3078 * utils.scm (package-cygnus-simulators): Rename from this ..
3079 (package-red-hat-simulators): .. to this.
3080 * opcodes.scm (option-set!): Use package-red-hat-simulators.
3081 * sid-cpu.scm (cgen-desc.h): Likewise.
3082 (cgen-cpu.h): Likewise.
3083 (cgen-defs.h): Likewise.
3084 (cgen-write.cxx): Likewise.
3085 (cgen-semantics.cxx): Likewise.
3086 (cgen-sem-switch.cxx): Likewise.
3087 * sid-decode.scm (cgen-decode.h): Likewise.
3088 (cgen-decode.cxx): Likewise.
3089 * sid-model.scm (cgen-model.cxx): Likewise.
3090 * sid.scm (option-set!): Likewise.
3091 * sim.scm (option-set!): Likewise.
3093 2002-01-07 Ben Elliston <bje@redhat.com>
3095 * utils.scm (copyright-fsf): Add 2002.
3096 (copyright-cygnus): Rename to copyright-red-hat.
3097 (copyright-red-hat): Add 2002.
3098 (CURRENT-COPYRIGHT): Update comment.
3099 * opcodes.scm (option-set!): Update callers.
3100 * sid-model.scm (cgen-model.cxx): Likewise.
3101 * sid-cpu.scm: Likewise.
3102 * sid-decode.scm: Likewise.
3103 * sid.scm (option-set!): Handle "redhat" as an option for
3104 "copyright"; use copyright-red-hat.
3105 * sim.scm (option-set!): Likewise.
3107 2002-01-03 Dave Brolley <brolley@redhat.com>
3109 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3110 number of insns in the list. Update the population count function to
3111 identify and prioritize 3 catgories of useful bits.
3112 (-population-top-few): Don't consider bits with a population count of
3114 (-build-decode-table-entry): Don't call
3115 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
3116 identical insns at the next tree level.
3117 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3118 this function is no longer used.
3119 (filter-non-specialized-ambiguous-insns): New function.
3120 (filter-identical-ambiguous-insns): New function.
3121 (find-identical-insn): New function.
3122 (filter-harmlessly-ambiguous-insns): Removed.
3124 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
3125 matthew green <mrg@redhat.com>
3126 Frank Ch. Eigler <fche@redhat.com>
3127 Nick Clifton <nickc@cambridge.redhat.com>
3129 * cpu/xstormy16.cpu: New file.
3130 * cpu/xstormy16.opc: New file.
3132 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
3134 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3136 2001-11-14 Dave Brolley <brolley@redhat.com>
3138 * utils-gen.scm (-gen-extract-word): Correct computation of the length
3139 of the field being extracted.
3141 2001-10-29 Johan Rydberg <johan@rydberg.com>
3143 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3144 (cos ...) and (sin ..) rtx.
3146 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
3148 * desc-cpu.scm: Do not include ctype.h in generated desc
3149 files. They will inherit safe-ctype.h instead.
3151 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
3153 * desc-cpu.scm: Add missing function prototypes (for generated
3154 C files). Fix compile time warning messages about unused
3155 parameters (for generated C files).
3156 * opc-asmdis.scm: The same.
3157 * opc-ibld.c: The same.
3158 * opc-itab.scm: The same.
3159 * cpu/fr30.opc: The same.
3160 * cpu/m32r.opc: The same.
3161 * cpu/openrisc.opc: The same.
3163 2001-09-17 graydon hoare <graydon@redhat.com>
3165 * insn.scm (syntax-break-out): Correct logic in handling escaped
3168 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
3170 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3171 call @arch@_cgen_build_insn_regex now that regex support is in
3174 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
3176 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3177 (mask-superset?): Look for strict supersets to allow rejection of
3180 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3182 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3183 (cgen-desc.h): Call it.
3184 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3186 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3187 entire_insn for extraction, if it's shorter than base-insn-bitsize.
3189 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3191 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3192 mach->cpu insn-chunk-bitsize.
3193 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3194 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3195 * mach.scm (<cpu>): New field insn-chunk-bitsize.
3196 (-cpu-parse, -cpu-read): Parse/initialize it.
3197 * doc/rtl.texi (define-cpu): Document it.
3199 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
3201 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3203 2001-07-06 Ben Elliston <bje@redhat.com>
3205 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3207 2001-07-05 Ben Elliston <bje@redhat.com>
3211 * read.scm (include): Include files from srcdir/cpu.
3212 (-cgen): Likewise for loading .cpu files.
3213 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3214 * *.cpu: Move all cpu descriptions into cpu subdirectory.
3216 * simplify.inc: Likewise.
3218 2001-07-04 Ben Elliston <bje@redhat.com>
3220 * read.scm (include): Log "Including file" message at level 1,
3221 rather than outputting it with (display).
3222 (cpu-load): Log "Loading cpu description" and "Processing cpu
3223 description" messages at levels 1 and 2, respectively, rather than
3226 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
3228 * desc.scm (<keyword> 'gen-defn): Add extra zero into
3229 CGEN_KEYWORD_ENTRY initializers.
3231 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3232 (<operand> 'test-data): Involve both the index and the hardware
3233 in testcase generation.
3234 (<hw-indx> 'test-data): Generate test data from the underlying
3236 (<ifield> 'test-data): Generate test data by computing bit
3237 patterns for the field, then decoding them.
3238 (<hw-address> 'test-data): Allow for new calling convention.
3239 (<hw-iaddress> 'test-data): Likewise.
3240 (<keyword> 'test-data): Convert index values into keywords.
3241 (<hw-asm> 'test-data): Convert index values into integer strings.
3243 * gas-test.scm (cgen-build.sh): Escape '.' as well.
3245 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
3247 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3248 is required for multi-mode hw types (memory).
3250 2001-05-11 Ben Elliston <bje@redhat.com>
3252 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3253 when generating allinsn.d from objdump output. Without it, the
3254 testsuite will treat $ as the regular expression for end of line.
3256 2001-05-09 Ben Elliston <bje@redhat.com>
3258 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3259 with `cgen_cpu_open'; documentation had become out of date.
3260 * doc/rtl.texi (Instruction operands): Likewise.
3262 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3264 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3265 various-base-length instruction sets.
3267 2001-04-02 Ben Elliston <bje@redhat.com>
3269 * sid-cpu.scm (-last-insn): New function.
3270 (-gen-sem-switch-engine): Loop through idesc while less than or
3271 equal to the last instruction enum, not less than the MAX enum.
3272 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3273 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3274 table's size to be the last instruction enum plus one, not
3276 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3277 instruction onto the instruction list.
3279 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3280 using the size of the table and its elements.
3281 (-gen-decode-insn-globals): Define the idesc table's size to be
3282 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3283 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3284 last instruction enum plus one, not @CPU@_INSN_MAX.
3286 2001-03-28 Ben Elliston <bje@redhat.com>
3288 * doc/version.texi (UPDATED, EDITION): Update.
3289 * doc/stamp-vti: Likewise.
3291 2001-03-26 Ben Elliston <bje@redhat.com>
3293 * doc/credits.texi (Credits): Update.
3295 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3296 specified prefix and, if necessary, escape `$' in gas-build.sh to
3297 prevent unwanted shell variable expansion.
3299 2001-03-24 Ben Elliston <bje@redhat.com>
3301 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3302 (<keyword>,test-data): Likewise.
3303 (<hw-address>,test-data): Likewise.
3304 (<hw-iaddress>,test-data): Likewise.
3305 (-collate-test-set): New function.
3306 (build-test-set): Use it.
3307 (gen-gas-test): Generate five test cases per instruction.
3308 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3310 * read.scm: Load "slib/random" if random is not defined.
3311 * slib/random.scm: New file.
3313 * utils.scm: Remove comments about the Hobbit compiler.
3314 (copyright-cygnus): Add 2001.
3315 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3316 (package-gnu-simulators): Tidy.
3318 2001-03-23 Ben Elliston <bje@redhat.com>
3320 * cgen-gas.scm: Inline documentation improvements.
3322 2001-03-21 Ben Elliston <bje@redhat.com>
3324 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3325 given in a syntax string is undefined.
3327 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3328 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3330 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3332 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3333 for arg_type CGEN_CPU_OPEN_BFDMACH.
3335 2001-03-20 Ben Elliston <bje@redhat.com>
3337 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3338 instruction onto the instruction list. Define MAX_INSNS to be the
3339 value of the last instruction enum plus one.
3341 2001-03-14 Nick Clifton <nickc@redhat.com>
3343 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3345 2001-03-05 Dave Brolley <brolley@redhat.com>
3347 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3348 if the number of ifields is greater than zero.
3350 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3352 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3353 Emit LIKELY/UNLIKELY branch probability hints.
3354 * sid-decode.cpu (-gen-record-args): Ditto.
3356 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3358 * desc-cpu.scm (-gen-hash-defines): Rename
3359 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3361 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3363 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3365 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3366 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3368 * sid.scm (<operand> gen-write): Use unsigned long long expression
3370 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3371 (<unit> gen-profile-code): Ditto.
3373 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3375 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3378 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3380 * operand.scm (<operand> pretty-sem-name): New field.
3381 (<operand> make): Initialize it from hw-name.
3382 (op:set-pretty-sem-name!): New function.
3383 (<operand> gen-pretty-name): Default to fetching new field.
3384 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3385 sem-name setting from -rtx-hw-name.
3387 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3389 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3390 its subsequent gen-pretty-name.
3392 * read.scm: Increase thread working stack limit and backtrace
3395 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3397 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3399 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3401 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3402 current insn plus 4.
3403 (h-delay-insn): New hardware register.
3404 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3408 * openrisc.opc (parse_hi16): Sign extend value.
3409 (parse_lo16): Likewise.
3411 2001-01-06 Ben Elliston <bje@redhat.com>
3413 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3414 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3415 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3416 (-gen-semantic-fn-table): Likewise.
3417 (-gen-scache-semantic-fn): Likewise.
3418 (-gen-no-scache-semantic-fn): Likewise.
3419 (cgen-read.c): Likewise.
3420 (cgen-sem-switch.c): Likewise.
3421 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3422 is a filename prefix.
3423 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3424 (-gen-decode-insn-globals): Likewise.
3425 (-gen-idesc-decls): Likewise.
3426 (cgen-decode.h): Likewise.
3427 (cgen-decode.c): Likewise.
3428 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3429 (gen-cpu-insn-enum): Likewise.
3430 (sim-finish!): Likewise.
3432 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3434 * openrisc.cpu: New file.
3435 * openrisc.opc: Likewise.
3437 2000-12-12 Ben Elliston <bje@redhat.com>
3439 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3441 2000-12-07 Ben Elliston <bje@redhat.com>
3443 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3444 "insn" when there are zero ifields to extract.
3446 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3448 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3449 used by simple/non-scache simulators.
3450 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3451 regardless of with-scache?.
3452 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3454 2000-12-03 Ben Elliston <bje@redhat.com>
3456 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3457 (cgen-desc.c): Likewise.
3459 2000-12-01 Greg McGary <greg@mcgary.org>
3461 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3463 2000-12-01 Ben Elliston <bje@redhat.com>
3465 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3466 definitions if run without with-multipla-isa?.
3467 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3468 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3470 2000-11-24 Ben Elliston <bje@redhat.com>
3472 * sim-cpu.scm (-gen-hardware-struct): New function.
3473 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3474 hardware elements wich have share one or more ISAs with the ISAs
3477 * sim.scm (-with-multiple-isa?): New symbol.
3478 (with-multiple-isa?): New function.
3479 (option-init!): Initialise -with-multiple-isa?.
3480 (option-set!): Handle with-multiple-isa option.
3482 2000-11-21 Ben Elliston <bje@redhat.com>
3484 * utils.scm (copyright-fsf): Add the year 2000.
3486 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3488 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3489 unneeded "\n\n" from F() macro definition.
3491 2000-11-15 Greg McGary <greg@mcgary.org>
3493 * utils-cgen.scm (gen-define-with-symcat): New function.
3494 * desc-cpu.scm (gen-ifld-defns): Use it.
3495 (gen-hw-table-defns): Use it.
3496 (-gen-hash-defines): Use it.
3497 (gen-operand-table): Use it.
3498 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3499 * opc-itab.scm (-gen-ifmt-table): Use it.
3500 (-gen-insn-opcode-table): Use it.
3501 (-gen-macro-insn-table): Use it.
3502 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3503 * sim-cpu.scm (cgen-semantics.c): Use it.
3504 (cgen-sem-switch.c): Use it.
3506 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3508 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3509 request to emit calls to insn extractors as functions rather than
3510 branches to inline blocks.
3511 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3512 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3514 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3515 to extractor clauses.
3517 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3519 * decode.scm (-distinguishing-bit-population): Significantly
3520 improve popularity heuristic. Renamed from
3521 (-mask-bit-population): Gone.
3522 (-population-above-threshold): Sort new bit numbers in order of
3524 (-population-top-few): Allow up to three more bits to be selected
3525 than requested. Correct selection order to prefer better bits.
3526 Correct bug in fewer-than-requested case. Keep threshold as
3528 (decode-best-get-bits): Pass also the insn-values.
3530 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3531 future optimization.
3533 * utils.scm (message): Format nested lists better.
3535 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3537 * dev.scm: Add srcdir to %load-path.
3539 * rtx-funcs.scm (subword): Mode of argument can be different
3540 than mode of result, so don't use OP0 to specify argument's mode.
3542 2000-11-02 Ben Elliston <bje@redhat.com>
3544 * doc/porting.texi (Building a GAS test suite): Document my change
3547 2000-11-01 Ben Elliston <bje@redhat.com>
3549 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3551 2000-10-31 Ben Elliston <bje@redhat.com>
3553 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3554 with no command line arguments if the gas build directory can be
3557 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3559 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3560 op-ifld -> op-ifield.
3562 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3564 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3566 2000-10-13 matthew green <mrg@cygnus.com>
3568 * utils-cgen.scm (get-ifetch): Move from here ...
3569 * sim.scm (get-ifetch): ... to here.
3570 * sid.scm (get-ifetch): Copy and port to c++.
3572 2000-10-06 Dave Brolley <brolley@redhat.com>
3574 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3575 ifld-start + ifld-word-offset.
3576 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3577 the field is beyond the base number of bits.
3578 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3579 (gen-extract-ifields): Ditto.
3580 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3581 characters in the regular expression.
3583 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3585 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3586 preprocessor constant.
3588 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3590 * slib/logical.scm: New file from slib. Provides robust bitwise
3591 logical operations for large integers.
3592 * read.scm: maybe-load it.
3594 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3596 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3597 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3598 single-isa predicate, but support keep-isa filtering.
3600 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3602 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3603 statement-expression and comma-expression contexts.
3604 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3606 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3608 * decode.scm (-population-top-few): Signal error gracefully if
3609 decoding is about to become ambiguous.
3611 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3613 * doc/rtl.texi (decode-assist): Describe this field as optional.
3615 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3617 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3620 2000-09-05 Dave Brolley <brolley@redhat.com>
3622 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3623 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3625 2000-08-29 Dave Brolley <brolley@redhat.com>
3627 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3628 adata-integral-insn is true for this architecture.
3630 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3632 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3633 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3634 * rtl-c.scm (-c-rtl-get): Improve an error message.
3635 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3637 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3639 * Makefile.in (DIST_COMMON): Regenerated.
3640 * ifield.scm (<derived-ifield> needed-iflds): New method.
3641 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3642 sfmts built from <derived-ifield>s.
3643 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3644 type symbol 'derived-ifield, not an unparseable string.
3645 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3646 (-sfmt-contents): Add tracing.
3648 From Doug Evans <dje@transmeta.com>:
3649 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3652 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3654 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3655 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3656 (-rtl-c-get): Rename from rtl-c-get.
3657 (rtl-c-get): New fn for getter logging.
3659 2000-07-28 Ben Elliston <bje@redhat.com>
3663 2000-07-25 Ben Elliston <bje@redhat.com>
3665 * doc/credits.texi (Credits): Add Frank Eigler.
3667 2000-07-24 Dave Brolley <brolley@redhat.com>
3669 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3671 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3672 (<keyword>): Initialize all elements fully.
3673 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3675 (-gen-mach-table-defns): Ditto.
3676 (-gen-ifld-defns): Ditto.
3677 (-gen-operand-table): Ditto.
3678 (-gen-insn-table): Ditto.
3679 (-gen-cpu-open): Nothing to do for the mach table.
3681 2000-07-13 Ben Elliston <bje@redhat.com>
3683 * doc/version.texi (UPDATED): Update.
3685 2000-07-05 Ben Elliston <bje@redhat.com>
3687 * configure.in (AC_PATH_PROG): Remove.
3688 * configure: Regenerate.
3689 * Makefile.am (GUILE): Locate guile dynamically.
3690 * Makefile.in: Regenerate.
3691 * doc/Makefile.in: Likewise.
3693 2000-07-03 Ben Elliston <bje@redhat.com>
3695 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3696 * opc-itab.scm (cgen-opc.c): Likewise.
3698 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3700 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3701 guile 1.4 compatibility.
3702 (rtx-env-dump): Comment out buggy display calls.
3704 2000-06-15 matthew green <mrg@redhat.com>
3706 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3708 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3710 * Makefile.in: Regenerated.
3712 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3713 (gen-ifld-defns): Ditto.
3714 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3715 * rtl.c (rtl-finish!): Ditto.
3716 * opc-itab.scm (-gen-ifield-decls): Ditto.
3717 * opcodes.scm (gen-switch): Exclude derived operands.
3718 * operand.scm (op-iflds-used): Expand derived operands.
3719 (hw-index-derived): New dummy function to create dummy object.
3720 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3721 constructor. Set object's hw-name and index fields.
3722 (-anyof-merge-subchoices): Set instance object's index also.
3723 (-anyof-name): New helper function.
3724 (anyof-merge-semantics): Correct replacement of operand names in
3726 (op-ifield): Tolerate derived-operands and their funny indices better.
3727 * ifield.scm (ifld-known-values): Expand derived ifields.
3728 (non-multi-ifields, non-derived-ifields): New utility functions.
3729 (ifld-decode-mode): Tolerate objects with unbound decode field.
3730 * iformat.scm (compute-insn-length): Expand derived ifields.
3731 (compute-insn-base-mask): Ditto.
3732 * insn.scm (insn-base-ifields): Remove.
3733 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3734 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3735 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3736 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3737 (-frag-test-data): Ditto.
3738 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3739 (-gen-sem-switch-engine); Ditto.
3740 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3741 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3742 (-gen-record-args): Tolerate unbound op-ifield.
3743 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3744 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3745 Exclude multi-insns.
3746 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3747 * utils-sim.scm (op-extract?): Handle derived operands.
3749 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3750 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3751 * hardware.scm (hardware-for-mode): New function.
3753 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3754 cleaning up decode tables.
3755 (mask-superset?): Little helper function for above.
3756 * decode.scm (-build-decode-table-entry): Call it.
3757 (-opcode-slots): Add some more tracing.
3758 * arm.cpu: Disable decode-splits construct due to implementation
3759 conflict with `filter-harmlessly-ambiguous-insns'
3761 * decode.scm (-population-top-few): New function for better decode
3762 bit generation. Includes minor helper functions.
3763 (decode-get-best-bits): Call it instead.
3764 (OLDdecode-get-best-bits): Renamed previous version of above.
3767 2000-06-13 Ben Elliston <bje@redhat.com>
3769 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3770 for the Guile library directory.
3771 * configure: Regenerate.
3772 * Makefile.in, doc/Makefile.in: Regenerate.
3774 * Makefile.in, doc/Makefile.in: Regenerate.
3775 * configure.in: Remove unnecessary tests. Move to version 1.0.
3776 * acconfig.h, config.in: Remove.
3777 * configure, aclocal.m4: Regenerate.
3778 * doc/stamp-vti, doc/version.texi: Likewise.
3779 * AUTHORS: New file.
3781 2000-06-07 Ben Elliston <bje@redhat.com>
3783 * fixup.scm (symbol-bound?): Reduce debugging output.
3785 2000-06-02 matthew green <mrg@redhat.com>
3787 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3788 a given instruction, replacing derived fields with their subfields.
3789 (insn-value): Use `insn-base-ifields' to find all constant values.
3790 (multi-insn-instantiate!): Comment some debug messages.
3792 2000-06-01 Ben Elliston <bje@redhat.com>
3794 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3795 symbol names used in a (c-call ..) rtx.
3797 * sim-test.scm (build-test-set): Return (()) for an instruction
3798 with no operands, so it too is included in the generated test set.
3800 2000-05-31 Ben Elliston <bje@redhat.com>
3802 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3803 (sim-test): Likewise.
3804 * Makefile.in: Regenerate.
3806 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3808 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3809 stack traceback, in an order that resembles gdb's `bt'.
3811 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3813 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3814 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3815 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3817 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3819 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3820 * iformat.scm (ifmt-expanded-ifields): Gone.
3821 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3823 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3826 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3829 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3831 * sid.scm (with-any-profile?): New function clone.
3833 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3835 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3837 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3839 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3840 (-multi-ifield-read): Parse them.
3841 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3842 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3843 (multi-ifield gen-extract): Add decode hook.
3844 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3846 * insn.scm (syntax-break-out): More correctly handle \-escaped
3848 (syntax-make-elements): Ditto.
3849 * opc-itab.scm (compute-syntax): Ditto.
3851 2000-05-17 Ben Elliston <bje@redhat.com>
3853 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3855 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3857 * gas-test.scm (build-test-set): Return (()) for an instruction
3858 with no operands, so it too is included in the generated test set.
3860 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3862 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3863 IFMT_OPERANDS and SYNTAX_BYTES.
3865 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3867 * sim.scm (with-any-profile?): New function.
3868 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3869 to decide whether or not to include profiling counters.
3871 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3873 Fuller derived-operand support for opcodes.
3874 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3875 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3876 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3877 (gen-operand-table): Omit derived- and anyof- operands from table.
3878 (gen-insn-table): Omit multi-insns from table.
3879 * iformat.scm (ifmt-expanded-fields): New function to expand
3880 subfields of derived-ifields.
3881 (ifmt-compute!): Ignore remaining multi-insns.
3882 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3884 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3885 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3886 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3887 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3888 (gen-switch): Omit anyof-operands.
3889 * operand.scm (-anyof-syntax): New function.
3890 (-anyof-merge-syntax): Call it.
3891 * utils.scm (collect): New idiomatic function.
3893 2000-05-10 Ben Elliston <bje@redhat.com>
3895 * m68k.cpu: New file (work in progress).
3897 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3899 * Makefile.am (all-local): New target. Create stamp-cgen.
3900 * Makefile.in: Regenerated.
3901 * doc/Makefile.in: Regenerated.
3903 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3905 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3906 (-operand-parse-setter): Ditto.
3907 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3908 for CACHE-ADDR operands.
3909 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3910 trace entries. Widen byte-wide values for printing.
3911 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3912 Widen byte-wide values for printing. Hexify memory addresses.
3914 2000-04-23 matthew green <mrg@redhat.com>
3916 * m32r.cpu: Fix a typo.
3918 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3920 * ia64.cpu (define-model): Change merced to Itanium.
3921 (f-qp): Change quilifying to qualifying.
3922 (movbr_ph, movbr_pvec): Delete.
3923 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3925 2000-04-07 Ben Elliston <bje@redhat.com>
3927 * doc/porting.texi (Building a simulator test suite): Clarify
3928 where generated test cases are placed.
3930 2000-04-07 Ben Elliston <bje@redhat.com>
3932 * Makefile.am (gas-test): Remove dependency on `cgen'.
3934 * Makefile.in: Regenerate.
3936 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3938 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3939 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3940 type reconfiguration.
3941 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3944 2000-03-30 Ben Elliston <bje@redhat.com>
3946 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3948 2000-03-24 Ben Elliston <bje@redhat.com>
3950 * Makefile.am (stamp-cgen): Reinstate target.
3951 * Makefile.in: Regenerate.
3953 2000-03-22 Ben Elliston <bje@redhat.com>
3955 * slib/ppfile.scm: Remove; unused.
3956 * slib/defmacex.scm: Likewise.
3958 2000-03-21 Ben Elliston <bje@redhat.com>
3960 * doc/internals.texi (Source file overview): Document.
3962 * Makefile.am (GUILEDIR): Remove.
3963 (CGEN): Ditto. Callers use $(GUILE) instead.
3964 (GUILEFLAGS): Ditto.
3966 (APPDESCFILES): Ditto.
3967 (OPCODESFILES): Ditto.
3969 (pkgdata_SCRIPTS): Ditto.
3970 (stamp-cgen): Remove target.
3971 * Makefile.in: Regenerate.
3973 * configure.in: Remove header and library tests.
3974 * configure: Regenerate.
3975 * config.in: Likewise.
3977 2000-03-20 Ben Elliston <bje@redhat.com>
3979 * read.scm: Cease loading "hob-sup.scm".
3980 * utils.scm: Inherit the fastcall family of procedures (for now).
3981 * hob-sup.scm: Remove.
3983 2000-03-20 Ben Elliston <bje@redhat.com>
3985 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3986 * configure: Regenerate.
3987 * gdbinit.in: Remove.
3989 2000-03-17 Ben Elliston <bje@redhat.com>
3991 * Makefile.am (CGEN): Use guile, not cgen.
3992 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3993 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3994 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3995 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3996 (HOB_OBJS): Likewise.
3997 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3998 (CGENOBJS): Likewise.
3999 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
4000 (hobbit, hobbit.o, hobbit.c): Remove targets.
4001 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
4002 (CLEANFILES): Update.
4003 * acconfig.h (WITH_HOBBIT): Remove.
4004 * configure.in: Do not test for 3 arg scm_make_vector. Remove
4005 option --with-cgen-hobbit.
4006 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
4007 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
4008 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
4009 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
4010 * Makefile.in: Regenerate.
4011 * config.in: Likewise.
4012 * aclocal.m4: Likewise.
4013 * configure: Likewise.
4014 * README (Hobbit support): Remove.
4015 * doc/internals.texi (Conventions): Do not mention Hobbit.
4016 * doc/porting.texi (Supported Guile versions): Likewise.
4018 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
4020 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4021 callback convention to new sid sidutil::basic_cpu code.
4022 (-gen-sfrag-engine-fn): Ditto.
4023 * sid.scm (-create-virtual-insns!): Ditto.
4024 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4026 (cxmake-skip): Implement properly for pbb mode.
4028 2000-03-03 Ben Elliston <bje@redhat.com>
4030 * doc/internals.texi: New file.
4032 2000-02-29 Ben Elliston <bje@redhat.com>
4034 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4035 * doc/porting.texi: Formatting tweaks.
4037 2000-02-25 Nick Clifton <nickc@cygnus.com>
4039 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4042 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
4044 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4047 2000-02-23 Andrew Haley <aph@cygnus.com>
4049 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4052 2000-02-24 Ben Elliston <bje@redhat.com>
4054 * doc/rtl.texi (Derived operands): Add some cindex entries.
4056 2000-02-23 Ben Elliston <bje@redhat.com>
4058 * ia32.cpu (dndo): Move general purpose macro from here ..
4059 * simplify.inc (dndo): .. to here.
4061 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
4063 * arm.cpu (h-tbit): Add c-call setter function.
4066 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
4068 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4069 (-frag-cost-compute!): Ditto.
4070 * utils.scm (copyright-cygnus): Add Y2K.
4071 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4073 2000-01-25 Nick Clifton <nickc@cygnus.com>
4075 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4076 flags field of the CGEN_CPU_TABLE structure.
4078 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
4080 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4081 All references updated.
4083 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
4085 * ia32.cpu: Rewrite addressing mode support.
4087 * ifield.scm (<ifield>): New member `follows'.
4088 (ifld-known-values): New proc.
4089 (<ifield>): New method set-word-offset!.
4090 (ifld-set-word-offset!): New proc.
4091 (ifld-new-word-offset): New proc.
4092 (<ifield>): New method next-word.
4093 (<multi-ifield>): New method next-word.
4094 (ifld-next-word): New proc.
4095 (ifld-precedes?): New proc.
4096 (-ifield-parse): New args word-offset,word-length,follows.
4097 All callers updated. Handle CISC-style vs RISC-style ifields.
4098 (-ifield-read): Recognize word-offset,word-length,follows specs.
4099 (-ifld-parse-follows): New proc.
4100 (-multi-ifield-make-default-insert): New proc.
4101 (-multi-ifield-make-default-extract): New proc.
4102 (-multi-ifield-parse): Provide default values for insert,extract
4103 handlers if not specified.
4104 (<derived-ifield>): New class.
4105 (derived-ifield?): New predicate.
4106 (ifld-derived-operand?): New predicate.
4107 (f-anyof): New global.
4108 (ifld-anyof?,ifld-anyof-operand?): New predicates.
4109 (f-derived,ifld-derived?): Delete.
4110 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
4111 * insn.scm (-sub-insn-ifields): New proc.
4112 (-sub-insn-make!): New proc.
4113 (multi-insn-instantiate!): Provide initial implementation.
4114 (-insn-parse): If insn contains "anyof" operands, create a
4115 <multi-insn> object instead of a plain <insn>.
4116 (-parse-insn-format-symbol): Rewrite derived operand handling.
4117 Add anyof operand handling.
4118 (-parse-insn-format-ifield-spec): Rewrite.
4119 (-parse-insn-format-operand-spec): Delete.
4120 (-parse-insn-format-list): Delete support for `(operand value)'.
4121 (anyof-operand-format?): Replaces derived-operand-format?.
4122 * operand.scm (-operand-parse-getter): Improve error messages.
4123 (-operand-parse-setter): Ditto.
4124 (<derived-operand>): New members args,syntax,base-ifield,encoding,
4126 (<anyof-operand>): Change baseclass from <derived-operand> to
4127 <operand>. Delete member values. New members base-ifield,choices.
4128 (anyof-operand?): New predicate.
4129 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4130 (-derived-operand-parse): Rewrite.
4131 (-derived-operand-read): Rewrite.
4132 (-anyof-parse-choice): New proc.
4133 (-anyof-operand-parse): Rewrite.
4134 (-anyof-operand-read,define-anyof-operand): New procs.
4135 (<anyof-value>): Rewrite.
4136 (-anyof-initial-known): New proc.
4137 (anyof-satisfies-assertions?): New proc.
4138 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4139 (-anyof-merge-getter,-anyof-merge-setter): New procs.
4140 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4141 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4142 (-anyof-value-from-derived): New proc.
4143 (-anyof-all-choices-1,anyof-all-choices): New procs.
4144 (operand-init!): Create define-anyof-operand reader command.
4146 * insn (syntax-break-out): Take syntax as argument instead of insn.
4147 All callers updated.
4148 (syntax-make): Move here, from ???.
4150 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4151 bitrange-foo. All uses updated.
4152 (bitrange-next-word): New proc.
4154 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4156 * rtl.scm (rtx-canonicalize): Provide initial implementation.
4157 (rtx-make-const,rtx-make-enum): New procs.
4158 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
4159 (rtx-mem-addr,rtx-mem-sel): New procs.
4160 (rtx-change-address): New proc.
4161 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4162 (rtx-make-set,rtx-single-set?): New procs.
4163 (rtx-combine): New proc.
4165 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
4166 (rtx-traverse-with-locals): Ditto.
4167 (-rtx-traverse,-rtx-traverse-*): Ditto.
4169 * rtl.scm (define-subr): New proc.
4170 (rtl-init!): Create reader command `define-subr'.
4172 * cos.c (_object_mi_p): Ensure argument is an object.
4173 (indent): New function.
4174 (_object_print_elms): Add pretty-printing support.
4175 (_object_print): Ditto.
4177 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4178 (*floats-s->c-fun-table*): Ditto.
4179 * hobbit.c,hobbit.h: Rebuild.
4180 * hob-sup.c (fastcall7): New proc.
4181 * hob-sup.h (fastcall7): Declare.
4182 * hob-sup.scm (fastcall7): New macro.
4184 * mach.scm (<arch>): New member subr-list.
4185 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4186 (arch-finish!): Reverse recorded subr list.
4188 * read.scm (debug-env): New global.
4189 (debug-var-names,debug-var,debug-repl-env): New procs.
4190 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
4191 (debug-quit): Renamed from `continue'.
4193 * simplify.inc (dsmf): New pmacro.
4195 * utils.scm (plus-scan): New proc.
4196 (split-bits): Rewrite.
4197 (split-value): New proc.
4199 1999-10-13 Doug Evans <devans@casey.cygnus.com>
4201 * doc/Makefile.am (DOCFILES): Add notes.texi.
4202 * doc/Makefile.in: Rebuild.
4204 1999-10-11 Doug Evans <devans@casey.cygnus.com>
4206 * ifield.scm (ifld-derived?): New proc.
4207 (f-derived): New global.
4208 (ifield-builtin!): Create ifield f-derived.
4209 (<multi-insn>): New class.
4210 (multi-insn?): New predicate.
4211 (multi-insn-instantiate!): New proc.
4212 (-insn-parse): Create <multi-insn> objects for insns with derived
4214 (-parse-insn-format-symbol): Handle derived ifields.
4215 (-parse-insn-format-ifield-spec): New proc.
4216 (-parse-insn-format-operand-spec): New proc.
4217 (-parse-insn-format-list): Simplify.
4218 (-parse-insn-format): No longer allow (ifield-object value) spec.
4219 (derived-operand-format?): New proc.
4220 (insn-alias?): New proc.
4221 (non-alias-insns): Rewrite.
4222 (insn-real?): Renamed from real-insn?, all callers updated.
4223 (virutal-insns): Rewrite.
4224 (multi-insns): New proc.
4225 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4226 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4227 Return #f if operand doesn't have an index or if index is not an
4229 (hw-index-anyof): New proc.
4230 (-operand-parse): Allow integer indices.
4231 (<derived-operand>): New class.
4232 (derived-operand?): New predicate.
4233 (<anyof-operand>): New class.
4234 (<anyof-value>): New class.
4235 (-anyof-parse-value,-anyof-operand-parse): New procs.
4236 (-derived-operand-parse,-derived-operand-read): New procs.
4237 (define-derived-operand,define-full-derived-operand): New procs.
4238 (operand-init!): New reader command define-derived-operand.
4240 * utils.scm (list-take): Handle negative amount.
4241 (element?): Rewrite.
4243 1999-10-10 Doug Evans <devans@casey.cygnus.com>
4245 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4247 1999-10-04 Richard Henderson <rth@cygnus.com>
4249 * ia64.cpu: Checkpoint.
4251 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4253 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4255 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4256 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4258 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4260 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4261 PC returned by sim_engine_invalid_insn.
4263 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4265 * ia32.cpu: New file.
4267 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4269 * utils.scm (bit-set?): Fix off by one error.
4271 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4273 * rtl.scm (hw): Check for valid hardware element before trying to
4276 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4277 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4278 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4279 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4280 compute_operand2_foo.
4282 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4283 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4284 Call delayed_branch/branch methods instead of assigning to `vpc'.
4285 (<hw-pc>,cxmake-skip): Call skip method.
4286 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4287 (<pc>,cxmake-skip): Ditto.
4288 (-create-virtual-insns!): Ditto.
4289 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4291 (op:record-profile): Specify #:output-language "c++".
4292 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4294 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4296 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4297 (gen-semantic-code): Ditto.
4298 (-gen-sem-case,-gen-sfrag-code): Ditto.
4299 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4300 (cgen-cpu.h): File is now #included by main cpu class, rather than
4302 (cgen-defs.h): New proc.
4303 (-gen-scache-semantic-fn): Change result type to sem_status.
4304 New local `status'. Call done_cti_insn/done_insn method at end.
4305 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4307 (cgen-sem-switch.cxx): Ditto.
4308 * sid-decode.scm (-gen-idesc-decls): Update return type of
4310 (cgen-decode.h): Add using namespace @arch@.
4311 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4313 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4314 (estate-output-language-c?,estate-output-language-c++?): New procs.
4315 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4316 (estate-make-for-normal-rtl-c++): New proc.
4317 (rtl-c++-parsed,rtl-c++): New proc.
4318 (s-c-call): Invoke cpu class method if c++.
4319 (join): Use s-c-raw-call.
4321 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4324 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4325 * rtl.scm (<eval-state>): New member `modifiers'.
4326 (<eval-state>,vmake!): Handle #:modifiers.
4327 (estate-with-modifiers): New proc.
4329 * rtl.scm (rtx-side-effects?): New proc.
4330 (rtx-canonical-bool): Don't change expr if it has side effects.
4331 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4334 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4336 * sim.scm (gen-scache-type): Fix typo in last patch.
4338 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4340 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4342 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4344 * sid.scm (<hw-pc>,cxmake-skip): New method.
4345 (<pc>,cxmake-skip): New method.
4347 * decode.scm (decode-build-table): Delete args startbit,index-list.
4348 All callers updated.
4349 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4350 All callers updated.
4351 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4352 to decode-get-best-bits.
4353 * sid-decode.scm (-gen-decode-fn): Ditto.
4355 * hardware.scm (hw-bits): New proc.
4356 (-hw-parse): New arg layout. All callers updated.
4357 (define-full-hardware): New arg layout. All callers updated.
4358 (-hw-validate-layout): New proc.
4359 (-hw-create-[gs]etter-from-layout): New procs.
4360 (<hw-register>,parse!): Handle layout spec.
4361 * types.scm (type-bits): New proc.
4363 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4364 UNARY, BINARY, TRINARY rtxs.
4366 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4367 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4368 Support '- as "unused spot" indicator.
4370 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4372 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4374 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4376 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4378 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4380 (tstate-make): New arg `depth'. All callers updated.
4381 (tstate-depth,tstate-set-depth!): New procs.
4382 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4383 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4384 (-rtx-traverse): Ditto. Keep track of traversal depth.
4386 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4388 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4389 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4390 * utils-sim.scm: Decoder generator support moved here.
4391 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4392 (-gen-decoder-switch): Sort entries for more fall-throughs.
4394 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4395 * Makefile.in: Rebuild.
4396 * sim-test.scm (build-sim-testcase): Add logging message.
4397 * dev.scm (cload): Recognize SIM-TEST application.
4398 (load-stest): Set APPLICATION to SIM-TEST.
4400 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4402 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4403 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4404 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4406 * insn.scm (syntax-break-out): Handle ${foo}.
4408 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4410 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4411 (bin_PROGRAMS): Define.
4412 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4413 (cgen-hob.c): Prepend $(srcdir)/ here.
4414 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4415 (libcpu_a_SOURCES): Delete.
4416 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4417 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4418 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4419 Add AC_CHECK_LIB(guile,main).
4420 * Makefile.in: Rebuild.
4421 * doc/Makefile.in: Rebuild.
4422 * aclocal.m4: Rebuild.
4423 * config.in: Rebuild.
4424 * configure: Rebuild.
4426 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4428 Rename rtx functions from name: to name, accept optional leading
4430 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4431 * attr.scm (-attr-eval): Update.
4432 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4433 (<hw-register>,mode-ok?): Disallow VOID.
4434 (<hw-immediate>,mode-ok?): Disallow VOID.
4435 (<hw-address>,mode-ok?): Disallow VOID.
4436 * mode.scm (mode-name?): New proc.
4437 (VOID): Renamed from VM.
4438 (DFLT): Renamed from DM.
4439 (mode-builtin!): Update.
4440 * opcodes.scm (<ifield>,gen-insert): Update.
4441 (<ifield>,gen-extract): Update.
4442 (<multi-ifield>,gen-insert,gen-extract): Update.
4443 * operand.scm (op:mode): Update.
4444 (<pc>,make!): Update.
4445 (op:new-mode): Update.
4446 (-operand-read): Update.
4447 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4448 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4449 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4450 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4451 (rtx-make): Call -rtx-munge-mode&options.
4452 (rtx accessors): Rewrite.
4453 (rtx-pretty-name): Update.
4454 (-rtx-traverse-*): Update.
4455 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4456 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4457 (-rtx-make-traverse-table): Update.
4458 (-rtx-traverse-operands): Update.
4459 (-rtx-option?,-rtx-option-list?): New procs.
4460 (-rtx-munge-mode&options): New proc.
4461 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4462 (-rtx-traverse): Update.
4463 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4464 (rtx-compile-time-constant?): Update.
4465 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4466 (rtx-value): Update.
4467 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4468 * rtx-funcs.scm (*): Update.
4469 * rtl-c.scm (rtl-c-get): Update.
4470 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4471 (s-c-call,s-c-raw-call): Update.
4472 (s-boolifop,s-convop,s-if,s-cond): Update.
4473 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4474 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4475 (s-parallel,s-sequence): Update.
4476 (rtl-c-build-table): Update.
4477 * sem-frags.scm (-frag-hash-compute!): Update.
4478 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4479 for temporary bug compatibility with previous version.
4480 (-frag-expr-locals,-frag-expr-stmts): Update.
4481 (-frag-compute-desired-frags,-frag-pick-best): Update.
4482 * semantics.scm (-simplify-expr-fn): Update.
4483 (rtx-simplify): Update.
4484 (-rtx-ref-type): Update. Account for modifiers.
4485 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4486 (-build-ifield-operand!): Update.
4487 (-build-known-values): Update.
4488 (semantic-compile): Update.
4489 (-gen-reg-access-defns): Update.
4490 (gen-semantic-code,-gen-sem-case): Update.
4491 (-gen-sfrag-code,-gen-sfrag-case): Update.
4492 * sim-cpu (gen-semantic-code): Update.
4493 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4494 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4495 (-hw-cxmake-get): 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 (sim-finish!): Update.
4502 * utils-gen.scm (-gen-ifld-extract-base): Update.
4503 (-gen-ifld-extract-beyond): Update.
4504 (gen-multi-ifld-extract): Update.
4505 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4506 * sid.scm (<hw-pc>,gen-write): Update.
4507 (-gen-decode-insn-globals): Update.
4508 (-hw-cxmake-get): Update.
4509 (<hw-register>,cxmake-get-raw): Update.
4510 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4511 (<hw-index>,cxmake-get): Update.
4512 (<operand>,gen-type,gen-read,cxmake-get): Update.
4513 (<operand>,gen-set-quiet,gen-set-trace): Update.
4514 (<pc>,cxmake-get): Update.
4515 (-create-virtual-insns!): Update.
4516 (-decode-split-build-assertion): Update.
4518 * simplify.inc: Update.
4520 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4522 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4523 Prefix queue function name with sim_ instead of @cpu@_.
4525 * sim.scm (-with-parallel-only?): New global.
4526 (option-init!): Initialize it.
4527 (option-set!): Set it.
4528 (with-parallel-only?): New proc.
4529 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4530 and writeback markers if with-parallel-only.
4531 (-gen-idesc-init-fn): Update.
4532 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4535 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4537 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4538 with the invalid insn handler.
4540 * utils.scm (list-maybe-ref): New proc.
4542 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4544 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4546 * i960.cpu (test*-*): Delete `expr' arg.
4547 (test-op,branch-op): Update.
4549 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4551 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4552 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4554 (gen-reg-access-defn): Ditto.
4555 (-gen-hw-addr): Rewrite.
4556 (-op-gen-queued-write): Rewrite.
4557 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4558 (-gen-scache-semantic-fn): Handle with-generic-write.
4559 (-gen-no-scache-semantic-fn): Ditto.
4561 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4563 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4565 * sim.scm (-with-generic-write?): New global.
4566 (option-init!): Initialize it.
4567 (option-set!): Set it.
4568 (with-generic-write?): New proc.
4569 (-gen-hw-addr): New proc.
4570 (-op-gen-queued-write): New proc.
4571 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4573 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4575 (-gen-sem-switch): Preserve existing with-parallel? value.
4576 (-gen-sem-parallel-switch): Ditto.
4577 (-gen-write-case): Add /indent support.
4578 (cgen-write.c): Rewrite.
4580 * utils.scm (-current-print-state): New global.
4581 (make-print-state): New proc.
4582 (pstate-indent,pstate-set-indent!): New procs.
4583 (pstate-cmd?,pstate-cmd-do): New procs.
4584 (/indent): New global.
4585 (/indent-set,/indent-add): New procs.
4586 (string-write): Set -current-print-state.
4587 (-string-write): New arg pstate, all callers updated.
4588 Handle print-state commands.
4589 (-string-list-flatten): New proc.
4590 (string-list->string): Use it.
4592 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4593 (-gen-sem-fn-table-entry): New proc.
4594 (-gen-semantic-fn-table): New proc.
4595 (-gen-scache-semantic-fn): Make fn static.
4596 (-gen-no-scache-semantic-fn): Ditto.
4597 (cgen-semantics.c): Define macro SEM_FN_NAME.
4598 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4599 FAST,FULL. Update @cpu@_insn_sem contents.
4600 (-gen-semf-fn-name): Delete.
4601 (-gen-sem-fn-decls): Delete.
4602 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4603 @cpu@_semf_init_idesc_table.
4604 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4606 (cgen-decode.h): Print sfmt enum.
4607 * sid-decode.scm (-gen-semf-fn-name): Delete.
4608 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4610 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4611 (ifmt-compute!): Ditto.
4612 * sim-decode.scm (-gen-decoder-switch): Ditto.
4613 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4614 (-gen-decoder-switch): Ditto.
4616 * insn.scm (insn-virtual?): New proc.
4618 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4620 * mach.scm (<arch>): attr-list is now a pair of lists.
4621 (current-attr-list): Rewrite.
4622 (current-attr-add!,current-attr-lookup): Rewrite.
4623 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4625 1999-08-06 Richard Henderson <rth@cygnus.com>
4627 * ia64.cpu: Initial checkpoint.
4629 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4631 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4632 (pmacros-init!): Update .apply help string.
4634 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4636 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4637 (<hw-pc>,cxmake-skip): New method.
4638 (<pc>,cxmake-skip): New method.
4639 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4640 (gen-argbuf-type): New member `skip_count'.
4641 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4642 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4644 * utils-sim.scm: New file.
4645 * dev.scm (load-sim): Load it.
4646 (load-sid): Load it.
4647 * cgen-sid.scm: Load it.
4648 * cgen-sim.scm: Load it.
4649 * iformat.scm (<sformat>): New member sbuf, not initialized by
4651 * rtx-funcs.scm (skip): Rewrite.
4652 * rtl-c.scm (skip): Rewrite.
4653 * m32r.cpu (sc,snc): Update `skip' usage.
4654 * mode.scm (mode-real-mode): New proc.
4655 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4656 Distinguish fragments by the <sformat-abuf> they use.
4657 * sim.scm (gen-profile-index-type): Delete.
4658 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4659 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4660 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4661 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4662 (-gen-argbuf-elm): Rewrite.
4663 (-gen-argbuf-hw-elm): Delete.
4664 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4666 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4667 (sim-init!): Initialize them.
4668 (sim-analyze-insns!): Set them.
4669 (current-sbuf-list): New proc.
4670 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4671 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4672 * sim-model.scm (-gen-model-insn-fn): Ditto.
4673 * sim-decode.scm (-gen-extract-decls): Delete.
4674 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4675 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4677 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4678 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4679 (-gen-op-extract,-gen-op-trace-extract): New procs.
4680 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4681 gen-sfmt-argvars-foo and rewrite.
4682 (-gen-record-args): Rewrite.
4683 (-gen-extract-case): Tweak.
4684 * sid.scm (gen-profile-index-type): Delete.
4685 (ifield argbuf support): Move to utils-sim.scm.
4686 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4687 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4688 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4689 (-sim-sformat-argbuf-list): New global.
4690 (sim-init!): Initialize it.
4691 (sim-analyze-insns!): Set it.
4692 (current-sbuf-list): New proc.
4693 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4694 (-gen-argbuf-hw-elm): Delete.
4695 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4697 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4698 (-gen-extract-decls): Delete.
4699 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4701 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4702 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4703 (-gen-op-extract,-gen-op-trace-extract): New procs.
4704 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4705 gen-sfmt-argvars-foo and rewrite.
4706 (-gen-record-args): Rewrite.
4707 (-gen-extract-case): Tweak.
4709 * cgen-gh.c (gh_putc,gh_puts): New functions.
4710 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4711 * cos.c (_object_print_elms,_object_print): Use them.
4712 * hob-sup.c (fastcall_print): Use them.
4713 * configure.in: Check for scm_gen_puts, scm_puts.
4714 * config.in: Rebuild.
4715 * configure: Rebuild.
4716 * aclocal.m4: Rebuild.
4717 * Makefile.in: Rebuild.
4719 * dev.scm (load-opc): Use load instead of maybe-load.
4720 (load-gtest,load-sim,load-stest): Ditto.
4723 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4725 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4726 up to avoid g++ 'goto crosses initialization' warning.
4727 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4728 (-gen-sfrag-case): Update use of NEXT_FRAG.
4730 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4732 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4734 * read.scm: Load sem-frags.scm.
4735 * sem-frags.scm (*): Lots rewritten.
4736 * sid.scm (-with-sem-frags?): New global
4737 (with-sem-frags?): New proc.
4738 (option-init!): Initialize -with-sem-frags?.
4739 (option-set!): Recognize with-sem-frags.
4740 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4741 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4743 (-gen-sfrag-engine-decls): New proc.
4744 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4745 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4746 (-gen-sfrag-engine): New proc.
4747 (-gen-sem-case): Emit setup-semantics if specified.
4748 (-gen-sem-switch-engine): Update init/use of computed goto label.
4749 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4751 (-gen-idesc-decls): Replace sem_address with cgoto.
4752 (-gen-scache-decls): Rewrite definition of `execute' member.
4753 * arm.cpu (arm isa): Enable decode-splits.
4754 * arm7.cpu (multiply insns): Rename result to mul-result.
4756 Rename decode-specialize to decode-split.
4757 * decode.scm (*): Update.
4758 * insn.scm (*): Update.
4759 * mach.scm (*): Update.
4760 * sid.scm (*): Update.
4762 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4764 Record objects as a smob.
4765 * cos.c (scm_tc16_object): New static global.
4766 (cos_init): Initialize it.
4767 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4768 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4769 (_object_tag): Delete.
4770 (_object_make_smob): New function.
4771 (_object_make_x,_object_make_with_values_x): Rewrite.
4772 (_object_elements,_object_class_desc): Rewrite.
4773 (_object_copy,object_p): Rewrite.
4774 (_object_specialize): Rewrite.
4775 (_object_print_elms,_object_print): New functions.
4776 (object_smob): New static global.
4777 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4779 * cos.c (_make_x_symbol): New static global.
4780 (object_make): Use it.
4781 (cos_init): Initialize it.
4783 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4785 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4786 instead to determine whether to use FLD macro.
4787 (<rtl-c-eval-state>): New member ifield-var?.
4788 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4789 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4790 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4792 * rtl.scm (rtx-sequence-assq-locals): New proc.
4794 * cos.scm (-object-error): Don't crash on non-objects.
4796 * Makefile.am (CLEANFILES): Add hobbit.
4797 * Makefile.in: Rebuild.
4799 * rtl-c.scm (s-c-call): Delete unnecessary code.
4801 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4803 * rtl-c.scm (ifield): Always reference value via `FLD'.
4805 * cos.c (elm_bound_p): Return problem SCM boolean values.
4807 * utils-cgen.scm (display-argv): New proc.
4808 * cgen-opc.scm (cgen): Call it.
4809 * cgen-sim.scm (cgen): Ditto.
4810 * cgen-gas.scm (cgen): Ditto.
4811 * cgen-stest.scm (cgen): Ditto.
4812 * cgen-sid.scm (cgen): Ditto.
4814 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4816 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4817 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4818 (-gen-extract-switch): Initialize result to 1.
4819 * opcodes.scm (gen-ifield-default-type): New proc.
4820 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4822 (<hw-index>,gen-insert): Handle non-ifield indices.
4823 (<hw-index>,gen-extract): Ditto.
4824 (<hw-asm>,gen-parse): Ditto.
4825 (<hw-asm>,gen-print): Ditto.
4826 (<keyword>,gen-parse): Ditto.
4827 (<keyword>,gen-print): Ditto.
4828 (<operand>,gen-fget): Ditto.
4829 (<operand>,gen-fset): Ditto.
4831 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4832 (-gen-hw-index): Ditto.
4833 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4834 (-gen-hw-index): Ditto.
4836 * sem-frags.scm: New file.
4838 * attr.scm (attr-parse): Add better checking of input.
4840 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4842 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4844 * ifield.scm (ifld-nil?): New proc.
4846 * operand.scm (<operand>): New members getter,setter.
4847 (<operand>,make!): New args getter,setter. All uses updated.
4848 (op:getter,op:setter): New procs.
4849 (<hw-index>,field-start): Return 0 for non-ifield indices.
4850 (<hw-index>,field-length): Return 0 for non-ifield indices.
4851 (-operand-parse-getter,-operand-parse-setter): New procs.
4852 (-operand-parse): New args getter,setter. All callers updated.
4853 Always use hw-index-scalar for scalar operands.
4854 (-operand-read): Handle getter,setter.
4855 (define-full-operand): New args getter,setter. All uses updated.
4856 * semantics.scm (-build-ifield-operand!): Update.
4857 (-build-index-of-operand!): Update.
4858 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4859 * simplify.inc (define-normal-operand): Update.
4861 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4862 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4863 (s-binop,s-cmpop,s-convop): Ditto.
4864 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4865 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4866 (fcc-tests): New insn-enum.
4867 (fcc-value): Rename from fcc-type.
4868 * sparcfpu.cpu: New file. All fp support moved here.
4870 * rtl.scm (<rtx-func>): New member class.
4871 (rtx-class-*?): New procs.
4872 (def-rtx-node): New arg class. All callers updated.
4873 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4874 * rtx-funcs.scm (*): Specify class.
4876 * utils-cgen.scm (context-make-reader): New proc.
4878 * utils.scm (assert-fail-msg): New variable.
4880 (list-drop,list-tail-drop): New procs.
4882 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4884 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4885 CGEN_MIN_INSN_SIZE deleted on March 22.
4887 * ifield.scm (<ifield>,needed-iflds): New method.
4888 (<multi-ifield>,needed-iflds): New method.
4889 (ifld-needed-iflds): New proc.
4890 (multi-ifield?): New proc.
4891 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4892 (-sfmt-search-key): Include insn length in key.
4893 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4894 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4895 (-ifmt-lookup-ifmt!): Compute key here.
4896 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4897 All callers updated.
4898 (ifmt-build): Delete arg desc. New args search-key,iflds.
4899 All callers updated.
4900 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4901 in-ops,out-ops,sorted-used-iflds. All callers updated.
4902 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4904 * operand.scm (op-iflds-used): New proc.
4905 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4907 And from sid.scm,sid-cpu.scm as well.
4908 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4909 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4910 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4911 (gen-extracted-ifld-value): Ditto.
4912 (-extract-chunk-specs): Ditto.
4913 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4914 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4915 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4916 (-extract-insert-subfields): New function.
4917 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4918 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4919 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4920 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4922 (-gen-no-scache-semantic-fn): Ditto.
4923 (-gen-sem-case): Ditto.
4924 (-gen-read-case): Update calls to gen-define-ifields,
4925 gen-extract-ifields.
4926 * sim-decode.scm (-gen-record-args): Update.
4927 (-gen-sfmt-argvars-assigns): Update.
4928 (-gen-extract-case): Update.
4929 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4930 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4932 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4933 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4934 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4935 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4936 gen-define-ifields, gen-extract-ifields.
4937 (-gen-record-args): Update.
4938 (gen-sfmt-argvars-assigns): Update.
4939 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4940 with gen-define-ifields. Ditto for gen-extract-foo.
4941 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4942 procs rather than method calls.
4944 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4946 * sid.scm (-create-virtual-insns!): New local `context', pass it
4949 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4950 (operand name) not (operand object), (local name) not (local object).
4951 (rtx-traverse-with-locals): New proc.
4952 (-compile-expr-fn): New proc.
4953 (rtx-compile): Rewrite.
4954 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4955 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4956 (rtl-c-set-trace): Ditto.
4957 (operand define-fn): Recognize operand name argument.
4958 (local define-fn): Recognize sequence temp name argument.
4959 * rtx-funcs.scm (operand): Argument is operand name, not object,
4960 so call current-op-lookup.
4961 (local): Similarily, so call rtx-temp-lookup.
4963 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4964 (rtx-operand?): Ditto.
4965 (rtx-pretty-name): Ditto.
4966 (rtx-local-obj): Flag symbol argument as an error.
4967 (rtx-local-name): New proc.
4968 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4970 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4972 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4975 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4978 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4979 (*floats-s->c-fun-table*): Ditto.
4980 * hobbit.c,hobbit.h: Rebuild.
4981 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4982 * semantics.scm (rtx-simplify): Use /fastcall-make.
4984 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4986 * insn.scm (<insn>): Delete members condition, compiled-condition.
4987 (<insn>,make!): Update
4988 (<insn> getters,setters): Update.
4989 (-insn-parse,insn-read,define-full-insn): Update.
4990 * minsn.scm (minsn-make-alias): Update.
4991 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4992 (ifmt-compute!): Ditto.
4993 * sim.scm (sim-finish!): Update.
4994 * simplify.inc: (define-normal-insn): Update.
4995 * sid-cpu.scm (gen-semantic-code): Update.
4997 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4998 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4999 (ifmt-compute!): Ditto.
5001 1999-06-16 Doug Evans <devans@casey.cygnus.com>
5003 * minsn.scm (minsn-compute-iflds): Print better error message for
5006 1999-06-12 Doug Evans <devans@casey.cygnus.com>
5008 * rtl.scm (tstate->estate): Don't copy over expr-fn.
5010 * Makefile.am (HOBFLAGS): New variable.
5011 (cgen-hob.c): Use it.
5013 (libcpu_a_SOURCES): Add hob-sup.c.
5014 (hob-sup.o): New rule.
5015 * Makefile.in: Rebuild.
5016 * cgen.c: #include hob-sup.h.
5017 (cgen_init_c): Call hobbit_init_support.
5018 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5019 (*special-scm->c-functions*): Add them.
5020 (display-c-expression): Handle *c-symbol*.
5021 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5022 (*floats-s->c-fun-table*): Ditto.
5023 (normalize): Recognize /fastcall-make.
5024 (normalize-fastcall-make): New proc.
5025 * hobbit.c,hobbit.h: Rebuild.
5026 * hob-sup.scm: New file.
5027 * hob-sup.c: New file.
5028 * hob-sup.h: New file.
5029 * read.scm: Load hob-sup.scm.
5030 * rtl.scm (-rtx-name-list): New variable.
5031 (rtx-name-list): New proc.
5032 (rtx-lookup): Try symbol first.
5033 (def-rtx-node): Add name to -rtx-name-list.
5034 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5035 (-rtx-traverse-anymode): New proc.
5036 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5037 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5038 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5039 (-rtx-traverse-{symornum,object}): New procs.
5040 (-rtx-make-traverse-table): Rewrite.
5041 (-rtx-traverse-operands): Rewrite arg-types handling.
5042 Handle #f result of traverser.
5043 (-rtx-traverse): Renamed from -rtx-traverse-normal.
5044 Move debug handling here.
5045 (-rtx-traverse-debug): Delete.
5046 (rtl-finish!): Change -rtx-traverse-table into list of handlers
5048 * semantics.scm (semantic-compile:process-expr!): Fix call to
5050 * utils.scm (map1-improper): New proc.
5052 1999-06-08 Doug Evans <devans@casey.cygnus.com>
5054 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5056 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5057 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5058 (<operand>,cxmake-get): Tweak.
5059 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
5061 1999-06-07 Doug Evans <devans@casey.cygnus.com>
5063 * thumb.cpu (dnti): Delete timing spec.
5066 * arm.cpu (arm isa): New fields condition, setup-semantics.
5067 (thumb isa): New field setup-semantics.
5068 (h-gr): Add attribute CACHE-ADDR.
5069 * arm7.cpu (dnai): Delete condition.
5070 (eval-cond): Delete.
5072 * mach.scm (<isa>): New member setup-semantics.
5073 (-isa-parse-setup-semantics): New proc.
5074 (-isa-parse): New arg setup-semantics.
5075 (-isa-read): Recognize setup-semantics.
5077 * sid-cpu.scm (gen-extract-fields): Split into two:
5078 gen-extract-ifields, gen-extract-ifmt-ifields.
5079 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
5080 tracing begin/end messages (done by caller now).
5081 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
5082 tracing begin/end messages (done by x-before,x-after virtual insns).
5083 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
5084 end so don't have to look it up again next time.
5085 * sid-decode.scm (-decode-expr-ifield-values): New proc.
5086 (-decode-expr-ifield-tracking-key): New proc.
5087 (-decode-expr-ifield-tracking): New proc.
5088 (-decode-expr-ifield-values-used): New proc.
5089 (-decode-expr-ifield-mark-used!): New proc.
5090 (-gen-decode-expr-set-itype): New proc.
5091 (-gen-decode-expr-entry): Rewrite.
5092 (-gen-decode-table-entry): New proc.
5093 (-gen-decoder-switch): Use it.
5094 (-gen-virtual-insn-finder): New proc.
5095 (-gen-argbuf-elm): Move here from sid.scm.
5096 (-gen-argbuf-hw-elm): Ditto.
5097 (-gen-argbuf-fields-union): Add entries for chain,before insns.
5098 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5099 conditional-execution isas.
5100 (-gen-decode-fn): Record conditional-exec ifield.
5101 * sid.scm (-current-pbb-engine?): New global.
5102 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5103 (<ifield>,gen-ifld-extract): New arg `indent'.
5104 (<multi-ifield>,gen-ifld-extract): Ditto.
5105 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
5106 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5107 (-gen-arch-model-decls): Only scan real insns.
5108 (scache-engine-insns,pbb-engine-insns): New procs.
5109 (-create-virtual-insns!): New proc.
5110 (sim-finish!): Call it.
5111 (-decode-specialize-insn?): New proc.
5112 (-decode-specialize-build-assertion): New proc.
5113 (-decode-specialize-insn-1): New proc.
5114 (-decode-specialize-insn): New proc.
5115 (-fill-sim-insn-list!): New proc.
5116 (sim-analyze!): Create copies of insns to be specialized.
5117 * utils-cgen.scm (obj-set-name!): New proc.
5119 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5120 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5122 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
5124 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5125 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5126 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5127 (attr): Rewrite test for insn owner.
5128 (member): New rtx function.
5129 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5130 as separate function.
5131 (rtx-ifield?,rtx-ifield-name): New procs.
5132 (rtx-operand-obj): Rewrite.
5133 (rtx-operand-name): New proc.
5134 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5135 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5136 (tstate-make): New args owner, known. All callers updated.
5137 (tstate-known-lookup): New proc.
5138 (rtx-traverse): New arg owner. All callers updated.
5139 (rtx-make-bool): New proc.
5140 (rtl-find-ifields): Rewrite.
5141 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5142 * semantics.scm: ... here.
5143 (rtx-const-equal,rtx-const-list-equal): New procs.
5144 (-build-known-values): New proc.
5145 (semantic-compile): New arg `insn'. Call rtx-simplify.
5146 (semantic-attrs): Ditto.
5147 * rtx-funcs.scm (member,number-list): New rtx functions.
5149 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5150 Rewrite. Delete arg `all-attrs'. All callers updated.
5151 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
5153 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5155 * decode.scm (subdtable-add): Handle `expr' entries.
5156 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
5157 (exprtable-entry-*): Update.
5158 (exprtable-entry-iflds): New proc.
5159 (exprentry-cost): New proc.
5160 (exprtable-sort,-gen-exprtable-name): New procs.
5161 (exprtable-make): New arg `name'. All callers updated. use vector.
5162 (exprtable-*): Update.
5163 (-build-decode-table-entry): Don't issue collision warning if all are
5164 specialized insns. Sort exprtable entries before building table.
5166 * read.scm (-reader-process-expanded-1): Move pretty printing of
5167 input to logging level 4.
5169 * utils.scm (string-list->string): New proc.
5171 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5173 (insn-read): Delete leading '-' in name. All callers updated.
5174 (real-insn?): New proc.
5175 (real-insns): Rewrite.
5176 (insn-has-ifield?): New proc.
5177 (insn-builtin!): Create insn attribute SPECIALIZED.
5179 * mach.scm (<arch>): Delete member app-data.
5180 (current-raw-insn-list): New proc.
5181 (insn-list-car,insn-list-splice!): New procs.
5182 (<decode-specialize>): New class.
5183 (-isa-parse-decode-specialize): New proc.
5184 (-isa-parse-decode-specializes): New proc.
5185 (<isa>): New members `condition', `decode-specializes'.
5186 (-isa-parse-condition): New proc.
5187 (-isa-parse): New args condition, decode-specializes.
5188 (-isa-read): Recognize condition, decode-specializes.
5189 (-isa-add-decode-specialize!): New proc.
5190 (modify-isa): New proc.
5191 (isa-conditional-exec?,state-conditional-exec?): New procs.
5192 (arch-init!): New reader command `modify-isa'.
5194 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5195 (mode-signed,mode-unsigned?): New procs.
5197 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
5199 * types.scm (<array>): New method get-shape.
5200 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5202 (hw-shape,hw-num-elms): New procs.
5203 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5204 if there's more than 255 registers.
5205 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5207 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5210 1999-05-21 Doug Evans <devans@casey.cygnus.com>
5212 * cgen-sid.scm (sim-arguments): Add -X.
5213 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5214 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5215 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
5216 Simplify by supporting pbb engine only.
5217 (-gen-sem-switch-init): New proc.
5218 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5219 (cgen-sem-switch.cxx): New proc.
5220 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5221 with with-pbb?. Support dual scache/pbb engines.
5222 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5223 Support dual scache/pbb engines.
5224 (cgen-decode.h): Generate semantic fn decls if with-scache?.
5225 * sid.scm (*) with-pbb? replaces with-sem-switch?.
5226 (sim-finish!): Create pbb support virtual insns if with-pbb?.
5228 1999-05-10 Ben Elliston <bje@cygnus.com>
5230 * arm7.cpu: Remove coprocessor related fields, operands and insn
5231 definitions for now. Take the undefined instruction trap instead.
5232 (ldmda-wb): New instruction.
5233 (ldmib-wb): Likewise.
5234 (ldmdb-wb): Likewise.
5235 (stmdb-wb): Likewise.
5236 (stmib-wb): Likewise.
5237 (stmda-wb): Likewise.
5239 1999-05-08 Doug Evans <devans@casey.cygnus.com>
5241 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5242 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5244 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5245 hobbit can't handle optional third arg.
5247 1999-05-07 Doug Evans <devans@casey.cygnus.com>
5249 * arm.cpu (h-tbit): Delete set spec.
5250 (h-mbits): Don't call arm_mbits_set in set spec.
5251 * arm.sim: New file.
5252 * hardware.scm (modify-hardware): New proc.
5253 (hardware-init!): Add modify-hardware command.
5254 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5255 (-hw-gen-set-quiet): Ditto.
5256 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5257 hardware attribute. Load $arch.sim file if present.
5258 * utils-cgen.scm (keyword-list?): New proc.
5259 (keyword-list->arg-list,arg-list-validate-name): New procs.
5260 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5262 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5264 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5267 * attr.scm (obj-prepend-atlist!): New proc.
5269 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5271 * sid.scm (<operand>,profilable?): Use op:type.
5272 * sim.scm (<operand>,profilable?): Use op:type.
5274 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5276 * utils.scm (find-index,find): Be more stack friendly.
5278 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5281 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5283 * arm.cpu (h-gr-usr): New hardware element.
5284 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5285 (arm-mode): New keyword.
5286 (h-mbits): Add set spec.
5287 (h-spsr): Implement get/set specs.
5289 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5290 (-reader-process-expanded-1): Pretty print logging output.
5292 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5293 (cgen-cpu.h): Print enums before hardware elements.
5294 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5295 * sid-decode.scm (cgen-decode.cxx): Ditto.
5296 * sid-model.scm (cgen-model.cxx): Ditto.
5298 * utils-cgen.scm (context-error): Accept variable number of
5301 * rtx-funcs.scm (error:): New rtx function.
5302 * rtl-c.scm (s-case-vm): New proc.
5303 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5304 (s-case): Simplify, handle non-VM result.
5305 (error:): New rtx function.
5307 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5309 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5310 (test-hi,test-ls): Fix cbit handling.
5311 (shift-type,h-operand2-shifttype): Move here ...
5312 * arm7.cpu: ... from here.
5313 (set-cond,set-cond-maybe,dnix): Delete, unused.
5314 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5315 * arm.cpu: ... to here.
5316 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5317 (alu-cmn): Use set-add-flags.
5318 (alu-tst): Use set-zn-flags.
5319 (alu-cmp): Use set-sub-flags.
5320 (lsl,lsr,asr): Set condition codes.
5321 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5322 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5324 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5325 All callers updated.
5326 (sub-sp): Rename from add-sp-neg.
5327 (f-lbwl-offset): Delete.
5328 (f-lbwl-hi,f-lbwl-lo): New ifields.
5329 (lbwl-hi,lbwl-lo): Update.
5330 (bl-hi): Add 4 to pc.
5331 (push-reg,pop-reg): Simplify.
5332 (push,push-lr): Push registers in correct order.
5333 (pop,pop-pc): Pop registers in correct order.
5334 (save-reg-inc,load-reg-inc): Simplify.
5335 (ldmia): Save registers in correct order.
5337 1999-04-30 Ben Elliston <bje@cygnus.com>
5339 * arm7.cpu (f-op-hdt): Remove; unused.
5340 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5341 (f-ror-imm8): New multi-ifield.
5342 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5344 (f-uimm12): New field.
5345 (ror-imm8): New operand.
5347 (hdt-offset8): Reinstate operand.
5348 (offset4-hi,offset4-lo): Remove.
5349 (set-cond): Remove macro; unused.
5350 (set-cond-maybe): Likewise.
5351 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5352 (store-word/byte): Likewise.
5353 (load-halfword): Use hdt-offset8 multifield operand instead of two
5354 4-bit operands that are explicitly combined by semantic code.
5355 (do-halfword-store): Bug fix. Set address when not preindexing.
5356 (store-halfword): Also use hdt-offset8 operand.
5357 (arith-op): Avoid clobbering source registers when one of them is
5358 the destination register.
5359 (arith-imm-op): Likewise.
5360 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5361 (teq-imm): Likewise.
5362 (ldm-p): Rename to ldmdb.
5363 (stm-pw): Rename to stmdb-wb.
5364 (multi-action): New macro; test reg-list bits and execute a
5365 semantic fn if the bit is set.
5366 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5367 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5368 (all insns): Use dnai entries for simplicity rather than dni.
5369 (*): Use short-form of (const ..).
5371 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5373 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5374 member eval to evaluator.
5375 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5376 (tstate-make): Delete arg op-fn. All callers updated.
5377 (tstate-op-fn,tstate-set-op-fn!): Delete.
5378 (rtx-traverse): Delete op-fn arg. All callers updated.
5379 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5380 split out of -simplify-for-compilation.
5382 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5383 (cgen_DEPENDENCIES): Add stamp-cgen.
5384 (stamp-cgen): New rule.
5385 * Makefile.in: Rebuild.
5387 * rtl-c.scm (enum:): Define emitter for.
5388 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5390 (rtx-constant-value,rtx-enum-value): New procs.
5391 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5392 (rtx-compile-time-constant?): Return #t for enums.
5393 (rtx-true?,rtx-false?): Handle enums.
5394 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5395 building result by hand.
5396 (rtx-simplify-eq-attr-insn): Ditto.
5397 * rtx-funcs.scm (enum:,enum): New rtx functions.
5399 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5401 (arch-analyze-insns!): New proc.
5402 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5403 of calling ifmt-compute! directly.
5404 * sid.scm (-sim-insns-analyzed?): Delete.
5405 (sim-analyze!): Call arch-analyze-insns! instead of calling
5406 ifmt-compute! directly.
5407 * sim.scm (-sim-insns-analyzed?): Delete.
5408 (sim-analyze!): Call arch-analyze-insns! instead of calling
5409 ifmt-compute! directly.
5411 * utils.scm (string-take-with-filler): New proc.
5412 (string-take): Use it.
5414 * pgmr-tools.scm: New file.
5415 * read.scm: Load it.
5416 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5418 * insn.scm (insn-base-mask): Renamed from insn:mask.
5419 All callers updated.
5420 (insn-base-mask-length): Renamed from insn:mask-length.
5421 All callers updated.
5422 (insn-foo): Renamed from insn:foo. All callers updated.
5423 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5424 * iformat.scm (compute-insn-base-mask-length): Renamed from
5425 compute-insn-mask-length. All callers updated.
5426 (compute-insn-base-mask): Renamed from compute-insn-mask.
5427 All callers updated.
5429 * enum.scm (-enum-parse-prefix): New proc.
5430 (<enum>,make!): Don't parse enum values here.
5431 (-enum-parse): Do it here. Call -enum-parse-prefix.
5432 (define-full-insn-enum): Ditto.
5433 (enum-vals-upcase): New proc.
5434 * hardware.scm (define-keyword): Make enum prefix uppercase.
5435 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5437 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5438 (<ifield>,field-extract): New method.
5439 (<multi-ifield>,field-extract): New method.
5440 (ifld-extract): New proc.
5441 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5442 (ifld-extract-fn-name): Renamed from ifld-extract.
5444 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5445 All callers updated.
5447 * ifield.scm (ifld-lsb0?): New proc.
5448 (sort-ifield-list): New arg up?. All callers updated.
5449 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5450 rather than global state.
5452 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5454 * insn.scm (pretty-print-insn-format): New proc.
5456 * Makefile.in: Rebuild.
5457 * aclocal.m4: Rebuild
5458 * configure: Rebuild.
5460 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5462 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5463 * configure: Rebuild.
5464 * aclocal.m4: Rebuild.
5465 * Makefile.in: Rebuild.
5466 * doc/Makefile.in: Rebuild.
5467 * doc/version.texi: Rebuild.
5469 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5471 * utils.scm (bits->bools): New proc.
5473 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5475 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5476 subfield's gen-ifld-extract-decl method.
5478 1999-04-23 Ben Elliston <bje@cygnus.com>
5480 * arm7.cpu (ldrsh-pu): Remove.
5481 (do-halfword-load): New pmacro.
5482 (load-halfword): Likewise.
5483 (do-halfword-store): Likewise.
5484 (store-halfword): Likewise.
5485 (strh-*): New instructions.
5486 (ldrsb-*): Likewise.
5488 (ldrsh-*): Likewise.
5490 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5492 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5495 * arm7.cpu (do-word/byte-store): Fix typo.
5497 1999-04-22 Ben Elliston <bje@cygnus.com>
5499 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5500 register is the program counter (R15).
5502 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5503 (str-*): Implement using store-word-byte. Remove older versions.
5504 (bic): Use the `inv' rtx for obtaining bitwise complements.
5505 (bic-imm): Likewise.
5507 (mvn-imm): Likewise.
5508 (store-indev-reg): Remove crufty pmacro.
5509 (load-indiv-reg): Likewise.
5510 (ldm-p): Reverse the order of register processing for decrement.
5512 (stbi): Remove; handled by the str-* insns.
5514 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5516 * thumb.cpu (cmp): Fix carry bit computation.
5519 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5521 * arm.cpu (h-tbit): Specify set spec.
5523 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5524 (set-sub-flags): Interpret "carry bit" as a borrow.
5525 (all sub/cmp insns): Carry bit is actually a borrow bit.
5526 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5527 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5529 (hireg-add,hireg-cmp,hireg-move): Ditto.
5531 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5532 (-CGEN-LANG-VERSION): Ditto.
5534 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5536 * pmacros.scm (-pmacro-make): New arg `default-values',
5537 all callers updated.
5538 (-pmacro-default-values): New proc.
5539 (-pmacro-process-keyworded-args): New proc.
5540 (-pmacro-process-args): New proc.
5541 (-pmacro-invoke): Process arguments before expanding macro.
5542 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5543 (define-pmacro): Handle default values specified in arg list.
5544 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5545 (rtx-boolif-op-arg[01]): New procs.
5546 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5547 (rtx-simplify): Handle not,orif,andif.
5548 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5549 * utils.scm (alist-copy): New proc.
5550 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5552 (swi): Explicitly set pc.
5554 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5556 1999-04-17 Ben Elliston <bje@cygnus.com>
5558 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5559 correctly adjusts the program counter now.
5561 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5562 (f-signed?): Rename from `f-hdt-signed?'.
5563 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5564 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5565 (f-hdt-offset8): Use new field names.
5566 (ldr): Use `imm12' field, not `offset12', since we do our own
5568 (str, str-*): Likewise.
5569 (ldu-*): Remove most; better not implemented than broken.
5571 (ldrsh-pu): New insn.
5575 (ldm-p): Likewise; replace (load-indiv-reg) version.
5577 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5579 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5580 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5581 (*): Explicitly specify mode in c-call.
5582 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5584 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5585 (arith-imm-op): New pmacro.
5586 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5587 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5589 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5591 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5593 * rtl.scm (rtl-find-ifields): Implement.
5595 * utils-gen.scm: New file.
5596 * read.scm: Load it.
5597 * desc.scm: Move generic attribute code to utils-gen.scm.
5598 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5599 * Makefile.in: Rebuild.
5601 * arm7.cpu (R15-OFFSET): New attribute.
5603 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5604 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5605 for reg-shift version.
5607 (data processing insns): Reorganize. Use dnai.
5609 * attr.scm (attr-kind): New proc.
5610 (attr-list-enum-list): Rewrite.
5611 (-attr-sort): Split result into two lists, bools and non-bools.
5612 (current-attr-list-for): Update.
5614 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5615 * sid-cpu.scm (-gen-attr-decls): New proc.
5616 (-gen-insn-attr-decls): New proc.
5617 (cgen-desc.h): New proc.
5618 (cgen-cpu.h): Put everything in @cpu@ namespace.
5619 (gen-parallel-exec-type): Change prefix of parexec struct from
5621 (-gen-trace-record-type): Ditto for trace_record struct.
5622 (-gen-write-case): Update.
5623 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5624 @prefix@. Update scache struct references.
5625 (-gen-sem-case): Update scache struct references.
5626 (-gen-sem-switch-fn): Update idesc struct reference.
5627 Update insn_type enum reference.
5628 (cgen-write.cxx): Update scache,argbuf references.
5629 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5630 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5631 from @cpu@ to @prefix@.
5632 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5633 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5634 from @CPU@ to @PREFIX@.
5635 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5636 from @CPU@ to @PREFIX@.
5637 (-gen-decode-insn-globals): Generate insn attributes.
5638 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5639 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5640 semantic fn typedef.
5641 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5642 Change prefix of scache struct from @cpu@ to @prefix@.
5643 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5644 Change prefix of idesc struct from @cpu@ to @prefix@.
5645 Change prefix of insn_type enum from @cpu@ to @prefix@.
5646 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5647 from @cpu@ to @prefix@.
5648 (-gen-scache-decls): Change prefix of scache struct from
5649 @cpu@ to @prefix@. Update idesc struct name.
5650 Update decode,execute methods.
5651 (-gen-extract-case): Update to type name changes.
5652 (-gen-decode-fn): Ditto.
5653 (cgen-decode.h): Put everything in @cpu@ namespace (except
5654 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5655 (cgen-decode.cxx): Add using namespace @cpu@.
5656 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5657 model_mark_get/set from @cpu@ to @prefix@.
5658 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5660 (gen-model-fn-decls): Update idesc struct name. Change prefix
5661 of model_insn_before/after from @cpu@ to @prefix@.
5662 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5663 Update insn_word type name.
5664 (-gen-model-timing-table): Update INSN_TIMING struct name.
5665 (-gen-model-init-fn): Update MODEL_DATA struct name.
5666 (-gen-mach-defns): Update name of init_idesc_table fn.
5667 (cgen-model.cxx): Add using namespace @cpu@.
5668 * sid.scm (gen-cpu-class): Delete.
5669 (gen-attr-type): New proc.
5670 (gen-obj-attr-sid-defn): New proc.
5671 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5672 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5674 (gen-cpu-insn-enum): Update name of insn enum.
5675 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5677 (swi): Rename @cpu@_swi to @prefix@_swi.
5679 * decode.scm (-build-decode-table-entry): Remove heuristic for
5680 distinguishing insns, and use insn ifield-assertion specs.
5682 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5683 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5684 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5685 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5686 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5687 all callers updated.
5688 (gen-attr-name): New proc
5689 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5690 (gen-obj-attr-defn): Delete num_nonbools count.
5692 * iformat.scm (ifmt-analyze): Handle insn-condition.
5693 (ifmt-compute!): Ditto.
5694 * insn.scm (<insn>): Specify default value for condition,
5695 post-cond-trap,compiled-condition,compiled-semantics.
5696 (<insn>,make!): New arg condition.
5697 (<insn>): Add getters for condition,compiled-condition.
5698 (-insn-parse): New arg condition, all callers updated.
5699 (-insn-read): Recognize condition spec.
5700 (define-full-insn): New arg condition.
5701 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5702 * semantics.scm (semantic-compile): Change arg sem-code to
5704 (semantic-attrs): Ditto.
5705 * sim.scm (sim-finish!): Update calls to define-full-insn.
5706 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5707 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5708 * sid.scm (sim-finish!): Update call to define-full-insn.
5710 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5712 * Makefile.am (sim-cpu): Allow specification of ISA.
5713 * Makefile.in: Rebuild.
5715 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5717 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5719 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5721 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5723 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5725 * attr.scm (atlist?): New proc.
5726 (-attr-eval): Rewrite.
5727 (attr-parse): New proc.
5728 (atlist-parse): Use it.
5730 * decode.scm (exprtable-entry-make): New proc.
5731 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5732 (exprtable-make,exprtable-insns): New procs.
5734 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5736 (hardware-builtin!): Make h-memory a vector.
5738 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5739 All callers updated.
5740 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5742 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5744 (-insn-parse): Set semantics to #f if not specified.
5745 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5747 (-parse-insn-format): Recognize `=' iformat spec.
5749 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5750 (isa-max-insn-bitsize): Ditto.
5752 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5754 (<ifield>,gen-extract): Ditto.
5755 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5756 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5757 (gen-define-ifmt-ifields): New proc.
5758 (gen-semantic-code): Rewrite.
5759 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5760 (-gen-decoder-switch): Handle expression tables.
5761 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5763 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5764 instead of gen-define-fields.
5765 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5767 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5768 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5769 (-gen-ifld-extract-beyond): Ditto.
5770 (<multi-ifield>,gen-ifld-extract): Ditto.
5771 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5772 rtl evaluation code.
5773 (op:read): Build an <eval-state> to pass to gen-read.
5774 (op:write): Build an <eval-state> to pass to gen-write.
5775 (op:record-profile): Build an <eval-state> to pass to
5777 * sim-cpu.scm (gen-semantic-code): Rewrite.
5778 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5780 (-gen-ifld-extract-beyond): Ditto.
5781 (<multi-ifield>,gen-ifld-extract): Ditto.
5782 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5783 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5784 rtl evaluation code.
5785 (op:read): Build an <eval-state> to pass to gen-read.
5786 (op:write): Build an <eval-state> to pass to gen-write.
5787 (op:record-profile): Build an <eval-state> to pass to
5790 * operand.scm (<operand>): Give `selector' default value of #f.
5791 Give `num' default value of -1. Give `cond?' default value of #f.
5792 (op:new-mode): Delete arg `set?', all uses updated.
5794 * read.scm (reader-error): Handle #f return from port-filename.
5795 (-init-parse-cpu!): Call rtl-c-init!.
5796 (reader-install-builtin!): Call rtl-builtin!.
5798 * rtl-c.scm: New file.
5799 * semantics.scm: New file.
5800 * read.scm: Load them.
5801 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5803 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5805 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5806 (-rtx-num-text,-rtx-max-num): New globals.
5807 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5808 (-rtx-macro-lookup): New proc.
5809 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5810 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5811 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5812 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5813 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5814 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5815 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5816 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5817 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5818 (rtx-pretty-name): New proc.
5819 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5820 (rtx-traverse-*): Rewrite rtx traversing.
5821 (rtx-eval-*): Rewrite rtx evaluation.
5822 (rtx-compile): New proc.
5823 (rtx-simplify): New proc.
5824 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5825 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5826 (ifield,index-of): Rewrite.
5827 (name): Renamed from `operand:'.
5828 (operand,xop,local): New rtx's.
5829 (current-insn): Rewrite.
5830 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5831 (cgen-hob.h): Remove rule for.
5832 (cgen-hob.o): Depend on cgen-hob.c only.
5833 * Makefile.in: Rebuild.
5835 * utils-cgen.scm (vmake): New proc.
5836 (<context>): New class.
5837 (context-make-prefix,context-error): New procs.
5839 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5841 * i960.cpu: Add some ??? comments.
5842 (xnor, ornot): New instructions.
5843 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5845 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5847 * cos.scm (-object-error): Print better error message.
5849 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5850 (-pmacro-env-ref): Renamed from -env-ref.
5852 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5854 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5856 (hardware-builtin!): Delete h-pc builtin.
5857 * arm.cpu (h-pc): Define.
5858 (h-gr): Delete get,set specs. Make array of 16 regs again.
5859 * arm7.cpu (set-logical-cc-maybe): Delete.
5860 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5861 (data processing insns): Rewrite.
5862 * m32r.cpu (h-pc): Define.
5863 * fr30.cpu (h-pc): Define.
5864 * i960.cpu (h-pc): Define.
5865 * sparc.cpu (h-pc): Define.
5867 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5868 (s-parallel): Replace do {...} while (0) with {...}.
5869 (s-sequence): Ditto.
5871 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5873 (-gen-write-case,-gen-sem-case): Ditto.
5874 (-gen-sem-case): Only specify `written' if profiling or
5875 parallel-write-back.
5876 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5877 (-gen-sem-switch-fn): New proc.
5878 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5879 based on with-sem-switch option.
5880 * sid-decode.scm (-gen-decode-insn-globals): Only define
5881 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5882 addresses in idesc_table if !with-sem-switch.
5883 (-gen-sem-fn-decls): Rewrite.
5884 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5885 member based on with-sem-switch. Only define
5886 `idesc_table_initialized_p' member if with-sem-switch.
5887 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5888 * sid.scm (-with-sem-switch?): New variable.
5889 (option-init!): Initialize it.
5890 (option-set!): Set it.
5891 (with-sem-switch?): New proc.
5892 (-op-gen-set-trace): Only emit `written' reference if profiling.
5893 (sim-finish!): Use h_pc_set to set pc.
5895 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5897 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5898 All callers updated.
5899 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5901 * sid.scm (gen-argbuf-type): Delete.
5902 (-gen-argbuf-fields-union): Move to ...
5903 * sid-decode.scm: ... here.
5905 * read.scm (-reader-process-expanded-1): New proc.
5906 (-reader-process-expanded): Call it to catch nested begin's.
5907 (reader-process): Move `begin' handling to -reader-process-expanded.
5909 * insn.scm (-insn-read): Fix name of `format' spec.
5911 * pmacros.scm (.pmacro): New builtin.
5912 (scan-symbol): If procedure macro, return macro rather than its symbol.
5913 (check-macro): Don't do lookup, instead check if (car expr) is
5915 (scan-list): Handle .pmacro.
5916 (scan): No longer re-examine text for another macro invocation.
5917 (-pmacro-build-lambda): New proc.
5918 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5919 another, fetch the other's value (rather than doing it during
5922 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5924 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5925 * Makefile.in: Rebuild.
5927 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5928 (-fill-slot!): Simplify.
5929 (-build-slots): Simplify.
5931 * dev.scm (load-sid): Don't load sid-arch.scm.
5933 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5935 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5938 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5940 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5941 * decode.scm: ... here. New file.
5942 * sid-decode.scm: Use decoder computation code in decode.scm.
5943 * read.scm: Load decode.scm.
5945 * arm.cpu (arm710 model): Add u-exec function unit.
5946 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5947 Add get/set specs to redirect reg 15 to h-pc.
5948 (h-*): Indicate for both ARM and THUMB isas.
5949 (cbit,nbit,vbit,zbit): Ditto.
5950 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5951 (h-cpsr): Make virtual. Add get/set specs.
5952 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5953 (h-spsr): New virtual reg.
5954 * arm7.cpu (shift-type): New explicitly defined keyword.
5955 (h-operand2-shifttype): Use it.
5956 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5957 All callers updated. Don't set cbit.
5958 (logical-op): Add rm to ifield list. Change case to case:. Use
5959 shift-type enum as case choices. Set cbit.
5960 (and,orr,eor,add-imm): Uncomment out.
5961 (undefined): Temporarily comment out.
5962 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5963 (lda-pc,lda-sp): Ditto.
5964 (ldr-pc): Rename from ldr.
5965 (cbranch): Mark insns as being thumb insns.
5967 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5969 * cgen-sid.scm: Don't load sid-arch.scm.
5970 (sim-arguments): Delete unused entries.
5971 * sid-arch.scm: Delete.
5973 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5974 (<insn>,ifld-assertions): New member.
5975 (<insn>,make!): New arg ifld-assertions, all callers updated.
5976 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5977 (insn:fields): Delete.
5978 (-insn-parse): New arg ifld-assertions. All callers updated.
5979 (-insn-read,define-insn): New procs.
5980 (define-full-insn): New arg ifld-assertions. All callers updated.
5981 (insn-init!): New comment define-insn.
5983 * model.scm (-model-parse): Ensure at least one unit specified.
5985 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5986 (<c-expr-temp>,get-name): New method.
5987 (-rtx-make-current-closure,s-closure): New proc.
5988 (hw:): Wrap rtx indices in a closure.
5989 (-gen-case-prefix): New proc.
5991 * rtx-funcs.scm (case:): Fix call to s-case.
5992 (closure): New rtx func.
5994 * hardware.scm (<hardware-base>): New member isas-cache.
5995 (<hardware-base>,get-isas): New method.
5996 (hardware-builtin): Indicate for all isas.
5997 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5998 * mach.scm (current-arch-mach-name-list): Return list of names.
5999 (current-isa-mach-name-list): Ditto.
6000 (define-arch): Install builtin objects here.
6001 * read.scm (keep-atlist?): Only keep if both mach and isa are
6003 (keep-mach-atlist?): New proc.
6004 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
6005 (reader-install-builtin!): Renamed from -install-builtin!.
6006 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
6007 -gen-cpu-reg-access-defns. Rewrite.
6008 (gen-reg-access-defn): Delete.
6009 (-gen-hardware-struct): New proc.
6010 (-gen-hardware-types): Simplify. Add multiple-isa support.
6011 (gen-semantic-fn,-gen-all-semantics): Delete.
6012 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
6013 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6014 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6015 Call sem-analyze-insns!.
6016 (cgen-semantics.cxx): Add multiple-isa support.
6017 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6018 (-gen-scache-decls,-gen-decode-fn): Ditto.
6019 (cgen-decode.h): Call sem-analyze-insns!.
6020 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6021 * sid.scm (-with-multiple-isa?): New variable.
6022 (option-init!): Initialize it.
6023 (option-set!): Set it.
6024 (with-multiple-isa?): New proc.
6025 (gen-cpu-ref): New arg isas. All callers updated.
6026 (gen-cpu-class): New proc.
6027 (*-get-macro,*-set-macro): Delete.
6028 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6029 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6030 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6031 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6032 (-sim-insns-analyzed): New global variable.
6033 (sim-init!): Reset it.
6034 (sim-analyze-insns!): New proc.
6035 (sim-analyze!): Don't do instruction analysis here.
6036 (sim-finish!): Specify isa of x-invalid insn.
6037 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6039 1999-03-22 Doug Evans <devans@casey.cygnus.com>
6041 * thumb.cpu (cpu,mach,model): Delete.
6042 (dntf): New pmacro. Use it for all field definitions.
6043 (dntop): New pmacro. Use it for all operand definitions.
6044 (asr): Correct field list.
6045 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6047 * utils-cgen.scm (define-getters): New macro to simplify
6048 writing class accessors.
6049 (define-setters): Ditto.
6050 (sanitize): Recognize isa elements.
6052 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6053 state-parallel-exec?.
6054 * sid-model.scm (*): Ditto.
6055 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
6056 state-decode-assist.
6058 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6059 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6060 * sim-decode.scm (-gen-decode-switch): Ditto.
6062 * sim-arch.scm (-regs-for-access-fns): Delete.
6063 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6064 (-gen-arch-reg-access-defns): Delete.
6066 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6067 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6068 with state-parallel=exec?.
6069 (cgen-*): Call sim-analyze-insns! here.
6070 * sim-decode.scm (cgen-*): Ditto.
6071 * sim-model.scm (cgen-*): Ditto.
6072 * sim.scm (-sim-insns-analyzed): New global variable.
6073 (sim-init!): Reset it.
6074 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
6075 already done the analysis.
6077 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6080 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6081 (arm arch): Update isa spec.
6082 (arm,thumb isas): Define.
6083 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6084 (arm7tdmi mach): Add isa spec.
6085 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
6086 `const' on word number.
6087 * fr30.cpu (fr30 arch): Update isa spec.
6089 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6091 * i960.cpu (i960 arch): Update isa spec.
6093 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6094 liw-insns,parallel-insns moved to isas spec.
6095 * m32r.cpu (m32r arch): Update isas spec.
6097 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6098 liw-insns,parallel-insns moved to isa spec.
6099 * sparc.cpu (sparc arch): Update isas spec.
6100 (sparc isa): Define.
6101 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6102 decode-assist moved to isa spec.
6103 * sparc64.cpu (sparc64 cpu): Ditto.
6104 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6105 * desc-cpu.scm (-gen-isa-table-defns): New proc.
6106 (-gen-mach-table-defns): Output mach table.
6107 (-gen-hash-defines): Delete insn size macros, except for
6109 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
6110 (cgen-desc.h): Define MAX_ISAS.
6111 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
6112 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
6113 (arch-* accessors): Renamed from arch:*. All callers updated.
6114 (current-arch-isa-name-list): New proc.
6115 (-arch-parse-isas): Renamed from -arch-parse-isa.
6116 (def-isa-attr!): Rewrite.
6117 (<iframe>): New class.
6118 (<itype>): New class.
6120 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6121 (isa-integral-insn?,isa-parallel-exec?): New procs.
6122 (-isa-parse,-isa-read,define-isa): New proc.
6123 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6124 liw-insns moved to <isa>.
6125 (cpu-* accessors): Renamed from cpu:*. All callers updated.
6126 (-cpu-parse,-cpu-read): Update.
6127 (state-*): Renamed from state:*. All callers updated.
6128 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6130 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6131 (state-decode-assist): New proc.
6132 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6133 (-adata-set-derived!): Rewrite.
6134 (adata-integral-insn?): Renamed from adata:integral-insn?. All
6136 (arch-init!): Add define-isa command.
6137 * read.scm (<reader>): Default keep-isa member to (all).
6138 (reader-* accessors): Renamed from reader:*. All callers updated.
6139 (-keep-isa-set!): Call string->symbol on isa name list.
6140 (keep-isa-validate!): Rewrite.
6141 (current-isa): New proc.
6142 (keep-isa?): Recognize "all".
6143 (-init-parse-cpu!): New arg keep-isa. All callers updated.
6144 Call -keep-isa-set!.
6145 (cmd-if): Recognize keep-isa?.
6146 (cpu-load): New arg keep-isa. All callers updated.
6147 (-opt-spec-update): New proc.
6148 (common-arguments): First arg is string, not symbol.
6149 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
6151 * rtl.scm (rtx-get): Default mode of string arg is INT.
6153 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
6155 * rtx-funcs.scm (join:): Pass cpu to handler.
6157 * configure.in (guile_include_dir): Delete.
6158 * configure: Rebuild.
6159 * Makefile.in: Rebuild.
6160 * doc/Makefile.in: Rebuild.
6162 * sid-cpu.scm (-extract-chunk-specs): New proc.
6163 (gen-define-fields): Use it.
6164 (-extract-chunk): New proc.
6165 (-gen-extract-beyond-var-list): Use it.
6166 (gen-extract-fields): Simplify.
6168 1999-03-22 Ben Elliston <bje@cygnus.com>
6170 * arm7.cpu (ldri-p): New instruction.
6171 (swi): Do not vector through 0x8 yet--there is nothing there.
6174 (all): Use (const x) in subreg expressions.
6176 1999-03-19 Ben Elliston <bje@cygnus.com>
6178 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6181 1999-03-17 Doug Evans <devans@casey.cygnus.com>
6183 * fr30.cpu (define-arch): Specify "forced" default-alignment.
6184 * mach.scm (-parse-alignment): Recognize "forced" alignment.
6185 * sim-cpu.scm (-extract-chunk-specs): New proc.
6186 (gen-define-fields): Use it.
6187 (-extract-chunk): New proc.
6188 (-gen-extract-beyond-var-list): Use it.
6189 (gen-extract-fields): Simplify.
6191 Port to guile 1.3.1.
6192 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6193 (LIBIBERTY): New var.
6194 (HOB_OBJS): Add cgen-gh.o.
6195 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6196 * Makefile.in: Rebuild.
6197 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6198 * config.in: Rebuild.
6199 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6200 libncurses, libtermcap.
6201 Add checks for needed functions in guile 1.2 not in guile 1.3,
6202 and vice versa. Add test for 3 argument scm_make_vector.
6203 * configure: Rebuild.
6204 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6205 definitions if guile doesn't have them.
6206 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6207 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
6208 with gh_vector_set_x.
6209 (cgh_qsort): Replace gh_list_length with gh_length.
6210 * cgen-gh.h: Add decls for added functions.
6211 (cgh_qsort): Don't declare if IN_HOBBIT.
6212 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
6213 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6214 scm_make_vector with gh_make_vector.
6215 * cos.scm: Use vector-length instead of length on vectors.
6216 * dev.scm (cload): Make varargs proc with keyword/value args.
6217 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
6218 provide version that works with guile 1.2 or 1.3.
6219 Include private copy of scmhob.h.
6220 * scmhob.h: New file. Keep our own copy for now.
6222 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
6224 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6226 (-rtx-traverse-operands): Dump cx temp stack if debugging.
6227 (-cx-temp-dump-stack): Pretty up output.
6229 * arm.cpu: comment out thumb.cpu until isa support ready.
6230 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6231 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6232 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6234 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6236 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6238 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6239 (<hw-address>,mode-ok?): unsigned/signed are compatible.
6241 * operand (op:new-mode): Improve error message.
6243 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
6244 * arm7.cpu: New file.
6246 1999-03-12 Ben Elliston <bje@cygnus.com>
6248 * arm.cpu: Lots of minor fixes after desk checking.
6250 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6252 * thumb.cpu: snapshot of current work
6254 * rtl.scm (rtx-get): Tweak error message.
6256 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6258 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6259 * Makefile.in: Rebuild.
6261 * cos.c (cos_vector_copy): New function.
6262 (_object_copy): Use it.
6264 * mode.scm (mode:eq?): Clean up.
6265 * rtl.scm (cx-new-mode): Copy attributes.
6266 (rtx-get): Don't make copy if <c-expr> with identical mode.
6268 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6270 (gr-names): h-gr register names moved here.
6272 (cr-names): h-cr register names moved here.
6274 (dr-names): h-dr register names moved here.
6276 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6277 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6278 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6280 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6282 (gr-names): h-gr register names moved here.
6284 (cr-names): h-cr register names moved here.
6286 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6287 (h-accums,h-psw): Ditto.
6288 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6290 (gr-names): h-gr register names moved here.
6291 (h-gr-indices): Delete.
6292 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6293 (sparc64 h-gr): Ditto.
6294 (h-y): Add get/set specs.
6296 (fp operands): Rewrite.
6297 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6298 (h-tbr,h-cwp,h-wim): Ditto.
6299 * sparc64.cpu (h-fpsr): Add get/set specs.
6300 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6301 (fp-ld-op): New arg `dest', all callers updated.
6302 (*): Replace `make-di' with `join'.
6304 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6306 (gen-semantic-code): Save/restore rtl generator state.
6307 (cgen-cpu.h): Call rtl-gen-init!.
6308 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6309 (-gen-ifld-extract-beyond): Ditto.
6310 (<multi-ifield>,gen-ifld-extract): Ditto.
6311 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6313 (-hw-gen-set-quiet-pc): Ditto.
6314 (<hw-pc>,gen-write): Ditto.
6315 (-hw-cxmake-get): Ditto. Call getter function if present.
6316 (<hw-register>,cxmake-get-raw): New method.
6317 (<hw-register>,gen-set-quiet-raw): New method.
6318 (-hw-gen-set-quiet): New arg `gstate'.
6319 (hw-fun-access?): Delete.
6320 (gen-reg-access-defn): Output function contents.
6321 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6323 (-gen-hw-index): Ditto.
6324 (op:read): Update gen-read invocation.
6325 (op:write): Update gen-write invocation.
6326 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6328 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6329 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6330 (<unit>,gen-profile-code): Update to sim.scm version.
6332 * sim-arch.scm (-regs-for-access-fns): New proc.
6333 (-biggest-reg-mode): New proc.
6334 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6335 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6336 virtual regs separately.
6337 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6339 (gen-semantic-code): Save/restore rtl generator state.
6340 (cgen-cpu.h): Call rtl-gen-init!.
6341 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6342 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6343 renamed to mach-bfd-name.
6344 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6345 (-gen-ifld-extract-beyond): Ditto.
6346 (<multi-ifield>,gen-ifld-extract): Ditto.
6347 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6348 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6349 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6351 (hw-fun-access?): Delete.
6352 (-hw-gen-set-quiet-pc): New arg `gstate'.
6353 (<hw-register>,gen-get-macro): Rewrite.
6354 (<hw-register>,gen-set-macro): Rewrite.
6355 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6356 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6357 (<hw-register>,cxmake-get-raw): New method.
6358 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6359 (<hw-register>,gen-set-quiet-raw): New method.
6360 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6362 (-gen-hw-index): Ditto.
6363 (<hw-index>): New arg `gstate'.
6364 (-gen-hw-selector): Update call to rtx-c.
6365 (<pc>): New arg `gstate'.
6366 (op:read): Update gen-read invocation.
6367 (op:write): Update gen-write invocation.
6368 (<operand>,cxmake-get): Handle raw-reg.
6369 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6370 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6371 (<operand>,gen-set-quiet): Handle raw-reg.
6372 (<operand>,gen-set-trace): Handle raw-reg.
6373 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6375 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6376 cgen_operand_type enum.
6377 (gen-operand-table): Add operand type enum. Replace pointer to
6378 hardware element with its enum. Null terminate table.
6379 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6380 Build operand table.
6381 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6382 * mach.scm (<arch-data>): New member `isas'.
6383 (adata-isas): New accessor.
6385 (isa-default-insn-word-bitsize): New accessor.
6386 (isa-enum): New proc.
6387 (current-arch-default-insn-word-bitsize): Delete.
6388 (current-isa-list,current-isa-lookup): New procs.
6389 (-arch-parse-isa): New proc.
6390 (-arch-parse): Rewrite.
6391 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6392 (define-arch): Define ISA attribute.
6393 (def-isa-attr!,isa-supports?): New procs.
6394 (<mach>): New member `isas'.
6395 (mach-isas): New accessor.
6396 (-mach-parse): New arg `isas', all callers updated.
6397 (-mach-read): Recognize `isas'.
6398 (arch-finish!): Rewrite.
6399 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6400 @arch@_cgen_get_{int,vma}_operand.
6401 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6402 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6403 of pointer to table entry.
6404 * opcodes.scm (gen-switch): Handle multiply defined operands.
6405 * operand.scm (op-sort): New proc.
6407 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6408 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6409 (hw-enum): Accept symbol argument.
6410 (hardware-builtin!): Delete attribute FUN-ACCESS.
6411 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6413 * attr.scm (atlist-source-form): New proc.
6414 (attr-builtin!): New attr `PRIVATE'.
6415 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6416 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6417 if they have `PRIVATE' attribute.
6418 (gen-hw-table-defns): Output definitions of explicitly defined
6420 * hardware.scm (<keyword>): New member print-name. Rename member
6421 `value' to `values', all uses updated.
6422 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6423 (keyword-parse): Rewrite.
6424 (-keyword-read): New proc.
6425 (define-keyword): New proc.
6426 (-hw-parse-keyword): New proc.
6427 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6429 (-hw-parse-values): Ditto.
6430 (-hw-parse-get,-hw-parse-set): Rewrite.
6431 (hardware-init!): Add new comment define-keyword.
6432 * mach.scm (<arch>): New member `kw-list'.
6433 (arch:kw-list,arch_set-kw-list!): New accessors.
6434 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6436 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6437 * mode.scm (mode-class-integral?): New proc.
6438 (mode-class-float?,mode-class-numeric?): New procs.
6439 (mode-integral?,mode-float?,mode-numeric?): New procs.
6440 (mode-compatible?): New proc.
6441 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6443 (<ifield>,gen-extract): Ditto.
6444 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6445 (<gstate>): New class.
6446 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6447 (gstate-context,gstate-set-context!): New accessors.
6448 (gstate-macro?,gstate-set-macro?!): New accessors.
6449 (gstate-make,gstate-copy): New procs.
6450 (-rtl-current-gstate): New global.
6451 (current-gstate-simulator?): New proc.
6452 (current-gstate-context,current-gstate-macro?): New procs.
6453 (current-gstate,current-gstate-set!): New procs.
6454 (rtl-gen-init!): Rewrite.
6455 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6456 (tstate-make): New arg `gstate', all callers updated.
6457 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6458 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6459 (tstate-gstate,tstate-set-gstate!): New accessors.
6460 (tstate-copy): New proc.
6461 (tstate-new-cond?,tstate-new-set?): Rewrite.
6462 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6463 (rtx-traverse): New arg `gstate', all callers updated.
6464 (rtx-strdump): New proc.
6465 (-simplify-for-compilation): New arg `gstate', all callers updated.
6466 (semantic-in-out-operands): Ditto.
6467 (semantic-attrs): Ditto.
6468 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6469 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6470 (rtx-value): Rewrite.
6471 (<c-expr>,gen-name): New method.
6472 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6473 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6474 (cx-new-mode): New proc.
6475 (-rtx-c-with-tstate): New proc.
6476 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6478 (-rtx-mode): Rewrite.
6479 (-rtx-mode-compatible?): New proc.
6480 (<c-expr-temp>): New member `value'.
6481 (cx-temp:value): New accessor.
6482 (<c-expr-temp>,make!): Override default method.
6483 (<c-expr-temp>,cxmake-get): Rewrite.
6484 (<c-expr-temp>,gen-set-quiet): Rewrite.
6485 (<c-expr-temp>,gen-set-trace): Rewrite.
6486 (gen-temp-defs): Use cx-temp:value.
6487 (record-temp!): New arg value, all callers updated.
6488 (cx-temp:cx:make): Delete.
6489 (-cx-temp-dump-stack): New proc.
6490 (rtx-get): New arg `gstate', all callers updated. Do mode
6491 compatibility checks. Ensure result has specified mode.
6492 (rtx-set-quiet): New arg `gstate', all callers updated.
6493 (rtx-set-trace): Ditto.
6494 (s-c-call): New arg `tstate', all callers updated.
6495 (s-c-raw-call): Ditto.
6496 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6497 (s-cmpop,s-if,e-if): Ditto.
6498 (s-subreg): New proc.
6499 (-par-new-temp!): New proc.
6500 (-par-next-temp!): Rewrite.
6501 (-par-replace-set-dests): Use -par-new-temp!.
6502 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6503 (s-sequence): Use -rtx-c-with-state.
6504 * rtx-funcs.scm (*): Update.
6505 (raw-reg:): New rtx function.
6507 (join:,subreg:): New rtx functions.
6509 * insn.scm (<insn>): New members pre-cond-trap, condition,
6510 post-cond-trap, compiled-condition.
6512 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6514 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6516 * utils-cgen.scm (parse-symbol): New proc.
6517 (parse-string): New proc.
6518 (gen-get-macro,gen-set-macro): New arg `index-args'.
6519 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6520 Prepend \ to newlines.
6522 * utils.scm (alist-remove-duplicates): Delete.
6524 * sid.scm (sim-init!): Delete private debugging code.
6526 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6528 * cgen-sid.scm: New file for C++ simulator application.
6529 * sid-arch.scm: Ditto.
6530 * sid-cpu.scm: Ditto.
6531 * sid-decode.scm: Ditto.
6532 * sid-model.scm: Ditto.
6534 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6536 1999-03-05 Ben Elliston <bje@cygnus.com>
6538 * arm.cpu: New file.
6540 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6542 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6543 * Makefile.in: Rebuild.
6545 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6546 (-attr-parse): Validate default value.
6548 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6549 (-CGEN-LANG-VERSION): Ditto.
6550 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6551 (<reader>): New member keep-isa plus accessors.
6552 (-keep-isa-set!,keep-isa-validate!): New procs.
6553 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6554 (common-arguments): New variable.
6555 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6556 (-debug-repl,continue): New procs.
6557 (-cgen,cgen): New procs.
6558 * cgen-gas.scm: Rewrite.
6559 * cgen-opc.scm: Rewrite.
6560 * cgen-sim.scm: Rewrite.
6561 * cgen-stest.scm: Rewrite.
6563 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6564 (gas-test-finish!): Call opcodes-finish!.
6565 (gas-test-analyze!): Call opcodes-analyze!.
6566 (<hw-asm>): New method test-data.
6567 (<operand>,testdata): Rewrite.
6568 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6569 (sim-test-finish!): Call opcodes-finish!.
6570 (sim-test-analyze!): Call opcodes-analyze!.
6571 (<hw-asm>): New method test-data.
6572 (<operand>,testdata): Rewrite.
6574 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6576 * fixup.scm (reverse!): Define if missing.
6577 * *.scm: Use reverse! instead of list-reverse!.
6579 * utils.scm (leading-id-char?): New proc.
6580 (id-char?): Rewrite.
6581 (chars-until-delimiter): New proc.
6582 * opc-itab.scm (extract-syntax-operands): Rewrite.
6583 (strip-mnemonic): Rewrite.
6584 (compute-syntax): Rewrite.
6586 * pmacros.scm (-pmacro-substr): New proc.
6587 (pmacros-init!): Add builtin .substr.
6589 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6591 * thumb.cpu: New file.
6593 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6595 * Makefile.am (CGENCFLAGS): New variable.
6596 (WITH_HOBBIT): Use automake conditional.
6597 (CGEN_HOB_SRC): New variable.
6598 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6599 (*.o): Compile with CGENCFLAGS.
6600 (cgen-hob.c): Simplify.
6601 (cgen-nohob.c): New rule.
6602 (hobbit): Renamed from hob.x.
6603 (CLEANFILES): Add cgen-nohob.c.
6604 * Makefile.in: Rebuild.
6605 * doc/Makefile.in: Rebuild.
6606 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6607 (WITH_HOBBIT): Use AM_CONDITIONAL.
6608 * configure: Rebuild.
6609 * aclocal.m4: Rebuild.
6611 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6612 with string-write-map.
6614 * sim-cpu.scm (hw-need-storage?): New proc.
6615 (-gen-hardware-types): Use it.
6616 (gen-parallel-exec-elm): Call op-save-index?.
6618 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6620 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6622 (-gen-ifld-extract-beyond): Ditto.
6623 (<integer>): Delete all references.
6624 (<sim-hardware>): Delete.
6625 (hw-profilable?): New proc.
6626 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6627 (<hw-register>): Rename method get-index-mode to save-index?.
6628 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6629 (<hw-register>,gen-sym-decl): Make virtual.
6630 (<hw-memory>,gen-sym-decl): Make virtual.
6631 (<hw-memory>): Rename method get-index-mode to save-index?.
6632 (<hw-address>,gen-sym-decl): Make virtual.
6633 (<operand>): New method save-index?.
6634 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6636 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6637 prefix added. All uses updated.
6639 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6640 rather than pointer to table entry.
6642 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6643 Remove all hw-asm,op-asm support.
6644 (-gen-parse-number,-gen-parse-address): New procs.
6645 (<keyword>,gen-parse): Redo function name computation.
6646 (<keyword>,gen-print): Ditto.
6647 (<operand>,gen-function-name): Rewrite.
6648 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6649 (opcodes-init!): Delete call to add-parser!.
6651 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6652 Define enum using hardware semantic name.
6653 (-gen-hw-decl,-gen-hw-defn): New procs.
6654 (gen-hw-table-decls): Use -gen-hw-decl.
6655 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6656 CGEN_HW_ENTRY structs.
6657 (gen-operand-table): Output hw's enum, not pointer to table entry.
6658 (-gen-cpu-open): Build table of selected hardware elements.
6660 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6661 (<hardware> support): Delete.
6662 (<hw-asm>): Delete, moved to hardware.scm.
6663 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6664 (<hw-asm>,gen-table-entry): New method.
6665 (<hw-asm>,parse!): Delete.
6666 (<keyword>,gen-table-entry): New method.
6667 (<keyword>,parse!): Delete.
6668 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6669 for gen-decl,gen-defn,gen-ref,gen-init.
6670 (desc-init!): Don't create parser for operand asm specs.
6672 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6673 * ifield.scm (<ifield>): New member `mode'.
6674 (<ifield>,make!): New arg `mode'.
6675 (ifld-mode): Rewrite.
6676 (ifld-hw-type): Rewrite.
6677 (<ifield>,min-value): Rewrite.
6678 (<ifield>,max-value): Rewrite.
6679 (-ifield-parse): New arg `mode'.
6680 (-ifield-read): Update.
6681 (define-full-ifield): New arg `mode'.
6682 (define-full-multi-ifield): Ditto.
6683 (-multi-ifield-parse): Ditto.
6684 (-multi-ifield-read): Update.
6685 (define-full-multi-ifield): New arg `mode'.
6686 (ifield-builtin!): Update definition of f-nil.
6687 * simplify.inc (define-normal-ifield): Update call to
6689 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6690 (define-normal-hardware): Delete arg asm. New args indices, values,
6691 handlers. Update call to define-full-hardware.
6692 (define-simple-hardware,dsh): New pmacros.
6693 (define-normal-operand): Update call to define-full-operand.
6694 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6695 Specify INT/UINT mode instead.
6696 (h-gr,h-cr): Use "indices" instead of "asm".
6697 (h-dr,h-ps): Update keyword syntax.
6698 (h-r13,h-r14,h-r15): Ditto.
6699 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6700 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6701 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6702 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6703 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6704 Specify INT/UINT mode instead.
6705 (h-gr): Use "indices" instead of "asm".
6706 (h-cc): Update keyword syntax.
6707 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6708 Specify INT/UINT mode instead.
6709 (h-hi16,h-slo16,h-ulo16): Update.
6710 (h-gr,h-cr): Use "indices" instead of "asm".
6711 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6712 (h-accums): Update keyword syntax.
6713 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6714 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6715 Specify INT/UINT mode instead.
6716 (h-gr-indices): New pmacro.
6717 (h-gr32,h-gr64): Split up from h-gr.
6718 (h-a): Update type spec. Use values instead of asm spec.
6719 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6720 (h-y,h-annul-p): Ditto.
6721 (h-asr): Update keyword spec.
6722 (h-lo10,h-lo13,h-hi22): Update.
6723 (get-freg-spec,set-freg-spec): New pmacros.
6724 (h-fr32,h-fr64): Split up from h-fr.
6725 (rdd): Comment out get/set specs.
6726 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6727 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6728 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6729 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6730 UNSIGNED. Specify INT/UINT mode instead.
6731 (h-*): Use dsh instead of dnh where appropriate.
6732 (h-ixcc): Update type spec. Use "values" instead of "asm".
6733 (h-p,h-membarmask): Ditto.
6734 (membarmask): Use "handlers" instead of "asm".
6736 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6737 values,handlers,getters,setters plus accessors.
6738 (hw-mode-ok?,hw-default-mode): New procs.
6739 (<hardware-base>): Rename method new-mode to mode-ok?
6740 (<hardware-base>): New method get-index-mode.
6741 (hw-index-mode): New proc.
6742 (pc?): Delete, moved to operand.scm.
6743 (address?): New proc.
6744 (<hardware>): Delete.
6745 (<hw-asm>): Definition moved here from desc.scm.
6746 (keyword-parse): New proc.
6747 (hardware-parsers): Delete.
6748 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6749 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6750 (-hw-parse-get,-hw-parse-set): New procs.
6751 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6752 indices,values,handlers,get,set. Rewrite.
6753 (-hw-read-extra): Delete.
6755 (define-hardware): Don't add object if not selected.
6756 (define-full-hardware): Ditto.
6757 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6758 (<hw-register>): Member `type' moved to baseclass. Delete member
6760 (<hw-register>,parse!): Rewrite.
6761 (<hw-register>): Delete methods get-rank,get-mode.
6762 (<hw-register>): Method new-mode renamed to mode-ok?
6763 (<hw-register>): New method get-index-mode.
6764 (<hw-pc>,parse!): Rewrite.
6765 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6766 (<hw-memory>,parse!): Rewrite.
6767 (<hw-memory>): Delete methods get-rank,get-mode.
6768 (<hw-memory>): Method new-mode renamed to mode-ok?
6769 (<hw-memory>): New method get-index-mode.
6770 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6772 (<hw-immediate>,parse!): Rewrite.
6773 (<hw-immediate>): Delete methods get-rank,get-mode.
6774 (<hw-immediate>): Method new-mode renamed to mode-ok?
6775 (<hw-address>): Delete member hw-asm.
6776 (<hw-address>,parse!): Rewrite.
6777 (<hw-address>): Delete methods get-rank,get-mode.
6778 (<hw-address>): Method new-mode renamed to mode-ok?
6779 (hw-profilable?): Delete.
6780 (hardware-init!): Delete hardware-parsers reference.
6781 Update argument specs of command define-full-hardware.
6782 (hardware-builtin!): Update definitions of hardware builtins.
6783 * operand.scm (<operand>): New members hw-name,mode-name.
6784 Delete member op-asm. New member handlers.
6785 (<operand>,make!): Update.
6786 (op:hw-name,op:mode-name,op:handlers): New procs.
6789 (<operand>): New method get-index-mode.
6790 (<pc>,make!): Update.
6791 (op:new-mode): Rewrite.
6792 (operand-parsers): Delete.
6793 (-operand-parse): Rewrite. Return #f if insn not selected.
6794 (-op-read-extra): Delete.
6795 (-operand-read): Update.
6796 (define-operand,define-full-operand): Update.
6797 (operand-init!): Delete operand-parsers reference.
6798 Update syntax of define-full-operand command.
6800 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6801 (define-full-insn): Update.
6802 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6803 (define-full-minsn): Update.
6805 * mode.scm (<mode>): New member class.
6806 (mode:class): New proc.
6808 (-mode-parse): New arg class.
6809 (define-full-mode): Update.
6810 (mode-find): Rewrite.
6811 (mode-make-int,mode-make-uint): New procs.
6812 (mode-init!): Update syntax of define-full-mode command.
6813 (mode-builtin!): Update definitions of builtin modes.
6815 * model.scm (<profile>): Delete.
6817 * read.scm (keep-atlist?): New proc.
6818 (keep-multiple?): New proc.
6819 (<parser-list>): Delete.
6820 (add-parser!,parse-spec!): Delete.
6822 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6823 (def-rtx-syntax-node): Ditto.
6824 (-rtx-traverse-debug?): New variable.
6825 (tstate-make): New proc.
6826 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6827 (tstate-new-cond?,tstate-new-set?): New procs.
6828 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6829 tstate. All callers updated.
6830 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6831 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6832 (-build-operand!): Replace arg cond? with tstate.
6833 (-build-reg-operand!,-build-mem-operand!): Ditto.
6834 (-build-index-of-operand!): Update making of <operand> object.
6835 (s-ifield): New arg tstate. All callers updated.
6836 (hw:): New arg tstate. All callers updated. Replace call to
6837 current-hw-lookup with current-hw-sem-lookup-1.
6838 (s-index-of): New arg tstate. All callers updated.
6840 (-rtx-use-sem-fn?): New proc.
6841 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6843 (s-convop): Only use semantic mode when using semantic cover fns.
6844 (s-cmpop): Call -rtx-use-sem-fn?.
6845 (s-cond,s-case): New arg tstate. All callers updated.
6846 (s-parallel,s-sequence): Ditto.
6848 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6850 * types.scm (<scalar>): Rewrite implementation.
6851 (<integer>): Delete.
6852 (parse-type): Rewrite.
6854 * utils-cgen.scm (parse-handlers): New proc.
6856 * utils.scm (!=): New proc.
6858 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6860 * pmacros.scm (-pmacro-expand): Fix typo.
6862 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6864 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6865 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6866 * i960.cpu (build-hex2): New pmacro.
6867 (insn-opcode): Simplify.
6868 (insn-opcode2): Ditto.
6870 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6871 * cgen-stest.scm (catch-with-backtrace): Ditto.
6873 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6875 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6876 All callers updated.
6877 (-pmacro-invoke): New proc.
6878 (-pmacro-sym,-pmacro-str): New procs.
6879 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6880 (pmacros-init!): Install builtins .iota, .map, .apply.
6881 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6882 (h-fr): Simplify register name spec.
6883 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6884 * utils.scm (num-args-ok?): New proc.
6886 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6888 * pmacros.scm (-pmacro-error): New proc.
6889 (-pmacro-expand): Use it.
6890 (-pmacro-splice): New proc.
6891 (pmacros-init!): Install new builtin .splice.
6893 * sparc.cpu: Include sparc64.cpu when appropriate.
6894 (f-mmask,f-simm11): Moved to sparc64.cpu.
6895 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6896 (ANNUL attribute): Delete.
6897 (test-* pmacros): New arg cc, all callers updated.
6898 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6899 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6901 (ldstub,swap): Moved to sparccom.cpu.
6902 * sparc64.cpu: Add more insns.
6904 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6906 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6908 (cgen-sem-switch.c): Ditto.
6909 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6910 moved to cgen-engine.h.
6911 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6912 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6913 global. Cache attributes and insn length in IDESC.
6914 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6915 @cpu@_opcode renamed to @cpu@_get_idata.
6916 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6917 done later underneath sim_resume.
6918 (@mach@_mach): Record @cpu@_prepare_run.
6919 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6921 (-hw-gen-set-quiet-pc): Ditto.
6922 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6923 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6924 (<hw-addr>,cxmake-get): Ditto.
6925 (<hw-iaddr>,cxmake-get): Ditto.
6926 (<pc>,cxmake-get): Ditto.
6927 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6928 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6929 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6930 (<hw-pc>,gen-write): Use hw-selector-default.
6931 (<hw-register>,gen-write): Ditto.
6932 (<hw-memory>,gen-write): Ditto.
6933 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6934 (-gen-hw-selector): New proc.
6936 * desc.scm: New file.
6937 * desc-cpu.scm: New file.
6938 * opcodes.scm: Split up into several smaller files.
6939 * opc-asmdis.scm: New file.
6940 * opc-ibld.scm: New file.
6941 * opc-itab.scm: New file.
6942 * opc-opinst.scm: New file.
6943 * Makefile.am (desc): New target.
6944 (opcodes): Update args to cgen-opc.scm.
6945 * Makefile.in: Rebuild.
6946 * aclocal.m4: Rebuild.
6947 * config.in: Rebuild.
6948 * configure.in: Update arg to AC_INIT.
6949 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6950 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6952 * configure: Rebuild.
6953 * cgen-gas.scm: Update files to load.
6954 * cgen-opc.scm: Ditto. Reorganize option letters.
6955 * cgen-sim.scm: Update files to load.
6956 * cgen-stest.scm: Ditto.
6957 * dev.scm (cload): New app "DESC".
6958 (load-opc): Update files to load.
6959 (load-gtest,load-sim,load-stest): Ditto.
6961 * attr.scm (bool-attr?): New proc.
6962 (attr-list-enum-list): New proc.
6963 (-attr-sort): Rewrite.
6964 (attr-builtin!): Give ALIAS attribute a fixed index.
6965 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6966 calculate attribute enum list.
6967 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6969 * insn.scm (-insn-parse): Renamed from parse-insn.
6971 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6974 * mode.scm (-mode-parse): Renamed from parse-mode.
6976 * operand.scm (<operand>): New member `selector'.
6977 (<operand>,make!): Use default selector.
6978 (hw-selector-default): New variable.
6979 (hw-selector-default?): New proc.
6981 * pmacros.scm (pmacros-init!): New proc.
6982 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6983 (-env-set!): Delete.
6984 (-pmacro-expand): New proc apply-macro.
6985 Use it in scan-list,scan. Scan list first, then see if macro
6987 (define-pmacro): Rewrite.
6988 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6990 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6991 selected if (current-mach) seen.
6992 (rtx?): Renamed from rtx-uneval?, all callers updated.
6993 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6995 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6996 selector, all callers updated.
6997 (hw:): New arg selector, all callers updated. Delete old comments
6999 (reg:,mem:): Handle selectors
7000 * rtx-funcs.scm (reg:): Handle selectors.
7002 * read.scm: Renamed from cpu.scm.
7003 (<command>): New class.
7004 (<reader>): New member commands.
7005 (reader-add-command!): New proc.
7006 (reader-lookup-command): New proc.
7007 (reader-error,-reader-process-expanded,reader-process): New procs.
7008 (reader-read-file!): New proc.
7009 (include): Call reader-read-file!.
7011 (cpu-load): Call reader-read-file!.
7012 * utils.scm (num-args): New proc.
7013 * simplify.inc: New file.
7014 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
7015 procs. Move define-normal-foo procs (and abbreviated forms) to
7016 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
7018 * fr30.cpu: Include simplify.inc.
7019 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7020 * i960.cpu: Include simplify.inc.
7021 * m32r.cpu: Include simplify.inc.
7022 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7023 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7024 * sparc.cpu: Include simplify.inc.
7025 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7026 * utils-cgen.scm (parse-error): Moved to read.scm.
7027 (sanitize): Rewrite.
7028 (utils-init!): New proc.
7030 1999-02-02 Doug Evans <devans@casey.cygnus.com>
7032 * sparc.cpu: New file.
7033 * sparc32.cpu: New file.
7034 * sparc64.cpu: New file.
7035 * sparccom.cpu: New file.
7036 * sparc.opc: New file.
7038 1999-01-27 Frank Eigler <fche@cygnus.com>
7040 * utils.scm (gen-copyright): New proc.
7042 1999-01-27 Doug Evans <devans@casey.cygnus.com>
7044 Parameterize rtl parsing, rather than having lots of little handlers.
7045 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7046 Delete member traverse.
7047 (rtx:set-traverse!): Delete.
7048 (-rtx-valid-types,-rtx-valid-matches): New variables.
7049 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7050 instead of expression. All callers updated.
7051 (def-rtx-node): New args arg-types,arg-modes.
7052 (def-rtx-syntax-node): Ditto.
7053 (def-rtx-dual-mode): Ditto.
7054 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7055 All callers updated.
7056 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7057 All callers updated.
7058 (rtx-macro-expand): New proc.
7059 (-rtx-traverse-check-args): Delete.
7060 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7061 an rtx specific traverser.
7062 (-rtx-any-mode?,-rtx-symornum?): New procs.
7063 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7064 (-rtx-traverse-no-mode): Delete.
7065 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7066 (-rtx-traverse-operands): Rewrite.
7067 (-rtx-traverse-expr): Rewrite.
7068 (rtx-traverse): Don't expand macros here, leave for caller to do.
7069 (rtx-simplify): Delete.
7070 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
7072 (rtx-true?,rtx-false?): Ditto.
7073 (-rtx-ref-type): Set dest is operand 1 now.
7074 (-simplify-for-compilation): New proc.
7075 (semantic-in-out-operands): Recognize regno as an alias for index-of.
7076 Expand macros before calling rtx-traverse. Sort operands by name
7077 to avoid unnecessary semantic formats.
7078 (semantic-attrs): New proc.
7079 (rtx-uneval?): Handle (<rtx-func> ...).
7080 (s-boolifop): Delete arg mode. All callers updated.
7081 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7082 (eq-attr): New arg obj.
7084 * m32r.cpu (rach): Update calls to andif.
7086 * minsn.scm (-minsn-parse-expansion): Renamed from
7087 parse-minsn-expansion.
7088 (-minsn-parse): Renamed from parse-minsn.
7089 (-minsn-read): Renamed from read-minsn.
7090 (def-minsn): Don't check APPLICATION here.
7091 (def-full-minsn): New proc.
7092 (define-macro-insn): Check APPLICATION here. Expand macros.
7093 (define-normal-macro-insn): Ditto.
7095 * utils.scm (word-value): New arg start-lsb?.
7096 (word-mask,word-extract): Ditto.
7097 (split-bits,powers-of-2): Use integer-expt instead of expt.
7098 (bit-set?): Handle 32 bit values (which are bignums).
7099 (cg-logand,cg-logxor): New functions.
7100 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7101 (<ifield>,field-value): Update call to word-value.
7102 (<ifield>,min-value): Use integer-expt instead of expt.
7103 (<ifield>,max-value): Ditto.
7105 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7107 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7109 Compute raw instruction format in addition to semantic based format.
7110 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7111 (<iformat> accessors): Rename accessors to ifmt-*.
7112 (<sformat>): New class.
7113 (fmt-enum): Renamed from fmt:enum.
7114 (-ifmt-search-key): Rewrite.
7115 (-sfmt-search-key): New proc.
7116 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7117 Compute iformat and sformat search keys.
7118 (ifmt-build): Update.
7119 (sfmt-build): New proc.
7120 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7121 (ifmt-compute!): Compute instruction format <iformat> based on
7122 instruction fields alone. Compute new semantic format <sformat>
7123 based on instruction fields and semantic information.
7124 (ifmt:lookup): Delete.
7125 * mach.scm (<arch>): New member sfmt-list, plus accessors.
7126 (current-sfmt-list): New proc.
7127 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7128 Rename member fmt to ifmt. New members fmt-desc, sfmt.
7129 (insn-length,insn-length-bytes): Update.
7130 (insn:mask-length,insn:mask): Update.
7131 (insn-lookup-op): Update.
7132 * gas-test.scm (gas-test-analyze!): Update.
7133 (gen-gas-test): Ditto.
7134 * sim-test.scm (sim-test-analyze!): Update.
7135 (gen-sim-test): Ditto.
7136 * opcodes.scm (gen-operand-instance-table): Update.
7137 (gen-operand-instance-ref): Ditto.
7138 (max-operand-instances): Use heuristic if semantics not parsed.
7139 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7140 (opcodes-analyze!): Only scan semantics of building operand instance
7142 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7143 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7144 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7145 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7146 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7147 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7148 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7150 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7151 New arg lsb0? All callers updated.
7152 (decode-bits): New arg lsb0?. All callers updated.
7153 (opcode-slots): Update call to bit-set?. Call integer-expt instead
7155 (-gen-decode-bits): New arg lsb0?. All callers updated.
7156 (build-slots): Call integer-expt instead of expt.
7157 (build-decode-table-entry): Handle crossing word boundaries better.
7158 (-gen-decode-switch): New arg lsb0?. All callers updated.
7159 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7161 * enum.scm (define-enum): Rewrite.
7162 (define-normal-enum): Ditto.
7163 (def-full-insn-enum): New proc.
7164 (define-normal-insn-enum): Rewrite.
7166 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7168 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7170 * dev.scm: Add sid support.
7172 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7173 (CLEANFILES): Add tmp-*.
7174 * Makefile.in: Rebuild.
7176 * doc/Makefile.am: New file.
7177 * doc/Makefile.in: New file.
7178 * doc/cgen.texi: New file.
7179 * Makefile.am (SUBDIRS): Define.
7180 * Makefile.in: Rebuild.
7181 * configure.in: Create doc/Makefile.
7182 * configure: Rebuild.
7184 1999-01-18 Doug Evans <devans@casey.cygnus.com>
7186 * insn.scm (insn:syn): Delete.
7188 1999-01-15 Doug Evans <devans@casey.cygnus.com>
7190 * fr30.cpu (model fr30-1): Add state variables load-regs,
7191 load-regs-pending. Delete h-gr. Clean up operand names of all units.
7192 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7193 (model m32rx): Ditto.
7194 (addi): Simplify function unit usage spec.
7195 (ld-plus): Rewrite operand names in function unit usage spec.
7196 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7197 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7198 overridden. Allow operand to appear in input and output spec.
7199 (<insn>,gen-profile-code): string-append -> string-list.
7201 * ifield.scm (define-ifield): Call pmacro-expand.
7202 (define-full-ifield,define-normal-ifield): Ditto.
7203 (define-multi-ifield,define-normal-multi-ifield): Ditto.
7205 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7206 with-scache and without-scache cases.
7208 1999-01-14 Doug Evans <devans@casey.cygnus.com>
7210 * fr30.cpu (fr30-1): Add state variable h-gr.
7211 Add units u-cti, u-load, u-store, u-ldm, u-stm.
7212 (all insns): First pass at providing cycle counts.
7213 * sim.scm (<unit>,gen-profile-code): Only check for output operands
7214 when initializing unit output operands, ditto for input operands.
7216 * insn.scm (insn-length,insn-length-bytes): New procs.
7217 * mach.scm (-adata-set-derived!): Use them.
7218 * sim-cpu.scm (-gen-sem-case): Ditto.
7220 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7221 (-gen-write-case): Ditto.
7222 (gen-semantic-fn): Ditto. Split into two:
7223 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
7225 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
7226 scache/no-scache appropriately. All callers updated.
7227 (-gen-sem-case): PCADDR->IADDR.
7228 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7230 * sim-decode.scm (*): Replace string-append,string-map with
7231 string-list,string-list-map where the result is sufficiently large.
7232 (-gen-decode-insn-table): Go back to simple version for non-scache
7233 case: just record IDESC in decoder tables and leave field extraction
7235 (-gen-decode-switch): Ditto.
7236 (-gen-decode-fn): Ditto.
7237 (-gen-extract-decls): Only emit format enum if with-scache?.
7238 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7240 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7241 (-gen-insn-timing): Ditto.
7242 * sim.scm (gen-argbuf-type): Only output sem_fields union in
7245 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7246 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7248 1999-01-12 Doug Evans <devans@casey.cygnus.com>
7250 * cpu.scm (keep-mach-validate!): New proc.
7251 (include): New proc.
7253 * mach.scm (current-arch-mach-name-list): New proc.
7254 (-parse-arch-machs): Always return canonical form.
7255 (def-arch): Validate user specified machs to be kept.
7256 (def-mach-attr!): Simplify.
7258 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7259 (option-init!): Initialize it.
7260 (option-set!): Set it.
7261 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7262 output operand instance tables.
7263 (cgen-opc.in): Only output operand instance tables if asked to.
7265 * sim.scm (option-init!,option-set!): Clarify returned value.
7267 * sim.scm (gen-mach-bfd-name): Move from here.
7268 * utils-cgen.scm: To here.
7270 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7272 * fr30.cpu (ilm): Fix comment field.
7273 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7276 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7277 (rtx-true?, rtx-false?): New procs.
7278 * rtx-funcs.scm (annul): Rename vpc to pc.
7279 (-rtx-traverse-if): Improve determination of whether then/else parts
7280 are conditionally executed.
7282 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7284 (gen-argbuf-type): Simplify generated definition (big sem_fields
7285 union moved outside).
7287 1999-01-11 Ben Elliston <bje@cygnus.com>
7289 * doc/porting.texi: New file.
7291 * doc/intro.texi: New file.
7292 (Layout): Use @example to insert preformatted ASCII text (such as
7293 diagrams). @code is inappropriate here.
7295 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7297 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7299 * m32r.opc (print_hash): Cast dis_info.
7301 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7302 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7305 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7307 * i960.cpu (f-br-disp): Remove RELOC attribute.
7308 (f-ctrl-disp): Ditto.
7309 (callx-disp): set-quiet -> set for (reg h-gr 2).
7310 (callx-indirect,callx-indirect-offset): Ditto.
7312 * Makefile.am (gas-test): Fix dependencies.
7313 * Makefile.in: Rebuild.
7314 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7315 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7316 (gas-test-analyze!): Use syntax-break-out.
7317 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7318 (sim-test-analyze!): Use syntax-break-out.
7319 (cgen-build.sh): Use gen-file-name.
7320 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7321 * insn.scm (syntax-break-out): New proc.
7322 * utils.scm (gen-file-name): New proc.
7324 * fixup.scm (nil,<?,<=?,>?): Delete.
7326 * utils.scm (count-true): Rewrite.
7328 * slib/sort.scm: Move sort.scm to slib directory.
7331 * iformat.scm (ifmt-compute!): Record empty format.
7333 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7334 internal procs outside. Handle expression register numbers.
7337 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7339 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7341 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7342 (gen-semantic-fn,-gen-sem-case): Ditto.
7343 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7344 (cgen-semantics.c): Ditto.
7345 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7346 (gen-ifmt-argvars-defns): New proc.
7347 (gen-ifmt-argvars-assigns): New proc.
7348 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7349 (-gen-decode-fn): Handle non-with-scache case.
7350 (cgen-decode.c): Define WANT_CPU to @cpu@.
7351 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7352 (cgen-model.c): Define WANT_CPU to @cpu@.
7353 * sim.scm (gen-ifld-extract-argvar): New proc.
7354 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7355 with FUN-ACCESS specified.
7356 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7357 (<hw-register>,gen-extract): New arg local?.
7358 (<hw-address>,gen-extract): Ditto.
7359 (-hw-cxmake-get): Handle non-with-scache case.
7360 (-hw-gen-set-quiet): Ditto.
7361 (<hw-address>,cxmake-get): Handle non-with-scache case.
7362 (gen-op-extract-argvar): New proc.
7363 (<operand>,gen-record-profile): Rewrite.
7364 (<operand>,gen-profile-code): Rewrite.
7365 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7366 (gen-argbuf-fields-union): New proc.
7367 (gen-argbuf-type): Use it. Handle non-scache case.
7369 * *.scm: class:foo procs renamed to class-foo.
7370 * attr.scm (<attribute>): New member `for'.
7371 (-attr-parse): New first value in list for default if
7373 (non-bool-attr-list,attr:add!): Delete.
7374 (def-attr): Use current-attr-add!.
7375 (atlist-attr-value-no-default): New proc.
7376 (attr-lookup-default): Handle boolean attributes.
7377 (gen-attr-enum): New proc.
7378 (-attr-remove-meta-attrs-alist): New proc.
7379 (attr-nub): New proc.
7380 (current-attr-list-for): New proc.
7381 (current-{ifld,hw,op,insn}-attr-list): New procs.
7382 (attr-builtin!): New proc.
7383 * cpu.scm (keep-obj?): Rewrite.
7384 (-init-parse-cpu!): Call arch-init!.
7385 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7386 (-finish-parse-cpu!): Call arch-finish!.
7387 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7388 (def-enum,def-full-enum): Use current-enum-add!.
7389 (gen-obj-list-enums): New proc.
7390 * hardware.scm (hw:add!,hw:lookup): Delete.
7391 (def-hardware,def-hardware-ext): Use current-hw-add!.
7392 (hw:std-attrs,hw:attr-list): Delete.
7393 (hardware-builtin!): Define builtin hardware attributes.
7394 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7395 (def-ifield,def-full-ifield): Use current-ifld-add!.
7396 (ifld:std-attrs,ifld:attr-list): Delete.
7397 (ifield-builtin!): New proc.
7398 * insn.scm (insn:add!,insn:lookup): Delete.
7399 (def-full-insn): Use current-insn-add!.
7400 (insn:std-attrs): Delete.
7401 (insn-builtin!): New proc.
7402 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7404 (<arch-data>): New member machs.
7405 (current-attr-list,current-enum-list): New procs.
7406 (current-op-list,current-minsn-list): New procs.
7407 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7408 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7410 (-parse-arch-machs): New proc.
7411 (-arch-parse): New arg machs, all callers updated.
7412 (-arch-read): Handle machs spec.
7413 (def-arch): Define MACH attribute here.
7414 (mach-init!,mach-finish!): Not here.
7415 (cpu:add!,cpu:lookup): Delete.
7416 (def-cpu): Use current-cpu-add!.
7417 (<mach>): New member bfd-name.
7418 (-mach-parse): New arg bfd-name, all callers updated.
7419 (-mach-read): Handle bfd-name spec.
7420 (mach:add!,mach:lookup): Delete.
7421 (def-mach): Use current-mach-add!.
7422 (def-mach-attr!): New proc.
7423 (arch-init!): New proc.
7424 (arch-finish!): New proc. Reverse all object lists here.
7425 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7426 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7427 (define-normal-macro-insn): Ignore minsn if mach not kept.
7428 * mode.scm (mode-builtin!): New proc.
7429 * model.scm (model:add!,model:lookup): Delete.
7430 (def-model): Use current-model-add!.
7431 * opcodes.scm (insn:attr-list): Delete.
7432 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7433 (gen-attr-table-defn): Emit value for default.
7434 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7435 (op:attr-list): Delete.
7436 (gen-operand-decls,gen-insn-decls): New proc.
7437 (compute-insn-attr-list): Delete.
7438 (cgen-opc.h): Reorganize and simplify.
7439 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7440 (def-operand,def-full-operand): Use current-op-add!.
7441 (op:std-attrs): Delete.
7442 (operand-enum): Delete.
7443 (operand-builtin!): Define builtin operand attrs.
7444 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7445 (gen-attr-enum-decl): Use gen-obj-list-enums.
7446 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7448 * fr30.cpu (define-arch): Add machs spec.
7449 (f-i4): SIGNED attribute -> !UNSIGNED.
7450 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7451 (HASH-PREFIX): Define operand attribute.
7452 (NOT-IN-DELAY-SLOT): Define insn attribute.
7453 * i960.cpu (define-arch): Add machs spec.
7454 * m32r.cpu (define-arch): Add machs spec.
7455 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7456 (HASH-PREFIX): Define operand attribute.
7457 (FILL-SLOT): Define insn attribute.
7459 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7461 * fr30.cpu (stilm): Correct mask for and operation.
7463 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7465 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7466 Replace START/EXIT with start/pass.
7467 (gen-sim-test): Delete ".text".
7469 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7471 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7473 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7475 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7476 (h-sbit): Make it FUN-ACCESS.
7477 (h-gr): Reorder so that general regs are always printed by number.
7479 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7481 * i960.cpu (flushreg): Use nop.
7483 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7485 * m32r.cpu (default-alignment): Specify.
7486 * mach.scm (<arch-data>): New member default-alignment.
7487 (adata:default-alignment): New proc.
7488 (current-arch-default-alignment): New proc.
7489 (-arch-parse): New arg default-alignment.
7490 (parse-alignment): New proc.
7491 (-arch-read): Handle default-alignment spec.
7493 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7495 * insn.scm (f-%): Delete.
7496 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7497 be readded if proved useful.
7498 (gen-extract-fields): Ditto. Use gen-ifetch.
7499 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7500 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7502 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7504 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7506 1998-12-14 Dave Brolley <brolley@cygnus.com>
7508 * fr30.cpu: Remove stub macros.
7509 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7510 (div2): Don't use addc/subc.
7512 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7514 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7517 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7519 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7521 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7523 * cpu.scm (keep-all?): New proc.
7524 (assert-keep-all): Use it.
7525 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7526 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7527 Check for spelling errors.
7529 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7531 * rtl.scm (s-convop): Call -rtx-sem-mode.
7533 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7535 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7536 (-parse-hw-profile): Ditto.
7537 (<hw-register>, parse!): Return `void' result.
7538 (<hw-pc>, parse!): Ditto.
7539 (<hw-memory>, parse!): Ditto.
7540 (<hw-immediate>, parse!): Ditto.
7541 (<hw-address>, parse!): Ditto.
7543 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7544 (-ifld-parse-encode-decode): New proc.
7545 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7546 (-multi-ifield-parse): Set encode/decode to #f.
7547 (ifld:decode-mode): New proc.
7548 * utils.scm (nub): Rewrite.
7549 * operand.scm (op-nub): Rewrite.
7550 * sim.scm (<ifield>, gen-type): Rewrite.
7551 (-gen-ifld-argbuf-defn): New proc.
7552 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7553 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7554 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7555 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7556 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7557 New method gen-trace-extract.
7558 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7559 from gen-argbuf-elm, return "" if not caching register address.
7560 Rewrite gen-extract. New method gen-trace-extract.
7561 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7562 gen-extract, gen-trace-extract, cxmake-get.
7563 (<hw-iaddress>): New method cxmake-get.
7564 (op-needed-iflds): New proc.
7565 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7566 (-gen-op-argbuf-defn): New proc.
7567 (gen-op-extract): Renamed from op:extract.
7568 (gen-op-trace-extract): Renamed from op:trace-extract.
7569 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7571 (gen-argbuf-elm): Rewrite.
7572 * sim-decode.scm (-gen-record-args): Update.
7574 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7576 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7577 argument position. Flag symbolic macros in function position as
7579 (define-pmacro): Handle quoting in definition of symbolic macros.
7580 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7582 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7584 * fr30.opc (parse_register_list): Account for reverse masks
7586 (print_register_list): Ditto.
7587 (parse_low_register_list_ld): New function.
7588 (parse_hi_register_list_ld): New function.
7589 (parse_low_register_list_st): New function.
7590 (parse_hi_register_list_st): New function.
7591 (print_hi_register_list_ld): New function.
7592 (print_hi_register_list_st): New function.
7593 (print_low_register_list_ld): New function.
7594 (print_low_register_list_st): New function.
7595 * fr30.cpu (ldr15dr): Implement workaround.
7596 (ldm0,ldm1,stm0,stm1): Implemented.
7598 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7600 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7601 * configure: Regenerate.
7602 * Makefile.am (WITH_HOBBIT): Update.
7603 (cgen-hob.c): Remove Makefile dependency.
7604 (cgen.o): Depend on cgen-gh.h, config.h.
7605 * Makefile.in: Regenerate.
7606 * aclocal.m4: Regenerate.
7608 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7610 * i960.cpu, i960.opc: New files.
7612 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7614 * fr30.opc (parse_register_number): New function.
7615 (parse_register_list): New function.
7616 (parse_low_register_list): Use parse_register_list.
7617 (parse_hi_register_list): Use parse_register_list.
7618 * fr30.cpu (sth): Fix assembler syntax. Implement more
7621 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7623 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7624 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7625 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7626 (-op-gen-set-trace-parallel): Ditto.
7627 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7629 * fr30.cpu (call,calld): Fix setting of pc.
7630 (f-op5): Fix start bit number.
7632 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7634 * fr30.cpu (st): Fix operand ordering. Implement more
7637 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7639 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7640 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7641 (fmt-semantic-operands): Move to sim.scm.
7642 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7643 * operand.scm (<hw-index>): New member `name'. All builders updated.
7644 (<hw-index>): New method get-name.
7645 (op-profilable?): Moved to sim.scm.
7647 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7648 (op-profilable?): Moved here from operand.scm.
7649 (gen-extract-type): Delete.
7650 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7651 (-gen-argfld-ref): New proc.
7652 (-gen-ifld-argfld-name): New proc.
7653 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7654 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7655 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7656 (<hardware-base>): Delete method gen-extract-type. New method
7658 (<hw-register): Ditto. Update method gen-extract.
7659 (<operand>, method gen-argbuf-elm): Rewrite.
7660 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7661 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7662 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7664 * sim-decode.scm (-gen-record-args): Tweak.
7666 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7668 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7670 * doc/porting: Fix typo: gas->sim.
7671 * fr30.opc (print_m4): New function.
7672 * fr30.cpu: Implemented many insns.
7674 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7676 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7678 * fr30.cpu (f-rel9): Delete RELOC attribute.
7679 (f-rel12): Add PCREL-ADDR attribute.
7680 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7681 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7682 * fr30.opc (print_label9): Delete.
7684 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7685 code for CTI indicators.
7686 * insn.scm (insn-cti?): Simplify.
7687 * utils-cgen.scm (atlist:cti?): New proc.
7689 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7691 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7692 (f-i20-4,f-i20-16,f-i20): New fields.
7698 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7699 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7700 * mach.scm (arch-data): Ditto.
7701 (current-arch-default-insn-word-bitsize): Renamed from
7702 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7703 (-arch-read): Update.
7705 * hardware.scm (hw:attr-list): Move here ...
7706 * opcodes.scm: ... from here.
7708 * ifield.scm (fld:bitrange): Delete.
7709 (fld:word-offset,fld:word-length): New procs.
7710 (ifield?): Use class-instance.
7711 (<ifield>, method field-start): Rewrite.
7712 (ifld:enum): New proc.
7713 (<ifield>, methods field-mask,field-value): Rewrite.
7714 (-ifield-parse): Rewrite.
7715 (<multi-ifield> support): Rewrite.
7716 (ifld-beyond-base?): Rewrite.
7717 (ifld:std-attrs): New variable.
7718 (ifld:attr-list): New proc.
7719 * iformat.scm (-compute-insn-mask): Rewrite.
7720 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7722 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7723 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7725 (<operand>): Ditto. Forward onto index instead.
7726 (gen-ifld-decls,gen-ifld-defns): New procs.
7727 (ifld:insert,ifld:extract): New procs.
7728 (<ifield>): New methods gen-insert, gen-extract.
7729 (<multi-ifield>): Ditto.
7730 (<hw-index>): Forward gen-insert,gen-extract onto value.
7731 (<hw-asm>): Delete insert/extract support.
7732 (<hw-register,hw-memory,hw-immediate>): Ditto.
7733 (gen-hash-defines): Use string-list.
7734 Define CGEN_MAX_IFMT_OPERANDS.
7735 (gen-switch): Use string-list,string-list-map.
7736 (gen-fget-switch,gen-fset-switch): Use string-list.
7737 (gen-parse-switch,gen-insert-switch): Ditto.
7738 (gen-extract-switch,gen-print-switch): Ditto.
7739 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7740 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7741 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7742 (gen-ivalue-entry): New proc.
7743 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7744 computation. Use 0 for operand ref table if ALIAS insn.
7745 (gen-minsn-table-entry): Use string-list.
7746 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7747 (gen-opcode-open): Record address of ifield table.
7748 (cgen-opc.h): Call gen-ifld-decls.
7749 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7750 * types.scm (<bitrange>): New members word-offset,word-length.
7751 Delete member total-length. Delete methods start,mask,value.
7752 (bitrange:word-offset,bitrange:word-length): New procs.
7753 * sim-cpu.scm (gen-define-fields): Simplify.
7754 (gen-extract-fields): Simplify.
7755 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7756 (<ifield>): New methods gen-ifld-extract-decl.
7757 Delete method gen-ifld-extract-beyond.
7758 (<multi-ifield>): New methods gen-ifld-extract-decl.
7759 (<multi-ifield>, method gen-ifld-extract): Implement.
7760 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7761 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7763 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7764 (-rtx-traverse-syntax-no-mode): New proc.
7765 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7766 (s-ifield): New proc.
7767 (s-shop): Don't prepend `unsigned' for unsigned modes.
7768 * rtx-funcs.scm (ifield): New rtx function.
7769 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7770 (delay): New rtx function.
7771 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7773 * cos.scm (-elm-make-method-getter): Fix typo.
7775 * utils.scm (backslash): Handle lists of strings.
7777 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7779 * fr30.cpu (f-rel9): Correct for pc+2.
7780 (label9): Use print_label9.
7781 * fr30.opc (print_label9): New function.
7783 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7785 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7786 * fr30.opc (parse_low_register_list): Renamed.
7787 (parse_hi_register_list): Renamed.
7788 (print_hi_register_list): Renamed.
7789 (print_low_register_list): Renamed.
7791 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7793 * fr30.cpu (f-rel9): Now a pc relative offset.
7795 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7797 * opcodes.scm (op-asm): Move to here, from operands.scm.
7798 (<op-asm>, method parse!): Validate arguments.
7799 (<operand>, method gen-function-name): Fix thinko.
7800 * operand.scm (<operand>, method make!): Don't set op-asm here.
7801 * utils.scm (list-elements-ok?): New proc.
7803 * opcodes.scm: Clean up pass.
7805 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7807 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7808 the fr30_int function.
7809 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7810 (h-dr): Add FUN-ACCESS attribute.
7812 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7814 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7815 for C symbol for models array.
7817 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7819 * fr30.opc (parse_reglist_low): New function.
7820 (parse_reglist_hi): New function.
7821 (print_reglist_low): New function.
7822 (print_reglist_hi): New function.
7823 * fr30.cpu: Finish remaining insn stubs.
7825 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7827 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7829 * fr30.cpu (ldi32m): Don't use for disassembly.
7831 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7833 * fr30.cpu (int): Implement it.
7835 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7837 * rtx-funcs.scm (nop): Fix C code.
7839 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7841 * fr30.cpu (f-i32): New ifield.
7844 (ldi32m): New macro insn.
7845 (inte): Provide simple version for now.
7847 * sim-arch.scm: New file.
7848 * sim.scm: Move architecture support generation to sim-arch.scm.
7849 * cgen-sim.scm: Load sim-arch.scm.
7852 * hardware.scm (pc?) New proc.
7853 (class <hardware-base>): Rewrite method 'pc?.
7854 (class <hardware>): Forward 'pc? to the hardware type.
7855 (class <hw-pc>): New method 'pc?.
7857 Add support for variable length ISAs.
7858 * ifield.scm (ifld-beyond-base?): New proc.
7859 * m32r.cpu: Remove integral-insn? spec.
7860 * mach.scm (arch:derived,arch:set-derived!): New procs.
7861 (arch:app-data,arch:set-app-data!): New procs.
7862 (class <arch>): New members derived, app-data.
7863 (class <cpu>): Delete member integral-insn?.
7864 (cpu:integral-insn?): Delete.
7865 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7866 (-cpu-read): Delete integral-insn? support.
7867 (state:decode-assist): Delete.
7868 (state:int-insn?): Delete.
7869 (<derived-arch-data>): New class.
7870 (-adata-set-derived!): New proc.
7871 (mach-finish!): Call it.
7872 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7873 (gen-operand-instance): Add COND_REF support.
7874 (gen-operand-instance-table): Ditto.
7875 (gen-hash-defines): Update.
7876 (gen-extract-switch): Update type of `insn_value' arg.
7877 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7878 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7880 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7881 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7882 beyond the base insn (for large insns).
7883 (-gen-extract-beyond-var-list): New proc.
7884 (gen-extract-fields): Handle large insns.
7885 (-gen-write-case): Update sem_arg computation.
7886 Update initial vpc computation.
7887 (gen-semantic-fn): Ditto. Update type of `insn'.
7888 (-gen-sem-case): Update sem_arg computation.
7889 Update initial vpc computation.
7890 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7891 (-gen-extract-word): New proc.
7892 (<ifield>): New method gen-ifld-extract-beyond.
7893 (gen-ifld-extract-beyond): New proc.
7894 * types.scm (bitrange-overlap?): New proc.
7896 * utils.scm (bits->bytes): New proc.
7897 (bytes->bits): New proc.
7899 Move extraction support into decoder.
7900 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7901 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7902 support to sim-decode.scm.
7903 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7904 be array of IDESC,FMT entries. Make the array const.
7905 (-gen-gcc-label-table): Make array const.
7906 (-gen-decode-switch): Branch to extraction code after insn has been
7908 (-gen-decode-insn-globals): Delete extract handler from
7910 (gen-decode-fn): Add extraction support.
7911 (-gen-sem-fn-decls): Delete extraction fn decls.
7912 (-gen-idesc-decls): Update @cpu@_decode decl.
7913 (-gen-idesc-init-fn): Delete extraction support.
7914 (-gen-extract-decls): New proc.
7916 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7917 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7919 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7920 All callers updated.
7921 (table-entry:make): Record insn value as insn object, not name.
7924 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7925 collision with C function.
7926 (path_dirname): Similarily.
7927 * hobbit.c,hobbit.h: Rebuild.
7929 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7931 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7933 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7935 * fr30.cpu: Implement more instruction stubs.
7937 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7939 * fr30.cpu: Implement more instruction stubs.
7941 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7943 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7945 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7947 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7948 (op:std-attrs): Ditto.
7949 * opcodes.scm (gen-operand-instance): Ditto.
7950 (gen-switch): Ditto.
7951 * m32r.cpu (condbit,accum): Update.
7952 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7954 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7956 * enum.scm (-enum-read): Fix typo.
7958 * iformat.scm (-ifmt-search-key): Simplify a little.
7960 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7962 * doc/porting: semantics.c -> sem.c.
7963 * Makefile.in: Regenerate.
7964 * fr30.cpu (add): Change ADD to add. Add more registers and set
7965 status bits on 'add' instruction.
7967 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7969 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7972 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7974 * minsn.scm (minsn:enum): Update, call current-arch-name.
7976 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7978 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7979 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7980 (ARCH,CGEN,CGENFLAGS): New variables.
7981 (gas-test,sim-test): New rules.
7982 * Makefile.in: Rebuild.
7983 * configure.in (arch): Define.
7984 * configure: Rebuild.
7986 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7987 * All .scm files: Ditto.
7989 * dev.scm: Fix gas-test call to cpu-load.
7990 * gas-test.scm: Clean up pass to remove bit-rot.
7991 * sim-test.scm: Ditto.
7993 * enum.scm (read-enum): Fix typo in `vals' handling.
7995 * hardware.scm (-parse-hw-type): Fix typo.
7996 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7997 (def-hardware,define-normal-hardware): Ditto.
7999 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
8000 (display-var): Use it.
8001 * hobbit.c: Rebuild.
8002 * hobbit.h: Rebuild.
8004 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
8005 avoid hobbit problem.
8006 * mach.scm (-cpu-read): Rename local `parallel-insns' to
8007 `parallel-insns-' to avoid hobbit problem.
8009 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
8011 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
8012 (parse_slo16,parse_ulo16): Ditto.
8013 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8015 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
8017 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8018 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8019 * Makefile.in: Rebuild.
8020 * insn.scm (define-normal-insn): Expand pmacros.
8021 * mode.scm (<mode>): New member `host?'. All uses updated.
8022 (mode:host?): New proc.
8023 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8024 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8025 (define-rtx-dual-mode): Ditto.
8026 (s-index-of): New proc.
8027 (s-unop): Use plain C for host mode operations.
8028 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8029 * rtx-funcs.scm (index-of): New rtx function.
8030 * sim.scm (<hw-index>): New method cxmake-get.
8032 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
8034 * sim-cpu.scm (-gen-engine-decls): Delete.
8036 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
8038 * doc/rtl (Example): Correct Typo.
8039 * doc/porting: Add 'make dep' step to opcodes port instructions.
8040 * fr30.opc: New file.
8041 * fr30.cpu: New file.
8043 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
8045 * configure.in: Handle guile $exec_prefix = $prefix/foo.
8046 * Makefile.am (GUILEINCDIR): New variable.
8048 * configure: Regenerate.
8049 * Makefile.in: Ditto.
8050 * aclocal.m4: Ditto.
8052 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
8054 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8055 (cgen-semantics.c): Ditto.
8056 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8057 * sim-model.scm (cgen-model.c): Ditto.
8058 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8059 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8061 * opcodes.scm (read-cpu.opc): Handle empty file.
8063 * cos.scm (-elm-make-method-setter): Fix typo.
8065 * cpu.scm (-init-parse-cpu!): Call types-init!.
8066 (-finish-parse-cpu!): Call types-finish!.
8067 * ifield.scm (<ifield>): Delete members start,length.
8068 New member bitrange.
8069 (<ifield>, methods field-start,field-length): Update.
8070 (fld:start): New arg insn-len. All callers updated.
8071 (<ifield>, methods field-mask,field-value): Update.
8072 (-ifield-parse): Update.
8073 (ifield-init!): Update.
8074 * iformat.scm (compute-insn-length): Simplify.
8075 (compute-insn-mask): Update.
8076 * insn.scm (insn:value): Update.
8077 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8078 (current-arch-default-insn-bitsize): New proc.
8079 (current-arch-insn-lsb0?): New proc.
8080 (-arch-parse,-arch-read): Update.
8081 (<cpu>): New member file-transform.
8082 (-cpu-parse,-cpu-read): Update.
8083 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8084 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8085 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8086 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8087 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8088 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8089 * operand.scm (op:start): Update call to field-start method.
8090 * sim-decode.scm (opcode-slots): New arg lsb0?.
8091 (fill-slot!,build-slots): Ditto.
8092 (build-decode-table-entry,build-decode-table-guts): Ditto.
8093 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8094 (gen-decode-fn): Ditto.
8095 (cgen-decode.c): Update call to gen-decode-fn.
8096 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8097 (-gen-cpu-header,-gen-cpuall-includes): New procs.
8098 (cgen-cpuall.h): Call -gen-cpuall-includes.
8099 * types.scm (<bitrange>): New class.
8100 (types-init!,types-finish!): New procs.
8101 * utils-cgen.scm (parse-number): New proc.
8102 (parse-boolean): New proc.
8103 * utils.scm (word-value): Renamed from shift-bits, rewrite.
8104 (word-mask): Rewrite.
8105 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8106 (m32rxf): New field `file-transform'.
8107 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8109 * hobbit.h: Fix include file name.
8111 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
8113 * slib: New directory of slib files used by cgen/hobbit.
8114 * hobbit.scm: New file.
8115 * hobbit.c: New file.
8116 * hobbit.h: New file.
8117 * hobscmif.h: New file.
8118 * hob-main.c: New file.
8119 * hobslib.scm: New file.
8121 * Makefile.am: Add support for compiling hobbit, and using compiled
8122 version of hobbit to compile cgen.
8123 * Makefile.in: Regenerate.
8124 * configure.in: Support --with-hobbit.
8125 * configure: Regenerate.
8126 * acconfig.h (WITH_HOBBIT): Add.
8127 * config.in: Regenerate.
8129 * rtl.scm: New file, was cdl-c.scm.
8130 Definition of rtx funcs moved to rtx-funcs.scm.
8131 (semantic-in-out-operands): Rewrite to compute object form of
8133 * rtx-funcs.scm: New file.
8135 * cgen-gh.c: #include "config.h".
8136 (gh_cadddr,gh_cddddr): New fns.
8137 (cgh_vector_to_list): New fn.
8138 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8139 (cgh_init): Prefix qsort procs with "cgh-".
8140 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8141 * cgen.c: #include "config.h".
8143 * attr.scm (bitset-attr?): New proc.
8144 (<bitset-attribute>, method parse-value): Value syntax changed from
8145 (val1 val2 ...) to val1,val2,....
8146 (<bitset-attribute>): New method gen-value.
8147 (<integer-attribute>): New method gen-value.
8148 (<enum-attribute>): New method gen-value.
8149 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8150 (<reader>): New class.
8151 (CURRENT-ARCH,CURRENT-READER): New globals.
8152 (keep-mach?): Move here from mach.scm.
8153 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8154 (<arch>): New class.
8155 (<arch-data>): New class.
8156 (<cpu>): Make subclass of <ident>.
8157 (*ENDIAN* variables): Delete.
8158 (process-state-vars): Delete.
8159 (mach-finish!): Add `base' value to MACH attribute.
8160 * hardware.scm (<hardware>): Make subclass of <ident>.
8161 (hw:std-attrs): New global.
8162 (hw-profilable?): New proc.
8163 * ifield.scm (<ifield>): Make subclass of <ident>.
8164 (sort-ifield-list): Move here from iformat.scm.
8165 * iformat.scm (<iformat>): Renamed from <insn-format>.
8166 Make subclass of <ident>.
8167 (-ifmt-search-key): Include cti? in categorization of formats.
8168 (ifmt-analyze): Compile semantics (turn to object form).
8169 * insn.scm (<insn>): Make subclass of <ident>.
8170 New member compiled-semantics.
8171 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8172 * mode.scm (<mode>): Make subclass of <ident>.
8174 * model.scm (<unit>): Make subclass of <ident>.
8175 New members inputs,outputs.
8176 (<model>): Make subclass of <ident>. New member state.
8177 (-unit-parse): Parse inputs,outputs.
8178 (<iunit>): New class.
8179 (-insn-timing-parse-model): New proc.
8180 (parse-insn-timing): Function unit spec rewritten.
8181 * operand.scm (<operand>): Make subclass of <ident>.
8182 New members sem-name,num,cond? New method gen-pretty-name.
8183 (hw-index-scalar): New global.
8184 (op-nub-hw): Move here from rtl.scm.
8185 (op:lookup-sem-name,op-profilable?): New procs.
8186 * pmacros.scm: Rewrite to pass through hobbit.
8187 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8188 * utils.scm (logit): Make a macro.
8189 (bit-set?): Rewrite.
8190 (high-part): Rewrite.
8192 * m32r.cpu (define-arch): Move to top of file.
8193 (cpu family m32rbf): Renamed from m32rb.
8194 (model m32r/d): Function unit spec rewritten.
8195 (all insns): Ditto. Replace UBI with BI.
8197 * opcodes.scm (gen-attr-table-decls): Declare
8198 @arch@_cgen_hw_attr_table.
8199 (gen-attr-table-defns): Generate hw attribute table.
8201 * sim-cpu.scm (-gen-engine-decls): New proc.
8202 (-gen-model-decls): New proc.
8203 (gen-parallel-exec-type): Add new member `written' to struct parexec.
8204 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8205 (-gen-record-profile-args): Simplify.
8206 (-gen-parallel-sem-case): Delete.
8207 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8208 New local `written'. Delete profiling code.
8209 (-gen-sem-case): Ditto.
8210 (-uncond-written-mask,-any-cond-written?): New procs.
8211 (cgen-sem-switch.c): Include duplicates of insns that can be executed
8212 parallelly or serially, and write-back handlers for all parallel insns.
8213 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8214 support to initialization of struct insn_sem.
8215 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8216 (-gen-insn-sem-type): Add parallel write-back support to struct
8218 (-gen-idesc-init-fn): Add support for virtual insns.
8219 Add parallel write-back support.
8220 * sim-model.scm (gen-model-profile-fn): Delete
8221 (-gen-model-fn-decls): New proc.
8222 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8223 (-gen-model-init-fn): New proc.
8224 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8225 members in @mach@_init_cpu.
8226 (cgen-model.c): Generate model handlers for each insn.
8227 * sim.scm (gen-define-field-macro): Cti insns handled differently.
8228 (<hw-pc>): New method gen-write.
8229 (<hw-register>, method gen-write): New arg `mode'.
8230 (<hw-register>): Delete method gen-record-profile!.
8231 New method gen-profile-index-type.
8232 (<hw-memory>, method gen-write): New arg `mode'.
8233 (<hw-address>, method gen-extract): Delete.
8234 (<hw-address>, method gen-write): New arg `mode'.
8235 (<hw-index>, method get-write-index): Rewrite.
8236 (<pc>, method cxmake-get-direct): Delete.
8237 (<pc>): New method cxmake-get. Comment out methods
8238 gen-set-quiet,gen-set-trace.
8239 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8240 gen-profile-index-type,gen-profile-code.
8241 Delete method gen-pretty-name. Rewrite method gen-write.
8242 Delete method cxmake-get-direct.
8243 (-op-gen-set-trace): Update `written'.
8244 (-op-gen-set-trace-parallel): Ditto.
8245 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8246 (gen-cpu-insn-enum-decl): Add extra entries for parallel
8247 insns and their write-back handlers.
8248 (insn-op-lookup): New proc.
8249 (<unit>): New method gen-profile-code.
8250 (<iunit>): New method gen-profile-code.
8251 (gen-argbuf-elm): Add profiling elements.
8252 (gen-argbuf-type): Define cti insns separately in their own struct.
8253 Add member `addr_cache' to this struct. Add entries for pbb virtual
8254 insns. Move semantic entries here from struct scache.
8255 Delete everything from struct scache except argbuf.
8256 (<insn>, method gen-profile-locals): Rewrite.
8257 (<insn>, method gen-profile-code): Rewrite.
8258 (sim-finish!): Create virtual pbb insns.
8260 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8262 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8263 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8264 (h-psw,h-bpsw,h-bbpsw): Define.
8265 (rte,trap): Handle bbpc,bbpsw.
8266 * opcodes.scm (max-operand-instances): Fix typo.
8267 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8268 hardware elements to be fun-access.
8269 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8271 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8273 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8275 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8277 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8279 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8281 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8283 (mach m32r): Update.
8285 * mach.scm (mach:supports?): New proc.
8286 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8287 gen-reg-access-{decls,defns}.
8288 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8289 (gen-mach-bfd-name): New proc.
8290 (gen-arch-reg-access-{decls,defns}): New procs.
8291 (cgen-arch.[ch]): Output register access cover fns.
8293 * hardware.scm (hardware-builtin!): Set print handlers for
8295 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8297 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8298 (my_print_insn): Ditto. Delete args buf, buflen.
8299 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8300 (-hw-asm-specs): Add `handlers' spec.
8301 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8303 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8305 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8306 (<hw-asm>, parse!): New method.
8307 (gen-insn-table-entry): Print semantics.
8308 (gen-opcode-open): Renamed from gen-opcode-table.
8310 * utils.scm (string-write): No longer a macro.
8311 (-string-write): Handle procedure args.
8312 * opcodes.scm: Update all calls to string-write.
8313 * sim-cpu.scm: Ditto.
8314 * sim-decode.scm: Ditto.
8315 * sim-model.scm: Ditto.
8318 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8320 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8321 (-gen-insn-builders,-gen-insn-builder): New procs.
8323 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8325 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8326 (gen-opcode-table): Properly terminate comment.
8328 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8331 Clean up pass over everything, so starting fresh.