1 2009-11-21 Doug Evans <dje@sebabeach.org>
3 * dev-utils.scm: New file.
4 * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
5 load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
6 * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
7 /loaded-file-record!, maybe-load): Delete.
8 Load cgen files directly instead of via maybe-load.
10 2009-11-14 Doug Evans <dje@sebabeach.org>
12 * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
13 expressions used in a void context.
15 * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
17 * cpu/xc16x.cpu: Delete, use copy in ../cpu.
18 * cpu/xc16x.opc: Ditto.
20 2009-11-12 Doug Evans <dje@sebabeach.org>
22 * rtl-c.scm (s-parallel): Use map-in-order instead of map.
24 * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
25 eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
27 2009-11-11 Doug Evans <dje@sebabeach.org>
29 * html.scm (gen-insn-docs): Add logging message.
31 2009-11-05 Doug Evans <dje@sebabeach.org>
33 * utils-cgen.scm (gen-set-macro2): New function.
34 * sim.scm (<hw-register> gen-get-macro): Call it.
36 * co-for-gen-all: New file.
38 * testsuite/name-comments-1.test: Update call to current-insn-lookup.
40 * utils.scm (reduce): Delete.
42 * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
44 * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
45 regarding PREFIX attribute handling.
47 * operand.scm (<hw-index>): Add enum to possible types, all uses
49 (hw-index-constant?, hw-index-constant-value): New functions.
50 (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
51 hw-index-enum-obj): New functions.
52 (/operand-parse): Handle enum indices.
53 * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
54 hw-index-constant-value.
55 * rtl.scm (rtx-constant-value): Fix handling of enums.
56 * rtx-funcs.scm (enum): Ditto.
57 * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
58 currently supported here.
60 2009-11-02 Doug Evans <dje@sebabeach.org>
62 Specify isa(s) when doing ifield, operand, insn lookups.
63 ACU = all callers updated.
64 * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
65 * enum.scm (define-full-insn-enum): Pass isa-name-list to
67 * html.scm (get-insn-properties): Pass isa-name-list to
69 * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
70 * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
71 (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
72 (/parse-insn-format, syntax-break-out): Ditto.
73 * mach.scm (obj-filter-by-isa): New function.
74 (current-ifld-lookup): New optional arg maybe-isa-name-list.
75 (/ifld-already-defined?, /op-already-defined?): Simplify.
76 (current-op-lookup): New optional arg maybe-isa-name-list.
77 (current-insn-lookup): New arg isa-name-list, ACU.
78 (/insn-already-defined?, /minsn-already-defined?): Simplify.
79 (current-minsn-lookup): New arg isa-name-list, ACU.
80 * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
82 * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
83 (gen-syntax-entry): Ditto.
84 * operand.scm (/operand-parse): Pass isa-name-list to
86 (/derived-parse-encoding): New arg isa-name-list, ACU.
87 (/derived-parse-ifield-assertion): Ditto.
88 (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
89 (/anyof-parse-choice): Ditto.
90 (anyof-satisfies-assertions?): Pass context to rtx-solve.
91 (/anyof-merge-syntax): New arg container, ACU.
92 (operand-builtin!): Add pc to all isas.
93 * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
94 (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
95 (rtl-c-parsed, rtl-c++-parsed): Ditto.
96 (rtl-c): New arg isa-name-list, ACU.
97 (rtl-c-expr, rtl-c++): Ditto.
98 (closure): New arg isa-name-list, ACU.
99 * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
100 (/cstate-isas): New function.
101 (/rtx-canon-symbol-list): New function.
102 (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
104 (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
105 (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
106 (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
107 (rtx-canonicalize): New arg isa-name-list, ACU.
108 (rtx-canonicalize-stmt): Delete.
109 (tstate-make): New arg isas, ACU.
110 (tstate-isas, tstate--set-isas!): New functions.
111 (tstate-env-stack): Renamed from tstate-env, ACU.
112 (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
113 (tstate-make-closure): Renamed from tstate-new-env, new arg
115 (/rtx-traverse-env): Delete.
116 (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
118 (/rtx-traverse): Include conditional flag in dump output.
119 Update isa,envstack for closures. Pass isa list to current-op-lookup.
120 (<eval-state>): New member isas. Rename env to env-stack.
121 (<eval-state> vmake!): Handle #:isas. #:env renamed to #:env-stack.
122 (<eval-state>): New getter/setter for isas. Rename env getter/setter
124 (estate-make-for-eval): Provide #:isas.
125 (estate-make-closure): Renamed from estate-new-env. New arg
127 * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
128 (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST.
129 (/rtx-trim-for-doc): Handle closures.
130 * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION,
132 (rtx-env-var-list): Delete.
133 (rtx-env-make): Handle already-compiled environments.
134 (rtx-var-alist-to-env): New function.
135 (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
136 (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
137 (rtx-operand-obj): New arg isa-name-list, ACU.
138 (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
140 * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
141 * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
142 (/frag-compute-desired-frags): Minor simplification.
143 (/frag-pick-best): Ditto.
144 * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
145 (/gen-sfrag-code): Update.
146 * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
147 * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
148 * utils.scm (non-null-intersection?): New function.
150 * gen-all (do_src): Manually run cgen-all for sid.
152 2009-11-01 Doug Evans <dje@sebabeach.org>
156 * rtl-traverse.scm (/rtx-canon): Issue better error message for
157 invalid rtx function names.
159 2009-10-28 Doug Evans <dje@sebabeach.org>
161 * cos.scm (object-assign!): New function.
162 * mode.scm (/mode-set-word-params!): Call it.
164 2009-10-25 Doug Evans <dje@sebabeach.org>
166 Record bitset attributes internally as a list.
167 Record rtx attribute values internally as ((rtx-expr)).
168 * attr.scm (bitset-attr?): Delete, unused.
169 (<bitset-attribute> parse-value): Rewrite.
170 (/attr-parse): Rewrite bitset default value processing.
171 (/attr-read): Pick out values of scalar attributes to distinguish
172 them from bitset values which are a list.
173 Fix spelling errors for processing of default values.
174 Handle string attributes.
175 (bitset-attr->list): Delete, all callers updated.
176 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
178 (atlist-source-form): Rewrite.
179 * hardware.scm (<hardware-base> 'get-isas): Update recognition
181 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
183 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
184 values are now lists.
185 * mach.scm (def-isa-attr!): Update, bitset attribute values,
186 including the default, are now lists.
187 (all-isas-attr-value): Result is now a list.
188 * doc/rtl.texi: Clean up pass over attribute docs.
190 Change internal representation of rtx attribute values.
191 * attr.scm (/attr-val-is-rtx?): New function.
192 (attr-value): Call it.
193 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
194 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
195 Disallow rtx values for bitset attributes.
196 (/attr-read): Record rtx in default value as ((rtx-expr)).
197 (/attr-eval): Update.
199 2009-10-24 Doug Evans <dje@sebabeach.org>
201 * gen-all-doc: Add sh.cpu.
202 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
203 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
205 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
206 (/gen-sfrag-case): Ditto.
207 * sim-cpu.scm (/gen-sem-case): Ditto.
209 * doc/rtl.texi: Add note that different ifields, operands, insns,
210 and minsns may occur with the same name in different isas.
211 Add note on the canonical form of rtl expressions.
213 2009-10-23 Doug Evans <dje@sebabeach.org>
215 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
216 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
218 * decode.scm: Tweak various comments.
219 (/opcode-slots): Add FIXME.
220 (/build-decode-table-guts): Add assert.
221 * utils-sim.scm (/gen-set-itype-and-extract): New function.
222 (/gen-bracketed-set-itype-and-extract): New function.
223 (/gen-decode-default-entry): Rewrite.
224 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
225 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
226 updated. Don't unnecessarily emit check for whether all opcode bits
228 (/gen-decode-expr-set-itype): Delete.
229 (/gen-decode-expr-entry): Update.
230 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
231 updated. Keep track of decoder tables used thus far.
232 (/gen-decoder-switch): Ditto.
233 * utils.scm (word-bit-value): New function.
235 2009-10-14 Doug Evans <dje@sebabeach.org>
237 * ifield.scm (<ifield>, value): Provide default initial value.
238 (ifield-encode-mode): Delete
239 (ifield-decode-mode): Delete duplicate definition.
240 (<derived-ifield>, 'make!): Initialize members encode, decode.
241 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
243 (<multi-ifield>, 'gen-insert): Ditto.
245 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
247 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
248 for @foo@_init_idesc_table.
250 2009-09-30 Doug Evans <dje@sebabeach.org>
252 * doc/intro.texi: Mention SID.
253 * doc/sim.texi: Ditto.
254 * doc/porting.text (Doing a simulator port): Add some text.
256 2009-09-27 Doug Evans <dje@sebabeach.org>
258 * cos.scm (/class-table): New global.
259 (/class-uid, /class-set-uid!): New functions.
260 (/class-parent-name): Renamed from /class-parents.
261 (/class-make!): Change parents arg to parent-name, all callers updated.
263 (/class-lookup-uid): New function.
264 (/class-parent-classes): Rewrite.
265 (/class-mi?): Delete.
266 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
268 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
269 (/class-compute-class-desc, class-desc-dump): Update.
270 (/object-make!): Update.
271 (/object-make-with-values!): Delete arg class-desc, all callers
273 (/object-copy): Delete arg top?, all callers updated.
274 (/object-specialize): Delete.
275 (/object-elements, /object-top-class): Delete.
276 (/object-class-name, /object-class-desc): Update.
277 (/object-class-uid): New function.
278 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
279 class-make, /class-subclass? /class-lookup-element,
281 (/elm-delta, elm-list): Delete.
282 (/elm-make-method-getter, elm-get, elm-xget): Update.
283 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
284 (elm-make-getter, elm-make-setter): Update.
285 (/method-lookup-next): Update.
286 (send): Don't specialize class passed to method.
287 (send-next): New arg class-name, all callers updated.
288 (/class-parent, /class-parent-via-path, object-parent): Delete.
289 (class-cons-parent!, class-append-parent!): Delete.
290 (object-reset!): Init /class-table.
292 * cos.scm (/object-debug-classes): Delete.
293 (/object-debug-elements, /object-debug-methods): Delete.
295 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
296 (method-proc): Delete.
297 (method-make-virtual!, method-make-virtual-forward!): Delete.
298 * ifield.scm (<ifield> field-start): Update.
299 (<ifield> field-length, pretty-print): Update.
300 (<multi-ifield> field-length, field-start, pretty-print): Update.
301 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
302 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
303 (<array> gen-sym-defn): Ditto.
304 (<hardware-base> gen-defn): Renamed from gen-defn.
305 (<hw-register> gen-type): Update.
306 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
307 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
308 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
309 (<hw-immediate> gen-type): Update.
310 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
311 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
312 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
313 (<array> gen-sym-defn): Ditto.
314 (<hardware-base> gen-defn): Renamed from gen-defn.
315 (<hw-register> gen-type): Update.
316 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
317 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
318 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
319 (<hw-immediate> gen-type): Update.
320 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
322 2009-09-25 Doug Evans <dje@sebabeach.org>
324 * operand.scm (/anyof-merge-setter): Handle set-quiet.
325 * rtl.scm (rtx-single-set?): Handle set-quiet.
327 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
328 rtl-cover-fns?, macro?. All callers updated.
329 (estate-make-for-normal-rtl-c): Delete, have all callers call
330 estate-make-for-rtl-c directly.
331 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
332 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
334 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
335 replaces /par-replace-set-dests.
336 (/par-replace-set-src-expr-fn): New function, replaces
337 /par-replace-set-srcs.
338 (s-parallel): Rewrite.
340 * rtl.scm (rtx-pretty-strdump): New function.
341 * rtl-traverse.scm (/rtx-canon-error): Use it.
342 (<eval-state>): New member outer-expr.
343 (estate-error): Include outer expression in error message if present.
345 2009-09-23 Doug Evans <dje@sebabeach.org>
347 * xc16x.cpu (h-cr): New hardware.
348 (muls): Comment out parts that won't compile, add fixme.
349 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
350 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
351 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
353 Rewrite rtl processing to require it to be "canonicalized" first,
354 and write a full canonicalizer / expression checker.
355 Remove all appearances of DFLT in canonical rtl.
356 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
358 * iformat.scm (ifmt-analyze) Use canonical semantics.
359 * insn (<insn>): New member canonical-semantics.
360 * mach.scm (<arch>): New member multi-insns-instantiated?.
361 (/instantiate-multi-insns!): New function.
362 (/canonicalize-insns!): New function.
363 (arch-analyze-insns!): Canonicalize insn semantics before processing
365 * mode.scm (/mode-set-word-params!): New function.
366 (mode-void?): New function.
367 (mode-compatible?): VOID is compatible with VOID.
368 (/mode-word-sizes-defined?): New global.
369 (mode-set-word-modes!): Use/set it.
370 (mode-ensure-word-sizes-defined): Update.
371 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
372 Redo WI/UWI/AI/IAI handling.
373 (op:new-mode): No longer accept DFLT.
374 (<derived-operand> constructor): Ensure all fields are initialized.
375 (<anyof-operand> constructor): Ditto.
376 (/derived-parse-ifield-assertion): Delete arg `args'.
378 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
379 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
380 (rtl-c-expr, rtl-c++): Ditto.
381 (/rtl-c-get): Use mode of operand, not containing expression.
382 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
383 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
384 estate-for-insn? instead.
385 (s-unop): Use mode of expression, not first operand.
386 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
387 (s-sequence): Remove DFLT support.
388 (ifield): Use mode of expression, not UINT.
389 (pc): Comment out, unused.
390 (int-attr): New rtx kind.
392 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
393 * rtl-traverse.scm (/rtx-canon-debug?): New global.
394 (/make-cstate): New function.
395 (/cstate-context, /cstate-outer-expr): New functions.
396 (/rtx-canon-error): New function.
397 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
398 /rtx-get-last-cond-case-rtx): New functions.
399 (/rtx-canon-*): New functions.
400 (/rtx-canner-table, /rtx-operand-canoners): New globals.
401 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
402 (/rtx-option, /rtx-option-list?): Rewrite.
403 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
404 Rewritten, all callers updated.
405 (/rtx-canon-expr, /rtx-canon): New functions.
406 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
407 (rtx-canonicalize-stmt): New function.
408 (tstate-make): Remove arg `set?'. All callers updated.
409 (tstate-new-set?): Delete.
410 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
411 moved to /rtx-canon-*.
412 (/rtx-traverse-normal-operand): New function.
413 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
414 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
415 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
416 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
418 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
419 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
420 (/rtx-make-traverser-table): Update.
421 (/rtx-traverse-operands): Remove mode processing, now done during
423 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
424 (/rtx-traverse): Ditto.
425 (rtx-init-traverser-tables!): New function.
426 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
427 (rtx-verify-no-dflt-modes): New function.
428 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
429 (rtx-simplify-insn): Use insn-canonical-semantics.
430 (rtx-canonicalize): Moved to rtl-traverse.scm.
431 (/compile-expr-fn, rtx-compile): Delete.
432 (/rtx-trim-rtx-list): New function.
433 (/rtx-trim-for-doc): Handle set, if.
434 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
435 (/rtx-valid-mode-types): Update.
436 (/rtx-valid-matches): Update.
437 (/rtx-find-matchexpr-index): New function.
438 (rtx-lookup): Require rtx-kind to be the rtx name.
439 (def-rtx-node): New arg result-mode, all callers updated.
440 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
441 (rtx-lazy-sem-mode): Delete.
442 (/rtx-closure-make): New arg `mode', all callers updated.
443 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
444 (rtx-operand-obj): Rewrite.
445 (rtx-make-xop): New functions.
446 (/hw): Renamed from `hw', all callers updated.
447 Use the correct mode instead of DFLT for the index.
448 (rtl-builtin!): Call rtx-init-traversal-tables!.
449 (rtl-finish!): Update.
450 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
451 Update mode arg-type.
453 (int-attr): New rtx kind.
455 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
456 (/frag-cost-compute!): Ditto.
457 * semantics.scm (/build-operand!): Delete args op-name, op.
458 New arg op-expr. All callers updated.
459 (/build-mem-operand!): Remove DFLT support.
460 (semantic-compile): Update process-expr!, mode arg deleted.
461 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
463 (/gen-sem-case, /gen-sfrag-code): Ditto.
464 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
465 (/op-gen-set-trace): New function. If not doing profiling, or using
466 the pbb engine, call /op-gen-set-quiet.
467 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
468 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
469 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
470 * utils.scm (find-first-index): New function.
471 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
473 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
475 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
477 2009-09-21 Doug Evans <dje@sebabeach.org>
479 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
480 All callers updated. Add FIXME.
481 (all rtx functions): Rename local estate to *estate*. It's an
482 artificial argument added to the rtx, so make it stand out.
484 * openrisc.cpu (or32 isa): Fix setup-semantics.
486 * rtl.scm (rtx-class-*?): Delete, unused.
487 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
489 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
490 (init-reader!): Set /CGEN-RTL-VERSION to default.
492 * read.scm (cpu-load): Print load parameters.
494 * dev.scm (load-doc): Set verbose-level to 2.
496 2009-09-20 Doug Evans <dje@sebabeach.org>
498 * rtl.scm (rtx-strdump): Use write instead of display.
500 2009-09-17 Doug Evans <dje@sebabeach.org>
502 * utils-cgen.scm (obj-csv-names): New function.
503 * utils-sim.scm (/sfmt-contents): Use it in logging message.
505 2009-09-12 Doug Evans <dje@sebabeach.org>
507 Clean up pass of mode handling.
508 Make use of mode name vs <mode> object more consistent and clear.
509 * hardware.scm (/keyword-read): Default mode to the mode name,
510 not the <mode> object.
511 (/hw-parse-indices): Parse mode name and pass mode object to
512 <hw-asm> constructor.
513 (/hw-parse-values): Ditto.
514 (<hw-register> parse!): Pass mode name to /hw-parse-indices
515 and /hw-parse-values.
516 (<hw-memory> parse!): Ditto.
517 (<hw-address> parse!): Ditto.
518 * mode.scm (/mode-table): New global, replaces mode-list.
519 Modes stored in hashtable instead of list.
520 (/mode-class-table): New global.
521 (mode-list-non-alias-values): Update.
522 (mode:eq?, mode-compatible?, mode:add!): Update.
523 (mode:lookup): Restrict arg to the mode's name. All callers updated.
524 (mode-maybe-lookup): New function.
525 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
526 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
527 (mode-find, mode-set-word-modes!): Update
528 (mode-ensure-word-sizes-defined): Update.
529 (/sort-mode-classes!): New function.
530 (mode-builtin!): Update. Sort mode classes here.
531 (mode-finish!): Sort mode classes here too.
532 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
534 (rtl-c-set-quiet): Allow mode to be name of object.
535 (rtl-c-set-trace): Ditto.
536 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
537 <mode> object. All callers updated.
538 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
539 (rtx-lazy-sem-mode): Ditto.
540 (<rtx-temp> make!): Assert mode arg is a <mode> object.
541 (rtx-env-make): Allow var-list modes to be name or object.
542 * sem-frags.scm (/frag-expr-assq-locals): New function.
543 (/frag-compute-locals!): Call it.
544 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
546 * semantics.scm (/build-mem-operand!): Handle mode aliases.
548 * sim-test.scm (*): Symbols no longer can be passed to string-append.
550 2009-09-10 Doug Evans <dje@sebabeach.org>
552 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
553 Improve error message for missing or too many bits.
554 (/insn-parse): Don't verify iformat for virtual insns.
556 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
558 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
559 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
560 * sid.scm (pbb-engine-insns): Ditto.
561 * sim-decode.scm (cgen-decode.c): Ditto.
563 2009-09-09 Doug Evans <dje@sebabeach.org>
565 * rtl-traverse.scm: Comment tweaks.
566 * rtl-xform.scm: Comment and reformatting tweaks.
567 * doc/rtl.texi: Add text to docs on ifield-assertions.
569 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
572 Add support for controlling warnings/errors.
573 Add tests for iformat description errors.
574 * dev.scm (cload): New option #:diag.
575 * read.scm (<reader>): New member verify-iformat?.
576 (/parse-diagnostic, parse-warning): New functions.
577 (parse-error): Guts moved to /parse-diagnostic.
578 (/set-diagnostic-options!): New function.
579 (cpu-load): New arg diagnostic-options, all callers updated.
580 Recognize -w diagnostic-option-list.
581 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
582 (ifld-simple-ifields, ifields-simple-ifields): New function.
583 * insn.scm (/parse-insn-format-iflds): New function.
584 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
585 New arg isa, all callers updated. Do some basic validation of the
586 ifield list if requested.
587 * mach.scm (/sanity-check-insns): Improve error message text.
588 * doc/running.texi: Document -w option.
589 * doc/porting.texi: Document #:trace, #:diag options to cload.
591 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
593 * dev.scm (*): Change default verbosity level to 2.
595 * ifield.scm (<ifield> pretty-print): New method.
596 (ifld-pretty-print): New function.
597 (<multi-ifield> pretty-print): New method.
599 * ifield.scm (<ifield> field-start): Delete word-len arg.
602 (<multi-ifield> field-start): Ditto.
603 * operand.scm (<hw-index> field-start): Ditto.
605 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
606 total-bitsize. All callers updated.
607 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
608 New member /insn-base-value.
609 (insn-base-value): New function.
610 * mach.scm (/sanity-check-insns): New function.
611 (arch-analyze-insns!): Call it.
613 2009-09-08 Doug Evans <dje@sebabeach.org>
615 * iformat.scm (ifields-base-ifields): Simplify.
616 (compute-insn-length): Simplify, call ifields-base-ifields.
617 (compute-insn-base-mask): Ditto.
618 * ifield.scm (ifld-known-values): Ditto.
619 (ifld-base-ifields): Ditto.
620 * insn.scm (insn-value): Ditto.
621 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
623 2009-09-08 DJ Delorie <dj@redhat.com>
625 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
626 preprocessor macro, not an enum.
628 2009-09-08 Doug Evans <dje@sebabeach.org>
630 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
632 (*): Remove trailing ":" from error messages passed to estate-error.
634 2009-09-07 Doug Evans <dje@sebabeach.org>
636 * types.scm (<struct>): Delete.
638 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
640 (/pmacro-loc-error): New function.
642 * mach.scm (/isa-parse-decode-assist): New function.
643 (/isa-parse): Call it.
645 * decode.scm (/get-subopcode-value): New function.
646 (/opcode-slots): Call it.
647 (/fill-slot!): Add logging message.
649 * cos.scm (/object-error): Convert symbols to strings before passing
652 * read.scm (rtl-version-equal?): New function.
653 (rtl-version-at-least?, rtl-version-older?): New functions.
655 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
656 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
658 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
660 2009-09-03 Doug Evans <dje@sebabeach.org>
662 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
665 2009-09-01 DJ Delorie <dj@redhat.com>
667 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
668 (parse_unsigned16_range): Likewise.
669 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
672 2009-09-01 Doug Evans <dje@sebabeach.org>
674 Pmacro .equals -> .equal?
675 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
676 -pmacro-builtin-equals. All callers updated.
677 (pmacros-init!): Rename .equals to .equal?.
678 * doc/pmacros.texi: Update.
679 * testsuite/pmacros-1.test: Update.
681 * doc/porting.texi: Work around texi2html bug where it doesn't
682 properly escape <> inside double-quotes inside @code.
684 * doc/porting.texi (Doing an opcodes port): Add step to specify
687 2009-08-29 Doug Evans <dje@sebabeach.org>
689 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
691 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
693 2009-08-27 Doug Evans <dje@sebabeach.org>
695 Add do-count rtl function.
696 * rtl-c.scm (s-do-count): New function.
697 (do-count): New rtl handler.
698 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
699 (-rtx-make-traverser-table): Add ITERATION.
700 * rtl.scm (rtx-make-iteration-limit-var): New function.
701 (rtx-env-make-iteration-locals): New function.
702 * rtx-funcs.scm (do-count): New rtl function.
703 * cpu/play.cpu: Add do-count-test insn.
704 * doc/rtl.texi: Add docs on do-count.
706 2009-08-26 Doug Evans <dje@sebabeach.org>
708 * read.scm (parse-error): Change error message output format
709 to match context-owner-error.
710 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
711 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
712 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
713 (operand): Call estate-error instead of context-error.
714 (local, delay): Ditto.
715 (ref, attr): Call estate-error instead of error.
716 * rtl-traverse.scm (tstate-error): New function.
717 (-rtx-traverse-error): Call tstate-error instead of context-error.
718 (-rtx-traverse-operands, -rtx-traverse): Ditto.
719 (estate-error): New function.
720 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
722 (e-if): Call estate-error instead of error.
723 * rtx-funcs.scm (error): Call estate-error instead of context-error.
725 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
726 Rewrite to call context-owner-error.
727 (context-owner-error): New function.
729 * ifield.scm (<ifield> constructor): New arg `location',
731 * insn.scm (<insn> constructor): Ditto.
732 (<multi-insn> constructor): Ditto.
733 * minsn.scm (<macro-insn> constructor): Ditto.
734 * operand.scm (<operand> constructor): Ditto.
735 * utils-cgen.scm (builtin-location): New function.
736 (<source-ident>): Fix default value of member `location'.
737 (source-ident?): New function.
739 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
740 (estate-push-env, estate-with-modifiers): Ditto.
741 (estate-deepen): New function.
743 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
745 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
746 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
749 2009-08-25 Doug Evans <dje@sebabeach.org>
751 * doc/pmacros.texi (pmacro default argument values): Add text.
753 2009-08-23 Doug Evans <dje@sebabeach.org>
755 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
756 Rename member prefix -> name-prefix.
757 (<keyword> getters): Update.
758 (-keyword-parse): Update. Default enum-prefix to NAME-.
759 (-keyword-read): Update. Don't compute default value for
761 (define-keyword): Update.
762 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
763 * read.scm (cgen-rtl-version): New function.
764 (-supported-rtl-versions): Add (0 8).
765 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
766 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
767 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
768 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
769 Update, print-name -> enum-prefix, make uppercase.
770 Remove unnecessary name-prefix spec.
771 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
772 * cpu/ip2k.cpu (register-names): Ditto.
773 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
774 * cpu/sparc.cpu (gr-names): Ditto.
775 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
776 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
777 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
778 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
779 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
780 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
781 prefix -> name-prefix.
782 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
783 Update, print-name -> enum-prefix, make uppercase.
784 (drc-names, xf-names): Ditto.
785 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
786 * doc/rtl.texi (Keywords): New section.
787 (hardware indices): Update text.
788 (rtl versions): Add 0.8.
790 Add define-rtl-version.
791 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
792 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
793 (cgen-lang-fixlevel): Delete.
794 (-supported-rtl-versions): New variable.
795 (-cmd-define-rtl-version): New function.
796 (init-reader!): New command define-rtl-version.
797 (-cgen): Add rtl version to --version output.
798 * doc/rtl.texi: Document rtl version support.
799 * cpu/play.cpu: Add define-rtl-version.
801 2009-08-22 Doug Evans <dje@sebabeach.org>
803 * Makefile.am (OPTIONS): Define.
804 (desc): Just generate <arch>-desc.[ch] files.
805 * Makefile.in: Regenerate.
806 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
808 (cgen-desc.c): Similarly.
809 * gen-all-desc: New file.
810 * opcodes.scm (opc-file-provided?): New function.
812 * mach.scm (current-*-add!): Update calls to parse-error.
813 * operand.scm (op:new-mode): Update call to parse-error.
814 * utils-cgen.scm (make-obj-context): New function.
816 * NEWS: Copy over entries from 1.1 branch.
818 2009-08-20 Doug Evans <dje@sebabeach.org>
820 * gas-test.scm (<keyword> test-data): Catch invalid requests,
821 flag a warning and compensate.
822 (<hw-address test-data): Tweak for readability.
823 (<hw-iaddress test-data): Ditto.
824 (cgen-build.sh): Convert symbols to strings before passing to
826 (cgen-allinsn.exp): Ditto.
828 * doc/pmacros.texi (.splice): Add more text.
830 2009-08-19 Doug Evans <dje@sebabeach.org>
832 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
833 distinguish from 1.1.
834 * configure: Regenerate.
835 * read.scm (-CGEN-VERSION): Update.
836 * doc/version.texi: Update.
838 New builtin .pmacro?.
839 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
840 (pmacros-init!): Add .pmacro?.
841 * doc/pmacros.text: Document .pmacro?.
842 * testsuite/pmacros-1.test: Test .pmacro?.
844 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
845 of a pmacro begins before its arguments are evaluated, improves
848 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
849 * testsuite/pmacros-1.test: Ditto. Add better tests.
851 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
853 (Operands): Similarly.
855 2009-08-18 Doug Evans <dje@sebabeach.org>
857 * ifield.scm (ifld-encode-mode): Add FIXME.
858 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
860 (<ifield> gen-extract): Similarly.
862 * read.scm (parse-error): Handle #f for context-location.
863 * utils-cgen.scm (unspecified-location): Fix building of
866 * doc/rtl.texi: Document how to write hex and boolean values.
868 * gas-test.scm (<hw-asm> test-data): Handle () values.
869 (<keyword> test-data): Convert symbols to strings before passing
871 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
874 * operand.scm (hw-index-scalar): Set `name'.
875 (hw-index-anyof, hw-index-derived): Ditto.
877 2009-08-17 Doug Evans <dje@sebabeach.org>
879 * pmacros.scm (-pmacro-builtin-internal-test): New function.
880 (pmacros-init!): Add .internal-test.
881 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
882 * testsuite/testsuite.cpu (internal-verify): New pmacro.
883 * doc/pmacros.text: Document .internal-test.
885 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
886 (parse-comment): Allow numbers.
887 * doc/porting.texi: Document that names and comments may be lists.
889 * insn.scm (-insn-parse): Fix typo.
891 Rename .eval -> .exec. Add new .eval.
892 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
893 (-pmacro-builtin-eval): New function.
894 (pmacros-init!): Add .exec.
895 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
896 * testsuite/location-1.test: Update.
897 * testsuite/pmacros-1.test: Add test for .eval.
899 2009-08-16 Doug Evans <dje@sebabeach.org>
901 * doc/porting.texi: Remove support for Guile 1.4.
903 * read.scm (current-reader-location): Return unspecified location
904 if reader hasn't been initialized yet.
906 2009-08-13 Doug Evans <dje@sebabeach.org>
908 * dev.scm: Document tracing options.
910 * pmacros.scm (pmacro-dump): New function.
911 (check-pmacro): Tweak debugging output.
912 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
913 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
915 Add .let* pmacro builtin.
916 * pmacros.scm (-pmacro-builtin-let*): New function.
917 (pmacros-init!): Add .let*.
918 * doc/pmacros.texi: Document .let*.
919 * testsuite/pmacros-1.test: Test .let*.
921 2009-08-12 Doug Evans <dje@sebabeach.org>
923 Clean up cpu file parsing, pass context consistently instead of the
924 old "errtxt" argument.
925 NOTE: ACU == "All Callers Updated".
926 * attr.scm (-parse-simple-attribute): Renamed from
927 parse-simple-attribute, ACU.
928 (-attr-parse): Change errtxt argument to context, ACU.
930 (atlist-parse): Ditto. Put context arg first.
931 (attr-parse): Use parse-error instead of context-error.
932 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
933 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
934 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
935 `context' arg is now a <context> object. ACU.
936 (-keyword-read): `context' arg is now a <context> object. ACU.
937 (-hw-parse-indices): Change errtxt argument to context, ACU.
938 (-hw-parse-values, -hw-parse-handlers): Ditto.
939 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
940 (-hw-validate-layout, -hw-create-getter-from-layout,
941 -hw-create-setter-from-layout): Ditto.
942 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
943 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
944 (<hw-address>:parse!): Ditto.
945 * ifield.scm (-ifield-parse, ifield-read): Ditto.
946 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
947 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
948 (-multi-ifield-parse, -multi-ifield-read): Ditto.
949 * insn.scm (-insn-parse, -insn-read): Ditto.
950 (parse-syntax): Ditto. Put context arg first.
951 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
952 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
953 (-parse-insn-format): Ditto.
954 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
955 (-arch-parse-isas): Ditto.
956 (-isa-read): Add context arg, ACU.
957 (-cpu-parse, -cpu-read, -mach-read): Ditto.
958 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
960 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
961 (minsn-make-alias): Ditto.
962 * mode.scm (-mode-parse): Ditto.
963 (parse-mode-name): Ditto. Put context arg first.
964 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
965 errtxt argument to context, ACU.
966 (-unit-parse, -model-parse, -model-read): Ditto.
967 * operand.scm (-operand-parse-getter): Use parse-error instead of
969 (-operand-parse-setter): Ditto.
970 (-operand-parse): Change errtxt argument to context, ACU.
971 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
972 (-anyof-operand-parse, -anyof-operand-read): Ditto.
973 * read.scm (reader-error): Delete. Use parse-error instead.
974 (parse-error): Change errtxt argument to context, ACU. Split args
975 argument into expr and maybe-help-text.
976 (-reader-process-expanded-1!): Reorganize.
977 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
978 * types.scm (parse-type): Ditto.
979 * utils-cgen.scm (single-location->simple-string): New function.
980 (<context>): Replace members file,lineno with location.
981 (make-prefix-context): Renamed from context-make-prefix, ACU.
982 (make-current-context): New function.
983 (context-append, context-append-name): New functions.
984 (context-make-reader): Delete.
985 (parse-name): Change errtxt argument to context, ACU.
986 Put context arg first.
987 (parse-comment): Ditto.
988 (parse-number): Change errtxt argument to context, ACU.
989 (arg-list-validate-name, arg-list-check-no-args,
990 arg-list-symbol-arg): Ditto.
992 * read.scm (-cmd-if): Don't assume test is a list.
994 * html.scm (get-insn-properties): Delete errtxt, unused.
996 2009-08-11 Doug Evans <dje@sebabeach.org>
998 * doc/rtl.texi (hardware types): Add pc.
1000 2009-08-07 Doug Evans <dje@sebabeach.org>
1002 Add -t option for tracing things like commands, pmacro expansion.
1003 * dev.scm (cload): New arg #:trace.
1004 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1005 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
1006 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1007 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1008 (-reader-process-expanded-1!): Trace commands if requested.
1009 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1010 (-set-trace-options!): New function.
1011 (-init-reader!): New function.
1012 (cpu-load): New arg trace-options, all callers updated.
1013 Call -init-reader! and -set-trace-options!.
1014 (cgen-usage): Improve output formatting.
1015 (common-arguments): New option -t.
1016 (-cgen): Process -t.
1017 * utils-cgen.scm (single-location->string): Renamed from
1018 pretty-print-single-location. All callers updated.
1019 (location->string): Renamed from pretty-print-location.
1020 All callers updated.
1021 (source-properties-location->string): New function.
1022 * doc/running.texi: Document -t.
1024 2009-08-06 Doug Evans <dje@sebabeach.org>
1026 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1027 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1028 * utils.scm: ... here.
1030 2009-08-05 Doug Evans <dje@sebabeach.org>
1032 Track source location better, for better error messages.
1033 * pmacros.scm (-pmacro-eval): Delete, unused.
1034 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1035 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1036 (scan-list, scan): Ditto.
1037 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1038 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1039 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1040 (scan-list1): New function.
1041 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
1042 * read.scm (<reader>): New member `location'.
1043 (-reader-lookup-command): Renamed from reader-lookup-command,
1044 all callers updated.
1045 (reader-error): Rewrite to produce better source location info.
1046 (current-reader-location): New function.
1047 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1048 All callers updated. Record source location of expression.
1049 (reader-process-expanded!): Renamed from reader-process-expanded.
1050 All callers updated.
1051 (-reader-process!): Renamed from reader-process. New arg `loc'.
1052 All callers updated. Record source location of define-pmacro.
1053 * utils-cgen.scm (<location>): New class.
1054 (single-location): New (pseudo) class.
1055 (pretty-print-single-location, pretty-print-location): New functions.
1056 (location-top, location-push-single, location-push): New functions.
1057 (unspecified-location, current-input-location): New functions.
1058 (location-property): New object property.
1059 (location-property-set!): New function.
1060 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
1062 * testsuite/location-1.test: New testcase.
1063 * testsuite/run-tests.sh: Fix fail count handling.
1064 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
1065 to expect cgen to fail.
1067 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1069 * read.scm (-cmd-include): Renamed from include. All callers updated.
1070 (-cmd-if): Renamed from cmd-if. All callers updated.
1071 Use reader-process-expanded! on then/else clauses instead of eval1.
1073 2009-07-22 Doug Evans <dje@sebabeach.org>
1075 * modes.scm (TI,OI): New modes.
1076 * types.scm (parse-type): Improve error checking. Don't hardwire
1078 * utils.scm (non-negative-integer?): New function.
1080 * pmacros.scm (-pmacro-builtin-find): New predicate.
1081 (pmacros-init!): Add .find.
1082 * doc/pmacros.tex: Document .find.
1083 * testsuite/pmacros-1.test: Test .find.
1085 2009-07-20 Doug Evans <dje@sebabeach.org>
1087 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1088 commented out printfs.
1089 * rtl.scm (rtl-finish!): Whitespace tweaks.
1090 * model.scm (parse-insn-timing): Tweak logging message.
1091 * operand.scm: Comment and whitespace tweaks.
1092 (op:type): Tweak error message.
1093 (op-ifield): Tweak logging message.
1094 (-derived-operand-parse, anyof-merge-semantics): Ditto.
1095 * read.scm: Whitespace cleanup.
1096 * utils.scm: Whitespace cleanup.
1098 2009-07-19 Doug Evans <dje@sebabeach.org>
1100 Fix binding of nested pmacro parameters.
1101 * pmacros.scm (-pmacro-env-make): New arg prev-env.
1102 All callers updated.
1103 (-pmacro-bulid-lambda): Ditto.
1104 * doc/pmacros.texi: Update.
1105 * testsuite/pmacros-1.test: Add testcase.
1107 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1109 (-multi-ifield-make-default-extract): Ditto.
1111 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1112 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1113 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1115 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1116 * doc/rtl.texi: Update.
1118 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1120 Rename builtin boolean pmacros, for consistency with rtl.
1121 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1122 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1123 * doc/pmacros.texi: Update.
1124 * testsuite/pmacros-1.test: Update.
1126 2009-07-17 Doug Evans <dje@sebabeach.org>
1128 Use hash tables to record ifields, operands, insns, macro-insns.
1129 * attr.scm (attr-builtin!): Tweak some comments.
1130 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1131 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1133 (<multi-ifield>): New constructor.
1134 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1135 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1137 (-sub-insn-make!): Add hack to avoid differences in generated code.
1138 (multi-insn-instantiate!): Add total number of multi-insns to
1140 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1141 minsn-list to foo-table. New member next-ordinal.
1142 Update getters/setters.
1143 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1145 (-get-next-ordinal!, -get-lowest-ordinal): New function.
1146 (-make-ident-object-table, -ident-object-table->list,
1147 -ident-object-table-add!, -ident-object-table-lookup): New functions.
1148 (current-ifld-list, current-ifld-add! current-ifld-lookup,
1149 -ifld-already-defined?): Rewrite.
1150 (current-op-list, current-op-add! current-op-lookup,
1151 -op-already-defined?): Rewrite.
1152 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1153 (current-insn-list, current-insn-add! current-insn-lookup,
1154 -insn-already-defined?): Rewrite.
1155 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1156 -minsn-already-defined?): Rewrite.
1157 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1158 (MAX-VIRTUAL-INSNS): Define.
1159 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1160 Update use of arch-insn-list.
1161 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1162 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1164 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1165 <ident>. New constructor.
1166 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1168 * sid.scm (-virtual-insn-add!): New function.
1169 (-create-virtual-insns!): Call it.
1170 (-fill-sim-insn-list!): Rewrite.
1171 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1172 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1173 * utils-cgen.scm (<ordered-ident>): New class.
1174 (obj-ordinal, obj-set-ordinal!): New functions.
1175 (add-ident-methods!): Delete.
1177 * model.scm (parse-insn-timing): Change logging message to level 3.
1179 2009-07-16 Doug Evans <dje@sebabeach.org>
1181 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1182 add a link to define-normal-insn-enum.
1184 * doc/porting.texi (Conventions): Add docs on writing integers.
1186 * cpu/simplify.inc (*): One line doc strings don't need \n.
1187 (df): Invoke define-full-ifield instead of claiming it's an alias.
1189 (dnop): Mark as deprecated.
1191 * cpu/play.cpu: Add example of hardware `layout'.
1192 * doc/porting.tex: Add docs on simplify.inc.
1193 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1196 * ifield.scm: Whitespace/formatting cleanup.
1198 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1200 * read.scm (parse-error): Don't print single entry args as a list.
1201 (-reader-process-expanded-1): Convert symbol to string for
1204 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1206 2009-07-15 Doug Evans <dje@sebabeach.org>
1208 * cpu/simplify.inc (dno): New pmacro.
1209 * doc/porting.texi: Add section on simplify.inc.
1210 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1212 2009-07-15 Doug Evans <devans@sourceware.org>
1214 * gen-all-doc: Generate index.html.
1216 2009-07-13 Doug Evans <dje@sebabeach.org>
1218 Extend pmacro language, add testsuite.
1219 * Makefile.am (SUBDIRS): Add testsuite.
1220 * Makefile.in: Regenerate.
1221 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1222 testsuite/test-utils.sh.
1223 * configure: Regenerate.
1224 * dev.scm (cload): Handle testsuite app.
1225 (load-testsuite): New function.
1226 * pmacros.scm: (-pmacro-debug?): New global.
1227 (-smacro-table): New global.
1228 (-smacro-lookup, -smacro-set!): New functions.
1229 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1230 (-pmacro-syntactic-form?): New function.
1231 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1232 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1233 (-pmacro-expected-non-negative-integer): New function.
1234 (-pmacro-verify-non-negative-integer): New function.
1235 (-pmacro-expand-expr-list): New function.
1236 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1237 (-pmacro-process-args): Renamed from -pmacro-invoke.
1238 (-pmacro-apply, -smacro-apply): New functions.
1239 (-pmacro-expand): Rewrite syntactic form processing.
1240 (-pmacro-build-lambda): Reformat.
1241 (define-pmacro): Watch for more errors in definition.
1242 (pmacro-debug): New function.
1243 (pmacro-trace): Set/reset -pmacro-debug?.
1244 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1245 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1246 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1247 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1248 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1249 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1250 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1251 (pmacros-init!): Initialize -smacro-table.
1252 Rewrite pmacro initialization.
1253 * read.scm (reader-process-expanded): Renamed from
1254 -reader-process-expanded. All callers updated.
1255 Recognize () as a no-op.
1256 (cpu-load): Tweak logging messages.
1257 * utils.scm (message): Add comment.
1258 * cpu/play.cpu: Add some instructions to play with .let.
1259 * doc/cgenint.texi: Move some debugging related docs to here from
1261 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1262 * testsuite/Makefile.am: New file.
1263 * testsuite/Makefile.in: New file.
1264 * testsuite/test-utils.sh.in: New file.
1265 * testsuite/run-tests.sh: New file.
1266 * testsuite/testsuite.cpu: New file.
1267 * testsuite/pmacros-1.test: New file.
1269 * decode.scm: Comment and formatting tweaks.
1270 (-build-decode-table-guts): Add more data to logging message.
1272 2009-07-12 Doug Evans <dje@sebabeach.org>
1274 Delete files that now live in ../cpu.
1275 * cpu/iq10.cpu: Delete.
1276 * cpu/iq2000.cpu: Delete.
1277 * cpu/iq2000.opc: Delete.
1278 * cpu/iq2000m.cpu: Delete.
1279 * cpu/m32r.cpu: Delete.
1280 * cpu/m32r.opc: Delete.
1282 2009-07-09 Doug Evans <dje@sebabeach.org>
1284 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1285 All callers updated. Work around -ve shifts by referencing the
1288 * utils.scm (message): Handle pairs.
1290 2009-07-08 DJ Delorie <dj@redhat.com>
1292 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1293 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1294 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1297 2009-07-07 Doug Evans <dje@sebabeach.org>
1299 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1300 * cpu/play.opc: New file.
1302 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1303 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1304 * doc/rtl.texi (Instructions): Update.
1306 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1307 (opc-arguments, -OPC): Call set-opc-file-path!.
1308 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1309 (set-opc-file-path!): New function.
1310 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1312 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1313 before passing to gen-c-args.
1315 2009-07-06 DJ Delorie <dj@redhat.com>
1317 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1318 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1319 unspecified accesses to control registers.
1321 2009-07-01 DJ Delorie <dj@redhat.com>
1323 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1324 unspecified accesses to control registers.
1326 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1327 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1329 2009-06-27 Doug Evans <dje@sebabeach.org>
1331 * gen-all-intrinsics: New file.
1333 2009-06-24 Doug Evans <dje@sebabeach.org>
1335 * All *.scm files: Update copyright year.
1336 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1338 2009-06-23 DJ Delorie <dj@redhat.com>
1340 * intrinsics.scm: Updates to support IVC2.
1341 (belongs-to-group?): Check IVC2 slots.
1342 (-slots-attribute): New.
1343 (targets::attributes): Add SLOTS.
1344 (target:add-well-known-intrinsics): Add CPMOV.
1345 (md-insn): Add CPTYPE and CRET?.
1346 (add-md-insn): Likewise.
1347 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1348 duplicate insns with different bit patterns.
1349 (write-cgen-insn?): Add cret? support.
1350 (intrinsics.h): Add vector types.
1351 (runtime-op): Add vector support.
1352 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1354 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1355 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1356 (h-cr-ivc2): Default to typeless.
1357 (h-ccr-ivc2): Fix register width.
1358 (SLOTS): Fix values and default.
1359 (ivc2_*): Add control register names.
1360 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1362 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1363 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1365 2009-06-22 Doug Evans <dje@sebabeach.org>
1367 * semantics.scm (insn-build-known-values): Fix typo in comment.
1369 2009-06-21 Doug Evans <dje@sebabeach.org>
1371 * rtl-xform.scm (rtx-simplify-insn): New function.
1372 * html.scm (gen-insn-docs): Call it.
1373 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1374 * iformat.scm (ifmt-analyze): Minor simplification.
1376 * semantics.scm (semantic-compile): Change arg sem-code-list to
1378 (semantic-attrs): Ditto.
1379 * iformat.scm (ifmt-analyze): Update.
1380 (ifmt-compute!): Update.
1381 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1383 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1384 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1385 * semantics.scm (rtx-simplify): Ditto.
1386 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1387 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1388 (-simplify-expr-fn): Move to rtl-xform.scm.
1389 (-solve-expr-fn, rtx-solve): Ditto.
1390 * rtl-xform.c: New file.
1391 * read.scm: Load it.
1393 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1394 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1395 (-rtx-traverse, rtx-traverse): Ditto.
1397 2009-06-20 Doug Evans <dje@sebabeach.org>
1399 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1401 * configure.in: Update version to 1.1.
1402 * configure: Regenerate.
1403 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1405 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1406 Doug Evans <dje@sebabeach.org>
1408 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1409 (cgen-desc.c): Ditto.
1410 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1411 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1412 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1413 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1414 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1415 (cgen-cpuall.h, cgen-ops.c): Ditto.
1416 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1417 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1418 (cgen-sem-switch.c): Ditto.
1419 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1420 * sim-model.c (cgen-model.c): Ditto.
1422 2009-06-18 Doug Evans <dje@sebabeach.org>
1424 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1426 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1428 * dev.scm (cload): Change #:arch argument to take the path to the
1429 .cpu file instead of just the name of the architecture.
1430 * read.scm (arch-path): Remove trailing '/'.
1431 (cpu-load): Set `arch-path' to directory of .cpu file.
1432 (-cgen): Don't set `arch-path' here.
1434 * doc/porting.texi: Update.
1436 2009-06-14 Doug Evans <dje@sebabeach.org>
1438 * gen-all-doc: Use files in ../cpu where possible.
1440 * Makefile.am (ARCHFILE): Fix path.
1441 * Makefile.in: Regenerate.
1442 * html.scm: Use "pre" instead of "plaintext".
1444 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1445 * doc/app.texi: Cleanup pass.
1446 * doc/cgen.texi: Cleanup pass.
1447 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1448 * doc/intro.texi: Cleanup pass.
1449 * doc/mdate-sh: New file.
1450 * doc/opcodes.texi: Cleanup pass.
1451 * doc/pmacros.texi: Cleanup pass.
1452 * doc/porting.texi: Cleanup pass.
1453 * doc/rtl.texi: Cleanup pass.
1454 * doc/running.texi: Cleanup pass. Document more runtime options.
1455 * doc/stamp-vti: Update.
1456 * doc/version.texi: Update.
1458 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1459 (GUILE): Fix definition.
1460 * Makefile.in: Regenerate with automake 1.9.6.
1461 * aclocal.m4: Regenerate with aclocal 1.9.6.
1462 * configure.in (AC_PREREQ): Set to 2.59.
1463 (GENINSRC_NEVER): Define.
1464 * configure: Regenerate with autoconf 2.59.
1465 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1466 (cgen.info,cgen.dvi): Delete.
1467 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1468 (noinst_TEXINFOS): Add cgenint.texi.
1469 (DOCFILES): Add missing files.
1470 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1471 * doc/Makefile.in: Regenerate with automake 1.9.6.
1473 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1475 * attr.scm: Removing trailing whitespace.
1476 * cgen-intrinsics.scm: Ditto.
1477 * cgen-sim.scm: Ditto.
1483 2009-05-28 DJ Delorie <dj@redhat.com>
1485 * cpu/mep.opc (parse_signed16_range): New.
1486 (parse_unsigned16_range): New.
1487 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1489 2009-05-26 DJ Delorie <dj@redhat.com>
1491 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1493 (f-ivc2-ccrn-c3hi): New.
1494 (f-ivc2-ccrn-c3lo): New.
1495 (f-ivc2-ccrn-c3): New.
1496 (ivc2c3ccrn): Use it.
1498 2009-05-22 DJ Delorie <dj@redhat.com>
1500 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1501 (mep_config_map): Regenerate.
1503 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1504 ivc2-specific names.
1506 (cmovc): move to after field definitions, use ivc2-specific
1508 (cpmovi_b_P0S_P1): New.
1510 2009-05-19 DJ Delorie <dj@redhat.com>
1512 * cpu/mep.opc: Regenerate configuration.
1513 (parse_cdisp10): Only check CPU flags, not COP flags.
1514 (check_configured_mach): Likewise.
1516 2009-05-13 DJ Delorie <dj@redhat.com>
1518 * intrinsics.scm (insns.md): Add RTL predicates.
1519 (intrinsics.h): Remove old C intrinsics.
1521 2009-04-29 DJ Delorie <dj@redhat.com>
1523 * mep-ivc2.cpu: New.
1524 * mep-core.cpu: Regenerated. Add support for deferred register
1526 (SLOT): Add IVC2 slot types.
1527 (sim-syscall): Rename to something more appropriate.
1528 * mep-ext-cop.cpu: Regenerate.
1529 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1530 (print_slot_insn): New.
1531 (mep_examine_ivc2_insns): New.
1532 (mep_print_insn_set_ivc2_mode): New.
1533 (mep_print_insn): Support IVC2 slotting.
1535 2009-04-20 DJ Delorie <dj@redhat.com>
1537 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1538 (guess-mode): Drop COP* syntax.
1539 (need-insn): Add "--syscall--" to the list.
1540 (enum-type): Drop COP* syntax.
1541 (intrinsics.h): Likewise.
1542 (intrinsic-protos.h): Change file header to allow it to be
1545 2009-04-17 DJ Delorie <dj@redhat.com>
1547 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1548 (lhucpm1): Limit to C5 mach.
1549 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1550 * cpu/mep-core.cpu (extend-cdisp10): New.
1551 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1553 2009-04-08 DJ Delorie <dj@redhat.com>
1555 * cpu/mep-c5.cpu: New.
1556 * cpu/mep-core.cpu: Add C5 support.
1557 * cpu/mep.opc: Likewise.
1559 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1561 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1562 about calling memset with a zero length.
1564 2009-02-03 DJ Delorie <dj@redhat.com>
1566 * cpu/mep-core.cpu: Update to new MeP configuration.
1567 * cpu/mep-ext-cop.cpu: Likewise.
1568 * cpu/mep.opc: Likewise.
1570 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1572 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1574 2008-06-17 Dave Brolley <brolley@redhat.com>
1576 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1579 2007-11-13 Dave Brolley <brolley@redhat.com>
1581 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1583 2007-11-05 Dave Brolley <brolley@redhat.com>
1585 * intrinsics.scm,cgen-intrinsics.scm: New application which
1586 generates code to support intrinsic functions for insns in the
1587 mep architecture in gcc.
1589 2007-09-21 Dave Brolley <brolley@redhat.com>
1591 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1592 (rn3us): CDATA attribute now LONG.
1594 2007-08-21 Dave Brolley <brolley@redhat.com>
1596 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1599 2007-07-05 Nick Clifton <nickc@redhat.com>
1601 * utils.scm (copyright-fsf): Update copyright notice to refer to
1604 2007-05-22 Nick Clifton <nickc@redhat.com>
1606 * doc/cgen.texi: Use @copying around the copyright notice.
1607 * doc/internals.texi: Likewise.
1609 2007-02-05 Dave Brolley <brolley@redhat.com>
1611 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1613 2007-02-05 Dave Brolley <brolley@redhat.com>
1615 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1616 in the generated code for @arch@_cgen_init_asm if it is defined.
1618 * Contribute the following changes:
1619 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1621 * attr.scm (<string-attribute>): New attribute class.
1622 (attr-kind): Handle <string-attribute>.
1623 (parse-simple-attribute): New function.
1624 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1625 (<bitset-attribute> 'parse-value): Likewise.
1626 (<boolean-attribute> 'parse-value): Likewise.
1627 (<enum-attribute> 'parse-value): Likewise.
1628 (<string-attribute> 'parse-value): New function.
1629 (-attr-parse): Handle <string-attribute>.
1630 (-attr-read): Likewise.
1631 (<string-attribute> 'gen-value-for-defn-raw): New function.
1632 (<string-attribute> 'gen-value-for-defn): New function.
1634 2006-11-07 Dave Brolley <brolley@redhat.com>
1636 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1639 2006-10-18 Dave Brolley <brolley@redhat.com>
1641 * Contribute the following changes:
1643 2006-07-11 Dave Brolley <brolley@redhat.com>
1645 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1647 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1648 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1649 hardware or memory mode which was used.
1650 * sid-cpu.scm (hw-need-write-stack?): New function.
1651 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1652 identify hardware which uses write stacks.
1653 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1654 Initialized to an empty list.
1655 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1656 hw-need-write-stack?.
1657 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1658 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1659 (used-in-delay-rtl?): New method of <hardware-base>.
1660 (hw-used-in-delay-rtl?): New function.
1662 2006-06-20 Dave Brolley <brolley@redhat.com>
1664 * sid.scm (gen-attr-type): Removed.
1665 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1666 (SH2a-MACH): Add sh5.
1667 (sh2a-nofpu-models): Add units for sh5.
1668 (sh2a-fpu-models): Likewise.
1670 2006-06-15 Dave Brolley <brolley@redhat.com>
1672 * cpu/sh-sim.cpu: New file.
1673 * cpu/sh-sid.cpu: New file.
1674 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1675 (All fields): Remap for (insn-lsb0? #f)
1676 (All insns): Add timing specs.
1677 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1678 'xattrs' and .splice it in.
1679 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1680 (h-frc,h-drc): Add PROFILE attribute.
1682 (h-vbr): New hardware.
1683 (All fields): Remap for (insn-lsb0? #f)
1684 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1685 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1686 (fpscr): Use h-fpscr.
1687 (fsdm,fsdn): Use h-fsd.
1688 (dshci): Add xtiming argument and splice it in.
1689 (dr,xd): pmacros removed.
1690 (All insns): Add timing specs, *-MACH attribibutes,
1691 SH4{A}-GROUP attributes.
1692 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1693 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1694 we're being processed for sim or sid.
1695 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1696 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1697 (define-isa compact): Add (isa-parallel-insns 2).
1698 (define-isa media): Add (isa-parallel-insns 2). Add
1699 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1700 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1702 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1703 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1704 (SH4al-MACH, SH5-MACH): New pmacros.
1705 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1706 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1707 (sh5-media-fp-units, common-model, common-model-with-fp)
1708 (sh3-model, sh3e-model): New pmacros.
1709 (define-model sh2): New model.
1710 (define-model sh2e): New model.
1711 (define-model sh3): New model.
1712 (define-model sh3e): New model.
1713 (define-model sh2a-nofpu): New model.
1714 (define-model sh2a-fpu): New model.
1715 (define-model sh4-nofpu): New model.
1716 (define-model sh4): New model.
1717 (define-model sh4a-nofpu): New model.
1718 (define-model sh4a): New model.
1719 (define-model sh4al): New model.
1720 (define-model sh5-media): New model.
1721 (define-model sh5): Add all units.
1722 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1723 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1724 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1725 (h-pc): Add PROFILE attribute.
1728 (h-gr,h-grc): Likewise.
1729 (h-cr): Set h-sr in setter.
1730 (h-frbit): Get/Set h-fpscr.
1731 (h-szbit,h-prbit): Likewise.
1732 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1733 Add getter and setter.
1734 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1735 Adjust getter and setter.
1736 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1737 Adjust getter and setter.
1738 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1739 (h-fsd,h-fmov): New hardware.
1741 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1743 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1744 doc/notes.texi, doc/porting.texi, doc/running.texi,
1745 doc/sim.texi: Fix some typos.
1747 2006-07-14 Dave Brolley <brolley@redhat.com>
1749 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1750 hardware or memory mode which was used.
1751 * sid-cpu.scm (hw-need-write-stack?): New function.
1752 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1753 identify hardware which uses write stacks.
1754 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1755 Initialized to an empty list.
1756 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1757 hw-need-write-stack?.
1758 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1759 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1760 (used-in-delay-rtl?): New method of <hardware-base>.
1761 (hw-used-in-delay-rtl?): New function.
1763 2006-06-20 Dave Brolley <brolley@redhat.com>
1765 * sid.scm (gen-attr-type): Removed.
1767 2006-05-10 Dave Brolley <brolley@redhat.com>
1769 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1770 support for (if (application-is? <appname>) (...) (...)).
1771 (-cgen): Add trailing "/" to arch-path.
1772 * utils.scm (dirname): Removed. dirname is a primitive function.
1774 2006-05-09 Dave Brolley <brolley@redhat.com>
1776 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1777 'entire_insn' not 'base_insn'.
1778 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1780 * sim.scm (-gen-arch-model-decls): Likewise.
1781 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1782 abuf->written if profiling.
1783 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1784 object->string om the mode.
1785 (-hw-gen-write-stack-decl): Likewise.
1786 * read.scm (include): Use arch-path as file location.
1787 (arch-path): Define it with a default setting.
1788 (-cgen): Update arch-path when "-a" option is specified.
1789 * utils.scm (dirname): New function.
1791 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1793 * configure.in: Remove AC_ARG_PROGRAM.
1794 * configure: Regenerate with autoconf 2.59.
1796 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1798 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1801 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1803 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1804 or an error message otherwise.
1805 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1806 Fix up comments to correctly describe the functions.
1808 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1809 Anil Paranjape <anilp1@kpitcummins.com>
1810 Shilin Shakti <shilins@kpitcummins.com>
1812 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1814 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1816 2006-02-10 Nick Clifton <nickc@redhat.com>
1818 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1820 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1822 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1824 (-hw-gen-write-stack-decl): Likewise.
1826 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1828 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1829 non-(adata-integral-insn? CURRENT-ARCH) case.
1831 2005-10-28 Dave Brolley <brolley@redhat.com>
1833 Contribute the following changes:
1834 2005-09-19 Dave Brolley <brolley@redhat.com>
1836 * attr.scm (gen-value-for-defn-raw): New methods.
1837 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1838 gen-value-for-defn-raw.
1839 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1841 2002-12-13 Dave Brolley <brolley@redhat.com>
1843 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1844 (-gen-attr-accessors): New function.
1845 (gen-obj-attr-defn): Update terminating initializer.
1846 (gen-obj-attr-end-defn): New function.
1847 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1848 * sid-cpu.scm (cgen-desc.h): Generate code to include
1849 "opcode/cgen-bitset.h"
1850 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1852 * desc.scm ('gen-defn): Update terminating initializer.
1853 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1854 terminatinig initializer.
1855 (gen-hw-decls): Ditto.
1856 (gen-operand-decls): Ditto.
1857 (gen-insn-decls): Ditto.
1858 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1859 (gen-insn-table): Update terminating initializer.
1860 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1861 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1862 * attr.scm (charmask-bytes): New function.
1863 (bitset-attr->charmask): New function.
1864 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1865 differences for SID-SIMULATOR.
1866 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1867 (<enum-attribute>): Ditto.
1869 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1871 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1873 2005-10-24 DJ Delorie <dj@redhat.com>
1875 * operand.scm (-anyof-merge-syntax): Print a more useful error
1878 2005-10-19 Nick Clifton <nickc@redhat.com>
1880 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1883 2005-10-18 Andreas Schwab <schwab@suse.de>
1885 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1887 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1889 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1892 2005-08-02 Dave Brolley <brolley@redhat.com>
1894 * rtl-c.scm (s-unop): Don't dereference
1895 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1896 (s-binop, s-convop, s-cmpop): Likewise.
1898 2005-07-29 Dave Brolley <brolley@redhat.com>
1900 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1901 if with-profile or with-parallel-write.
1902 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1903 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1906 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1908 * cpu/fr30.opc (print_register_list): Correct format strings.
1909 * cpu/ip2k.opc: Likewise.
1911 2005-07-05 Nick Clifton <nickc@redhat.com>
1913 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1914 unsigned in order to avoid compile time warnings about sign
1917 2005-07-01 Nick Clifton <nickc@redhat.com>
1919 * desc-cpu.scm: Update to ISO C90 function declaration style.
1920 * opc-asmdis.scm: Likewise.
1921 * opc-ibld.scm: Likewise.
1922 * opc-itab.scm: Likewise.
1923 * cpu/fr30.opc: Likewise.
1924 * cpu/i960.opc: Likewise.
1925 * cpu/ip2k.opc: Likewise.
1926 * cpu/iq2000.opc: Likewise.
1927 * cpu/m32r.opc: Likewise.
1928 * cpu/openrisc.opc: Likewise.
1929 * cpu/sh.opc: Likewise.
1930 * cpu/sparc.opc: Likewise.
1931 * cpu/xstormy16.opc: Likewise.
1933 2005-06-15 Dave Brolley <brolley@redhat.com>
1935 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1936 (cgen-cpu.h): Call it.
1938 Contributed on behalf of Graydon Hoare
1939 2001-06-05 graydon hoare <graydon@redhat.com>
1941 * utils.scm (foldl): Define.
1945 (intersection): Simplify.
1946 * sid.scm : Set APPLICATION to SID-SIMULATOR.
1947 (-op-gen-delayed-set-maybe-trace): Define.
1948 (<operand> 'gen-set-{quiet,trace}): Delegate to
1949 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1950 up and needs cleaning.
1951 (-with-parallel?): Hardwire with-parallel to #t.
1952 (<operand> 'cxmake-get): Replace with lookahead-aware code
1953 * sid-decode.scm: Remove per-insn writeback fns.
1954 (-gen-idesc-decls): Redefine sem_fn type.
1955 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1956 with write stack stuff.
1957 (cgen-write.cxx): Replace per-insn writebacks with single write
1958 stack writeback. Add write stack reset function.
1959 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1961 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1962 estate attribute set.
1963 (delay): Set #:delayed attribute to calculated delay, update
1964 maximum delay of cpu, check (delay ...) usage.
1965 * operand.scm (<operand>): Add delayed slot to <operand>.
1966 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1967 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1968 * doc/rtl.texi (Expressions): Add section on (delay ...).
1970 2005-06-13 Jim Blandy <jimb@redhat.com>
1972 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1975 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1977 * doc/porting.texi: Change all mention of md_apply_fix3 and
1978 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1981 2005-05-18 Dave Brolley <brolley@redhat.com>
1983 * utils-sim.scm (-gen-decode-default-entry): New function.
1984 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1985 code to check that all opcodes bits match.
1986 (-gen-decoder-switch): Use -gen-decode-default-entry.
1988 2005-05-16 Jim Blandy <jimb@redhat.com>
1990 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1991 fetched by one of our GETIMEM* methods.
1992 * utils-gen.scm (-extract-chunk-specs): Always fetch full
1993 base-insn-sized chunks.
1995 2005-05-10 Nick Clifton <nickc@redhat.com>
1997 * Update the address and phone number of the FSF organization in
1998 the GPL notices in the following files:
1999 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2000 cpu/powerpc.cpu, slib/random.scm
2002 2005-05-06 Jim Blandy <jimb@redhat.com>
2004 * pprint.scm, cos-pprint.scm: Add documentation.
2006 * pprint.scm (pprint): Don't wipe out elide-table after each call.
2008 * pprint.scm, cos-pprint.scm: New files.
2010 2005-04-04 Nick Clifton <nickc@redhat.com>
2012 * opcodes.scm (-gen-parse-address): Initialise value to zero to
2013 avoid a compile time warning.
2015 2005-03-18 Nick Clifton <nickc@redhat.com>
2017 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2018 "percent-operand" from "%operand" as the latter confuses xgettext
2019 into thinking that it is a C printf formating directive, which
2020 prevents proper translation.
2022 2005-02-23 Nick Clifton <nickc@redhat.com>
2024 * opcodes.scm (gen-parse-number): Add a cast to the desired
2025 pointer signed'ness in order to prevent compile time warnings.
2026 * cpu/ip2k.opc: Fixed compile time warnings about differing
2027 signed'ness of pointers passed to functions.
2028 * cpu/iq2000.opc: Likewise.
2029 * cpu/m32r.opc: Likewise.
2030 * cpu/openrisc.opc: Likewise.
2031 * cpu/xstormy16.opc: Likewise.
2033 2005-02-22 Alan Modra <amodra@bigpond.net.au>
2035 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2036 (cgen-desc.h): ..to here, after opcode/cgen.h include.
2038 2005-02-16 Dave Brolley <brolley@redhat.com>
2040 * utils.scm: Update copyright years.
2041 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2042 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2043 * operand.scm (-derived-operand-parse): Move logit message from level 1
2046 2005-02-15 Nick Clifton <nickc@redhat.com>
2048 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2049 prevent compile time warning messages.
2050 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2051 * utils-gen.scm (attr-int-gen-defn): Likewise.
2052 (attr-gen-defn): Likewise.
2053 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2054 (print_dollarhex16): Remove unused function.
2056 2005-02-15 Jim Blandy <jimb@redhat.com>
2058 * guile.scm (cgen-call-with-debugging): Doc fix.
2060 Make backtraces work more reliably.
2061 * guile.scm: Set up debugging parameters, and enable debugging and
2062 source positions while loading.
2063 (cgen-call-with-debugging, cgen-debugging-stack-start): New
2065 * read.scm: Don't set debugging parameters here.
2066 (catch-with-backtrace): Function deleted.
2067 (-cgen): Simply note the presence or absence of the -b option.
2068 Pass the flag to cgen-call-with-debugging, so debugging is turned
2069 off here if the user didn't request it, for faster computation.
2070 (cgen): Call cgen-debugging-stack-start here, instead of
2071 catch-with-backtrace.
2073 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2075 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2076 Don't write out the trailing -s here.
2077 * Makefile.in: Regenerated.
2078 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2079 fixup.scm here; let the caller decide which Scheme's customization
2081 * dev.scm: Load guile.scm, not fixup.scm.
2082 * fixup.scm: Deleted; contents have all moved to guile.scm.
2085 * guile.scm (debug-write): New function.
2087 2005-02-14 Jim Blandy <jimb@redhat.com>
2089 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2090 transformer procedure, not eval. Transformer procedures take one
2093 2005-02-11 Nick Clifton <nickc@redhat.com>
2095 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2096 to 'bfd_vma *' in order avoid compile time warning message.
2098 2005-02-09 Jim Blandy <jimb@redhat.com>
2100 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
2101 corresponding change in the sim/common directory.)
2103 2005-02-07 Jim Blandy <jimb@redhat.com>
2105 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
2106 changes in the opcodes directory.)
2108 * guile.scm: New file, containing Guile-specific definitions and
2109 adaptations. This is loaded by the app-specific shell scripts.
2110 Initially identical to fixup.scm.
2111 * cgen-sid.scm: Don't load fixup.scm here.
2113 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2116 2005-01-27 Jim Blandy <jimb@redhat.com>
2118 * utils.scm (string/symbol->append): Renamed from 'concat'.
2119 * opcodes.scm (gen-switch): Use new name.
2120 * insn.scm (-sub-insn-make!): Same.
2121 * rtl.scm (rtx-dump): Same.
2122 * semantics.scm (semantic-compile): Same.
2124 2005-01-20 Jim Blandy <jimb@redhat.com>
2126 * opcodes.scm (gen-switch): Use concat instead of string-map.
2128 * utils.scm (concat): New function.
2129 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2130 * rtl.scm (rtx-dump): Same.
2131 * semantics.scm (semantic-compile): Same.
2133 2004-12-16 Jim Blandy <jimb@redhat.com>
2135 * utils-cgen.scm (parse-name): Don't assume that string-map can be
2136 applied to symbols. Process everything as strings, and then
2137 convert to a symbol at the end.
2139 * read.scm (debug-repl): Temporarily redirect input and output to
2140 /dev/tty while we debug, so we don't interfere with whatever CGEN
2141 is reading or writing.
2142 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2145 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
2147 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2148 will work with newer versions of guile.
2150 2004-10-27 Nick Clifton <nickc@redhat.com>
2152 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2153 * cpu/iq2000.cpu: Likewise.
2155 2004-07-21 DJ Delorie <dj@redhat.com>
2157 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2159 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2161 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2162 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2164 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2166 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2168 2004-03-22 Dave Brolley <brolley@redhat.com>
2170 * utils.scm (copyright-fsf): Update copyright years.
2171 (copyright-red-hat): Ditto.
2172 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2174 (-op-gen-set-trace-parallel): Ditto.
2176 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2178 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2179 disassembling codes for 0x*2 addresses.
2181 2004-01-29 Dave Brolley <brolley@redhat.com>
2183 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2184 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2185 in the extra bit positions.
2187 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2189 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2191 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2193 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2194 "short" being 16 bit.
2195 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2196 internationalize error message.
2197 (parse_lo16): Likewise. Remove useless code.
2199 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2201 * cpu/m32r.cpu : Add new model m32r2.
2202 Add new instructions.
2203 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2204 Changed PIPE attr of push from O to OS.
2205 Care for Little-endian of M32R.
2206 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2207 Care for Little-endian of M32R.
2208 (parse_slo16): signed extension for value.
2210 2003-10-26 Dave Brolley <brolley@redhat.com>
2212 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2213 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2214 (-gen-extract-fn): Call -gen-record-profile-args.
2216 2003-10-21 Dave Brolley <brolley@redhat.com>
2218 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2220 * decode.scm (-opcode-slots): Correct typo in logit call.
2222 2003-10-09 Jim Blandy <jimb@redhat.com>
2224 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2225 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2227 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2229 2003-10-06 Dave Brolley <brolley@redhat.com>
2231 * gen-all-doc: Add fr550.
2233 2003-09-11 Doug Evans <dje@sebabeach.org>
2235 * Makefile.am (ARCHFILE): New var.
2236 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2237 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2238 * Makefile.in: Regenerate.
2240 2003-09-08 Dave Brolley <brolley@redhat.com>
2242 On behalf of Doug Evans <dje@sebabeach.org>
2243 Pass in paths to input files, instead of assuming they live in
2244 $srcdir/cpu. Plus misc. option processing cleanup.
2245 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2246 Add pre-process pass to all options.
2247 * cgen-gas.scm (gas-arguments): Ditto.
2248 * cgen-sid.scm (sim-arguments): Ditto.
2249 * cgen-sim.scm (sim-arguments): Ditto.
2250 * cgen-stest.scm (stest-arguments): Ditto.
2251 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2252 (-opc-file-path): New global.
2253 (opc-file-path): New fn.
2254 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2255 All callers updated.
2256 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2257 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2258 Replace srcdir arg with opc-file. All callers updated.
2259 * read.scm (-opt-spec-update): Delete.
2260 (opt-get-first-pass,opt-get-second-pass): New fns.
2261 (-cgen): Process application-specific arguments in two passes.
2263 2003-08-29 Dave Brolley <brolley@redhat.com>
2265 * cpu/frv.cpu: Removed.
2266 * cpu/frv.opc: Removed.
2268 2003-08-21 Nick Clifton <nickc@redhat.com>
2270 * cpu/frv.cpu (mbtoh): Replace input parameter to
2271 u-media-dual-expand and u-media-dual-btoh with output parameter.
2272 (cmbtoh): Add profiling hack.
2274 2003-08-19 Michael Snyder <msnyder@redhat.com>
2276 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2278 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2280 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2281 the elements for the END record of CGEN_OPINST, silencing warnings.
2283 2003-07-15 Doug Evans <dje@sebabeach.org>
2285 Add guile 1.6.4 support.
2286 - empty list must be quoted
2287 - string functions have stricter type checking
2288 - eval now takes a second argument
2289 - symbol-bound? is deprecated
2290 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2291 (bitset-attr->list): Ensure arg to string-cut is a string.
2292 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2293 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2294 * cos.scm (-class-list): Must quote empty list.
2295 (-class-parent-classes,-class-compute-class-desc): Ditto.
2296 (class-make,make,object-reset!): Ditto.
2297 (method-make-make!): Call eval1 instead of eval.
2298 (method-make-forward!,method-make-virtual-forward!): Ditto.
2299 * decode.scm (subdtable-add): Use stringsym-append instead of
2301 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2302 (-build-decode-table-entry): Fetch string name of insn.
2303 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2304 (-gen-mach-table-defns): Ditto for mach.
2305 (gen-ifld-defns): Ditto for ifld.
2306 (gen-hw-table-defns): Ditto for hw.
2307 (gen-operand-table): Ditto for op.
2308 (gen-insn-table-entry): Ditto for insn.
2309 * desc.scm (gen-attr-table-defn): Ditto for attr.
2310 (<keyword>,gen-defn): Don't pass symbols to string-append.
2311 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2313 (enum-vals-upcase): Use symbol-upcase to build result.
2314 (-enum-parse): Use stringsym-append to build errtxt.
2315 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2316 (eval1): New function.
2317 (symbol-bound?): Provide own version if >= guile 1.6.
2318 * hardware.scm (define-keyword): Use string-append instead of
2320 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2321 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2323 (gen-list-entry): Handle either symbol or string `name' arg.
2324 (gen-obj-doc-header): Fetch string name of `o' arg.
2325 (define-cpu-intro): Ditto for cpu.
2326 (gen-mach-intro): Ditto for mach.
2327 (gen-model-intro): Ditto for model.
2328 (gen-isa-intro): Ditto for isa.
2329 (gen-machine-doc-1): Ditto for isa.
2330 (gen-reg-doc-1): Convert mach to string first.
2331 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2332 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2334 (gen-insn-categories): Fetch string name of mach. Convert
2335 enum-val-name to string first.
2336 (gen-insn-docs): Fetch string name of mach.
2337 * ifield.scm (ifld-ilk): Result is a string.
2338 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2339 Fetch string name of ifld.
2340 (-sfmt-search-key): Similarily for ifld and op.
2341 * insn.scm (syntax-make): Fetch string name of syntax element.
2342 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2343 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2344 * mode.scm (mode:c-type): Result is a string.
2345 (mode:enum): Fetch string name of mode.
2346 (-mode-parse): Use stringsym-append to build errtxt.
2347 * model.scm (model:enum): Fetch string name of model.
2348 (-model-parse): Use stringsym-append to build errtxt.
2349 (parse-insn-timing): Must quote empty list.
2350 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2351 (-gen-minsn-opcode-entry): Ditto.
2352 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2354 (read-cpu.opc): Convert current-arch-name to a string before using.
2355 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2356 (<derived-operand>): Must quote empty list.
2357 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2358 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2360 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2361 (-pmacro-sym): Must convert symbols to strings before passing to
2363 (-pmacro-str): Ditto.
2364 (pmacros-init!): Use eval1 instead of eval.
2365 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2366 (keep-isa-atlist?): Ditto.
2367 (cmd-if): Use eval1 instead of eval.
2368 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2369 (-rtl-c-get): Fetch string name of src.
2370 (s-unop): Ditto for mode.
2371 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2372 (-gen-par-temp-defns,subword): Ditto.
2373 (join): Use stringsym-append instead of string-append.
2374 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2375 (rtx-traverse-debug): Fetch string name of rtx-obj.
2376 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2377 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2378 (rtx-pretty-name): Result is a string.
2379 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2380 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2381 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2383 (-gen-sfrag-case): Fetch string name of user.
2384 * sid-model.scm (unit:enum): Fetch string name of unit.
2385 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2386 (<hw-memory>,gen-set-quiet): Ditto.
2387 (gen-mode-defs): Ditto.
2388 (sim-finish!): Convert current-arch-name to a string before using.
2389 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2390 (-gen-no-scache-semantic-fn): Ditto.
2391 (cgen-defs.h): Fetch string name of isa.
2392 (cgen-read.c): Convert current-arch-name to a string before using.
2393 (cgen-write.c): Ditto.
2394 * sim-model.scm (unit:enum): Fetch string name of unit.
2395 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2396 (-gen-model-timing-table): Fetch string name of model.
2397 (-gen-mach-model-table): Ditto.
2398 (-gen-mach-defns): Fetch string name of mach.
2399 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2400 (<hw-memory>,cxmake-get): Fetch string name of mode.
2401 (<hw-memory>,gen-set-quiet): Ditto.
2402 (gen-mode-defs): Ditto.
2403 (sim-finish!): Must quote empty list.
2404 * utils-cgen.scm (<ident>): Must quote empty list.
2405 (obj:str-name): New fn.
2406 (parse-comment): Result is a string.
2407 (parse-symbol): Result is a symbol.
2408 (parse-string): Result is a string.
2409 (keyword-list?): Convert arg to string before calling string-ref.
2410 (keyword-list->arg-list): Ditto.
2411 (gen-attr-name): Convert attr-name to string first.
2412 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2413 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2414 (gen-define-ifmt-ifields): Ditto for fld.
2415 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2417 (gen-file-name): Ditto.
2418 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2419 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2420 (reduce): Call eval1 instead of eval.
2421 * cpu/m32r.cpu (addi): Don't use `#.'.
2423 * gen-all-sim: Fix some typos.
2425 2003-07-08 Doug Evans <dje@sebabeach.org>
2427 * gen-all-doc: Ensure run from cgen src dir.
2428 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2429 * gen-all-sid: Similarily, in ./tmp-sid.
2430 * gen-all-sim: Similarily, in ./tmp-sim.
2432 2003-06-20 Doug Evans <dje@sebabeach.org>
2434 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2436 2003-06-19 Doug Evans <dje@sebabeach.org>
2438 * mach.scm (-ifld-already-defined?): New proc.
2439 (current-ifld-add!): Use it.
2440 (-op-already-defined?): New proc.
2441 (current-op-add!): Use it.
2442 (-insn-already-defined?): New proc.
2443 (current-insn-add!): Use it.
2444 (-minsn-already-defined?): New proc.
2445 (current-minsn-add!): Use it.
2446 (obj-isa-list): New proc.
2447 (isa-supports?): Use it.
2449 2003-06-10 Doug Evans <dje@sebabeach.org>
2451 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2452 * cpu/m32r.cpu (all insns): Ditto.
2454 * mach.scm (current-*-add!): Disallow redefinition. Make result
2457 * gen-all-doc: Split arm and frv docs up a bit.
2459 * cpu/arm.cpu: Add IDOC attribute.
2460 * cpu/frv.cpu: Ditto.
2461 * cpu/i960.cpu: Ditto.
2462 * cpu/openrisc.cpu: Ditto.
2463 * cpu/xstormy16.cpu: Ditto.
2464 * cpu/m32r.cpu: Ditto.
2465 (all insns): Explicitly specify IDOC attribute.
2467 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2468 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2469 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2470 * Makefile.in: Regenerate.
2471 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2472 (-attr-read): Defer computing default value until we know the type.
2473 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2474 (<attr-list>:attr-present?): New method.
2475 (atlist-attr-present?,obj-attr-present?): New fns.
2476 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2477 (attr-builtin!): New insn attr IDOC.
2478 * cgen-doc.scm (doc-arguments): New args -I,-N.
2479 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2480 Support comment as fourth element of enum value.
2481 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2482 * html.scm (gen-html-header): New arg kind, all callers updated.
2483 (gen-table-of-contents): New arg insn-file, all callers updated.
2484 (gen-list-entry,gen-doc-header): New fn.
2485 (get-operands): Delete.
2486 (gen-iformat-table): Rewrite.
2487 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2488 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2489 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2490 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2491 (get-insns-for-category,gen-categories-insn-lists): New fns.
2492 (gen-insn-docs): Simplify each insn's semantics first.
2493 Print insn tables sorted by IDOC categories.
2494 (*insn-html-file-name*): New global.
2495 (cgen-insn.html): New fn.
2497 * insn.scm (<insn>): Create a setter for the `tmp' member.
2498 * semantics.scm (insn-build-known-values): Renamed from
2499 -build-known-values. All callers updated.
2501 * rtl.scm: Move traveral/evaluation support to ...
2502 * rtl-traverse.scm: New file.
2503 * read.scm: Maybe-load rtl-traverse.scm.
2505 * rtl.scm (-rtx-valid-types): Add SETRTX.
2507 * rtx-funcs.scm (nop,parallel): Fix mode.
2509 * utils.scm (eqv-lookup-index): New fn.
2510 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2512 * dev.scm (load-doc): Set APPLICATION.
2514 2003-06-10 Dave Brolley <brolley@redhat.com>
2516 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2517 * sid-decode.scm: Generate #include of config.h into
2518 @prefix@-decode.cxx.
2519 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2521 2003-06-07 Doug Evans <dje@sebabeach.org>
2523 * gen-all-sid: New file.
2524 * gen-all-opcodes: New file.
2526 2003-06-05 Nick Clifton <nickc@redhat.com>
2528 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2529 version of the FRinti operand.
2530 (FRintjeven): Likewise for FRintj.
2531 (FRintkeven): Likewise for FRintk.
2532 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2533 media-quad-arith-sat-semantics, media-quad-arith-sat,
2534 conditional-media-quad-arith-sat, mdunpackh,
2535 media-quad-multiply-semantics, media-quad-multiply,
2536 conditional-media-quad-multiply, media-quad-complex-i,
2537 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2538 conditional-media-quad-multiply-acc, munpackh,
2539 media-quad-multiply-cross-acc-semantics, mdpackh,
2540 media-quad-multiply-cross-acc, mbtoh-semantics,
2541 media-quad-cross-multiply-cross-acc-semantics,
2542 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2543 media-quad-cross-multiply-acc-semantics, cmbtoh,
2544 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2545 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2546 cmhtob): Use new operands.
2547 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2548 (parse_even_register): New function.
2550 2003-06-04 Doug Evans <dje@sebabeach.org>
2552 Better handling of 64 bit and mixed 32/64 bit architectures.
2553 * hardware.scm (hw-update-word-modes!): New fn.
2554 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2555 hw-update-word-modes!.
2556 (state-word-bitsize): Replace FIXME with requested check.
2557 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2558 * mode.scm (mode-find): Ignore INT,UINT.
2559 (-mode-word-sizes-kind): New global.
2560 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2561 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2562 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2564 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2565 unusable, correct values set later.
2566 (mode-finish!): Remove cruft.
2567 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2568 * opcodes.scm (opcodes-init!): Ditto.
2569 * rtx-funcs.scm (annul): Fix mode of pc.
2570 * cpu/ia64.cpu: Remove cruft that sets word modes.
2571 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2573 2003-06-03 Nick Clifton <nickc@redhat.com>
2575 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2576 immediate value not unsigned.
2578 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2580 * cpu/sh.cpu: Amend comments to refer to SuperH.
2581 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2582 * cpu/sh64-media.cpu: Likewise.
2583 (Saturation): Update manual reference.
2585 2003-05-15 Doug Evans <dje@sebabeach.org>
2587 * Makefile.am (srcroot): New var.
2589 * Makefile.in: Regenerate.
2590 * cgen-doc.scm: New file.
2591 * html.scm: New file.
2592 * gen-all-doc: New file.
2593 * dev.scm (cload): Handle DOC application.
2595 * machs.scm (machs-for-cpu): New fn.
2596 * model.scm (models-for-cpu): New fn.
2597 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2599 (iota): Rewrite to be identical to pmacro version. All uses updated.
2600 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2602 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2603 (-gen-decode-bits): Instead put in better fix here.
2605 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2607 2003-05-01 DJ Delorie <dj@redhat.com>
2609 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2611 (set-alignfix-mem): Likewise.
2613 2003-04-16 Dave Brolley <brolley@redhat.com>
2615 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2616 * utils.scm (copyright-fsf): Update generate copyright years.
2617 (copyright-cygnus): Ditto.
2618 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2620 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2622 (<operand>'gen-profile-code): New parameter 'when'.
2623 (<iunit>'gen-profile-code): Ditto.
2624 (<insn>'gen-profile-code): Ditto.
2625 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2626 'insn_reference' for the 'after' function.
2627 * model.scm (unit:enum): Moved to sim-model.scm.
2628 * sim-model.scm (unit:enum): Moved from model.scm.
2629 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2630 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2631 * sid-model.scm (unit:enum): New version for sid.
2632 (gen-model-class-name): New function.
2633 (gen-model-unit-fn-decl): New function.
2634 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2635 (gen-model-unit-fn-name): New parameter 'when'.
2636 (-gen-model-insn-fn-name): Ditto.
2637 (-gen-model-insn-qualified-fn-name): New function.
2638 (-gen-model-insn-fn-decl): New function.
2639 (-gen-model-insn-fn-decls): New function.
2640 (-gen-model-insn-fn): New parameter 'when'. Call
2641 -gen-model-insn-qualified-fn-name.
2642 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2643 functions for modelling insn before and after execution.
2644 (-gen-model-class-decls): New function.
2645 (" (gen-model-class-name model) "): New function.
2646 (gen-model-classes): New function.
2647 (-gen-insn-timing): Generate functions for modelling insn before and after
2649 (-gen-insn-unit-timing): Generate class-qualified names.
2650 (-gen-model-timing-table): Ditto.
2651 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2652 not needed (yet) by sid.
2653 (cgen-model.h): New function.
2655 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2657 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2658 * cpu/sh64-compact.cpu: Likewise.
2659 * cpu/sh64-media.cpu: Likewise.
2661 2003-03-21 DJ Delorie <dj@redhat.com>
2663 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2664 which indicates if the sign flag is set from bit 15 or 7.
2666 (set-psw): New argument ws, propogate it.
2667 (set-psw-nowrite): Likewise.
2668 (set-mem-psw): Likewise.
2669 (set-psw-carry): Likewise. Use temporaries to prevent
2670 prematurely overwriting needed inputs.
2671 (set-psw-rrotate17): Fix logic.
2672 (shrgrgr): Preserve carry for zero-bit shifts.
2673 (shrgrimm): Likewise.
2674 (shlgrgr): Likewise.
2675 (shlgrimm): Likewise.
2676 (asrgrgr): Likewise.
2677 (asrgrimm): Likewise.
2680 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2682 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2684 2002-03-05 DJ Delorie <dj@redhat.com>
2686 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2687 prematurely overwriting needed inputs.
2688 (set-psw-sub): Likewise.
2690 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2692 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2694 2003-02-18 DJ Delorie <dj@redhat.com>
2696 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2697 (movlmemimm): Just mask the address.
2698 (movhmemimm): Likewise.
2699 (movlmemgr): Likewise.
2700 (movhmemgr): Likewise.
2701 (set-psw): Always set the psw last.
2702 (set-psw-carry): Likewise.
2703 (set-psw-add): Likewise.
2704 (set-psw-sub): Likewise.
2706 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2707 of 16 patterns from the set-psw-rotate17 function.
2708 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2709 movgriipostincgr, movgriipredecgr): Set psw correctly.
2710 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2711 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2712 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2714 2003-02-11 Dave Brolley <brolley@redhat.com>
2716 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2717 @arch@_cgen-ifld_table.
2718 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2719 @arch@_cgen-ifld_table.
2721 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2723 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2725 2003-01-09 Graydon Hoare <graydon@redhat.com>
2727 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2730 2003-01-07 Graydon Hoare <graydon@redhat.com>
2732 * utils-gen.scm (attr-int-gen-defn): Define.
2734 2002-12-21 Doug Evans <dje@sebabeach.org>
2736 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2737 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2739 * dev.scm (cload): Update location of .cpu files.
2741 2002-12-19 Doug Evans <dje@sebabeach.org>
2743 * utils-sim.scm (gen-profile-sym): New fn.
2744 (<operand>,sbuf-profile-sym): New method.
2745 (<operand>,sbuf-profile-elm): Use it.
2746 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2747 of hardcoding symbol name.
2748 (<operand>,gen-profile-code): Ditto.
2749 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2752 * mode.scm (mode-sem-mode): New fn.
2753 * operand.scm (op:new-mode): Update. mode-name.
2754 (op-natural-mode?) New fn.
2755 * rtl.scm (hw): Set hw-name,mode-name.
2757 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2759 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2760 as size of IDESC-TABLE-VAR.
2761 (@prefix@_init_idesc_table): Ditto.
2762 * sim-model.scm (-gen-mach-defns): Ditto.
2763 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2765 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2767 * insn.scm (-parse-insn-format-symbol): Improve error message.
2768 (-parse-insn-format): Ditto.
2770 * gen-all-sim: New script.
2772 2002-12-16 DJ Delorie <dj@delorie.com>
2774 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2776 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2778 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2779 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2780 (parse_immediate16): Handle immediate16 values, which now include
2781 @hi(label) and @lo(label)
2783 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2785 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2786 Add braces and cast for union field.
2787 (gen-multi-ifield-nodes): Add braces and cast for union field.
2788 (cgen_operand_table): Similarly fix sentinel.
2789 (cgen_cpu_close): Constify "insns". Formatting.
2790 (cgen-desc.c): Include xregex.h.
2791 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2793 <opc.c>: Include safe-ctype.h.
2794 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2795 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2796 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2797 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2798 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2799 (parse_addr16): Correct type of "value". Formatting.
2800 (parse_addr16_p): Likewise.
2801 (parse_addr16_cjp): Likewise.
2802 (parse_lit8): Likewise.
2803 (parse_bit3): Formatting.
2804 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2805 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2806 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2808 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2809 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2810 (print_dollarhex8): Likewise.
2811 (print_dollarhex16): Likewise.
2812 (print_dollarhex_addr16h): Likewise.
2813 (print_dollarhex_addr16l): Likewise.
2814 (print_dollarhex_p): Likewise.
2815 (print_dollarhex_cj): Likewise.
2816 (print_decimal): Likewise.
2817 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2819 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2821 * doc/rtl.texi (Model variants): Mention current limitations for
2822 unit inputs and outputs.
2823 (Hardware elements) <attribute PROFILE>: Be slightly more
2825 (Instructions) <timing>: input/output overrides have a direction
2828 2002-11-25 DJ Delorie <dj@redhat.com>
2830 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2832 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2834 * cpu/iq10.cpu: New file.
2835 * cpu/iq2000.cpu: Likewise.
2836 * cpu/iq2000.opc: Likewise.
2837 * cpu/iq2000m.cpu: Likewise.
2839 2002-11-19 DJ Delorie <dj@redhat.com>
2841 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2843 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2845 * dev.scm: Call getenv with a string, not a symbol.
2847 2002-10-08 Doug Evans <dje@transmeta.com>
2848 Hans-Peter Nilsson <hp@axis.com>
2850 * types.scm (bitrange-overlap?): Handle lsb0?.
2852 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2854 From Robert Cragie <rcc@jennic.com>:
2855 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2857 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2858 Ben Elliston <bje@redhat.com>
2859 John Healy <jhealy@redhat.com>
2860 Jeff Johnston <jjohnstn@redhat.com>
2861 Alan Lehotsky <alehotsky@redhat.com>
2862 Ubicom Inc. <SupportDesk@ubicom.com>
2864 * cpu/ip2k.cpu: New file.
2865 * cpu/ip2k.opc: Likewise.
2867 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2869 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2871 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2873 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2874 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2875 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2876 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2877 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2878 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2879 (-sthi-byte): If there is a single byte to store, store it at
2881 (sthil, sthiq): Fix big-endian behaviour.
2882 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2883 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2884 (saturate): Use Dimode to check if saturation operation is required.
2885 (usaturate): Likewise.
2887 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2888 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2889 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2890 (msadubq): Fix subword index in second operand of first subtraction.
2892 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2894 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2897 2002-06-18 Dave Brolley <brolley@redhat.com>
2899 * cpu/frv.cpu: New cpu description.
2900 * cpu/frv.opc: New cpu support code.
2902 2002-05-21 Dave Brolley <brolley@redhat.com>
2904 * decode.scm (-opcode-slots): Don't consider bits beyond the
2907 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2909 * cpu/powerpc.cpu: New file.
2911 2002-05-01 Graydon Hoare <graydon@redhat.com>
2913 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2915 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
2917 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2918 results are expanded recursively.
2920 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
2922 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2923 call scan-symbol on it, to enable recursive macro-expansion.
2925 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
2927 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2928 for multiple-isa configurations.
2929 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2931 2002-02-04 Ben Elliston <bje@redhat.com>
2933 * cpu/sh.cpu, cpu/sh.opc: New files.
2934 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2936 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
2938 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2939 (Enumerated constants): Mention that an ifield must not specify a
2941 (Instruction operands): Ditto for index.
2942 (Expressions) <parallel>: Remove misplaced mention of local
2944 <if>: Mention that mode must be specified and non-VOID when the
2947 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
2949 * doc/porting.texi: When referring to *.opc, mention they are in
2950 the cpu subdir. Call top-level directory toplevel, not devo.
2951 Close string in define-normal-insn example.
2953 * doc/pmacros.texi: Fix .substr typo to .substring.
2954 Mention that .sym expansions are not further expanded.
2956 2002-01-22 Graydon Hoare <graydon@redhat.com>
2958 * desc-cpu.scm (ifld-number-cache): Add.
2960 (gen-maybe-multi-ifld-of-op): Add.
2961 (gen-maybe-multi-ifld): Add.
2962 (gen-multi-ifield-nodes): Add.
2963 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2965 2002-01-10 matthew green <mrg@redhat.com>
2967 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2968 (gr-Rb-names): ... to this.
2969 (h-Rb): New hardware piece.
2970 (h-Rbj): Use gr-Rb-names.
2972 (holdx): New instruction.
2974 2002-01-07 Ben Elliston <bje@redhat.com>
2976 * utils.scm (package-cygnus-simulators): Rename from this ..
2977 (package-red-hat-simulators): .. to this.
2978 * opcodes.scm (option-set!): Use package-red-hat-simulators.
2979 * sid-cpu.scm (cgen-desc.h): Likewise.
2980 (cgen-cpu.h): Likewise.
2981 (cgen-defs.h): Likewise.
2982 (cgen-write.cxx): Likewise.
2983 (cgen-semantics.cxx): Likewise.
2984 (cgen-sem-switch.cxx): Likewise.
2985 * sid-decode.scm (cgen-decode.h): Likewise.
2986 (cgen-decode.cxx): Likewise.
2987 * sid-model.scm (cgen-model.cxx): Likewise.
2988 * sid.scm (option-set!): Likewise.
2989 * sim.scm (option-set!): Likewise.
2991 2002-01-07 Ben Elliston <bje@redhat.com>
2993 * utils.scm (copyright-fsf): Add 2002.
2994 (copyright-cygnus): Rename to copyright-red-hat.
2995 (copyright-red-hat): Add 2002.
2996 (CURRENT-COPYRIGHT): Update comment.
2997 * opcodes.scm (option-set!): Update callers.
2998 * sid-model.scm (cgen-model.cxx): Likewise.
2999 * sid-cpu.scm: Likewise.
3000 * sid-decode.scm: Likewise.
3001 * sid.scm (option-set!): Handle "redhat" as an option for
3002 "copyright"; use copyright-red-hat.
3003 * sim.scm (option-set!): Likewise.
3005 2002-01-03 Dave Brolley <brolley@redhat.com>
3007 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3008 number of insns in the list. Update the population count function to
3009 identify and prioritize 3 catgories of useful bits.
3010 (-population-top-few): Don't consider bits with a population count of
3012 (-build-decode-table-entry): Don't call
3013 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
3014 identical insns at the next tree level.
3015 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3016 this function is no longer used.
3017 (filter-non-specialized-ambiguous-insns): New function.
3018 (filter-identical-ambiguous-insns): New function.
3019 (find-identical-insn): New function.
3020 (filter-harmlessly-ambiguous-insns): Removed.
3022 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
3023 matthew green <mrg@redhat.com>
3024 Frank Ch. Eigler <fche@redhat.com>
3025 Nick Clifton <nickc@cambridge.redhat.com>
3027 * cpu/xstormy16.cpu: New file.
3028 * cpu/xstormy16.opc: New file.
3030 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
3032 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3034 2001-11-14 Dave Brolley <brolley@redhat.com>
3036 * utils-gen.scm (-gen-extract-word): Correct computation of the length
3037 of the field being extracted.
3039 2001-10-29 Johan Rydberg <johan@rydberg.com>
3041 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3042 (cos ...) and (sin ..) rtx.
3044 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
3046 * desc-cpu.scm: Do not include ctype.h in generated desc
3047 files. They will inherit safe-ctype.h instead.
3049 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
3051 * desc-cpu.scm: Add missing function prototypes (for generated
3052 C files). Fix compile time warning messages about unused
3053 parameters (for generated C files).
3054 * opc-asmdis.scm: The same.
3055 * opc-ibld.c: The same.
3056 * opc-itab.scm: The same.
3057 * cpu/fr30.opc: The same.
3058 * cpu/m32r.opc: The same.
3059 * cpu/openrisc.opc: The same.
3061 2001-09-17 graydon hoare <graydon@redhat.com>
3063 * insn.scm (syntax-break-out): Correct logic in handling escaped
3066 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
3068 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3069 call @arch@_cgen_build_insn_regex now that regex support is in
3072 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
3074 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3075 (mask-superset?): Look for strict supersets to allow rejection of
3078 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3080 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3081 (cgen-desc.h): Call it.
3082 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3084 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3085 entire_insn for extraction, if it's shorter than base-insn-bitsize.
3087 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3089 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3090 mach->cpu insn-chunk-bitsize.
3091 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3092 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3093 * mach.scm (<cpu>): New field insn-chunk-bitsize.
3094 (-cpu-parse, -cpu-read): Parse/initialize it.
3095 * doc/rtl.texi (define-cpu): Document it.
3097 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
3099 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3101 2001-07-06 Ben Elliston <bje@redhat.com>
3103 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3105 2001-07-05 Ben Elliston <bje@redhat.com>
3109 * read.scm (include): Include files from srcdir/cpu.
3110 (-cgen): Likewise for loading .cpu files.
3111 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3112 * *.cpu: Move all cpu descriptions into cpu subdirectory.
3114 * simplify.inc: Likewise.
3116 2001-07-04 Ben Elliston <bje@redhat.com>
3118 * read.scm (include): Log "Including file" message at level 1,
3119 rather than outputting it with (display).
3120 (cpu-load): Log "Loading cpu description" and "Processing cpu
3121 description" messages at levels 1 and 2, respectively, rather than
3124 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
3126 * desc.scm (<keyword> 'gen-defn): Add extra zero into
3127 CGEN_KEYWORD_ENTRY initializers.
3129 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3130 (<operand> 'test-data): Involve both the index and the hardware
3131 in testcase generation.
3132 (<hw-indx> 'test-data): Generate test data from the underlying
3134 (<ifield> 'test-data): Generate test data by computing bit
3135 patterns for the field, then decoding them.
3136 (<hw-address> 'test-data): Allow for new calling convention.
3137 (<hw-iaddress> 'test-data): Likewise.
3138 (<keyword> 'test-data): Convert index values into keywords.
3139 (<hw-asm> 'test-data): Convert index values into integer strings.
3141 * gas-test.scm (cgen-build.sh): Escape '.' as well.
3143 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
3145 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3146 is required for multi-mode hw types (memory).
3148 2001-05-11 Ben Elliston <bje@redhat.com>
3150 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3151 when generating allinsn.d from objdump output. Without it, the
3152 testsuite will treat $ as the regular expression for end of line.
3154 2001-05-09 Ben Elliston <bje@redhat.com>
3156 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3157 with `cgen_cpu_open'; documentation had become out of date.
3158 * doc/rtl.texi (Instruction operands): Likewise.
3160 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3162 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3163 various-base-length instruction sets.
3165 2001-04-02 Ben Elliston <bje@redhat.com>
3167 * sid-cpu.scm (-last-insn): New function.
3168 (-gen-sem-switch-engine): Loop through idesc while less than or
3169 equal to the last instruction enum, not less than the MAX enum.
3170 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3171 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3172 table's size to be the last instruction enum plus one, not
3174 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3175 instruction onto the instruction list.
3177 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3178 using the size of the table and its elements.
3179 (-gen-decode-insn-globals): Define the idesc table's size to be
3180 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3181 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3182 last instruction enum plus one, not @CPU@_INSN_MAX.
3184 2001-03-28 Ben Elliston <bje@redhat.com>
3186 * doc/version.texi (UPDATED, EDITION): Update.
3187 * doc/stamp-vti: Likewise.
3189 2001-03-26 Ben Elliston <bje@redhat.com>
3191 * doc/credits.texi (Credits): Update.
3193 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3194 specified prefix and, if necessary, escape `$' in gas-build.sh to
3195 prevent unwanted shell variable expansion.
3197 2001-03-24 Ben Elliston <bje@redhat.com>
3199 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3200 (<keyword>,test-data): Likewise.
3201 (<hw-address>,test-data): Likewise.
3202 (<hw-iaddress>,test-data): Likewise.
3203 (-collate-test-set): New function.
3204 (build-test-set): Use it.
3205 (gen-gas-test): Generate five test cases per instruction.
3206 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3208 * read.scm: Load "slib/random" if random is not defined.
3209 * slib/random.scm: New file.
3211 * utils.scm: Remove comments about the Hobbit compiler.
3212 (copyright-cygnus): Add 2001.
3213 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3214 (package-gnu-simulators): Tidy.
3216 2001-03-23 Ben Elliston <bje@redhat.com>
3218 * cgen-gas.scm: Inline documentation improvements.
3220 2001-03-21 Ben Elliston <bje@redhat.com>
3222 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3223 given in a syntax string is undefined.
3225 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3226 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3228 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3230 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3231 for arg_type CGEN_CPU_OPEN_BFDMACH.
3233 2001-03-20 Ben Elliston <bje@redhat.com>
3235 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3236 instruction onto the instruction list. Define MAX_INSNS to be the
3237 value of the last instruction enum plus one.
3239 2001-03-14 Nick Clifton <nickc@redhat.com>
3241 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3243 2001-03-05 Dave Brolley <brolley@redhat.com>
3245 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3246 if the number of ifields is greater than zero.
3248 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3250 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3251 Emit LIKELY/UNLIKELY branch probability hints.
3252 * sid-decode.cpu (-gen-record-args): Ditto.
3254 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3256 * desc-cpu.scm (-gen-hash-defines): Rename
3257 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3259 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3261 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3263 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3264 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3266 * sid.scm (<operand> gen-write): Use unsigned long long expression
3268 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3269 (<unit> gen-profile-code): Ditto.
3271 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3273 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3276 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3278 * operand.scm (<operand> pretty-sem-name): New field.
3279 (<operand> make): Initialize it from hw-name.
3280 (op:set-pretty-sem-name!): New function.
3281 (<operand> gen-pretty-name): Default to fetching new field.
3282 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3283 sem-name setting from -rtx-hw-name.
3285 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3287 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3288 its subsequent gen-pretty-name.
3290 * read.scm: Increase thread working stack limit and backtrace
3293 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3295 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3297 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3299 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3300 current insn plus 4.
3301 (h-delay-insn): New hardware register.
3302 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3306 * openrisc.opc (parse_hi16): Sign extend value.
3307 (parse_lo16): Likewise.
3309 2001-01-06 Ben Elliston <bje@redhat.com>
3311 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3312 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3313 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3314 (-gen-semantic-fn-table): Likewise.
3315 (-gen-scache-semantic-fn): Likewise.
3316 (-gen-no-scache-semantic-fn): Likewise.
3317 (cgen-read.c): Likewise.
3318 (cgen-sem-switch.c): Likewise.
3319 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3320 is a filename prefix.
3321 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3322 (-gen-decode-insn-globals): Likewise.
3323 (-gen-idesc-decls): Likewise.
3324 (cgen-decode.h): Likewise.
3325 (cgen-decode.c): Likewise.
3326 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3327 (gen-cpu-insn-enum): Likewise.
3328 (sim-finish!): Likewise.
3330 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3332 * openrisc.cpu: New file.
3333 * openrisc.opc: Likewise.
3335 2000-12-12 Ben Elliston <bje@redhat.com>
3337 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3339 2000-12-07 Ben Elliston <bje@redhat.com>
3341 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3342 "insn" when there are zero ifields to extract.
3344 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3346 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3347 used by simple/non-scache simulators.
3348 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3349 regardless of with-scache?.
3350 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3352 2000-12-03 Ben Elliston <bje@redhat.com>
3354 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3355 (cgen-desc.c): Likewise.
3357 2000-12-01 Greg McGary <greg@mcgary.org>
3359 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3361 2000-12-01 Ben Elliston <bje@redhat.com>
3363 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3364 definitions if run without with-multipla-isa?.
3365 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3366 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3368 2000-11-24 Ben Elliston <bje@redhat.com>
3370 * sim-cpu.scm (-gen-hardware-struct): New function.
3371 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3372 hardware elements wich have share one or more ISAs with the ISAs
3375 * sim.scm (-with-multiple-isa?): New symbol.
3376 (with-multiple-isa?): New function.
3377 (option-init!): Initialise -with-multiple-isa?.
3378 (option-set!): Handle with-multiple-isa option.
3380 2000-11-21 Ben Elliston <bje@redhat.com>
3382 * utils.scm (copyright-fsf): Add the year 2000.
3384 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3386 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3387 unneeded "\n\n" from F() macro definition.
3389 2000-11-15 Greg McGary <greg@mcgary.org>
3391 * utils-cgen.scm (gen-define-with-symcat): New function.
3392 * desc-cpu.scm (gen-ifld-defns): Use it.
3393 (gen-hw-table-defns): Use it.
3394 (-gen-hash-defines): Use it.
3395 (gen-operand-table): Use it.
3396 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3397 * opc-itab.scm (-gen-ifmt-table): Use it.
3398 (-gen-insn-opcode-table): Use it.
3399 (-gen-macro-insn-table): Use it.
3400 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3401 * sim-cpu.scm (cgen-semantics.c): Use it.
3402 (cgen-sem-switch.c): Use it.
3404 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3406 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3407 request to emit calls to insn extractors as functions rather than
3408 branches to inline blocks.
3409 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3410 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3412 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3413 to extractor clauses.
3415 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3417 * decode.scm (-distinguishing-bit-population): Significantly
3418 improve popularity heuristic. Renamed from
3419 (-mask-bit-population): Gone.
3420 (-population-above-threshold): Sort new bit numbers in order of
3422 (-population-top-few): Allow up to three more bits to be selected
3423 than requested. Correct selection order to prefer better bits.
3424 Correct bug in fewer-than-requested case. Keep threshold as
3426 (decode-best-get-bits): Pass also the insn-values.
3428 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3429 future optimization.
3431 * utils.scm (message): Format nested lists better.
3433 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3435 * dev.scm: Add srcdir to %load-path.
3437 * rtx-funcs.scm (subword): Mode of argument can be different
3438 than mode of result, so don't use OP0 to specify argument's mode.
3440 2000-11-02 Ben Elliston <bje@redhat.com>
3442 * doc/porting.texi (Building a GAS test suite): Document my change
3445 2000-11-01 Ben Elliston <bje@redhat.com>
3447 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3449 2000-10-31 Ben Elliston <bje@redhat.com>
3451 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3452 with no command line arguments if the gas build directory can be
3455 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3457 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3458 op-ifld -> op-ifield.
3460 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3462 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3464 2000-10-13 matthew green <mrg@cygnus.com>
3466 * utils-cgen.scm (get-ifetch): Move from here ...
3467 * sim.scm (get-ifetch): ... to here.
3468 * sid.scm (get-ifetch): Copy and port to c++.
3470 2000-10-06 Dave Brolley <brolley@redhat.com>
3472 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3473 ifld-start + ifld-word-offset.
3474 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3475 the field is beyond the base number of bits.
3476 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3477 (gen-extract-ifields): Ditto.
3478 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3479 characters in the regular expression.
3481 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3483 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3484 preprocessor constant.
3486 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3488 * slib/logical.scm: New file from slib. Provides robust bitwise
3489 logical operations for large integers.
3490 * read.scm: maybe-load it.
3492 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3494 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3495 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3496 single-isa predicate, but support keep-isa filtering.
3498 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3500 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3501 statement-expression and comma-expression contexts.
3502 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3504 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3506 * decode.scm (-population-top-few): Signal error gracefully if
3507 decoding is about to become ambiguous.
3509 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3511 * doc/rtl.texi (decode-assist): Describe this field as optional.
3513 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3515 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3518 2000-09-05 Dave Brolley <brolley@redhat.com>
3520 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3521 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3523 2000-08-29 Dave Brolley <brolley@redhat.com>
3525 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3526 adata-integral-insn is true for this architecture.
3528 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3530 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3531 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3532 * rtl-c.scm (-c-rtl-get): Improve an error message.
3533 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3535 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3537 * Makefile.in (DIST_COMMON): Regenerated.
3538 * ifield.scm (<derived-ifield> needed-iflds): New method.
3539 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3540 sfmts built from <derived-ifield>s.
3541 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3542 type symbol 'derived-ifield, not an unparseable string.
3543 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3544 (-sfmt-contents): Add tracing.
3546 From Doug Evans <dje@transmeta.com>:
3547 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3550 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3552 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3553 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3554 (-rtl-c-get): Rename from rtl-c-get.
3555 (rtl-c-get): New fn for getter logging.
3557 2000-07-28 Ben Elliston <bje@redhat.com>
3561 2000-07-25 Ben Elliston <bje@redhat.com>
3563 * doc/credits.texi (Credits): Add Frank Eigler.
3565 2000-07-24 Dave Brolley <brolley@redhat.com>
3567 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3569 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3570 (<keyword>): Initialize all elements fully.
3571 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3573 (-gen-mach-table-defns): Ditto.
3574 (-gen-ifld-defns): Ditto.
3575 (-gen-operand-table): Ditto.
3576 (-gen-insn-table): Ditto.
3577 (-gen-cpu-open): Nothing to do for the mach table.
3579 2000-07-13 Ben Elliston <bje@redhat.com>
3581 * doc/version.texi (UPDATED): Update.
3583 2000-07-05 Ben Elliston <bje@redhat.com>
3585 * configure.in (AC_PATH_PROG): Remove.
3586 * configure: Regenerate.
3587 * Makefile.am (GUILE): Locate guile dynamically.
3588 * Makefile.in: Regenerate.
3589 * doc/Makefile.in: Likewise.
3591 2000-07-03 Ben Elliston <bje@redhat.com>
3593 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3594 * opc-itab.scm (cgen-opc.c): Likewise.
3596 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3598 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3599 guile 1.4 compatibility.
3600 (rtx-env-dump): Comment out buggy display calls.
3602 2000-06-15 matthew green <mrg@redhat.com>
3604 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3606 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3608 * Makefile.in: Regenerated.
3610 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3611 (gen-ifld-defns): Ditto.
3612 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3613 * rtl.c (rtl-finish!): Ditto.
3614 * opc-itab.scm (-gen-ifield-decls): Ditto.
3615 * opcodes.scm (gen-switch): Exclude derived operands.
3616 * operand.scm (op-iflds-used): Expand derived operands.
3617 (hw-index-derived): New dummy function to create dummy object.
3618 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3619 constructor. Set object's hw-name and index fields.
3620 (-anyof-merge-subchoices): Set instance object's index also.
3621 (-anyof-name): New helper function.
3622 (anyof-merge-semantics): Correct replacement of operand names in
3624 (op-ifield): Tolerate derived-operands and their funny indices better.
3625 * ifield.scm (ifld-known-values): Expand derived ifields.
3626 (non-multi-ifields, non-derived-ifields): New utility functions.
3627 (ifld-decode-mode): Tolerate objects with unbound decode field.
3628 * iformat.scm (compute-insn-length): Expand derived ifields.
3629 (compute-insn-base-mask): Ditto.
3630 * insn.scm (insn-base-ifields): Remove.
3631 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3632 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3633 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3634 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3635 (-frag-test-data): Ditto.
3636 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3637 (-gen-sem-switch-engine); Ditto.
3638 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3639 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3640 (-gen-record-args): Tolerate unbound op-ifield.
3641 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3642 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3643 Exclude multi-insns.
3644 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3645 * utils-sim.scm (op-extract?): Handle derived operands.
3647 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3648 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3649 * hardware.scm (hardware-for-mode): New function.
3651 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3652 cleaning up decode tables.
3653 (mask-superset?): Little helper function for above.
3654 * decode.scm (-build-decode-table-entry): Call it.
3655 (-opcode-slots): Add some more tracing.
3656 * arm.cpu: Disable decode-splits construct due to implementation
3657 conflict with `filter-harmlessly-ambiguous-insns'
3659 * decode.scm (-population-top-few): New function for better decode
3660 bit generation. Includes minor helper functions.
3661 (decode-get-best-bits): Call it instead.
3662 (OLDdecode-get-best-bits): Renamed previous version of above.
3665 2000-06-13 Ben Elliston <bje@redhat.com>
3667 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3668 for the Guile library directory.
3669 * configure: Regenerate.
3670 * Makefile.in, doc/Makefile.in: Regenerate.
3672 * Makefile.in, doc/Makefile.in: Regenerate.
3673 * configure.in: Remove unnecessary tests. Move to version 1.0.
3674 * acconfig.h, config.in: Remove.
3675 * configure, aclocal.m4: Regenerate.
3676 * doc/stamp-vti, doc/version.texi: Likewise.
3677 * AUTHORS: New file.
3679 2000-06-07 Ben Elliston <bje@redhat.com>
3681 * fixup.scm (symbol-bound?): Reduce debugging output.
3683 2000-06-02 matthew green <mrg@redhat.com>
3685 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3686 a given instruction, replacing derived fields with their subfields.
3687 (insn-value): Use `insn-base-ifields' to find all constant values.
3688 (multi-insn-instantiate!): Comment some debug messages.
3690 2000-06-01 Ben Elliston <bje@redhat.com>
3692 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3693 symbol names used in a (c-call ..) rtx.
3695 * sim-test.scm (build-test-set): Return (()) for an instruction
3696 with no operands, so it too is included in the generated test set.
3698 2000-05-31 Ben Elliston <bje@redhat.com>
3700 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3701 (sim-test): Likewise.
3702 * Makefile.in: Regenerate.
3704 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3706 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3707 stack traceback, in an order that resembles gdb's `bt'.
3709 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3711 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3712 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3713 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3715 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3717 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3718 * iformat.scm (ifmt-expanded-ifields): Gone.
3719 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3721 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3724 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3727 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3729 * sid.scm (with-any-profile?): New function clone.
3731 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3733 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3735 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3737 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3738 (-multi-ifield-read): Parse them.
3739 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3740 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3741 (multi-ifield gen-extract): Add decode hook.
3742 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3744 * insn.scm (syntax-break-out): More correctly handle \-escaped
3746 (syntax-make-elements): Ditto.
3747 * opc-itab.scm (compute-syntax): Ditto.
3749 2000-05-17 Ben Elliston <bje@redhat.com>
3751 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3753 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3755 * gas-test.scm (build-test-set): Return (()) for an instruction
3756 with no operands, so it too is included in the generated test set.
3758 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3760 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3761 IFMT_OPERANDS and SYNTAX_BYTES.
3763 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3765 * sim.scm (with-any-profile?): New function.
3766 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3767 to decide whether or not to include profiling counters.
3769 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3771 Fuller derived-operand support for opcodes.
3772 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3773 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3774 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3775 (gen-operand-table): Omit derived- and anyof- operands from table.
3776 (gen-insn-table): Omit multi-insns from table.
3777 * iformat.scm (ifmt-expanded-fields): New function to expand
3778 subfields of derived-ifields.
3779 (ifmt-compute!): Ignore remaining multi-insns.
3780 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3782 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3783 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3784 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3785 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3786 (gen-switch): Omit anyof-operands.
3787 * operand.scm (-anyof-syntax): New function.
3788 (-anyof-merge-syntax): Call it.
3789 * utils.scm (collect): New idiomatic function.
3791 2000-05-10 Ben Elliston <bje@redhat.com>
3793 * m68k.cpu: New file (work in progress).
3795 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3797 * Makefile.am (all-local): New target. Create stamp-cgen.
3798 * Makefile.in: Regenerated.
3799 * doc/Makefile.in: Regenerated.
3801 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3803 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3804 (-operand-parse-setter): Ditto.
3805 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3806 for CACHE-ADDR operands.
3807 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3808 trace entries. Widen byte-wide values for printing.
3809 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3810 Widen byte-wide values for printing. Hexify memory addresses.
3812 2000-04-23 matthew green <mrg@redhat.com>
3814 * m32r.cpu: Fix a typo.
3816 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3818 * ia64.cpu (define-model): Change merced to Itanium.
3819 (f-qp): Change quilifying to qualifying.
3820 (movbr_ph, movbr_pvec): Delete.
3821 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3823 2000-04-07 Ben Elliston <bje@redhat.com>
3825 * doc/porting.texi (Building a simulator test suite): Clarify
3826 where generated test cases are placed.
3828 2000-04-07 Ben Elliston <bje@redhat.com>
3830 * Makefile.am (gas-test): Remove dependency on `cgen'.
3832 * Makefile.in: Regenerate.
3834 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3836 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3837 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3838 type reconfiguration.
3839 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3842 2000-03-30 Ben Elliston <bje@redhat.com>
3844 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3846 2000-03-24 Ben Elliston <bje@redhat.com>
3848 * Makefile.am (stamp-cgen): Reinstate target.
3849 * Makefile.in: Regenerate.
3851 2000-03-22 Ben Elliston <bje@redhat.com>
3853 * slib/ppfile.scm: Remove; unused.
3854 * slib/defmacex.scm: Likewise.
3856 2000-03-21 Ben Elliston <bje@redhat.com>
3858 * doc/internals.texi (Source file overview): Document.
3860 * Makefile.am (GUILEDIR): Remove.
3861 (CGEN): Ditto. Callers use $(GUILE) instead.
3862 (GUILEFLAGS): Ditto.
3864 (APPDESCFILES): Ditto.
3865 (OPCODESFILES): Ditto.
3867 (pkgdata_SCRIPTS): Ditto.
3868 (stamp-cgen): Remove target.
3869 * Makefile.in: Regenerate.
3871 * configure.in: Remove header and library tests.
3872 * configure: Regenerate.
3873 * config.in: Likewise.
3875 2000-03-20 Ben Elliston <bje@redhat.com>
3877 * read.scm: Cease loading "hob-sup.scm".
3878 * utils.scm: Inherit the fastcall family of procedures (for now).
3879 * hob-sup.scm: Remove.
3881 2000-03-20 Ben Elliston <bje@redhat.com>
3883 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3884 * configure: Regenerate.
3885 * gdbinit.in: Remove.
3887 2000-03-17 Ben Elliston <bje@redhat.com>
3889 * Makefile.am (CGEN): Use guile, not cgen.
3890 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3891 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3892 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3893 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3894 (HOB_OBJS): Likewise.
3895 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3896 (CGENOBJS): Likewise.
3897 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3898 (hobbit, hobbit.o, hobbit.c): Remove targets.
3899 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3900 (CLEANFILES): Update.
3901 * acconfig.h (WITH_HOBBIT): Remove.
3902 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3903 option --with-cgen-hobbit.
3904 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3905 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3906 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3907 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3908 * Makefile.in: Regenerate.
3909 * config.in: Likewise.
3910 * aclocal.m4: Likewise.
3911 * configure: Likewise.
3912 * README (Hobbit support): Remove.
3913 * doc/internals.texi (Conventions): Do not mention Hobbit.
3914 * doc/porting.texi (Supported Guile versions): Likewise.
3916 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
3918 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3919 callback convention to new sid sidutil::basic_cpu code.
3920 (-gen-sfrag-engine-fn): Ditto.
3921 * sid.scm (-create-virtual-insns!): Ditto.
3922 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3924 (cxmake-skip): Implement properly for pbb mode.
3926 2000-03-03 Ben Elliston <bje@redhat.com>
3928 * doc/internals.texi: New file.
3930 2000-02-29 Ben Elliston <bje@redhat.com>
3932 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3933 * doc/porting.texi: Formatting tweaks.
3935 2000-02-25 Nick Clifton <nickc@cygnus.com>
3937 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3940 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
3942 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3945 2000-02-23 Andrew Haley <aph@cygnus.com>
3947 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3950 2000-02-24 Ben Elliston <bje@redhat.com>
3952 * doc/rtl.texi (Derived operands): Add some cindex entries.
3954 2000-02-23 Ben Elliston <bje@redhat.com>
3956 * ia32.cpu (dndo): Move general purpose macro from here ..
3957 * simplify.inc (dndo): .. to here.
3959 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
3961 * arm.cpu (h-tbit): Add c-call setter function.
3964 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
3966 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3967 (-frag-cost-compute!): Ditto.
3968 * utils.scm (copyright-cygnus): Add Y2K.
3969 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3971 2000-01-25 Nick Clifton <nickc@cygnus.com>
3973 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3974 flags field of the CGEN_CPU_TABLE structure.
3976 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
3978 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3979 All references updated.
3981 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
3983 * ia32.cpu: Rewrite addressing mode support.
3985 * ifield.scm (<ifield>): New member `follows'.
3986 (ifld-known-values): New proc.
3987 (<ifield>): New method set-word-offset!.
3988 (ifld-set-word-offset!): New proc.
3989 (ifld-new-word-offset): New proc.
3990 (<ifield>): New method next-word.
3991 (<multi-ifield>): New method next-word.
3992 (ifld-next-word): New proc.
3993 (ifld-precedes?): New proc.
3994 (-ifield-parse): New args word-offset,word-length,follows.
3995 All callers updated. Handle CISC-style vs RISC-style ifields.
3996 (-ifield-read): Recognize word-offset,word-length,follows specs.
3997 (-ifld-parse-follows): New proc.
3998 (-multi-ifield-make-default-insert): New proc.
3999 (-multi-ifield-make-default-extract): New proc.
4000 (-multi-ifield-parse): Provide default values for insert,extract
4001 handlers if not specified.
4002 (<derived-ifield>): New class.
4003 (derived-ifield?): New predicate.
4004 (ifld-derived-operand?): New predicate.
4005 (f-anyof): New global.
4006 (ifld-anyof?,ifld-anyof-operand?): New predicates.
4007 (f-derived,ifld-derived?): Delete.
4008 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
4009 * insn.scm (-sub-insn-ifields): New proc.
4010 (-sub-insn-make!): New proc.
4011 (multi-insn-instantiate!): Provide initial implementation.
4012 (-insn-parse): If insn contains "anyof" operands, create a
4013 <multi-insn> object instead of a plain <insn>.
4014 (-parse-insn-format-symbol): Rewrite derived operand handling.
4015 Add anyof operand handling.
4016 (-parse-insn-format-ifield-spec): Rewrite.
4017 (-parse-insn-format-operand-spec): Delete.
4018 (-parse-insn-format-list): Delete support for `(operand value)'.
4019 (anyof-operand-format?): Replaces derived-operand-format?.
4020 * operand.scm (-operand-parse-getter): Improve error messages.
4021 (-operand-parse-setter): Ditto.
4022 (<derived-operand>): New members args,syntax,base-ifield,encoding,
4024 (<anyof-operand>): Change baseclass from <derived-operand> to
4025 <operand>. Delete member values. New members base-ifield,choices.
4026 (anyof-operand?): New predicate.
4027 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4028 (-derived-operand-parse): Rewrite.
4029 (-derived-operand-read): Rewrite.
4030 (-anyof-parse-choice): New proc.
4031 (-anyof-operand-parse): Rewrite.
4032 (-anyof-operand-read,define-anyof-operand): New procs.
4033 (<anyof-value>): Rewrite.
4034 (-anyof-initial-known): New proc.
4035 (anyof-satisfies-assertions?): New proc.
4036 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4037 (-anyof-merge-getter,-anyof-merge-setter): New procs.
4038 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4039 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4040 (-anyof-value-from-derived): New proc.
4041 (-anyof-all-choices-1,anyof-all-choices): New procs.
4042 (operand-init!): Create define-anyof-operand reader command.
4044 * insn (syntax-break-out): Take syntax as argument instead of insn.
4045 All callers updated.
4046 (syntax-make): Move here, from ???.
4048 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4049 bitrange-foo. All uses updated.
4050 (bitrange-next-word): New proc.
4052 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4054 * rtl.scm (rtx-canonicalize): Provide initial implementation.
4055 (rtx-make-const,rtx-make-enum): New procs.
4056 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
4057 (rtx-mem-addr,rtx-mem-sel): New procs.
4058 (rtx-change-address): New proc.
4059 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4060 (rtx-make-set,rtx-single-set?): New procs.
4061 (rtx-combine): New proc.
4063 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
4064 (rtx-traverse-with-locals): Ditto.
4065 (-rtx-traverse,-rtx-traverse-*): Ditto.
4067 * rtl.scm (define-subr): New proc.
4068 (rtl-init!): Create reader command `define-subr'.
4070 * cos.c (_object_mi_p): Ensure argument is an object.
4071 (indent): New function.
4072 (_object_print_elms): Add pretty-printing support.
4073 (_object_print): Ditto.
4075 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4076 (*floats-s->c-fun-table*): Ditto.
4077 * hobbit.c,hobbit.h: Rebuild.
4078 * hob-sup.c (fastcall7): New proc.
4079 * hob-sup.h (fastcall7): Declare.
4080 * hob-sup.scm (fastcall7): New macro.
4082 * mach.scm (<arch>): New member subr-list.
4083 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4084 (arch-finish!): Reverse recorded subr list.
4086 * read.scm (debug-env): New global.
4087 (debug-var-names,debug-var,debug-repl-env): New procs.
4088 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
4089 (debug-quit): Renamed from `continue'.
4091 * simplify.inc (dsmf): New pmacro.
4093 * utils.scm (plus-scan): New proc.
4094 (split-bits): Rewrite.
4095 (split-value): New proc.
4097 1999-10-13 Doug Evans <devans@casey.cygnus.com>
4099 * doc/Makefile.am (DOCFILES): Add notes.texi.
4100 * doc/Makefile.in: Rebuild.
4102 1999-10-11 Doug Evans <devans@casey.cygnus.com>
4104 * ifield.scm (ifld-derived?): New proc.
4105 (f-derived): New global.
4106 (ifield-builtin!): Create ifield f-derived.
4107 (<multi-insn>): New class.
4108 (multi-insn?): New predicate.
4109 (multi-insn-instantiate!): New proc.
4110 (-insn-parse): Create <multi-insn> objects for insns with derived
4112 (-parse-insn-format-symbol): Handle derived ifields.
4113 (-parse-insn-format-ifield-spec): New proc.
4114 (-parse-insn-format-operand-spec): New proc.
4115 (-parse-insn-format-list): Simplify.
4116 (-parse-insn-format): No longer allow (ifield-object value) spec.
4117 (derived-operand-format?): New proc.
4118 (insn-alias?): New proc.
4119 (non-alias-insns): Rewrite.
4120 (insn-real?): Renamed from real-insn?, all callers updated.
4121 (virutal-insns): Rewrite.
4122 (multi-insns): New proc.
4123 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4124 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4125 Return #f if operand doesn't have an index or if index is not an
4127 (hw-index-anyof): New proc.
4128 (-operand-parse): Allow integer indices.
4129 (<derived-operand>): New class.
4130 (derived-operand?): New predicate.
4131 (<anyof-operand>): New class.
4132 (<anyof-value>): New class.
4133 (-anyof-parse-value,-anyof-operand-parse): New procs.
4134 (-derived-operand-parse,-derived-operand-read): New procs.
4135 (define-derived-operand,define-full-derived-operand): New procs.
4136 (operand-init!): New reader command define-derived-operand.
4138 * utils.scm (list-take): Handle negative amount.
4139 (element?): Rewrite.
4141 1999-10-10 Doug Evans <devans@casey.cygnus.com>
4143 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4145 1999-10-04 Richard Henderson <rth@cygnus.com>
4147 * ia64.cpu: Checkpoint.
4149 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4151 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4153 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4154 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4156 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4158 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4159 PC returned by sim_engine_invalid_insn.
4161 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4163 * ia32.cpu: New file.
4165 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4167 * utils.scm (bit-set?): Fix off by one error.
4169 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4171 * rtl.scm (hw): Check for valid hardware element before trying to
4174 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4175 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4176 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4177 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4178 compute_operand2_foo.
4180 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4181 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4182 Call delayed_branch/branch methods instead of assigning to `vpc'.
4183 (<hw-pc>,cxmake-skip): Call skip method.
4184 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4185 (<pc>,cxmake-skip): Ditto.
4186 (-create-virtual-insns!): Ditto.
4187 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4189 (op:record-profile): Specify #:output-language "c++".
4190 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4192 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4194 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4195 (gen-semantic-code): Ditto.
4196 (-gen-sem-case,-gen-sfrag-code): Ditto.
4197 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4198 (cgen-cpu.h): File is now #included by main cpu class, rather than
4200 (cgen-defs.h): New proc.
4201 (-gen-scache-semantic-fn): Change result type to sem_status.
4202 New local `status'. Call done_cti_insn/done_insn method at end.
4203 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4205 (cgen-sem-switch.cxx): Ditto.
4206 * sid-decode.scm (-gen-idesc-decls): Update return type of
4208 (cgen-decode.h): Add using namespace @arch@.
4209 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4211 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4212 (estate-output-language-c?,estate-output-language-c++?): New procs.
4213 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4214 (estate-make-for-normal-rtl-c++): New proc.
4215 (rtl-c++-parsed,rtl-c++): New proc.
4216 (s-c-call): Invoke cpu class method if c++.
4217 (join): Use s-c-raw-call.
4219 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4222 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4223 * rtl.scm (<eval-state>): New member `modifiers'.
4224 (<eval-state>,vmake!): Handle #:modifiers.
4225 (estate-with-modifiers): New proc.
4227 * rtl.scm (rtx-side-effects?): New proc.
4228 (rtx-canonical-bool): Don't change expr if it has side effects.
4229 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4232 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4234 * sim.scm (gen-scache-type): Fix typo in last patch.
4236 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4238 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4240 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4242 * sid.scm (<hw-pc>,cxmake-skip): New method.
4243 (<pc>,cxmake-skip): New method.
4245 * decode.scm (decode-build-table): Delete args startbit,index-list.
4246 All callers updated.
4247 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4248 All callers updated.
4249 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4250 to decode-get-best-bits.
4251 * sid-decode.scm (-gen-decode-fn): Ditto.
4253 * hardware.scm (hw-bits): New proc.
4254 (-hw-parse): New arg layout. All callers updated.
4255 (define-full-hardware): New arg layout. All callers updated.
4256 (-hw-validate-layout): New proc.
4257 (-hw-create-[gs]etter-from-layout): New procs.
4258 (<hw-register>,parse!): Handle layout spec.
4259 * types.scm (type-bits): New proc.
4261 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4262 UNARY, BINARY, TRINARY rtxs.
4264 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4265 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4266 Support '- as "unused spot" indicator.
4268 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4270 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4272 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4274 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4276 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4278 (tstate-make): New arg `depth'. All callers updated.
4279 (tstate-depth,tstate-set-depth!): New procs.
4280 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4281 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4282 (-rtx-traverse): Ditto. Keep track of traversal depth.
4284 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4286 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4287 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4288 * utils-sim.scm: Decoder generator support moved here.
4289 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4290 (-gen-decoder-switch): Sort entries for more fall-throughs.
4292 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4293 * Makefile.in: Rebuild.
4294 * sim-test.scm (build-sim-testcase): Add logging message.
4295 * dev.scm (cload): Recognize SIM-TEST application.
4296 (load-stest): Set APPLICATION to SIM-TEST.
4298 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4300 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4301 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4302 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4304 * insn.scm (syntax-break-out): Handle ${foo}.
4306 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4308 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4309 (bin_PROGRAMS): Define.
4310 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4311 (cgen-hob.c): Prepend $(srcdir)/ here.
4312 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4313 (libcpu_a_SOURCES): Delete.
4314 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4315 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4316 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4317 Add AC_CHECK_LIB(guile,main).
4318 * Makefile.in: Rebuild.
4319 * doc/Makefile.in: Rebuild.
4320 * aclocal.m4: Rebuild.
4321 * config.in: Rebuild.
4322 * configure: Rebuild.
4324 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4326 Rename rtx functions from name: to name, accept optional leading
4328 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4329 * attr.scm (-attr-eval): Update.
4330 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4331 (<hw-register>,mode-ok?): Disallow VOID.
4332 (<hw-immediate>,mode-ok?): Disallow VOID.
4333 (<hw-address>,mode-ok?): Disallow VOID.
4334 * mode.scm (mode-name?): New proc.
4335 (VOID): Renamed from VM.
4336 (DFLT): Renamed from DM.
4337 (mode-builtin!): Update.
4338 * opcodes.scm (<ifield>,gen-insert): Update.
4339 (<ifield>,gen-extract): Update.
4340 (<multi-ifield>,gen-insert,gen-extract): Update.
4341 * operand.scm (op:mode): Update.
4342 (<pc>,make!): Update.
4343 (op:new-mode): Update.
4344 (-operand-read): Update.
4345 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4346 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4347 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4348 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4349 (rtx-make): Call -rtx-munge-mode&options.
4350 (rtx accessors): Rewrite.
4351 (rtx-pretty-name): Update.
4352 (-rtx-traverse-*): Update.
4353 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4354 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4355 (-rtx-make-traverse-table): Update.
4356 (-rtx-traverse-operands): Update.
4357 (-rtx-option?,-rtx-option-list?): New procs.
4358 (-rtx-munge-mode&options): New proc.
4359 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4360 (-rtx-traverse): Update.
4361 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4362 (rtx-compile-time-constant?): Update.
4363 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4364 (rtx-value): Update.
4365 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4366 * rtx-funcs.scm (*): Update.
4367 * rtl-c.scm (rtl-c-get): Update.
4368 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4369 (s-c-call,s-c-raw-call): Update.
4370 (s-boolifop,s-convop,s-if,s-cond): Update.
4371 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4372 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4373 (s-parallel,s-sequence): Update.
4374 (rtl-c-build-table): Update.
4375 * sem-frags.scm (-frag-hash-compute!): Update.
4376 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4377 for temporary bug compatibility with previous version.
4378 (-frag-expr-locals,-frag-expr-stmts): Update.
4379 (-frag-compute-desired-frags,-frag-pick-best): Update.
4380 * semantics.scm (-simplify-expr-fn): Update.
4381 (rtx-simplify): Update.
4382 (-rtx-ref-type): Update. Account for modifiers.
4383 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4384 (-build-ifield-operand!): Update.
4385 (-build-known-values): Update.
4386 (semantic-compile): Update.
4387 (-gen-reg-access-defns): Update.
4388 (gen-semantic-code,-gen-sem-case): Update.
4389 (-gen-sfrag-code,-gen-sfrag-case): Update.
4390 * sim-cpu (gen-semantic-code): Update.
4391 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4392 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4393 (-hw-cxmake-get): Update.
4394 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4395 (<hw-index>,cxmake-get): Update.
4396 (<operand>,gen-type,gen-read,cxmake-get): Update.
4397 (<operand>,gen-set-quiet,gen-set-trace): Update.
4398 (<pc>,cxmake-get): Update.
4399 (sim-finish!): Update.
4400 * utils-gen.scm (-gen-ifld-extract-base): Update.
4401 (-gen-ifld-extract-beyond): Update.
4402 (gen-multi-ifld-extract): Update.
4403 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4404 * sid.scm (<hw-pc>,gen-write): Update.
4405 (-gen-decode-insn-globals): Update.
4406 (-hw-cxmake-get): Update.
4407 (<hw-register>,cxmake-get-raw): Update.
4408 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4409 (<hw-index>,cxmake-get): Update.
4410 (<operand>,gen-type,gen-read,cxmake-get): Update.
4411 (<operand>,gen-set-quiet,gen-set-trace): Update.
4412 (<pc>,cxmake-get): Update.
4413 (-create-virtual-insns!): Update.
4414 (-decode-split-build-assertion): Update.
4416 * simplify.inc: Update.
4418 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4420 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4421 Prefix queue function name with sim_ instead of @cpu@_.
4423 * sim.scm (-with-parallel-only?): New global.
4424 (option-init!): Initialize it.
4425 (option-set!): Set it.
4426 (with-parallel-only?): New proc.
4427 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4428 and writeback markers if with-parallel-only.
4429 (-gen-idesc-init-fn): Update.
4430 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4433 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4435 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4436 with the invalid insn handler.
4438 * utils.scm (list-maybe-ref): New proc.
4440 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4442 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4444 * i960.cpu (test*-*): Delete `expr' arg.
4445 (test-op,branch-op): Update.
4447 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4449 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4450 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4452 (gen-reg-access-defn): Ditto.
4453 (-gen-hw-addr): Rewrite.
4454 (-op-gen-queued-write): Rewrite.
4455 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4456 (-gen-scache-semantic-fn): Handle with-generic-write.
4457 (-gen-no-scache-semantic-fn): Ditto.
4459 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4461 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4463 * sim.scm (-with-generic-write?): New global.
4464 (option-init!): Initialize it.
4465 (option-set!): Set it.
4466 (with-generic-write?): New proc.
4467 (-gen-hw-addr): New proc.
4468 (-op-gen-queued-write): New proc.
4469 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4471 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4473 (-gen-sem-switch): Preserve existing with-parallel? value.
4474 (-gen-sem-parallel-switch): Ditto.
4475 (-gen-write-case): Add /indent support.
4476 (cgen-write.c): Rewrite.
4478 * utils.scm (-current-print-state): New global.
4479 (make-print-state): New proc.
4480 (pstate-indent,pstate-set-indent!): New procs.
4481 (pstate-cmd?,pstate-cmd-do): New procs.
4482 (/indent): New global.
4483 (/indent-set,/indent-add): New procs.
4484 (string-write): Set -current-print-state.
4485 (-string-write): New arg pstate, all callers updated.
4486 Handle print-state commands.
4487 (-string-list-flatten): New proc.
4488 (string-list->string): Use it.
4490 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4491 (-gen-sem-fn-table-entry): New proc.
4492 (-gen-semantic-fn-table): New proc.
4493 (-gen-scache-semantic-fn): Make fn static.
4494 (-gen-no-scache-semantic-fn): Ditto.
4495 (cgen-semantics.c): Define macro SEM_FN_NAME.
4496 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4497 FAST,FULL. Update @cpu@_insn_sem contents.
4498 (-gen-semf-fn-name): Delete.
4499 (-gen-sem-fn-decls): Delete.
4500 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4501 @cpu@_semf_init_idesc_table.
4502 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4504 (cgen-decode.h): Print sfmt enum.
4505 * sid-decode.scm (-gen-semf-fn-name): Delete.
4506 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4508 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4509 (ifmt-compute!): Ditto.
4510 * sim-decode.scm (-gen-decoder-switch): Ditto.
4511 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4512 (-gen-decoder-switch): Ditto.
4514 * insn.scm (insn-virtual?): New proc.
4516 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4518 * mach.scm (<arch>): attr-list is now a pair of lists.
4519 (current-attr-list): Rewrite.
4520 (current-attr-add!,current-attr-lookup): Rewrite.
4521 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4523 1999-08-06 Richard Henderson <rth@cygnus.com>
4525 * ia64.cpu: Initial checkpoint.
4527 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4529 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4530 (pmacros-init!): Update .apply help string.
4532 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4534 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4535 (<hw-pc>,cxmake-skip): New method.
4536 (<pc>,cxmake-skip): New method.
4537 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4538 (gen-argbuf-type): New member `skip_count'.
4539 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4540 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4542 * utils-sim.scm: New file.
4543 * dev.scm (load-sim): Load it.
4544 (load-sid): Load it.
4545 * cgen-sid.scm: Load it.
4546 * cgen-sim.scm: Load it.
4547 * iformat.scm (<sformat>): New member sbuf, not initialized by
4549 * rtx-funcs.scm (skip): Rewrite.
4550 * rtl-c.scm (skip): Rewrite.
4551 * m32r.cpu (sc,snc): Update `skip' usage.
4552 * mode.scm (mode-real-mode): New proc.
4553 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4554 Distinguish fragments by the <sformat-abuf> they use.
4555 * sim.scm (gen-profile-index-type): Delete.
4556 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4557 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4558 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4559 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4560 (-gen-argbuf-elm): Rewrite.
4561 (-gen-argbuf-hw-elm): Delete.
4562 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4564 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4565 (sim-init!): Initialize them.
4566 (sim-analyze-insns!): Set them.
4567 (current-sbuf-list): New proc.
4568 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4569 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4570 * sim-model.scm (-gen-model-insn-fn): Ditto.
4571 * sim-decode.scm (-gen-extract-decls): Delete.
4572 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4573 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4575 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4576 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4577 (-gen-op-extract,-gen-op-trace-extract): New procs.
4578 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4579 gen-sfmt-argvars-foo and rewrite.
4580 (-gen-record-args): Rewrite.
4581 (-gen-extract-case): Tweak.
4582 * sid.scm (gen-profile-index-type): Delete.
4583 (ifield argbuf support): Move to utils-sim.scm.
4584 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4585 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4586 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4587 (-sim-sformat-argbuf-list): New global.
4588 (sim-init!): Initialize it.
4589 (sim-analyze-insns!): Set it.
4590 (current-sbuf-list): New proc.
4591 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4592 (-gen-argbuf-hw-elm): Delete.
4593 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4595 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4596 (-gen-extract-decls): Delete.
4597 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4599 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4600 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4601 (-gen-op-extract,-gen-op-trace-extract): New procs.
4602 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4603 gen-sfmt-argvars-foo and rewrite.
4604 (-gen-record-args): Rewrite.
4605 (-gen-extract-case): Tweak.
4607 * cgen-gh.c (gh_putc,gh_puts): New functions.
4608 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4609 * cos.c (_object_print_elms,_object_print): Use them.
4610 * hob-sup.c (fastcall_print): Use them.
4611 * configure.in: Check for scm_gen_puts, scm_puts.
4612 * config.in: Rebuild.
4613 * configure: Rebuild.
4614 * aclocal.m4: Rebuild.
4615 * Makefile.in: Rebuild.
4617 * dev.scm (load-opc): Use load instead of maybe-load.
4618 (load-gtest,load-sim,load-stest): Ditto.
4621 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4623 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4624 up to avoid g++ 'goto crosses initialization' warning.
4625 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4626 (-gen-sfrag-case): Update use of NEXT_FRAG.
4628 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4630 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4632 * read.scm: Load sem-frags.scm.
4633 * sem-frags.scm (*): Lots rewritten.
4634 * sid.scm (-with-sem-frags?): New global
4635 (with-sem-frags?): New proc.
4636 (option-init!): Initialize -with-sem-frags?.
4637 (option-set!): Recognize with-sem-frags.
4638 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4639 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4641 (-gen-sfrag-engine-decls): New proc.
4642 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4643 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4644 (-gen-sfrag-engine): New proc.
4645 (-gen-sem-case): Emit setup-semantics if specified.
4646 (-gen-sem-switch-engine): Update init/use of computed goto label.
4647 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4649 (-gen-idesc-decls): Replace sem_address with cgoto.
4650 (-gen-scache-decls): Rewrite definition of `execute' member.
4651 * arm.cpu (arm isa): Enable decode-splits.
4652 * arm7.cpu (multiply insns): Rename result to mul-result.
4654 Rename decode-specialize to decode-split.
4655 * decode.scm (*): Update.
4656 * insn.scm (*): Update.
4657 * mach.scm (*): Update.
4658 * sid.scm (*): Update.
4660 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4662 Record objects as a smob.
4663 * cos.c (scm_tc16_object): New static global.
4664 (cos_init): Initialize it.
4665 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4666 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4667 (_object_tag): Delete.
4668 (_object_make_smob): New function.
4669 (_object_make_x,_object_make_with_values_x): Rewrite.
4670 (_object_elements,_object_class_desc): Rewrite.
4671 (_object_copy,object_p): Rewrite.
4672 (_object_specialize): Rewrite.
4673 (_object_print_elms,_object_print): New functions.
4674 (object_smob): New static global.
4675 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4677 * cos.c (_make_x_symbol): New static global.
4678 (object_make): Use it.
4679 (cos_init): Initialize it.
4681 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4683 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4684 instead to determine whether to use FLD macro.
4685 (<rtl-c-eval-state>): New member ifield-var?.
4686 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4687 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4688 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4690 * rtl.scm (rtx-sequence-assq-locals): New proc.
4692 * cos.scm (-object-error): Don't crash on non-objects.
4694 * Makefile.am (CLEANFILES): Add hobbit.
4695 * Makefile.in: Rebuild.
4697 * rtl-c.scm (s-c-call): Delete unnecessary code.
4699 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4701 * rtl-c.scm (ifield): Always reference value via `FLD'.
4703 * cos.c (elm_bound_p): Return problem SCM boolean values.
4705 * utils-cgen.scm (display-argv): New proc.
4706 * cgen-opc.scm (cgen): Call it.
4707 * cgen-sim.scm (cgen): Ditto.
4708 * cgen-gas.scm (cgen): Ditto.
4709 * cgen-stest.scm (cgen): Ditto.
4710 * cgen-sid.scm (cgen): Ditto.
4712 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4714 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4715 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4716 (-gen-extract-switch): Initialize result to 1.
4717 * opcodes.scm (gen-ifield-default-type): New proc.
4718 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4720 (<hw-index>,gen-insert): Handle non-ifield indices.
4721 (<hw-index>,gen-extract): Ditto.
4722 (<hw-asm>,gen-parse): Ditto.
4723 (<hw-asm>,gen-print): Ditto.
4724 (<keyword>,gen-parse): Ditto.
4725 (<keyword>,gen-print): Ditto.
4726 (<operand>,gen-fget): Ditto.
4727 (<operand>,gen-fset): Ditto.
4729 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4730 (-gen-hw-index): Ditto.
4731 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4732 (-gen-hw-index): Ditto.
4734 * sem-frags.scm: New file.
4736 * attr.scm (attr-parse): Add better checking of input.
4738 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4740 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4742 * ifield.scm (ifld-nil?): New proc.
4744 * operand.scm (<operand>): New members getter,setter.
4745 (<operand>,make!): New args getter,setter. All uses updated.
4746 (op:getter,op:setter): New procs.
4747 (<hw-index>,field-start): Return 0 for non-ifield indices.
4748 (<hw-index>,field-length): Return 0 for non-ifield indices.
4749 (-operand-parse-getter,-operand-parse-setter): New procs.
4750 (-operand-parse): New args getter,setter. All callers updated.
4751 Always use hw-index-scalar for scalar operands.
4752 (-operand-read): Handle getter,setter.
4753 (define-full-operand): New args getter,setter. All uses updated.
4754 * semantics.scm (-build-ifield-operand!): Update.
4755 (-build-index-of-operand!): Update.
4756 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4757 * simplify.inc (define-normal-operand): Update.
4759 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4760 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4761 (s-binop,s-cmpop,s-convop): Ditto.
4762 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4763 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4764 (fcc-tests): New insn-enum.
4765 (fcc-value): Rename from fcc-type.
4766 * sparcfpu.cpu: New file. All fp support moved here.
4768 * rtl.scm (<rtx-func>): New member class.
4769 (rtx-class-*?): New procs.
4770 (def-rtx-node): New arg class. All callers updated.
4771 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4772 * rtx-funcs.scm (*): Specify class.
4774 * utils-cgen.scm (context-make-reader): New proc.
4776 * utils.scm (assert-fail-msg): New variable.
4778 (list-drop,list-tail-drop): New procs.
4780 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4782 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4783 CGEN_MIN_INSN_SIZE deleted on March 22.
4785 * ifield.scm (<ifield>,needed-iflds): New method.
4786 (<multi-ifield>,needed-iflds): New method.
4787 (ifld-needed-iflds): New proc.
4788 (multi-ifield?): New proc.
4789 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4790 (-sfmt-search-key): Include insn length in key.
4791 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4792 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4793 (-ifmt-lookup-ifmt!): Compute key here.
4794 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4795 All callers updated.
4796 (ifmt-build): Delete arg desc. New args search-key,iflds.
4797 All callers updated.
4798 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4799 in-ops,out-ops,sorted-used-iflds. All callers updated.
4800 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4802 * operand.scm (op-iflds-used): New proc.
4803 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4805 And from sid.scm,sid-cpu.scm as well.
4806 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4807 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4808 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4809 (gen-extracted-ifld-value): Ditto.
4810 (-extract-chunk-specs): Ditto.
4811 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4812 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4813 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4814 (-extract-insert-subfields): New function.
4815 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4816 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4817 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4818 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4820 (-gen-no-scache-semantic-fn): Ditto.
4821 (-gen-sem-case): Ditto.
4822 (-gen-read-case): Update calls to gen-define-ifields,
4823 gen-extract-ifields.
4824 * sim-decode.scm (-gen-record-args): Update.
4825 (-gen-sfmt-argvars-assigns): Update.
4826 (-gen-extract-case): Update.
4827 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4828 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4830 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4831 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4832 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4833 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4834 gen-define-ifields, gen-extract-ifields.
4835 (-gen-record-args): Update.
4836 (gen-sfmt-argvars-assigns): Update.
4837 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4838 with gen-define-ifields. Ditto for gen-extract-foo.
4839 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4840 procs rather than method calls.
4842 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4844 * sid.scm (-create-virtual-insns!): New local `context', pass it
4847 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4848 (operand name) not (operand object), (local name) not (local object).
4849 (rtx-traverse-with-locals): New proc.
4850 (-compile-expr-fn): New proc.
4851 (rtx-compile): Rewrite.
4852 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4853 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4854 (rtl-c-set-trace): Ditto.
4855 (operand define-fn): Recognize operand name argument.
4856 (local define-fn): Recognize sequence temp name argument.
4857 * rtx-funcs.scm (operand): Argument is operand name, not object,
4858 so call current-op-lookup.
4859 (local): Similarily, so call rtx-temp-lookup.
4861 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4862 (rtx-operand?): Ditto.
4863 (rtx-pretty-name): Ditto.
4864 (rtx-local-obj): Flag symbol argument as an error.
4865 (rtx-local-name): New proc.
4866 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4868 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4870 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4873 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4876 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4877 (*floats-s->c-fun-table*): Ditto.
4878 * hobbit.c,hobbit.h: Rebuild.
4879 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4880 * semantics.scm (rtx-simplify): Use /fastcall-make.
4882 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4884 * insn.scm (<insn>): Delete members condition, compiled-condition.
4885 (<insn>,make!): Update
4886 (<insn> getters,setters): Update.
4887 (-insn-parse,insn-read,define-full-insn): Update.
4888 * minsn.scm (minsn-make-alias): Update.
4889 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4890 (ifmt-compute!): Ditto.
4891 * sim.scm (sim-finish!): Update.
4892 * simplify.inc: (define-normal-insn): Update.
4893 * sid-cpu.scm (gen-semantic-code): Update.
4895 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4896 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4897 (ifmt-compute!): Ditto.
4899 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4901 * minsn.scm (minsn-compute-iflds): Print better error message for
4904 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4906 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4908 * Makefile.am (HOBFLAGS): New variable.
4909 (cgen-hob.c): Use it.
4911 (libcpu_a_SOURCES): Add hob-sup.c.
4912 (hob-sup.o): New rule.
4913 * Makefile.in: Rebuild.
4914 * cgen.c: #include hob-sup.h.
4915 (cgen_init_c): Call hobbit_init_support.
4916 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4917 (*special-scm->c-functions*): Add them.
4918 (display-c-expression): Handle *c-symbol*.
4919 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4920 (*floats-s->c-fun-table*): Ditto.
4921 (normalize): Recognize /fastcall-make.
4922 (normalize-fastcall-make): New proc.
4923 * hobbit.c,hobbit.h: Rebuild.
4924 * hob-sup.scm: New file.
4925 * hob-sup.c: New file.
4926 * hob-sup.h: New file.
4927 * read.scm: Load hob-sup.scm.
4928 * rtl.scm (-rtx-name-list): New variable.
4929 (rtx-name-list): New proc.
4930 (rtx-lookup): Try symbol first.
4931 (def-rtx-node): Add name to -rtx-name-list.
4932 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4933 (-rtx-traverse-anymode): New proc.
4934 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4935 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4936 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4937 (-rtx-traverse-{symornum,object}): New procs.
4938 (-rtx-make-traverse-table): Rewrite.
4939 (-rtx-traverse-operands): Rewrite arg-types handling.
4940 Handle #f result of traverser.
4941 (-rtx-traverse): Renamed from -rtx-traverse-normal.
4942 Move debug handling here.
4943 (-rtx-traverse-debug): Delete.
4944 (rtl-finish!): Change -rtx-traverse-table into list of handlers
4946 * semantics.scm (semantic-compile:process-expr!): Fix call to
4948 * utils.scm (map1-improper): New proc.
4950 1999-06-08 Doug Evans <devans@casey.cygnus.com>
4952 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4954 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4955 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4956 (<operand>,cxmake-get): Tweak.
4957 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
4959 1999-06-07 Doug Evans <devans@casey.cygnus.com>
4961 * thumb.cpu (dnti): Delete timing spec.
4964 * arm.cpu (arm isa): New fields condition, setup-semantics.
4965 (thumb isa): New field setup-semantics.
4966 (h-gr): Add attribute CACHE-ADDR.
4967 * arm7.cpu (dnai): Delete condition.
4968 (eval-cond): Delete.
4970 * mach.scm (<isa>): New member setup-semantics.
4971 (-isa-parse-setup-semantics): New proc.
4972 (-isa-parse): New arg setup-semantics.
4973 (-isa-read): Recognize setup-semantics.
4975 * sid-cpu.scm (gen-extract-fields): Split into two:
4976 gen-extract-ifields, gen-extract-ifmt-ifields.
4977 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
4978 tracing begin/end messages (done by caller now).
4979 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
4980 tracing begin/end messages (done by x-before,x-after virtual insns).
4981 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
4982 end so don't have to look it up again next time.
4983 * sid-decode.scm (-decode-expr-ifield-values): New proc.
4984 (-decode-expr-ifield-tracking-key): New proc.
4985 (-decode-expr-ifield-tracking): New proc.
4986 (-decode-expr-ifield-values-used): New proc.
4987 (-decode-expr-ifield-mark-used!): New proc.
4988 (-gen-decode-expr-set-itype): New proc.
4989 (-gen-decode-expr-entry): Rewrite.
4990 (-gen-decode-table-entry): New proc.
4991 (-gen-decoder-switch): Use it.
4992 (-gen-virtual-insn-finder): New proc.
4993 (-gen-argbuf-elm): Move here from sid.scm.
4994 (-gen-argbuf-hw-elm): Ditto.
4995 (-gen-argbuf-fields-union): Add entries for chain,before insns.
4996 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4997 conditional-execution isas.
4998 (-gen-decode-fn): Record conditional-exec ifield.
4999 * sid.scm (-current-pbb-engine?): New global.
5000 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5001 (<ifield>,gen-ifld-extract): New arg `indent'.
5002 (<multi-ifield>,gen-ifld-extract): Ditto.
5003 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
5004 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5005 (-gen-arch-model-decls): Only scan real insns.
5006 (scache-engine-insns,pbb-engine-insns): New procs.
5007 (-create-virtual-insns!): New proc.
5008 (sim-finish!): Call it.
5009 (-decode-specialize-insn?): New proc.
5010 (-decode-specialize-build-assertion): New proc.
5011 (-decode-specialize-insn-1): New proc.
5012 (-decode-specialize-insn): New proc.
5013 (-fill-sim-insn-list!): New proc.
5014 (sim-analyze!): Create copies of insns to be specialized.
5015 * utils-cgen.scm (obj-set-name!): New proc.
5017 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5018 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5020 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
5022 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5023 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5024 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5025 (attr): Rewrite test for insn owner.
5026 (member): New rtx function.
5027 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5028 as separate function.
5029 (rtx-ifield?,rtx-ifield-name): New procs.
5030 (rtx-operand-obj): Rewrite.
5031 (rtx-operand-name): New proc.
5032 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5033 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5034 (tstate-make): New args owner, known. All callers updated.
5035 (tstate-known-lookup): New proc.
5036 (rtx-traverse): New arg owner. All callers updated.
5037 (rtx-make-bool): New proc.
5038 (rtl-find-ifields): Rewrite.
5039 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5040 * semantics.scm: ... here.
5041 (rtx-const-equal,rtx-const-list-equal): New procs.
5042 (-build-known-values): New proc.
5043 (semantic-compile): New arg `insn'. Call rtx-simplify.
5044 (semantic-attrs): Ditto.
5045 * rtx-funcs.scm (member,number-list): New rtx functions.
5047 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5048 Rewrite. Delete arg `all-attrs'. All callers updated.
5049 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
5051 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5053 * decode.scm (subdtable-add): Handle `expr' entries.
5054 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
5055 (exprtable-entry-*): Update.
5056 (exprtable-entry-iflds): New proc.
5057 (exprentry-cost): New proc.
5058 (exprtable-sort,-gen-exprtable-name): New procs.
5059 (exprtable-make): New arg `name'. All callers updated. use vector.
5060 (exprtable-*): Update.
5061 (-build-decode-table-entry): Don't issue collision warning if all are
5062 specialized insns. Sort exprtable entries before building table.
5064 * read.scm (-reader-process-expanded-1): Move pretty printing of
5065 input to logging level 4.
5067 * utils.scm (string-list->string): New proc.
5069 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5071 (insn-read): Delete leading '-' in name. All callers updated.
5072 (real-insn?): New proc.
5073 (real-insns): Rewrite.
5074 (insn-has-ifield?): New proc.
5075 (insn-builtin!): Create insn attribute SPECIALIZED.
5077 * mach.scm (<arch>): Delete member app-data.
5078 (current-raw-insn-list): New proc.
5079 (insn-list-car,insn-list-splice!): New procs.
5080 (<decode-specialize>): New class.
5081 (-isa-parse-decode-specialize): New proc.
5082 (-isa-parse-decode-specializes): New proc.
5083 (<isa>): New members `condition', `decode-specializes'.
5084 (-isa-parse-condition): New proc.
5085 (-isa-parse): New args condition, decode-specializes.
5086 (-isa-read): Recognize condition, decode-specializes.
5087 (-isa-add-decode-specialize!): New proc.
5088 (modify-isa): New proc.
5089 (isa-conditional-exec?,state-conditional-exec?): New procs.
5090 (arch-init!): New reader command `modify-isa'.
5092 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5093 (mode-signed,mode-unsigned?): New procs.
5095 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
5097 * types.scm (<array>): New method get-shape.
5098 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5100 (hw-shape,hw-num-elms): New procs.
5101 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5102 if there's more than 255 registers.
5103 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5105 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5108 1999-05-21 Doug Evans <devans@casey.cygnus.com>
5110 * cgen-sid.scm (sim-arguments): Add -X.
5111 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5112 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5113 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
5114 Simplify by supporting pbb engine only.
5115 (-gen-sem-switch-init): New proc.
5116 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5117 (cgen-sem-switch.cxx): New proc.
5118 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5119 with with-pbb?. Support dual scache/pbb engines.
5120 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5121 Support dual scache/pbb engines.
5122 (cgen-decode.h): Generate semantic fn decls if with-scache?.
5123 * sid.scm (*) with-pbb? replaces with-sem-switch?.
5124 (sim-finish!): Create pbb support virtual insns if with-pbb?.
5126 1999-05-10 Ben Elliston <bje@cygnus.com>
5128 * arm7.cpu: Remove coprocessor related fields, operands and insn
5129 definitions for now. Take the undefined instruction trap instead.
5130 (ldmda-wb): New instruction.
5131 (ldmib-wb): Likewise.
5132 (ldmdb-wb): Likewise.
5133 (stmdb-wb): Likewise.
5134 (stmib-wb): Likewise.
5135 (stmda-wb): Likewise.
5137 1999-05-08 Doug Evans <devans@casey.cygnus.com>
5139 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5140 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5142 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5143 hobbit can't handle optional third arg.
5145 1999-05-07 Doug Evans <devans@casey.cygnus.com>
5147 * arm.cpu (h-tbit): Delete set spec.
5148 (h-mbits): Don't call arm_mbits_set in set spec.
5149 * arm.sim: New file.
5150 * hardware.scm (modify-hardware): New proc.
5151 (hardware-init!): Add modify-hardware command.
5152 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5153 (-hw-gen-set-quiet): Ditto.
5154 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5155 hardware attribute. Load $arch.sim file if present.
5156 * utils-cgen.scm (keyword-list?): New proc.
5157 (keyword-list->arg-list,arg-list-validate-name): New procs.
5158 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5160 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5162 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5165 * attr.scm (obj-prepend-atlist!): New proc.
5167 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5169 * sid.scm (<operand>,profilable?): Use op:type.
5170 * sim.scm (<operand>,profilable?): Use op:type.
5172 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5174 * utils.scm (find-index,find): Be more stack friendly.
5176 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5179 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5181 * arm.cpu (h-gr-usr): New hardware element.
5182 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5183 (arm-mode): New keyword.
5184 (h-mbits): Add set spec.
5185 (h-spsr): Implement get/set specs.
5187 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5188 (-reader-process-expanded-1): Pretty print logging output.
5190 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5191 (cgen-cpu.h): Print enums before hardware elements.
5192 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5193 * sid-decode.scm (cgen-decode.cxx): Ditto.
5194 * sid-model.scm (cgen-model.cxx): Ditto.
5196 * utils-cgen.scm (context-error): Accept variable number of
5199 * rtx-funcs.scm (error:): New rtx function.
5200 * rtl-c.scm (s-case-vm): New proc.
5201 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5202 (s-case): Simplify, handle non-VM result.
5203 (error:): New rtx function.
5205 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5207 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5208 (test-hi,test-ls): Fix cbit handling.
5209 (shift-type,h-operand2-shifttype): Move here ...
5210 * arm7.cpu: ... from here.
5211 (set-cond,set-cond-maybe,dnix): Delete, unused.
5212 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5213 * arm.cpu: ... to here.
5214 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5215 (alu-cmn): Use set-add-flags.
5216 (alu-tst): Use set-zn-flags.
5217 (alu-cmp): Use set-sub-flags.
5218 (lsl,lsr,asr): Set condition codes.
5219 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5220 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5222 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5223 All callers updated.
5224 (sub-sp): Rename from add-sp-neg.
5225 (f-lbwl-offset): Delete.
5226 (f-lbwl-hi,f-lbwl-lo): New ifields.
5227 (lbwl-hi,lbwl-lo): Update.
5228 (bl-hi): Add 4 to pc.
5229 (push-reg,pop-reg): Simplify.
5230 (push,push-lr): Push registers in correct order.
5231 (pop,pop-pc): Pop registers in correct order.
5232 (save-reg-inc,load-reg-inc): Simplify.
5233 (ldmia): Save registers in correct order.
5235 1999-04-30 Ben Elliston <bje@cygnus.com>
5237 * arm7.cpu (f-op-hdt): Remove; unused.
5238 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5239 (f-ror-imm8): New multi-ifield.
5240 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5242 (f-uimm12): New field.
5243 (ror-imm8): New operand.
5245 (hdt-offset8): Reinstate operand.
5246 (offset4-hi,offset4-lo): Remove.
5247 (set-cond): Remove macro; unused.
5248 (set-cond-maybe): Likewise.
5249 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5250 (store-word/byte): Likewise.
5251 (load-halfword): Use hdt-offset8 multifield operand instead of two
5252 4-bit operands that are explicitly combined by semantic code.
5253 (do-halfword-store): Bug fix. Set address when not preindexing.
5254 (store-halfword): Also use hdt-offset8 operand.
5255 (arith-op): Avoid clobbering source registers when one of them is
5256 the destination register.
5257 (arith-imm-op): Likewise.
5258 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5259 (teq-imm): Likewise.
5260 (ldm-p): Rename to ldmdb.
5261 (stm-pw): Rename to stmdb-wb.
5262 (multi-action): New macro; test reg-list bits and execute a
5263 semantic fn if the bit is set.
5264 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5265 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5266 (all insns): Use dnai entries for simplicity rather than dni.
5267 (*): Use short-form of (const ..).
5269 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5271 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5272 member eval to evaluator.
5273 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5274 (tstate-make): Delete arg op-fn. All callers updated.
5275 (tstate-op-fn,tstate-set-op-fn!): Delete.
5276 (rtx-traverse): Delete op-fn arg. All callers updated.
5277 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5278 split out of -simplify-for-compilation.
5280 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5281 (cgen_DEPENDENCIES): Add stamp-cgen.
5282 (stamp-cgen): New rule.
5283 * Makefile.in: Rebuild.
5285 * rtl-c.scm (enum:): Define emitter for.
5286 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5288 (rtx-constant-value,rtx-enum-value): New procs.
5289 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5290 (rtx-compile-time-constant?): Return #t for enums.
5291 (rtx-true?,rtx-false?): Handle enums.
5292 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5293 building result by hand.
5294 (rtx-simplify-eq-attr-insn): Ditto.
5295 * rtx-funcs.scm (enum:,enum): New rtx functions.
5297 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5299 (arch-analyze-insns!): New proc.
5300 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5301 of calling ifmt-compute! directly.
5302 * sid.scm (-sim-insns-analyzed?): Delete.
5303 (sim-analyze!): Call arch-analyze-insns! instead of calling
5304 ifmt-compute! directly.
5305 * sim.scm (-sim-insns-analyzed?): Delete.
5306 (sim-analyze!): Call arch-analyze-insns! instead of calling
5307 ifmt-compute! directly.
5309 * utils.scm (string-take-with-filler): New proc.
5310 (string-take): Use it.
5312 * pgmr-tools.scm: New file.
5313 * read.scm: Load it.
5314 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5316 * insn.scm (insn-base-mask): Renamed from insn:mask.
5317 All callers updated.
5318 (insn-base-mask-length): Renamed from insn:mask-length.
5319 All callers updated.
5320 (insn-foo): Renamed from insn:foo. All callers updated.
5321 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5322 * iformat.scm (compute-insn-base-mask-length): Renamed from
5323 compute-insn-mask-length. All callers updated.
5324 (compute-insn-base-mask): Renamed from compute-insn-mask.
5325 All callers updated.
5327 * enum.scm (-enum-parse-prefix): New proc.
5328 (<enum>,make!): Don't parse enum values here.
5329 (-enum-parse): Do it here. Call -enum-parse-prefix.
5330 (define-full-insn-enum): Ditto.
5331 (enum-vals-upcase): New proc.
5332 * hardware.scm (define-keyword): Make enum prefix uppercase.
5333 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5335 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5336 (<ifield>,field-extract): New method.
5337 (<multi-ifield>,field-extract): New method.
5338 (ifld-extract): New proc.
5339 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5340 (ifld-extract-fn-name): Renamed from ifld-extract.
5342 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5343 All callers updated.
5345 * ifield.scm (ifld-lsb0?): New proc.
5346 (sort-ifield-list): New arg up?. All callers updated.
5347 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5348 rather than global state.
5350 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5352 * insn.scm (pretty-print-insn-format): New proc.
5354 * Makefile.in: Rebuild.
5355 * aclocal.m4: Rebuild
5356 * configure: Rebuild.
5358 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5360 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5361 * configure: Rebuild.
5362 * aclocal.m4: Rebuild.
5363 * Makefile.in: Rebuild.
5364 * doc/Makefile.in: Rebuild.
5365 * doc/version.texi: Rebuild.
5367 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5369 * utils.scm (bits->bools): New proc.
5371 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5373 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5374 subfield's gen-ifld-extract-decl method.
5376 1999-04-23 Ben Elliston <bje@cygnus.com>
5378 * arm7.cpu (ldrsh-pu): Remove.
5379 (do-halfword-load): New pmacro.
5380 (load-halfword): Likewise.
5381 (do-halfword-store): Likewise.
5382 (store-halfword): Likewise.
5383 (strh-*): New instructions.
5384 (ldrsb-*): Likewise.
5386 (ldrsh-*): Likewise.
5388 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5390 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5393 * arm7.cpu (do-word/byte-store): Fix typo.
5395 1999-04-22 Ben Elliston <bje@cygnus.com>
5397 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5398 register is the program counter (R15).
5400 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5401 (str-*): Implement using store-word-byte. Remove older versions.
5402 (bic): Use the `inv' rtx for obtaining bitwise complements.
5403 (bic-imm): Likewise.
5405 (mvn-imm): Likewise.
5406 (store-indev-reg): Remove crufty pmacro.
5407 (load-indiv-reg): Likewise.
5408 (ldm-p): Reverse the order of register processing for decrement.
5410 (stbi): Remove; handled by the str-* insns.
5412 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5414 * thumb.cpu (cmp): Fix carry bit computation.
5417 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5419 * arm.cpu (h-tbit): Specify set spec.
5421 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5422 (set-sub-flags): Interpret "carry bit" as a borrow.
5423 (all sub/cmp insns): Carry bit is actually a borrow bit.
5424 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5425 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5427 (hireg-add,hireg-cmp,hireg-move): Ditto.
5429 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5430 (-CGEN-LANG-VERSION): Ditto.
5432 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5434 * pmacros.scm (-pmacro-make): New arg `default-values',
5435 all callers updated.
5436 (-pmacro-default-values): New proc.
5437 (-pmacro-process-keyworded-args): New proc.
5438 (-pmacro-process-args): New proc.
5439 (-pmacro-invoke): Process arguments before expanding macro.
5440 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5441 (define-pmacro): Handle default values specified in arg list.
5442 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5443 (rtx-boolif-op-arg[01]): New procs.
5444 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5445 (rtx-simplify): Handle not,orif,andif.
5446 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5447 * utils.scm (alist-copy): New proc.
5448 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5450 (swi): Explicitly set pc.
5452 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5454 1999-04-17 Ben Elliston <bje@cygnus.com>
5456 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5457 correctly adjusts the program counter now.
5459 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5460 (f-signed?): Rename from `f-hdt-signed?'.
5461 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5462 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5463 (f-hdt-offset8): Use new field names.
5464 (ldr): Use `imm12' field, not `offset12', since we do our own
5466 (str, str-*): Likewise.
5467 (ldu-*): Remove most; better not implemented than broken.
5469 (ldrsh-pu): New insn.
5473 (ldm-p): Likewise; replace (load-indiv-reg) version.
5475 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5477 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5478 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5479 (*): Explicitly specify mode in c-call.
5480 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5482 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5483 (arith-imm-op): New pmacro.
5484 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5485 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5487 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5489 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5491 * rtl.scm (rtl-find-ifields): Implement.
5493 * utils-gen.scm: New file.
5494 * read.scm: Load it.
5495 * desc.scm: Move generic attribute code to utils-gen.scm.
5496 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5497 * Makefile.in: Rebuild.
5499 * arm7.cpu (R15-OFFSET): New attribute.
5501 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5502 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5503 for reg-shift version.
5505 (data processing insns): Reorganize. Use dnai.
5507 * attr.scm (attr-kind): New proc.
5508 (attr-list-enum-list): Rewrite.
5509 (-attr-sort): Split result into two lists, bools and non-bools.
5510 (current-attr-list-for): Update.
5512 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5513 * sid-cpu.scm (-gen-attr-decls): New proc.
5514 (-gen-insn-attr-decls): New proc.
5515 (cgen-desc.h): New proc.
5516 (cgen-cpu.h): Put everything in @cpu@ namespace.
5517 (gen-parallel-exec-type): Change prefix of parexec struct from
5519 (-gen-trace-record-type): Ditto for trace_record struct.
5520 (-gen-write-case): Update.
5521 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5522 @prefix@. Update scache struct references.
5523 (-gen-sem-case): Update scache struct references.
5524 (-gen-sem-switch-fn): Update idesc struct reference.
5525 Update insn_type enum reference.
5526 (cgen-write.cxx): Update scache,argbuf references.
5527 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5528 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5529 from @cpu@ to @prefix@.
5530 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5531 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5532 from @CPU@ to @PREFIX@.
5533 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5534 from @CPU@ to @PREFIX@.
5535 (-gen-decode-insn-globals): Generate insn attributes.
5536 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5537 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5538 semantic fn typedef.
5539 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5540 Change prefix of scache struct from @cpu@ to @prefix@.
5541 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5542 Change prefix of idesc struct from @cpu@ to @prefix@.
5543 Change prefix of insn_type enum from @cpu@ to @prefix@.
5544 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5545 from @cpu@ to @prefix@.
5546 (-gen-scache-decls): Change prefix of scache struct from
5547 @cpu@ to @prefix@. Update idesc struct name.
5548 Update decode,execute methods.
5549 (-gen-extract-case): Update to type name changes.
5550 (-gen-decode-fn): Ditto.
5551 (cgen-decode.h): Put everything in @cpu@ namespace (except
5552 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5553 (cgen-decode.cxx): Add using namespace @cpu@.
5554 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5555 model_mark_get/set from @cpu@ to @prefix@.
5556 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5558 (gen-model-fn-decls): Update idesc struct name. Change prefix
5559 of model_insn_before/after from @cpu@ to @prefix@.
5560 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5561 Update insn_word type name.
5562 (-gen-model-timing-table): Update INSN_TIMING struct name.
5563 (-gen-model-init-fn): Update MODEL_DATA struct name.
5564 (-gen-mach-defns): Update name of init_idesc_table fn.
5565 (cgen-model.cxx): Add using namespace @cpu@.
5566 * sid.scm (gen-cpu-class): Delete.
5567 (gen-attr-type): New proc.
5568 (gen-obj-attr-sid-defn): New proc.
5569 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5570 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5572 (gen-cpu-insn-enum): Update name of insn enum.
5573 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5575 (swi): Rename @cpu@_swi to @prefix@_swi.
5577 * decode.scm (-build-decode-table-entry): Remove heuristic for
5578 distinguishing insns, and use insn ifield-assertion specs.
5580 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5581 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5582 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5583 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5584 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5585 all callers updated.
5586 (gen-attr-name): New proc
5587 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5588 (gen-obj-attr-defn): Delete num_nonbools count.
5590 * iformat.scm (ifmt-analyze): Handle insn-condition.
5591 (ifmt-compute!): Ditto.
5592 * insn.scm (<insn>): Specify default value for condition,
5593 post-cond-trap,compiled-condition,compiled-semantics.
5594 (<insn>,make!): New arg condition.
5595 (<insn>): Add getters for condition,compiled-condition.
5596 (-insn-parse): New arg condition, all callers updated.
5597 (-insn-read): Recognize condition spec.
5598 (define-full-insn): New arg condition.
5599 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5600 * semantics.scm (semantic-compile): Change arg sem-code to
5602 (semantic-attrs): Ditto.
5603 * sim.scm (sim-finish!): Update calls to define-full-insn.
5604 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5605 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5606 * sid.scm (sim-finish!): Update call to define-full-insn.
5608 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5610 * Makefile.am (sim-cpu): Allow specification of ISA.
5611 * Makefile.in: Rebuild.
5613 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5615 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5617 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5619 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5621 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5623 * attr.scm (atlist?): New proc.
5624 (-attr-eval): Rewrite.
5625 (attr-parse): New proc.
5626 (atlist-parse): Use it.
5628 * decode.scm (exprtable-entry-make): New proc.
5629 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5630 (exprtable-make,exprtable-insns): New procs.
5632 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5634 (hardware-builtin!): Make h-memory a vector.
5636 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5637 All callers updated.
5638 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5640 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5642 (-insn-parse): Set semantics to #f if not specified.
5643 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5645 (-parse-insn-format): Recognize `=' iformat spec.
5647 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5648 (isa-max-insn-bitsize): Ditto.
5650 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5652 (<ifield>,gen-extract): Ditto.
5653 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5654 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5655 (gen-define-ifmt-ifields): New proc.
5656 (gen-semantic-code): Rewrite.
5657 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5658 (-gen-decoder-switch): Handle expression tables.
5659 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5661 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5662 instead of gen-define-fields.
5663 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5665 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5666 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5667 (-gen-ifld-extract-beyond): Ditto.
5668 (<multi-ifield>,gen-ifld-extract): Ditto.
5669 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5670 rtl evaluation code.
5671 (op:read): Build an <eval-state> to pass to gen-read.
5672 (op:write): Build an <eval-state> to pass to gen-write.
5673 (op:record-profile): Build an <eval-state> to pass to
5675 * sim-cpu.scm (gen-semantic-code): Rewrite.
5676 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5678 (-gen-ifld-extract-beyond): Ditto.
5679 (<multi-ifield>,gen-ifld-extract): Ditto.
5680 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5681 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5682 rtl evaluation code.
5683 (op:read): Build an <eval-state> to pass to gen-read.
5684 (op:write): Build an <eval-state> to pass to gen-write.
5685 (op:record-profile): Build an <eval-state> to pass to
5688 * operand.scm (<operand>): Give `selector' default value of #f.
5689 Give `num' default value of -1. Give `cond?' default value of #f.
5690 (op:new-mode): Delete arg `set?', all uses updated.
5692 * read.scm (reader-error): Handle #f return from port-filename.
5693 (-init-parse-cpu!): Call rtl-c-init!.
5694 (reader-install-builtin!): Call rtl-builtin!.
5696 * rtl-c.scm: New file.
5697 * semantics.scm: New file.
5698 * read.scm: Load them.
5699 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5701 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5703 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5704 (-rtx-num-text,-rtx-max-num): New globals.
5705 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5706 (-rtx-macro-lookup): New proc.
5707 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5708 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5709 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5710 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5711 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5712 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5713 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5714 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5715 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5716 (rtx-pretty-name): New proc.
5717 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5718 (rtx-traverse-*): Rewrite rtx traversing.
5719 (rtx-eval-*): Rewrite rtx evaluation.
5720 (rtx-compile): New proc.
5721 (rtx-simplify): New proc.
5722 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5723 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5724 (ifield,index-of): Rewrite.
5725 (name): Renamed from `operand:'.
5726 (operand,xop,local): New rtx's.
5727 (current-insn): Rewrite.
5728 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5729 (cgen-hob.h): Remove rule for.
5730 (cgen-hob.o): Depend on cgen-hob.c only.
5731 * Makefile.in: Rebuild.
5733 * utils-cgen.scm (vmake): New proc.
5734 (<context>): New class.
5735 (context-make-prefix,context-error): New procs.
5737 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5739 * i960.cpu: Add some ??? comments.
5740 (xnor, ornot): New instructions.
5741 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5743 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5745 * cos.scm (-object-error): Print better error message.
5747 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5748 (-pmacro-env-ref): Renamed from -env-ref.
5750 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5752 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5754 (hardware-builtin!): Delete h-pc builtin.
5755 * arm.cpu (h-pc): Define.
5756 (h-gr): Delete get,set specs. Make array of 16 regs again.
5757 * arm7.cpu (set-logical-cc-maybe): Delete.
5758 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5759 (data processing insns): Rewrite.
5760 * m32r.cpu (h-pc): Define.
5761 * fr30.cpu (h-pc): Define.
5762 * i960.cpu (h-pc): Define.
5763 * sparc.cpu (h-pc): Define.
5765 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5766 (s-parallel): Replace do {...} while (0) with {...}.
5767 (s-sequence): Ditto.
5769 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5771 (-gen-write-case,-gen-sem-case): Ditto.
5772 (-gen-sem-case): Only specify `written' if profiling or
5773 parallel-write-back.
5774 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5775 (-gen-sem-switch-fn): New proc.
5776 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5777 based on with-sem-switch option.
5778 * sid-decode.scm (-gen-decode-insn-globals): Only define
5779 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5780 addresses in idesc_table if !with-sem-switch.
5781 (-gen-sem-fn-decls): Rewrite.
5782 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5783 member based on with-sem-switch. Only define
5784 `idesc_table_initialized_p' member if with-sem-switch.
5785 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5786 * sid.scm (-with-sem-switch?): New variable.
5787 (option-init!): Initialize it.
5788 (option-set!): Set it.
5789 (with-sem-switch?): New proc.
5790 (-op-gen-set-trace): Only emit `written' reference if profiling.
5791 (sim-finish!): Use h_pc_set to set pc.
5793 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5795 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5796 All callers updated.
5797 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5799 * sid.scm (gen-argbuf-type): Delete.
5800 (-gen-argbuf-fields-union): Move to ...
5801 * sid-decode.scm: ... here.
5803 * read.scm (-reader-process-expanded-1): New proc.
5804 (-reader-process-expanded): Call it to catch nested begin's.
5805 (reader-process): Move `begin' handling to -reader-process-expanded.
5807 * insn.scm (-insn-read): Fix name of `format' spec.
5809 * pmacros.scm (.pmacro): New builtin.
5810 (scan-symbol): If procedure macro, return macro rather than its symbol.
5811 (check-macro): Don't do lookup, instead check if (car expr) is
5813 (scan-list): Handle .pmacro.
5814 (scan): No longer re-examine text for another macro invocation.
5815 (-pmacro-build-lambda): New proc.
5816 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5817 another, fetch the other's value (rather than doing it during
5820 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5822 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5823 * Makefile.in: Rebuild.
5825 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5826 (-fill-slot!): Simplify.
5827 (-build-slots): Simplify.
5829 * dev.scm (load-sid): Don't load sid-arch.scm.
5831 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5833 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5836 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5838 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5839 * decode.scm: ... here. New file.
5840 * sid-decode.scm: Use decoder computation code in decode.scm.
5841 * read.scm: Load decode.scm.
5843 * arm.cpu (arm710 model): Add u-exec function unit.
5844 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5845 Add get/set specs to redirect reg 15 to h-pc.
5846 (h-*): Indicate for both ARM and THUMB isas.
5847 (cbit,nbit,vbit,zbit): Ditto.
5848 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5849 (h-cpsr): Make virtual. Add get/set specs.
5850 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5851 (h-spsr): New virtual reg.
5852 * arm7.cpu (shift-type): New explicitly defined keyword.
5853 (h-operand2-shifttype): Use it.
5854 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5855 All callers updated. Don't set cbit.
5856 (logical-op): Add rm to ifield list. Change case to case:. Use
5857 shift-type enum as case choices. Set cbit.
5858 (and,orr,eor,add-imm): Uncomment out.
5859 (undefined): Temporarily comment out.
5860 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5861 (lda-pc,lda-sp): Ditto.
5862 (ldr-pc): Rename from ldr.
5863 (cbranch): Mark insns as being thumb insns.
5865 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5867 * cgen-sid.scm: Don't load sid-arch.scm.
5868 (sim-arguments): Delete unused entries.
5869 * sid-arch.scm: Delete.
5871 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5872 (<insn>,ifld-assertions): New member.
5873 (<insn>,make!): New arg ifld-assertions, all callers updated.
5874 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5875 (insn:fields): Delete.
5876 (-insn-parse): New arg ifld-assertions. All callers updated.
5877 (-insn-read,define-insn): New procs.
5878 (define-full-insn): New arg ifld-assertions. All callers updated.
5879 (insn-init!): New comment define-insn.
5881 * model.scm (-model-parse): Ensure at least one unit specified.
5883 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5884 (<c-expr-temp>,get-name): New method.
5885 (-rtx-make-current-closure,s-closure): New proc.
5886 (hw:): Wrap rtx indices in a closure.
5887 (-gen-case-prefix): New proc.
5889 * rtx-funcs.scm (case:): Fix call to s-case.
5890 (closure): New rtx func.
5892 * hardware.scm (<hardware-base>): New member isas-cache.
5893 (<hardware-base>,get-isas): New method.
5894 (hardware-builtin): Indicate for all isas.
5895 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5896 * mach.scm (current-arch-mach-name-list): Return list of names.
5897 (current-isa-mach-name-list): Ditto.
5898 (define-arch): Install builtin objects here.
5899 * read.scm (keep-atlist?): Only keep if both mach and isa are
5901 (keep-mach-atlist?): New proc.
5902 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5903 (reader-install-builtin!): Renamed from -install-builtin!.
5904 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5905 -gen-cpu-reg-access-defns. Rewrite.
5906 (gen-reg-access-defn): Delete.
5907 (-gen-hardware-struct): New proc.
5908 (-gen-hardware-types): Simplify. Add multiple-isa support.
5909 (gen-semantic-fn,-gen-all-semantics): Delete.
5910 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5911 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5912 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5913 Call sem-analyze-insns!.
5914 (cgen-semantics.cxx): Add multiple-isa support.
5915 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5916 (-gen-scache-decls,-gen-decode-fn): Ditto.
5917 (cgen-decode.h): Call sem-analyze-insns!.
5918 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5919 * sid.scm (-with-multiple-isa?): New variable.
5920 (option-init!): Initialize it.
5921 (option-set!): Set it.
5922 (with-multiple-isa?): New proc.
5923 (gen-cpu-ref): New arg isas. All callers updated.
5924 (gen-cpu-class): New proc.
5925 (*-get-macro,*-set-macro): Delete.
5926 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5927 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5928 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5929 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5930 (-sim-insns-analyzed): New global variable.
5931 (sim-init!): Reset it.
5932 (sim-analyze-insns!): New proc.
5933 (sim-analyze!): Don't do instruction analysis here.
5934 (sim-finish!): Specify isa of x-invalid insn.
5935 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5937 1999-03-22 Doug Evans <devans@casey.cygnus.com>
5939 * thumb.cpu (cpu,mach,model): Delete.
5940 (dntf): New pmacro. Use it for all field definitions.
5941 (dntop): New pmacro. Use it for all operand definitions.
5942 (asr): Correct field list.
5943 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5945 * utils-cgen.scm (define-getters): New macro to simplify
5946 writing class accessors.
5947 (define-setters): Ditto.
5948 (sanitize): Recognize isa elements.
5950 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5951 state-parallel-exec?.
5952 * sid-model.scm (*): Ditto.
5953 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
5954 state-decode-assist.
5956 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5957 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5958 * sim-decode.scm (-gen-decode-switch): Ditto.
5960 * sim-arch.scm (-regs-for-access-fns): Delete.
5961 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5962 (-gen-arch-reg-access-defns): Delete.
5964 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5965 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5966 with state-parallel=exec?.
5967 (cgen-*): Call sim-analyze-insns! here.
5968 * sim-decode.scm (cgen-*): Ditto.
5969 * sim-model.scm (cgen-*): Ditto.
5970 * sim.scm (-sim-insns-analyzed): New global variable.
5971 (sim-init!): Reset it.
5972 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
5973 already done the analysis.
5975 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5978 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5979 (arm arch): Update isa spec.
5980 (arm,thumb isas): Define.
5981 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5982 (arm7tdmi mach): Add isa spec.
5983 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
5984 `const' on word number.
5985 * fr30.cpu (fr30 arch): Update isa spec.
5987 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5989 * i960.cpu (i960 arch): Update isa spec.
5991 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5992 liw-insns,parallel-insns moved to isas spec.
5993 * m32r.cpu (m32r arch): Update isas spec.
5995 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5996 liw-insns,parallel-insns moved to isa spec.
5997 * sparc.cpu (sparc arch): Update isas spec.
5998 (sparc isa): Define.
5999 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6000 decode-assist moved to isa spec.
6001 * sparc64.cpu (sparc64 cpu): Ditto.
6002 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6003 * desc-cpu.scm (-gen-isa-table-defns): New proc.
6004 (-gen-mach-table-defns): Output mach table.
6005 (-gen-hash-defines): Delete insn size macros, except for
6007 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
6008 (cgen-desc.h): Define MAX_ISAS.
6009 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
6010 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
6011 (arch-* accessors): Renamed from arch:*. All callers updated.
6012 (current-arch-isa-name-list): New proc.
6013 (-arch-parse-isas): Renamed from -arch-parse-isa.
6014 (def-isa-attr!): Rewrite.
6015 (<iframe>): New class.
6016 (<itype>): New class.
6018 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6019 (isa-integral-insn?,isa-parallel-exec?): New procs.
6020 (-isa-parse,-isa-read,define-isa): New proc.
6021 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6022 liw-insns moved to <isa>.
6023 (cpu-* accessors): Renamed from cpu:*. All callers updated.
6024 (-cpu-parse,-cpu-read): Update.
6025 (state-*): Renamed from state:*. All callers updated.
6026 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6028 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6029 (state-decode-assist): New proc.
6030 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6031 (-adata-set-derived!): Rewrite.
6032 (adata-integral-insn?): Renamed from adata:integral-insn?. All
6034 (arch-init!): Add define-isa command.
6035 * read.scm (<reader>): Default keep-isa member to (all).
6036 (reader-* accessors): Renamed from reader:*. All callers updated.
6037 (-keep-isa-set!): Call string->symbol on isa name list.
6038 (keep-isa-validate!): Rewrite.
6039 (current-isa): New proc.
6040 (keep-isa?): Recognize "all".
6041 (-init-parse-cpu!): New arg keep-isa. All callers updated.
6042 Call -keep-isa-set!.
6043 (cmd-if): Recognize keep-isa?.
6044 (cpu-load): New arg keep-isa. All callers updated.
6045 (-opt-spec-update): New proc.
6046 (common-arguments): First arg is string, not symbol.
6047 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
6049 * rtl.scm (rtx-get): Default mode of string arg is INT.
6051 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
6053 * rtx-funcs.scm (join:): Pass cpu to handler.
6055 * configure.in (guile_include_dir): Delete.
6056 * configure: Rebuild.
6057 * Makefile.in: Rebuild.
6058 * doc/Makefile.in: Rebuild.
6060 * sid-cpu.scm (-extract-chunk-specs): New proc.
6061 (gen-define-fields): Use it.
6062 (-extract-chunk): New proc.
6063 (-gen-extract-beyond-var-list): Use it.
6064 (gen-extract-fields): Simplify.
6066 1999-03-22 Ben Elliston <bje@cygnus.com>
6068 * arm7.cpu (ldri-p): New instruction.
6069 (swi): Do not vector through 0x8 yet--there is nothing there.
6072 (all): Use (const x) in subreg expressions.
6074 1999-03-19 Ben Elliston <bje@cygnus.com>
6076 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6079 1999-03-17 Doug Evans <devans@casey.cygnus.com>
6081 * fr30.cpu (define-arch): Specify "forced" default-alignment.
6082 * mach.scm (-parse-alignment): Recognize "forced" alignment.
6083 * sim-cpu.scm (-extract-chunk-specs): New proc.
6084 (gen-define-fields): Use it.
6085 (-extract-chunk): New proc.
6086 (-gen-extract-beyond-var-list): Use it.
6087 (gen-extract-fields): Simplify.
6089 Port to guile 1.3.1.
6090 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6091 (LIBIBERTY): New var.
6092 (HOB_OBJS): Add cgen-gh.o.
6093 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6094 * Makefile.in: Rebuild.
6095 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6096 * config.in: Rebuild.
6097 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6098 libncurses, libtermcap.
6099 Add checks for needed functions in guile 1.2 not in guile 1.3,
6100 and vice versa. Add test for 3 argument scm_make_vector.
6101 * configure: Rebuild.
6102 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6103 definitions if guile doesn't have them.
6104 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6105 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
6106 with gh_vector_set_x.
6107 (cgh_qsort): Replace gh_list_length with gh_length.
6108 * cgen-gh.h: Add decls for added functions.
6109 (cgh_qsort): Don't declare if IN_HOBBIT.
6110 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
6111 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6112 scm_make_vector with gh_make_vector.
6113 * cos.scm: Use vector-length instead of length on vectors.
6114 * dev.scm (cload): Make varargs proc with keyword/value args.
6115 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
6116 provide version that works with guile 1.2 or 1.3.
6117 Include private copy of scmhob.h.
6118 * scmhob.h: New file. Keep our own copy for now.
6120 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
6122 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6124 (-rtx-traverse-operands): Dump cx temp stack if debugging.
6125 (-cx-temp-dump-stack): Pretty up output.
6127 * arm.cpu: comment out thumb.cpu until isa support ready.
6128 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6129 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6130 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6132 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6134 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6136 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6137 (<hw-address>,mode-ok?): unsigned/signed are compatible.
6139 * operand (op:new-mode): Improve error message.
6141 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
6142 * arm7.cpu: New file.
6144 1999-03-12 Ben Elliston <bje@cygnus.com>
6146 * arm.cpu: Lots of minor fixes after desk checking.
6148 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6150 * thumb.cpu: snapshot of current work
6152 * rtl.scm (rtx-get): Tweak error message.
6154 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6156 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6157 * Makefile.in: Rebuild.
6159 * cos.c (cos_vector_copy): New function.
6160 (_object_copy): Use it.
6162 * mode.scm (mode:eq?): Clean up.
6163 * rtl.scm (cx-new-mode): Copy attributes.
6164 (rtx-get): Don't make copy if <c-expr> with identical mode.
6166 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6168 (gr-names): h-gr register names moved here.
6170 (cr-names): h-cr register names moved here.
6172 (dr-names): h-dr register names moved here.
6174 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6175 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6176 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6178 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6180 (gr-names): h-gr register names moved here.
6182 (cr-names): h-cr register names moved here.
6184 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6185 (h-accums,h-psw): Ditto.
6186 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6188 (gr-names): h-gr register names moved here.
6189 (h-gr-indices): Delete.
6190 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6191 (sparc64 h-gr): Ditto.
6192 (h-y): Add get/set specs.
6194 (fp operands): Rewrite.
6195 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6196 (h-tbr,h-cwp,h-wim): Ditto.
6197 * sparc64.cpu (h-fpsr): Add get/set specs.
6198 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6199 (fp-ld-op): New arg `dest', all callers updated.
6200 (*): Replace `make-di' with `join'.
6202 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6204 (gen-semantic-code): Save/restore rtl generator state.
6205 (cgen-cpu.h): Call rtl-gen-init!.
6206 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6207 (-gen-ifld-extract-beyond): Ditto.
6208 (<multi-ifield>,gen-ifld-extract): Ditto.
6209 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6211 (-hw-gen-set-quiet-pc): Ditto.
6212 (<hw-pc>,gen-write): Ditto.
6213 (-hw-cxmake-get): Ditto. Call getter function if present.
6214 (<hw-register>,cxmake-get-raw): New method.
6215 (<hw-register>,gen-set-quiet-raw): New method.
6216 (-hw-gen-set-quiet): New arg `gstate'.
6217 (hw-fun-access?): Delete.
6218 (gen-reg-access-defn): Output function contents.
6219 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6221 (-gen-hw-index): Ditto.
6222 (op:read): Update gen-read invocation.
6223 (op:write): Update gen-write invocation.
6224 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6226 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6227 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6228 (<unit>,gen-profile-code): Update to sim.scm version.
6230 * sim-arch.scm (-regs-for-access-fns): New proc.
6231 (-biggest-reg-mode): New proc.
6232 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6233 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6234 virtual regs separately.
6235 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6237 (gen-semantic-code): Save/restore rtl generator state.
6238 (cgen-cpu.h): Call rtl-gen-init!.
6239 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6240 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6241 renamed to mach-bfd-name.
6242 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6243 (-gen-ifld-extract-beyond): Ditto.
6244 (<multi-ifield>,gen-ifld-extract): Ditto.
6245 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6246 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6247 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6249 (hw-fun-access?): Delete.
6250 (-hw-gen-set-quiet-pc): New arg `gstate'.
6251 (<hw-register>,gen-get-macro): Rewrite.
6252 (<hw-register>,gen-set-macro): Rewrite.
6253 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6254 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6255 (<hw-register>,cxmake-get-raw): New method.
6256 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6257 (<hw-register>,gen-set-quiet-raw): New method.
6258 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6260 (-gen-hw-index): Ditto.
6261 (<hw-index>): New arg `gstate'.
6262 (-gen-hw-selector): Update call to rtx-c.
6263 (<pc>): New arg `gstate'.
6264 (op:read): Update gen-read invocation.
6265 (op:write): Update gen-write invocation.
6266 (<operand>,cxmake-get): Handle raw-reg.
6267 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6268 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6269 (<operand>,gen-set-quiet): Handle raw-reg.
6270 (<operand>,gen-set-trace): Handle raw-reg.
6271 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6273 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6274 cgen_operand_type enum.
6275 (gen-operand-table): Add operand type enum. Replace pointer to
6276 hardware element with its enum. Null terminate table.
6277 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6278 Build operand table.
6279 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6280 * mach.scm (<arch-data>): New member `isas'.
6281 (adata-isas): New accessor.
6283 (isa-default-insn-word-bitsize): New accessor.
6284 (isa-enum): New proc.
6285 (current-arch-default-insn-word-bitsize): Delete.
6286 (current-isa-list,current-isa-lookup): New procs.
6287 (-arch-parse-isa): New proc.
6288 (-arch-parse): Rewrite.
6289 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6290 (define-arch): Define ISA attribute.
6291 (def-isa-attr!,isa-supports?): New procs.
6292 (<mach>): New member `isas'.
6293 (mach-isas): New accessor.
6294 (-mach-parse): New arg `isas', all callers updated.
6295 (-mach-read): Recognize `isas'.
6296 (arch-finish!): Rewrite.
6297 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6298 @arch@_cgen_get_{int,vma}_operand.
6299 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6300 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6301 of pointer to table entry.
6302 * opcodes.scm (gen-switch): Handle multiply defined operands.
6303 * operand.scm (op-sort): New proc.
6305 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6306 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6307 (hw-enum): Accept symbol argument.
6308 (hardware-builtin!): Delete attribute FUN-ACCESS.
6309 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6311 * attr.scm (atlist-source-form): New proc.
6312 (attr-builtin!): New attr `PRIVATE'.
6313 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6314 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6315 if they have `PRIVATE' attribute.
6316 (gen-hw-table-defns): Output definitions of explicitly defined
6318 * hardware.scm (<keyword>): New member print-name. Rename member
6319 `value' to `values', all uses updated.
6320 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6321 (keyword-parse): Rewrite.
6322 (-keyword-read): New proc.
6323 (define-keyword): New proc.
6324 (-hw-parse-keyword): New proc.
6325 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6327 (-hw-parse-values): Ditto.
6328 (-hw-parse-get,-hw-parse-set): Rewrite.
6329 (hardware-init!): Add new comment define-keyword.
6330 * mach.scm (<arch>): New member `kw-list'.
6331 (arch:kw-list,arch_set-kw-list!): New accessors.
6332 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6334 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6335 * mode.scm (mode-class-integral?): New proc.
6336 (mode-class-float?,mode-class-numeric?): New procs.
6337 (mode-integral?,mode-float?,mode-numeric?): New procs.
6338 (mode-compatible?): New proc.
6339 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6341 (<ifield>,gen-extract): Ditto.
6342 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6343 (<gstate>): New class.
6344 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6345 (gstate-context,gstate-set-context!): New accessors.
6346 (gstate-macro?,gstate-set-macro?!): New accessors.
6347 (gstate-make,gstate-copy): New procs.
6348 (-rtl-current-gstate): New global.
6349 (current-gstate-simulator?): New proc.
6350 (current-gstate-context,current-gstate-macro?): New procs.
6351 (current-gstate,current-gstate-set!): New procs.
6352 (rtl-gen-init!): Rewrite.
6353 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6354 (tstate-make): New arg `gstate', all callers updated.
6355 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6356 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6357 (tstate-gstate,tstate-set-gstate!): New accessors.
6358 (tstate-copy): New proc.
6359 (tstate-new-cond?,tstate-new-set?): Rewrite.
6360 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6361 (rtx-traverse): New arg `gstate', all callers updated.
6362 (rtx-strdump): New proc.
6363 (-simplify-for-compilation): New arg `gstate', all callers updated.
6364 (semantic-in-out-operands): Ditto.
6365 (semantic-attrs): Ditto.
6366 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6367 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6368 (rtx-value): Rewrite.
6369 (<c-expr>,gen-name): New method.
6370 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6371 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6372 (cx-new-mode): New proc.
6373 (-rtx-c-with-tstate): New proc.
6374 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6376 (-rtx-mode): Rewrite.
6377 (-rtx-mode-compatible?): New proc.
6378 (<c-expr-temp>): New member `value'.
6379 (cx-temp:value): New accessor.
6380 (<c-expr-temp>,make!): Override default method.
6381 (<c-expr-temp>,cxmake-get): Rewrite.
6382 (<c-expr-temp>,gen-set-quiet): Rewrite.
6383 (<c-expr-temp>,gen-set-trace): Rewrite.
6384 (gen-temp-defs): Use cx-temp:value.
6385 (record-temp!): New arg value, all callers updated.
6386 (cx-temp:cx:make): Delete.
6387 (-cx-temp-dump-stack): New proc.
6388 (rtx-get): New arg `gstate', all callers updated. Do mode
6389 compatibility checks. Ensure result has specified mode.
6390 (rtx-set-quiet): New arg `gstate', all callers updated.
6391 (rtx-set-trace): Ditto.
6392 (s-c-call): New arg `tstate', all callers updated.
6393 (s-c-raw-call): Ditto.
6394 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6395 (s-cmpop,s-if,e-if): Ditto.
6396 (s-subreg): New proc.
6397 (-par-new-temp!): New proc.
6398 (-par-next-temp!): Rewrite.
6399 (-par-replace-set-dests): Use -par-new-temp!.
6400 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6401 (s-sequence): Use -rtx-c-with-state.
6402 * rtx-funcs.scm (*): Update.
6403 (raw-reg:): New rtx function.
6405 (join:,subreg:): New rtx functions.
6407 * insn.scm (<insn>): New members pre-cond-trap, condition,
6408 post-cond-trap, compiled-condition.
6410 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6412 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6414 * utils-cgen.scm (parse-symbol): New proc.
6415 (parse-string): New proc.
6416 (gen-get-macro,gen-set-macro): New arg `index-args'.
6417 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6418 Prepend \ to newlines.
6420 * utils.scm (alist-remove-duplicates): Delete.
6422 * sid.scm (sim-init!): Delete private debugging code.
6424 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6426 * cgen-sid.scm: New file for C++ simulator application.
6427 * sid-arch.scm: Ditto.
6428 * sid-cpu.scm: Ditto.
6429 * sid-decode.scm: Ditto.
6430 * sid-model.scm: Ditto.
6432 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6434 1999-03-05 Ben Elliston <bje@cygnus.com>
6436 * arm.cpu: New file.
6438 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6440 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6441 * Makefile.in: Rebuild.
6443 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6444 (-attr-parse): Validate default value.
6446 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6447 (-CGEN-LANG-VERSION): Ditto.
6448 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6449 (<reader>): New member keep-isa plus accessors.
6450 (-keep-isa-set!,keep-isa-validate!): New procs.
6451 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6452 (common-arguments): New variable.
6453 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6454 (-debug-repl,continue): New procs.
6455 (-cgen,cgen): New procs.
6456 * cgen-gas.scm: Rewrite.
6457 * cgen-opc.scm: Rewrite.
6458 * cgen-sim.scm: Rewrite.
6459 * cgen-stest.scm: Rewrite.
6461 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6462 (gas-test-finish!): Call opcodes-finish!.
6463 (gas-test-analyze!): Call opcodes-analyze!.
6464 (<hw-asm>): New method test-data.
6465 (<operand>,testdata): Rewrite.
6466 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6467 (sim-test-finish!): Call opcodes-finish!.
6468 (sim-test-analyze!): Call opcodes-analyze!.
6469 (<hw-asm>): New method test-data.
6470 (<operand>,testdata): Rewrite.
6472 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6474 * fixup.scm (reverse!): Define if missing.
6475 * *.scm: Use reverse! instead of list-reverse!.
6477 * utils.scm (leading-id-char?): New proc.
6478 (id-char?): Rewrite.
6479 (chars-until-delimiter): New proc.
6480 * opc-itab.scm (extract-syntax-operands): Rewrite.
6481 (strip-mnemonic): Rewrite.
6482 (compute-syntax): Rewrite.
6484 * pmacros.scm (-pmacro-substr): New proc.
6485 (pmacros-init!): Add builtin .substr.
6487 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6489 * thumb.cpu: New file.
6491 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6493 * Makefile.am (CGENCFLAGS): New variable.
6494 (WITH_HOBBIT): Use automake conditional.
6495 (CGEN_HOB_SRC): New variable.
6496 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6497 (*.o): Compile with CGENCFLAGS.
6498 (cgen-hob.c): Simplify.
6499 (cgen-nohob.c): New rule.
6500 (hobbit): Renamed from hob.x.
6501 (CLEANFILES): Add cgen-nohob.c.
6502 * Makefile.in: Rebuild.
6503 * doc/Makefile.in: Rebuild.
6504 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6505 (WITH_HOBBIT): Use AM_CONDITIONAL.
6506 * configure: Rebuild.
6507 * aclocal.m4: Rebuild.
6509 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6510 with string-write-map.
6512 * sim-cpu.scm (hw-need-storage?): New proc.
6513 (-gen-hardware-types): Use it.
6514 (gen-parallel-exec-elm): Call op-save-index?.
6516 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6518 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6520 (-gen-ifld-extract-beyond): Ditto.
6521 (<integer>): Delete all references.
6522 (<sim-hardware>): Delete.
6523 (hw-profilable?): New proc.
6524 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6525 (<hw-register>): Rename method get-index-mode to save-index?.
6526 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6527 (<hw-register>,gen-sym-decl): Make virtual.
6528 (<hw-memory>,gen-sym-decl): Make virtual.
6529 (<hw-memory>): Rename method get-index-mode to save-index?.
6530 (<hw-address>,gen-sym-decl): Make virtual.
6531 (<operand>): New method save-index?.
6532 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6534 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6535 prefix added. All uses updated.
6537 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6538 rather than pointer to table entry.
6540 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6541 Remove all hw-asm,op-asm support.
6542 (-gen-parse-number,-gen-parse-address): New procs.
6543 (<keyword>,gen-parse): Redo function name computation.
6544 (<keyword>,gen-print): Ditto.
6545 (<operand>,gen-function-name): Rewrite.
6546 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6547 (opcodes-init!): Delete call to add-parser!.
6549 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6550 Define enum using hardware semantic name.
6551 (-gen-hw-decl,-gen-hw-defn): New procs.
6552 (gen-hw-table-decls): Use -gen-hw-decl.
6553 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6554 CGEN_HW_ENTRY structs.
6555 (gen-operand-table): Output hw's enum, not pointer to table entry.
6556 (-gen-cpu-open): Build table of selected hardware elements.
6558 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6559 (<hardware> support): Delete.
6560 (<hw-asm>): Delete, moved to hardware.scm.
6561 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6562 (<hw-asm>,gen-table-entry): New method.
6563 (<hw-asm>,parse!): Delete.
6564 (<keyword>,gen-table-entry): New method.
6565 (<keyword>,parse!): Delete.
6566 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6567 for gen-decl,gen-defn,gen-ref,gen-init.
6568 (desc-init!): Don't create parser for operand asm specs.
6570 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6571 * ifield.scm (<ifield>): New member `mode'.
6572 (<ifield>,make!): New arg `mode'.
6573 (ifld-mode): Rewrite.
6574 (ifld-hw-type): Rewrite.
6575 (<ifield>,min-value): Rewrite.
6576 (<ifield>,max-value): Rewrite.
6577 (-ifield-parse): New arg `mode'.
6578 (-ifield-read): Update.
6579 (define-full-ifield): New arg `mode'.
6580 (define-full-multi-ifield): Ditto.
6581 (-multi-ifield-parse): Ditto.
6582 (-multi-ifield-read): Update.
6583 (define-full-multi-ifield): New arg `mode'.
6584 (ifield-builtin!): Update definition of f-nil.
6585 * simplify.inc (define-normal-ifield): Update call to
6587 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6588 (define-normal-hardware): Delete arg asm. New args indices, values,
6589 handlers. Update call to define-full-hardware.
6590 (define-simple-hardware,dsh): New pmacros.
6591 (define-normal-operand): Update call to define-full-operand.
6592 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6593 Specify INT/UINT mode instead.
6594 (h-gr,h-cr): Use "indices" instead of "asm".
6595 (h-dr,h-ps): Update keyword syntax.
6596 (h-r13,h-r14,h-r15): Ditto.
6597 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6598 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6599 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6600 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6601 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6602 Specify INT/UINT mode instead.
6603 (h-gr): Use "indices" instead of "asm".
6604 (h-cc): Update keyword syntax.
6605 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6606 Specify INT/UINT mode instead.
6607 (h-hi16,h-slo16,h-ulo16): Update.
6608 (h-gr,h-cr): Use "indices" instead of "asm".
6609 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6610 (h-accums): Update keyword syntax.
6611 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6612 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6613 Specify INT/UINT mode instead.
6614 (h-gr-indices): New pmacro.
6615 (h-gr32,h-gr64): Split up from h-gr.
6616 (h-a): Update type spec. Use values instead of asm spec.
6617 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6618 (h-y,h-annul-p): Ditto.
6619 (h-asr): Update keyword spec.
6620 (h-lo10,h-lo13,h-hi22): Update.
6621 (get-freg-spec,set-freg-spec): New pmacros.
6622 (h-fr32,h-fr64): Split up from h-fr.
6623 (rdd): Comment out get/set specs.
6624 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6625 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6626 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6627 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6628 UNSIGNED. Specify INT/UINT mode instead.
6629 (h-*): Use dsh instead of dnh where appropriate.
6630 (h-ixcc): Update type spec. Use "values" instead of "asm".
6631 (h-p,h-membarmask): Ditto.
6632 (membarmask): Use "handlers" instead of "asm".
6634 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6635 values,handlers,getters,setters plus accessors.
6636 (hw-mode-ok?,hw-default-mode): New procs.
6637 (<hardware-base>): Rename method new-mode to mode-ok?
6638 (<hardware-base>): New method get-index-mode.
6639 (hw-index-mode): New proc.
6640 (pc?): Delete, moved to operand.scm.
6641 (address?): New proc.
6642 (<hardware>): Delete.
6643 (<hw-asm>): Definition moved here from desc.scm.
6644 (keyword-parse): New proc.
6645 (hardware-parsers): Delete.
6646 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6647 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6648 (-hw-parse-get,-hw-parse-set): New procs.
6649 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6650 indices,values,handlers,get,set. Rewrite.
6651 (-hw-read-extra): Delete.
6653 (define-hardware): Don't add object if not selected.
6654 (define-full-hardware): Ditto.
6655 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6656 (<hw-register>): Member `type' moved to baseclass. Delete member
6658 (<hw-register>,parse!): Rewrite.
6659 (<hw-register>): Delete methods get-rank,get-mode.
6660 (<hw-register>): Method new-mode renamed to mode-ok?
6661 (<hw-register>): New method get-index-mode.
6662 (<hw-pc>,parse!): Rewrite.
6663 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6664 (<hw-memory>,parse!): Rewrite.
6665 (<hw-memory>): Delete methods get-rank,get-mode.
6666 (<hw-memory>): Method new-mode renamed to mode-ok?
6667 (<hw-memory>): New method get-index-mode.
6668 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6670 (<hw-immediate>,parse!): Rewrite.
6671 (<hw-immediate>): Delete methods get-rank,get-mode.
6672 (<hw-immediate>): Method new-mode renamed to mode-ok?
6673 (<hw-address>): Delete member hw-asm.
6674 (<hw-address>,parse!): Rewrite.
6675 (<hw-address>): Delete methods get-rank,get-mode.
6676 (<hw-address>): Method new-mode renamed to mode-ok?
6677 (hw-profilable?): Delete.
6678 (hardware-init!): Delete hardware-parsers reference.
6679 Update argument specs of command define-full-hardware.
6680 (hardware-builtin!): Update definitions of hardware builtins.
6681 * operand.scm (<operand>): New members hw-name,mode-name.
6682 Delete member op-asm. New member handlers.
6683 (<operand>,make!): Update.
6684 (op:hw-name,op:mode-name,op:handlers): New procs.
6687 (<operand>): New method get-index-mode.
6688 (<pc>,make!): Update.
6689 (op:new-mode): Rewrite.
6690 (operand-parsers): Delete.
6691 (-operand-parse): Rewrite. Return #f if insn not selected.
6692 (-op-read-extra): Delete.
6693 (-operand-read): Update.
6694 (define-operand,define-full-operand): Update.
6695 (operand-init!): Delete operand-parsers reference.
6696 Update syntax of define-full-operand command.
6698 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6699 (define-full-insn): Update.
6700 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6701 (define-full-minsn): Update.
6703 * mode.scm (<mode>): New member class.
6704 (mode:class): New proc.
6706 (-mode-parse): New arg class.
6707 (define-full-mode): Update.
6708 (mode-find): Rewrite.
6709 (mode-make-int,mode-make-uint): New procs.
6710 (mode-init!): Update syntax of define-full-mode command.
6711 (mode-builtin!): Update definitions of builtin modes.
6713 * model.scm (<profile>): Delete.
6715 * read.scm (keep-atlist?): New proc.
6716 (keep-multiple?): New proc.
6717 (<parser-list>): Delete.
6718 (add-parser!,parse-spec!): Delete.
6720 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6721 (def-rtx-syntax-node): Ditto.
6722 (-rtx-traverse-debug?): New variable.
6723 (tstate-make): New proc.
6724 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6725 (tstate-new-cond?,tstate-new-set?): New procs.
6726 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6727 tstate. All callers updated.
6728 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6729 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6730 (-build-operand!): Replace arg cond? with tstate.
6731 (-build-reg-operand!,-build-mem-operand!): Ditto.
6732 (-build-index-of-operand!): Update making of <operand> object.
6733 (s-ifield): New arg tstate. All callers updated.
6734 (hw:): New arg tstate. All callers updated. Replace call to
6735 current-hw-lookup with current-hw-sem-lookup-1.
6736 (s-index-of): New arg tstate. All callers updated.
6738 (-rtx-use-sem-fn?): New proc.
6739 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6741 (s-convop): Only use semantic mode when using semantic cover fns.
6742 (s-cmpop): Call -rtx-use-sem-fn?.
6743 (s-cond,s-case): New arg tstate. All callers updated.
6744 (s-parallel,s-sequence): Ditto.
6746 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6748 * types.scm (<scalar>): Rewrite implementation.
6749 (<integer>): Delete.
6750 (parse-type): Rewrite.
6752 * utils-cgen.scm (parse-handlers): New proc.
6754 * utils.scm (!=): New proc.
6756 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6758 * pmacros.scm (-pmacro-expand): Fix typo.
6760 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6762 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6763 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6764 * i960.cpu (build-hex2): New pmacro.
6765 (insn-opcode): Simplify.
6766 (insn-opcode2): Ditto.
6768 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6769 * cgen-stest.scm (catch-with-backtrace): Ditto.
6771 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6773 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6774 All callers updated.
6775 (-pmacro-invoke): New proc.
6776 (-pmacro-sym,-pmacro-str): New procs.
6777 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6778 (pmacros-init!): Install builtins .iota, .map, .apply.
6779 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6780 (h-fr): Simplify register name spec.
6781 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6782 * utils.scm (num-args-ok?): New proc.
6784 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6786 * pmacros.scm (-pmacro-error): New proc.
6787 (-pmacro-expand): Use it.
6788 (-pmacro-splice): New proc.
6789 (pmacros-init!): Install new builtin .splice.
6791 * sparc.cpu: Include sparc64.cpu when appropriate.
6792 (f-mmask,f-simm11): Moved to sparc64.cpu.
6793 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6794 (ANNUL attribute): Delete.
6795 (test-* pmacros): New arg cc, all callers updated.
6796 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6797 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6799 (ldstub,swap): Moved to sparccom.cpu.
6800 * sparc64.cpu: Add more insns.
6802 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6804 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6806 (cgen-sem-switch.c): Ditto.
6807 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6808 moved to cgen-engine.h.
6809 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6810 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6811 global. Cache attributes and insn length in IDESC.
6812 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6813 @cpu@_opcode renamed to @cpu@_get_idata.
6814 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6815 done later underneath sim_resume.
6816 (@mach@_mach): Record @cpu@_prepare_run.
6817 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6819 (-hw-gen-set-quiet-pc): Ditto.
6820 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6821 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6822 (<hw-addr>,cxmake-get): Ditto.
6823 (<hw-iaddr>,cxmake-get): Ditto.
6824 (<pc>,cxmake-get): Ditto.
6825 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6826 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6827 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6828 (<hw-pc>,gen-write): Use hw-selector-default.
6829 (<hw-register>,gen-write): Ditto.
6830 (<hw-memory>,gen-write): Ditto.
6831 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6832 (-gen-hw-selector): New proc.
6834 * desc.scm: New file.
6835 * desc-cpu.scm: New file.
6836 * opcodes.scm: Split up into several smaller files.
6837 * opc-asmdis.scm: New file.
6838 * opc-ibld.scm: New file.
6839 * opc-itab.scm: New file.
6840 * opc-opinst.scm: New file.
6841 * Makefile.am (desc): New target.
6842 (opcodes): Update args to cgen-opc.scm.
6843 * Makefile.in: Rebuild.
6844 * aclocal.m4: Rebuild.
6845 * config.in: Rebuild.
6846 * configure.in: Update arg to AC_INIT.
6847 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6848 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6850 * configure: Rebuild.
6851 * cgen-gas.scm: Update files to load.
6852 * cgen-opc.scm: Ditto. Reorganize option letters.
6853 * cgen-sim.scm: Update files to load.
6854 * cgen-stest.scm: Ditto.
6855 * dev.scm (cload): New app "DESC".
6856 (load-opc): Update files to load.
6857 (load-gtest,load-sim,load-stest): Ditto.
6859 * attr.scm (bool-attr?): New proc.
6860 (attr-list-enum-list): New proc.
6861 (-attr-sort): Rewrite.
6862 (attr-builtin!): Give ALIAS attribute a fixed index.
6863 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6864 calculate attribute enum list.
6865 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6867 * insn.scm (-insn-parse): Renamed from parse-insn.
6869 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6872 * mode.scm (-mode-parse): Renamed from parse-mode.
6874 * operand.scm (<operand>): New member `selector'.
6875 (<operand>,make!): Use default selector.
6876 (hw-selector-default): New variable.
6877 (hw-selector-default?): New proc.
6879 * pmacros.scm (pmacros-init!): New proc.
6880 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6881 (-env-set!): Delete.
6882 (-pmacro-expand): New proc apply-macro.
6883 Use it in scan-list,scan. Scan list first, then see if macro
6885 (define-pmacro): Rewrite.
6886 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6888 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6889 selected if (current-mach) seen.
6890 (rtx?): Renamed from rtx-uneval?, all callers updated.
6891 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6893 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6894 selector, all callers updated.
6895 (hw:): New arg selector, all callers updated. Delete old comments
6897 (reg:,mem:): Handle selectors
6898 * rtx-funcs.scm (reg:): Handle selectors.
6900 * read.scm: Renamed from cpu.scm.
6901 (<command>): New class.
6902 (<reader>): New member commands.
6903 (reader-add-command!): New proc.
6904 (reader-lookup-command): New proc.
6905 (reader-error,-reader-process-expanded,reader-process): New procs.
6906 (reader-read-file!): New proc.
6907 (include): Call reader-read-file!.
6909 (cpu-load): Call reader-read-file!.
6910 * utils.scm (num-args): New proc.
6911 * simplify.inc: New file.
6912 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
6913 procs. Move define-normal-foo procs (and abbreviated forms) to
6914 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
6916 * fr30.cpu: Include simplify.inc.
6917 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6918 * i960.cpu: Include simplify.inc.
6919 * m32r.cpu: Include simplify.inc.
6920 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6921 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6922 * sparc.cpu: Include simplify.inc.
6923 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6924 * utils-cgen.scm (parse-error): Moved to read.scm.
6925 (sanitize): Rewrite.
6926 (utils-init!): New proc.
6928 1999-02-02 Doug Evans <devans@casey.cygnus.com>
6930 * sparc.cpu: New file.
6931 * sparc32.cpu: New file.
6932 * sparc64.cpu: New file.
6933 * sparccom.cpu: New file.
6934 * sparc.opc: New file.
6936 1999-01-27 Frank Eigler <fche@cygnus.com>
6938 * utils.scm (gen-copyright): New proc.
6940 1999-01-27 Doug Evans <devans@casey.cygnus.com>
6942 Parameterize rtl parsing, rather than having lots of little handlers.
6943 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6944 Delete member traverse.
6945 (rtx:set-traverse!): Delete.
6946 (-rtx-valid-types,-rtx-valid-matches): New variables.
6947 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6948 instead of expression. All callers updated.
6949 (def-rtx-node): New args arg-types,arg-modes.
6950 (def-rtx-syntax-node): Ditto.
6951 (def-rtx-dual-mode): Ditto.
6952 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6953 All callers updated.
6954 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6955 All callers updated.
6956 (rtx-macro-expand): New proc.
6957 (-rtx-traverse-check-args): Delete.
6958 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6959 an rtx specific traverser.
6960 (-rtx-any-mode?,-rtx-symornum?): New procs.
6961 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6962 (-rtx-traverse-no-mode): Delete.
6963 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6964 (-rtx-traverse-operands): Rewrite.
6965 (-rtx-traverse-expr): Rewrite.
6966 (rtx-traverse): Don't expand macros here, leave for caller to do.
6967 (rtx-simplify): Delete.
6968 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
6970 (rtx-true?,rtx-false?): Ditto.
6971 (-rtx-ref-type): Set dest is operand 1 now.
6972 (-simplify-for-compilation): New proc.
6973 (semantic-in-out-operands): Recognize regno as an alias for index-of.
6974 Expand macros before calling rtx-traverse. Sort operands by name
6975 to avoid unnecessary semantic formats.
6976 (semantic-attrs): New proc.
6977 (rtx-uneval?): Handle (<rtx-func> ...).
6978 (s-boolifop): Delete arg mode. All callers updated.
6979 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6980 (eq-attr): New arg obj.
6982 * m32r.cpu (rach): Update calls to andif.
6984 * minsn.scm (-minsn-parse-expansion): Renamed from
6985 parse-minsn-expansion.
6986 (-minsn-parse): Renamed from parse-minsn.
6987 (-minsn-read): Renamed from read-minsn.
6988 (def-minsn): Don't check APPLICATION here.
6989 (def-full-minsn): New proc.
6990 (define-macro-insn): Check APPLICATION here. Expand macros.
6991 (define-normal-macro-insn): Ditto.
6993 * utils.scm (word-value): New arg start-lsb?.
6994 (word-mask,word-extract): Ditto.
6995 (split-bits,powers-of-2): Use integer-expt instead of expt.
6996 (bit-set?): Handle 32 bit values (which are bignums).
6997 (cg-logand,cg-logxor): New functions.
6998 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6999 (<ifield>,field-value): Update call to word-value.
7000 (<ifield>,min-value): Use integer-expt instead of expt.
7001 (<ifield>,max-value): Ditto.
7003 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7005 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7007 Compute raw instruction format in addition to semantic based format.
7008 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7009 (<iformat> accessors): Rename accessors to ifmt-*.
7010 (<sformat>): New class.
7011 (fmt-enum): Renamed from fmt:enum.
7012 (-ifmt-search-key): Rewrite.
7013 (-sfmt-search-key): New proc.
7014 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7015 Compute iformat and sformat search keys.
7016 (ifmt-build): Update.
7017 (sfmt-build): New proc.
7018 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7019 (ifmt-compute!): Compute instruction format <iformat> based on
7020 instruction fields alone. Compute new semantic format <sformat>
7021 based on instruction fields and semantic information.
7022 (ifmt:lookup): Delete.
7023 * mach.scm (<arch>): New member sfmt-list, plus accessors.
7024 (current-sfmt-list): New proc.
7025 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7026 Rename member fmt to ifmt. New members fmt-desc, sfmt.
7027 (insn-length,insn-length-bytes): Update.
7028 (insn:mask-length,insn:mask): Update.
7029 (insn-lookup-op): Update.
7030 * gas-test.scm (gas-test-analyze!): Update.
7031 (gen-gas-test): Ditto.
7032 * sim-test.scm (sim-test-analyze!): Update.
7033 (gen-sim-test): Ditto.
7034 * opcodes.scm (gen-operand-instance-table): Update.
7035 (gen-operand-instance-ref): Ditto.
7036 (max-operand-instances): Use heuristic if semantics not parsed.
7037 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7038 (opcodes-analyze!): Only scan semantics of building operand instance
7040 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7041 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7042 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7043 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7044 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7045 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7046 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7048 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7049 New arg lsb0? All callers updated.
7050 (decode-bits): New arg lsb0?. All callers updated.
7051 (opcode-slots): Update call to bit-set?. Call integer-expt instead
7053 (-gen-decode-bits): New arg lsb0?. All callers updated.
7054 (build-slots): Call integer-expt instead of expt.
7055 (build-decode-table-entry): Handle crossing word boundaries better.
7056 (-gen-decode-switch): New arg lsb0?. All callers updated.
7057 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7059 * enum.scm (define-enum): Rewrite.
7060 (define-normal-enum): Ditto.
7061 (def-full-insn-enum): New proc.
7062 (define-normal-insn-enum): Rewrite.
7064 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7066 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7068 * dev.scm: Add sid support.
7070 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7071 (CLEANFILES): Add tmp-*.
7072 * Makefile.in: Rebuild.
7074 * doc/Makefile.am: New file.
7075 * doc/Makefile.in: New file.
7076 * doc/cgen.texi: New file.
7077 * Makefile.am (SUBDIRS): Define.
7078 * Makefile.in: Rebuild.
7079 * configure.in: Create doc/Makefile.
7080 * configure: Rebuild.
7082 1999-01-18 Doug Evans <devans@casey.cygnus.com>
7084 * insn.scm (insn:syn): Delete.
7086 1999-01-15 Doug Evans <devans@casey.cygnus.com>
7088 * fr30.cpu (model fr30-1): Add state variables load-regs,
7089 load-regs-pending. Delete h-gr. Clean up operand names of all units.
7090 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7091 (model m32rx): Ditto.
7092 (addi): Simplify function unit usage spec.
7093 (ld-plus): Rewrite operand names in function unit usage spec.
7094 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7095 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7096 overridden. Allow operand to appear in input and output spec.
7097 (<insn>,gen-profile-code): string-append -> string-list.
7099 * ifield.scm (define-ifield): Call pmacro-expand.
7100 (define-full-ifield,define-normal-ifield): Ditto.
7101 (define-multi-ifield,define-normal-multi-ifield): Ditto.
7103 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7104 with-scache and without-scache cases.
7106 1999-01-14 Doug Evans <devans@casey.cygnus.com>
7108 * fr30.cpu (fr30-1): Add state variable h-gr.
7109 Add units u-cti, u-load, u-store, u-ldm, u-stm.
7110 (all insns): First pass at providing cycle counts.
7111 * sim.scm (<unit>,gen-profile-code): Only check for output operands
7112 when initializing unit output operands, ditto for input operands.
7114 * insn.scm (insn-length,insn-length-bytes): New procs.
7115 * mach.scm (-adata-set-derived!): Use them.
7116 * sim-cpu.scm (-gen-sem-case): Ditto.
7118 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7119 (-gen-write-case): Ditto.
7120 (gen-semantic-fn): Ditto. Split into two:
7121 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
7123 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
7124 scache/no-scache appropriately. All callers updated.
7125 (-gen-sem-case): PCADDR->IADDR.
7126 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7128 * sim-decode.scm (*): Replace string-append,string-map with
7129 string-list,string-list-map where the result is sufficiently large.
7130 (-gen-decode-insn-table): Go back to simple version for non-scache
7131 case: just record IDESC in decoder tables and leave field extraction
7133 (-gen-decode-switch): Ditto.
7134 (-gen-decode-fn): Ditto.
7135 (-gen-extract-decls): Only emit format enum if with-scache?.
7136 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7138 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7139 (-gen-insn-timing): Ditto.
7140 * sim.scm (gen-argbuf-type): Only output sem_fields union in
7143 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7144 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7146 1999-01-12 Doug Evans <devans@casey.cygnus.com>
7148 * cpu.scm (keep-mach-validate!): New proc.
7149 (include): New proc.
7151 * mach.scm (current-arch-mach-name-list): New proc.
7152 (-parse-arch-machs): Always return canonical form.
7153 (def-arch): Validate user specified machs to be kept.
7154 (def-mach-attr!): Simplify.
7156 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7157 (option-init!): Initialize it.
7158 (option-set!): Set it.
7159 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7160 output operand instance tables.
7161 (cgen-opc.in): Only output operand instance tables if asked to.
7163 * sim.scm (option-init!,option-set!): Clarify returned value.
7165 * sim.scm (gen-mach-bfd-name): Move from here.
7166 * utils-cgen.scm: To here.
7168 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7170 * fr30.cpu (ilm): Fix comment field.
7171 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7174 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7175 (rtx-true?, rtx-false?): New procs.
7176 * rtx-funcs.scm (annul): Rename vpc to pc.
7177 (-rtx-traverse-if): Improve determination of whether then/else parts
7178 are conditionally executed.
7180 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7182 (gen-argbuf-type): Simplify generated definition (big sem_fields
7183 union moved outside).
7185 1999-01-11 Ben Elliston <bje@cygnus.com>
7187 * doc/porting.texi: New file.
7189 * doc/intro.texi: New file.
7190 (Layout): Use @example to insert preformatted ASCII text (such as
7191 diagrams). @code is inappropriate here.
7193 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7195 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7197 * m32r.opc (print_hash): Cast dis_info.
7199 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7200 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7203 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7205 * i960.cpu (f-br-disp): Remove RELOC attribute.
7206 (f-ctrl-disp): Ditto.
7207 (callx-disp): set-quiet -> set for (reg h-gr 2).
7208 (callx-indirect,callx-indirect-offset): Ditto.
7210 * Makefile.am (gas-test): Fix dependencies.
7211 * Makefile.in: Rebuild.
7212 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7213 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7214 (gas-test-analyze!): Use syntax-break-out.
7215 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7216 (sim-test-analyze!): Use syntax-break-out.
7217 (cgen-build.sh): Use gen-file-name.
7218 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7219 * insn.scm (syntax-break-out): New proc.
7220 * utils.scm (gen-file-name): New proc.
7222 * fixup.scm (nil,<?,<=?,>?): Delete.
7224 * utils.scm (count-true): Rewrite.
7226 * slib/sort.scm: Move sort.scm to slib directory.
7229 * iformat.scm (ifmt-compute!): Record empty format.
7231 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7232 internal procs outside. Handle expression register numbers.
7235 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7237 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7239 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7240 (gen-semantic-fn,-gen-sem-case): Ditto.
7241 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7242 (cgen-semantics.c): Ditto.
7243 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7244 (gen-ifmt-argvars-defns): New proc.
7245 (gen-ifmt-argvars-assigns): New proc.
7246 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7247 (-gen-decode-fn): Handle non-with-scache case.
7248 (cgen-decode.c): Define WANT_CPU to @cpu@.
7249 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7250 (cgen-model.c): Define WANT_CPU to @cpu@.
7251 * sim.scm (gen-ifld-extract-argvar): New proc.
7252 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7253 with FUN-ACCESS specified.
7254 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7255 (<hw-register>,gen-extract): New arg local?.
7256 (<hw-address>,gen-extract): Ditto.
7257 (-hw-cxmake-get): Handle non-with-scache case.
7258 (-hw-gen-set-quiet): Ditto.
7259 (<hw-address>,cxmake-get): Handle non-with-scache case.
7260 (gen-op-extract-argvar): New proc.
7261 (<operand>,gen-record-profile): Rewrite.
7262 (<operand>,gen-profile-code): Rewrite.
7263 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7264 (gen-argbuf-fields-union): New proc.
7265 (gen-argbuf-type): Use it. Handle non-scache case.
7267 * *.scm: class:foo procs renamed to class-foo.
7268 * attr.scm (<attribute>): New member `for'.
7269 (-attr-parse): New first value in list for default if
7271 (non-bool-attr-list,attr:add!): Delete.
7272 (def-attr): Use current-attr-add!.
7273 (atlist-attr-value-no-default): New proc.
7274 (attr-lookup-default): Handle boolean attributes.
7275 (gen-attr-enum): New proc.
7276 (-attr-remove-meta-attrs-alist): New proc.
7277 (attr-nub): New proc.
7278 (current-attr-list-for): New proc.
7279 (current-{ifld,hw,op,insn}-attr-list): New procs.
7280 (attr-builtin!): New proc.
7281 * cpu.scm (keep-obj?): Rewrite.
7282 (-init-parse-cpu!): Call arch-init!.
7283 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7284 (-finish-parse-cpu!): Call arch-finish!.
7285 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7286 (def-enum,def-full-enum): Use current-enum-add!.
7287 (gen-obj-list-enums): New proc.
7288 * hardware.scm (hw:add!,hw:lookup): Delete.
7289 (def-hardware,def-hardware-ext): Use current-hw-add!.
7290 (hw:std-attrs,hw:attr-list): Delete.
7291 (hardware-builtin!): Define builtin hardware attributes.
7292 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7293 (def-ifield,def-full-ifield): Use current-ifld-add!.
7294 (ifld:std-attrs,ifld:attr-list): Delete.
7295 (ifield-builtin!): New proc.
7296 * insn.scm (insn:add!,insn:lookup): Delete.
7297 (def-full-insn): Use current-insn-add!.
7298 (insn:std-attrs): Delete.
7299 (insn-builtin!): New proc.
7300 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7302 (<arch-data>): New member machs.
7303 (current-attr-list,current-enum-list): New procs.
7304 (current-op-list,current-minsn-list): New procs.
7305 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7306 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7308 (-parse-arch-machs): New proc.
7309 (-arch-parse): New arg machs, all callers updated.
7310 (-arch-read): Handle machs spec.
7311 (def-arch): Define MACH attribute here.
7312 (mach-init!,mach-finish!): Not here.
7313 (cpu:add!,cpu:lookup): Delete.
7314 (def-cpu): Use current-cpu-add!.
7315 (<mach>): New member bfd-name.
7316 (-mach-parse): New arg bfd-name, all callers updated.
7317 (-mach-read): Handle bfd-name spec.
7318 (mach:add!,mach:lookup): Delete.
7319 (def-mach): Use current-mach-add!.
7320 (def-mach-attr!): New proc.
7321 (arch-init!): New proc.
7322 (arch-finish!): New proc. Reverse all object lists here.
7323 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7324 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7325 (define-normal-macro-insn): Ignore minsn if mach not kept.
7326 * mode.scm (mode-builtin!): New proc.
7327 * model.scm (model:add!,model:lookup): Delete.
7328 (def-model): Use current-model-add!.
7329 * opcodes.scm (insn:attr-list): Delete.
7330 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7331 (gen-attr-table-defn): Emit value for default.
7332 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7333 (op:attr-list): Delete.
7334 (gen-operand-decls,gen-insn-decls): New proc.
7335 (compute-insn-attr-list): Delete.
7336 (cgen-opc.h): Reorganize and simplify.
7337 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7338 (def-operand,def-full-operand): Use current-op-add!.
7339 (op:std-attrs): Delete.
7340 (operand-enum): Delete.
7341 (operand-builtin!): Define builtin operand attrs.
7342 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7343 (gen-attr-enum-decl): Use gen-obj-list-enums.
7344 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7346 * fr30.cpu (define-arch): Add machs spec.
7347 (f-i4): SIGNED attribute -> !UNSIGNED.
7348 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7349 (HASH-PREFIX): Define operand attribute.
7350 (NOT-IN-DELAY-SLOT): Define insn attribute.
7351 * i960.cpu (define-arch): Add machs spec.
7352 * m32r.cpu (define-arch): Add machs spec.
7353 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7354 (HASH-PREFIX): Define operand attribute.
7355 (FILL-SLOT): Define insn attribute.
7357 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7359 * fr30.cpu (stilm): Correct mask for and operation.
7361 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7363 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7364 Replace START/EXIT with start/pass.
7365 (gen-sim-test): Delete ".text".
7367 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7369 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7371 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7373 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7374 (h-sbit): Make it FUN-ACCESS.
7375 (h-gr): Reorder so that general regs are always printed by number.
7377 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7379 * i960.cpu (flushreg): Use nop.
7381 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7383 * m32r.cpu (default-alignment): Specify.
7384 * mach.scm (<arch-data>): New member default-alignment.
7385 (adata:default-alignment): New proc.
7386 (current-arch-default-alignment): New proc.
7387 (-arch-parse): New arg default-alignment.
7388 (parse-alignment): New proc.
7389 (-arch-read): Handle default-alignment spec.
7391 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7393 * insn.scm (f-%): Delete.
7394 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7395 be readded if proved useful.
7396 (gen-extract-fields): Ditto. Use gen-ifetch.
7397 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7398 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7400 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7402 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7404 1998-12-14 Dave Brolley <brolley@cygnus.com>
7406 * fr30.cpu: Remove stub macros.
7407 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7408 (div2): Don't use addc/subc.
7410 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7412 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7415 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7417 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7419 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7421 * cpu.scm (keep-all?): New proc.
7422 (assert-keep-all): Use it.
7423 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7424 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7425 Check for spelling errors.
7427 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7429 * rtl.scm (s-convop): Call -rtx-sem-mode.
7431 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7433 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7434 (-parse-hw-profile): Ditto.
7435 (<hw-register>, parse!): Return `void' result.
7436 (<hw-pc>, parse!): Ditto.
7437 (<hw-memory>, parse!): Ditto.
7438 (<hw-immediate>, parse!): Ditto.
7439 (<hw-address>, parse!): Ditto.
7441 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7442 (-ifld-parse-encode-decode): New proc.
7443 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7444 (-multi-ifield-parse): Set encode/decode to #f.
7445 (ifld:decode-mode): New proc.
7446 * utils.scm (nub): Rewrite.
7447 * operand.scm (op-nub): Rewrite.
7448 * sim.scm (<ifield>, gen-type): Rewrite.
7449 (-gen-ifld-argbuf-defn): New proc.
7450 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7451 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7452 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7453 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7454 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7455 New method gen-trace-extract.
7456 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7457 from gen-argbuf-elm, return "" if not caching register address.
7458 Rewrite gen-extract. New method gen-trace-extract.
7459 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7460 gen-extract, gen-trace-extract, cxmake-get.
7461 (<hw-iaddress>): New method cxmake-get.
7462 (op-needed-iflds): New proc.
7463 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7464 (-gen-op-argbuf-defn): New proc.
7465 (gen-op-extract): Renamed from op:extract.
7466 (gen-op-trace-extract): Renamed from op:trace-extract.
7467 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7469 (gen-argbuf-elm): Rewrite.
7470 * sim-decode.scm (-gen-record-args): Update.
7472 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7474 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7475 argument position. Flag symbolic macros in function position as
7477 (define-pmacro): Handle quoting in definition of symbolic macros.
7478 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7480 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7482 * fr30.opc (parse_register_list): Account for reverse masks
7484 (print_register_list): Ditto.
7485 (parse_low_register_list_ld): New function.
7486 (parse_hi_register_list_ld): New function.
7487 (parse_low_register_list_st): New function.
7488 (parse_hi_register_list_st): New function.
7489 (print_hi_register_list_ld): New function.
7490 (print_hi_register_list_st): New function.
7491 (print_low_register_list_ld): New function.
7492 (print_low_register_list_st): New function.
7493 * fr30.cpu (ldr15dr): Implement workaround.
7494 (ldm0,ldm1,stm0,stm1): Implemented.
7496 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7498 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7499 * configure: Regenerate.
7500 * Makefile.am (WITH_HOBBIT): Update.
7501 (cgen-hob.c): Remove Makefile dependency.
7502 (cgen.o): Depend on cgen-gh.h, config.h.
7503 * Makefile.in: Regenerate.
7504 * aclocal.m4: Regenerate.
7506 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7508 * i960.cpu, i960.opc: New files.
7510 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7512 * fr30.opc (parse_register_number): New function.
7513 (parse_register_list): New function.
7514 (parse_low_register_list): Use parse_register_list.
7515 (parse_hi_register_list): Use parse_register_list.
7516 * fr30.cpu (sth): Fix assembler syntax. Implement more
7519 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7521 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7522 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7523 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7524 (-op-gen-set-trace-parallel): Ditto.
7525 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7527 * fr30.cpu (call,calld): Fix setting of pc.
7528 (f-op5): Fix start bit number.
7530 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7532 * fr30.cpu (st): Fix operand ordering. Implement more
7535 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7537 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7538 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7539 (fmt-semantic-operands): Move to sim.scm.
7540 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7541 * operand.scm (<hw-index>): New member `name'. All builders updated.
7542 (<hw-index>): New method get-name.
7543 (op-profilable?): Moved to sim.scm.
7545 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7546 (op-profilable?): Moved here from operand.scm.
7547 (gen-extract-type): Delete.
7548 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7549 (-gen-argfld-ref): New proc.
7550 (-gen-ifld-argfld-name): New proc.
7551 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7552 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7553 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7554 (<hardware-base>): Delete method gen-extract-type. New method
7556 (<hw-register): Ditto. Update method gen-extract.
7557 (<operand>, method gen-argbuf-elm): Rewrite.
7558 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7559 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7560 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7562 * sim-decode.scm (-gen-record-args): Tweak.
7564 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7566 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7568 * doc/porting: Fix typo: gas->sim.
7569 * fr30.opc (print_m4): New function.
7570 * fr30.cpu: Implemented many insns.
7572 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7574 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7576 * fr30.cpu (f-rel9): Delete RELOC attribute.
7577 (f-rel12): Add PCREL-ADDR attribute.
7578 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7579 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7580 * fr30.opc (print_label9): Delete.
7582 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7583 code for CTI indicators.
7584 * insn.scm (insn-cti?): Simplify.
7585 * utils-cgen.scm (atlist:cti?): New proc.
7587 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7589 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7590 (f-i20-4,f-i20-16,f-i20): New fields.
7596 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7597 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7598 * mach.scm (arch-data): Ditto.
7599 (current-arch-default-insn-word-bitsize): Renamed from
7600 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7601 (-arch-read): Update.
7603 * hardware.scm (hw:attr-list): Move here ...
7604 * opcodes.scm: ... from here.
7606 * ifield.scm (fld:bitrange): Delete.
7607 (fld:word-offset,fld:word-length): New procs.
7608 (ifield?): Use class-instance.
7609 (<ifield>, method field-start): Rewrite.
7610 (ifld:enum): New proc.
7611 (<ifield>, methods field-mask,field-value): Rewrite.
7612 (-ifield-parse): Rewrite.
7613 (<multi-ifield> support): Rewrite.
7614 (ifld-beyond-base?): Rewrite.
7615 (ifld:std-attrs): New variable.
7616 (ifld:attr-list): New proc.
7617 * iformat.scm (-compute-insn-mask): Rewrite.
7618 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7620 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7621 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7623 (<operand>): Ditto. Forward onto index instead.
7624 (gen-ifld-decls,gen-ifld-defns): New procs.
7625 (ifld:insert,ifld:extract): New procs.
7626 (<ifield>): New methods gen-insert, gen-extract.
7627 (<multi-ifield>): Ditto.
7628 (<hw-index>): Forward gen-insert,gen-extract onto value.
7629 (<hw-asm>): Delete insert/extract support.
7630 (<hw-register,hw-memory,hw-immediate>): Ditto.
7631 (gen-hash-defines): Use string-list.
7632 Define CGEN_MAX_IFMT_OPERANDS.
7633 (gen-switch): Use string-list,string-list-map.
7634 (gen-fget-switch,gen-fset-switch): Use string-list.
7635 (gen-parse-switch,gen-insert-switch): Ditto.
7636 (gen-extract-switch,gen-print-switch): Ditto.
7637 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7638 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7639 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7640 (gen-ivalue-entry): New proc.
7641 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7642 computation. Use 0 for operand ref table if ALIAS insn.
7643 (gen-minsn-table-entry): Use string-list.
7644 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7645 (gen-opcode-open): Record address of ifield table.
7646 (cgen-opc.h): Call gen-ifld-decls.
7647 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7648 * types.scm (<bitrange>): New members word-offset,word-length.
7649 Delete member total-length. Delete methods start,mask,value.
7650 (bitrange:word-offset,bitrange:word-length): New procs.
7651 * sim-cpu.scm (gen-define-fields): Simplify.
7652 (gen-extract-fields): Simplify.
7653 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7654 (<ifield>): New methods gen-ifld-extract-decl.
7655 Delete method gen-ifld-extract-beyond.
7656 (<multi-ifield>): New methods gen-ifld-extract-decl.
7657 (<multi-ifield>, method gen-ifld-extract): Implement.
7658 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7659 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7661 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7662 (-rtx-traverse-syntax-no-mode): New proc.
7663 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7664 (s-ifield): New proc.
7665 (s-shop): Don't prepend `unsigned' for unsigned modes.
7666 * rtx-funcs.scm (ifield): New rtx function.
7667 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7668 (delay): New rtx function.
7669 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7671 * cos.scm (-elm-make-method-getter): Fix typo.
7673 * utils.scm (backslash): Handle lists of strings.
7675 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7677 * fr30.cpu (f-rel9): Correct for pc+2.
7678 (label9): Use print_label9.
7679 * fr30.opc (print_label9): New function.
7681 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7683 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7684 * fr30.opc (parse_low_register_list): Renamed.
7685 (parse_hi_register_list): Renamed.
7686 (print_hi_register_list): Renamed.
7687 (print_low_register_list): Renamed.
7689 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7691 * fr30.cpu (f-rel9): Now a pc relative offset.
7693 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7695 * opcodes.scm (op-asm): Move to here, from operands.scm.
7696 (<op-asm>, method parse!): Validate arguments.
7697 (<operand>, method gen-function-name): Fix thinko.
7698 * operand.scm (<operand>, method make!): Don't set op-asm here.
7699 * utils.scm (list-elements-ok?): New proc.
7701 * opcodes.scm: Clean up pass.
7703 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7705 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7706 the fr30_int function.
7707 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7708 (h-dr): Add FUN-ACCESS attribute.
7710 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7712 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7713 for C symbol for models array.
7715 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7717 * fr30.opc (parse_reglist_low): New function.
7718 (parse_reglist_hi): New function.
7719 (print_reglist_low): New function.
7720 (print_reglist_hi): New function.
7721 * fr30.cpu: Finish remaining insn stubs.
7723 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7725 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7727 * fr30.cpu (ldi32m): Don't use for disassembly.
7729 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7731 * fr30.cpu (int): Implement it.
7733 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7735 * rtx-funcs.scm (nop): Fix C code.
7737 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7739 * fr30.cpu (f-i32): New ifield.
7742 (ldi32m): New macro insn.
7743 (inte): Provide simple version for now.
7745 * sim-arch.scm: New file.
7746 * sim.scm: Move architecture support generation to sim-arch.scm.
7747 * cgen-sim.scm: Load sim-arch.scm.
7750 * hardware.scm (pc?) New proc.
7751 (class <hardware-base>): Rewrite method 'pc?.
7752 (class <hardware>): Forward 'pc? to the hardware type.
7753 (class <hw-pc>): New method 'pc?.
7755 Add support for variable length ISAs.
7756 * ifield.scm (ifld-beyond-base?): New proc.
7757 * m32r.cpu: Remove integral-insn? spec.
7758 * mach.scm (arch:derived,arch:set-derived!): New procs.
7759 (arch:app-data,arch:set-app-data!): New procs.
7760 (class <arch>): New members derived, app-data.
7761 (class <cpu>): Delete member integral-insn?.
7762 (cpu:integral-insn?): Delete.
7763 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7764 (-cpu-read): Delete integral-insn? support.
7765 (state:decode-assist): Delete.
7766 (state:int-insn?): Delete.
7767 (<derived-arch-data>): New class.
7768 (-adata-set-derived!): New proc.
7769 (mach-finish!): Call it.
7770 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7771 (gen-operand-instance): Add COND_REF support.
7772 (gen-operand-instance-table): Ditto.
7773 (gen-hash-defines): Update.
7774 (gen-extract-switch): Update type of `insn_value' arg.
7775 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7776 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7778 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7779 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7780 beyond the base insn (for large insns).
7781 (-gen-extract-beyond-var-list): New proc.
7782 (gen-extract-fields): Handle large insns.
7783 (-gen-write-case): Update sem_arg computation.
7784 Update initial vpc computation.
7785 (gen-semantic-fn): Ditto. Update type of `insn'.
7786 (-gen-sem-case): Update sem_arg computation.
7787 Update initial vpc computation.
7788 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7789 (-gen-extract-word): New proc.
7790 (<ifield>): New method gen-ifld-extract-beyond.
7791 (gen-ifld-extract-beyond): New proc.
7792 * types.scm (bitrange-overlap?): New proc.
7794 * utils.scm (bits->bytes): New proc.
7795 (bytes->bits): New proc.
7797 Move extraction support into decoder.
7798 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7799 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7800 support to sim-decode.scm.
7801 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7802 be array of IDESC,FMT entries. Make the array const.
7803 (-gen-gcc-label-table): Make array const.
7804 (-gen-decode-switch): Branch to extraction code after insn has been
7806 (-gen-decode-insn-globals): Delete extract handler from
7808 (gen-decode-fn): Add extraction support.
7809 (-gen-sem-fn-decls): Delete extraction fn decls.
7810 (-gen-idesc-decls): Update @cpu@_decode decl.
7811 (-gen-idesc-init-fn): Delete extraction support.
7812 (-gen-extract-decls): New proc.
7814 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7815 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7817 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7818 All callers updated.
7819 (table-entry:make): Record insn value as insn object, not name.
7822 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7823 collision with C function.
7824 (path_dirname): Similarily.
7825 * hobbit.c,hobbit.h: Rebuild.
7827 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7829 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7831 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7833 * fr30.cpu: Implement more instruction stubs.
7835 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7837 * fr30.cpu: Implement more instruction stubs.
7839 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7841 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7843 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7845 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7846 (op:std-attrs): Ditto.
7847 * opcodes.scm (gen-operand-instance): Ditto.
7848 (gen-switch): Ditto.
7849 * m32r.cpu (condbit,accum): Update.
7850 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7852 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7854 * enum.scm (-enum-read): Fix typo.
7856 * iformat.scm (-ifmt-search-key): Simplify a little.
7858 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7860 * doc/porting: semantics.c -> sem.c.
7861 * Makefile.in: Regenerate.
7862 * fr30.cpu (add): Change ADD to add. Add more registers and set
7863 status bits on 'add' instruction.
7865 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7867 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7870 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7872 * minsn.scm (minsn:enum): Update, call current-arch-name.
7874 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7876 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7877 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7878 (ARCH,CGEN,CGENFLAGS): New variables.
7879 (gas-test,sim-test): New rules.
7880 * Makefile.in: Rebuild.
7881 * configure.in (arch): Define.
7882 * configure: Rebuild.
7884 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7885 * All .scm files: Ditto.
7887 * dev.scm: Fix gas-test call to cpu-load.
7888 * gas-test.scm: Clean up pass to remove bit-rot.
7889 * sim-test.scm: Ditto.
7891 * enum.scm (read-enum): Fix typo in `vals' handling.
7893 * hardware.scm (-parse-hw-type): Fix typo.
7894 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7895 (def-hardware,define-normal-hardware): Ditto.
7897 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7898 (display-var): Use it.
7899 * hobbit.c: Rebuild.
7900 * hobbit.h: Rebuild.
7902 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7903 avoid hobbit problem.
7904 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7905 `parallel-insns-' to avoid hobbit problem.
7907 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7909 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7910 (parse_slo16,parse_ulo16): Ditto.
7911 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7913 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
7915 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7916 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7917 * Makefile.in: Rebuild.
7918 * insn.scm (define-normal-insn): Expand pmacros.
7919 * mode.scm (<mode>): New member `host?'. All uses updated.
7920 (mode:host?): New proc.
7921 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7922 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7923 (define-rtx-dual-mode): Ditto.
7924 (s-index-of): New proc.
7925 (s-unop): Use plain C for host mode operations.
7926 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7927 * rtx-funcs.scm (index-of): New rtx function.
7928 * sim.scm (<hw-index>): New method cxmake-get.
7930 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
7932 * sim-cpu.scm (-gen-engine-decls): Delete.
7934 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
7936 * doc/rtl (Example): Correct Typo.
7937 * doc/porting: Add 'make dep' step to opcodes port instructions.
7938 * fr30.opc: New file.
7939 * fr30.cpu: New file.
7941 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
7943 * configure.in: Handle guile $exec_prefix = $prefix/foo.
7944 * Makefile.am (GUILEINCDIR): New variable.
7946 * configure: Regenerate.
7947 * Makefile.in: Ditto.
7948 * aclocal.m4: Ditto.
7950 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
7952 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7953 (cgen-semantics.c): Ditto.
7954 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7955 * sim-model.scm (cgen-model.c): Ditto.
7956 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7957 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7959 * opcodes.scm (read-cpu.opc): Handle empty file.
7961 * cos.scm (-elm-make-method-setter): Fix typo.
7963 * cpu.scm (-init-parse-cpu!): Call types-init!.
7964 (-finish-parse-cpu!): Call types-finish!.
7965 * ifield.scm (<ifield>): Delete members start,length.
7966 New member bitrange.
7967 (<ifield>, methods field-start,field-length): Update.
7968 (fld:start): New arg insn-len. All callers updated.
7969 (<ifield>, methods field-mask,field-value): Update.
7970 (-ifield-parse): Update.
7971 (ifield-init!): Update.
7972 * iformat.scm (compute-insn-length): Simplify.
7973 (compute-insn-mask): Update.
7974 * insn.scm (insn:value): Update.
7975 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7976 (current-arch-default-insn-bitsize): New proc.
7977 (current-arch-insn-lsb0?): New proc.
7978 (-arch-parse,-arch-read): Update.
7979 (<cpu>): New member file-transform.
7980 (-cpu-parse,-cpu-read): Update.
7981 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7982 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7983 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7984 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7985 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7986 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7987 * operand.scm (op:start): Update call to field-start method.
7988 * sim-decode.scm (opcode-slots): New arg lsb0?.
7989 (fill-slot!,build-slots): Ditto.
7990 (build-decode-table-entry,build-decode-table-guts): Ditto.
7991 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7992 (gen-decode-fn): Ditto.
7993 (cgen-decode.c): Update call to gen-decode-fn.
7994 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7995 (-gen-cpu-header,-gen-cpuall-includes): New procs.
7996 (cgen-cpuall.h): Call -gen-cpuall-includes.
7997 * types.scm (<bitrange>): New class.
7998 (types-init!,types-finish!): New procs.
7999 * utils-cgen.scm (parse-number): New proc.
8000 (parse-boolean): New proc.
8001 * utils.scm (word-value): Renamed from shift-bits, rewrite.
8002 (word-mask): Rewrite.
8003 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8004 (m32rxf): New field `file-transform'.
8005 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8007 * hobbit.h: Fix include file name.
8009 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
8011 * slib: New directory of slib files used by cgen/hobbit.
8012 * hobbit.scm: New file.
8013 * hobbit.c: New file.
8014 * hobbit.h: New file.
8015 * hobscmif.h: New file.
8016 * hob-main.c: New file.
8017 * hobslib.scm: New file.
8019 * Makefile.am: Add support for compiling hobbit, and using compiled
8020 version of hobbit to compile cgen.
8021 * Makefile.in: Regenerate.
8022 * configure.in: Support --with-hobbit.
8023 * configure: Regenerate.
8024 * acconfig.h (WITH_HOBBIT): Add.
8025 * config.in: Regenerate.
8027 * rtl.scm: New file, was cdl-c.scm.
8028 Definition of rtx funcs moved to rtx-funcs.scm.
8029 (semantic-in-out-operands): Rewrite to compute object form of
8031 * rtx-funcs.scm: New file.
8033 * cgen-gh.c: #include "config.h".
8034 (gh_cadddr,gh_cddddr): New fns.
8035 (cgh_vector_to_list): New fn.
8036 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8037 (cgh_init): Prefix qsort procs with "cgh-".
8038 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8039 * cgen.c: #include "config.h".
8041 * attr.scm (bitset-attr?): New proc.
8042 (<bitset-attribute>, method parse-value): Value syntax changed from
8043 (val1 val2 ...) to val1,val2,....
8044 (<bitset-attribute>): New method gen-value.
8045 (<integer-attribute>): New method gen-value.
8046 (<enum-attribute>): New method gen-value.
8047 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8048 (<reader>): New class.
8049 (CURRENT-ARCH,CURRENT-READER): New globals.
8050 (keep-mach?): Move here from mach.scm.
8051 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8052 (<arch>): New class.
8053 (<arch-data>): New class.
8054 (<cpu>): Make subclass of <ident>.
8055 (*ENDIAN* variables): Delete.
8056 (process-state-vars): Delete.
8057 (mach-finish!): Add `base' value to MACH attribute.
8058 * hardware.scm (<hardware>): Make subclass of <ident>.
8059 (hw:std-attrs): New global.
8060 (hw-profilable?): New proc.
8061 * ifield.scm (<ifield>): Make subclass of <ident>.
8062 (sort-ifield-list): Move here from iformat.scm.
8063 * iformat.scm (<iformat>): Renamed from <insn-format>.
8064 Make subclass of <ident>.
8065 (-ifmt-search-key): Include cti? in categorization of formats.
8066 (ifmt-analyze): Compile semantics (turn to object form).
8067 * insn.scm (<insn>): Make subclass of <ident>.
8068 New member compiled-semantics.
8069 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8070 * mode.scm (<mode>): Make subclass of <ident>.
8072 * model.scm (<unit>): Make subclass of <ident>.
8073 New members inputs,outputs.
8074 (<model>): Make subclass of <ident>. New member state.
8075 (-unit-parse): Parse inputs,outputs.
8076 (<iunit>): New class.
8077 (-insn-timing-parse-model): New proc.
8078 (parse-insn-timing): Function unit spec rewritten.
8079 * operand.scm (<operand>): Make subclass of <ident>.
8080 New members sem-name,num,cond? New method gen-pretty-name.
8081 (hw-index-scalar): New global.
8082 (op-nub-hw): Move here from rtl.scm.
8083 (op:lookup-sem-name,op-profilable?): New procs.
8084 * pmacros.scm: Rewrite to pass through hobbit.
8085 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8086 * utils.scm (logit): Make a macro.
8087 (bit-set?): Rewrite.
8088 (high-part): Rewrite.
8090 * m32r.cpu (define-arch): Move to top of file.
8091 (cpu family m32rbf): Renamed from m32rb.
8092 (model m32r/d): Function unit spec rewritten.
8093 (all insns): Ditto. Replace UBI with BI.
8095 * opcodes.scm (gen-attr-table-decls): Declare
8096 @arch@_cgen_hw_attr_table.
8097 (gen-attr-table-defns): Generate hw attribute table.
8099 * sim-cpu.scm (-gen-engine-decls): New proc.
8100 (-gen-model-decls): New proc.
8101 (gen-parallel-exec-type): Add new member `written' to struct parexec.
8102 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8103 (-gen-record-profile-args): Simplify.
8104 (-gen-parallel-sem-case): Delete.
8105 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8106 New local `written'. Delete profiling code.
8107 (-gen-sem-case): Ditto.
8108 (-uncond-written-mask,-any-cond-written?): New procs.
8109 (cgen-sem-switch.c): Include duplicates of insns that can be executed
8110 parallelly or serially, and write-back handlers for all parallel insns.
8111 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8112 support to initialization of struct insn_sem.
8113 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8114 (-gen-insn-sem-type): Add parallel write-back support to struct
8116 (-gen-idesc-init-fn): Add support for virtual insns.
8117 Add parallel write-back support.
8118 * sim-model.scm (gen-model-profile-fn): Delete
8119 (-gen-model-fn-decls): New proc.
8120 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8121 (-gen-model-init-fn): New proc.
8122 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8123 members in @mach@_init_cpu.
8124 (cgen-model.c): Generate model handlers for each insn.
8125 * sim.scm (gen-define-field-macro): Cti insns handled differently.
8126 (<hw-pc>): New method gen-write.
8127 (<hw-register>, method gen-write): New arg `mode'.
8128 (<hw-register>): Delete method gen-record-profile!.
8129 New method gen-profile-index-type.
8130 (<hw-memory>, method gen-write): New arg `mode'.
8131 (<hw-address>, method gen-extract): Delete.
8132 (<hw-address>, method gen-write): New arg `mode'.
8133 (<hw-index>, method get-write-index): Rewrite.
8134 (<pc>, method cxmake-get-direct): Delete.
8135 (<pc>): New method cxmake-get. Comment out methods
8136 gen-set-quiet,gen-set-trace.
8137 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8138 gen-profile-index-type,gen-profile-code.
8139 Delete method gen-pretty-name. Rewrite method gen-write.
8140 Delete method cxmake-get-direct.
8141 (-op-gen-set-trace): Update `written'.
8142 (-op-gen-set-trace-parallel): Ditto.
8143 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8144 (gen-cpu-insn-enum-decl): Add extra entries for parallel
8145 insns and their write-back handlers.
8146 (insn-op-lookup): New proc.
8147 (<unit>): New method gen-profile-code.
8148 (<iunit>): New method gen-profile-code.
8149 (gen-argbuf-elm): Add profiling elements.
8150 (gen-argbuf-type): Define cti insns separately in their own struct.
8151 Add member `addr_cache' to this struct. Add entries for pbb virtual
8152 insns. Move semantic entries here from struct scache.
8153 Delete everything from struct scache except argbuf.
8154 (<insn>, method gen-profile-locals): Rewrite.
8155 (<insn>, method gen-profile-code): Rewrite.
8156 (sim-finish!): Create virtual pbb insns.
8158 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8160 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8161 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8162 (h-psw,h-bpsw,h-bbpsw): Define.
8163 (rte,trap): Handle bbpc,bbpsw.
8164 * opcodes.scm (max-operand-instances): Fix typo.
8165 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8166 hardware elements to be fun-access.
8167 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8169 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8171 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8173 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8175 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8177 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8179 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8181 (mach m32r): Update.
8183 * mach.scm (mach:supports?): New proc.
8184 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8185 gen-reg-access-{decls,defns}.
8186 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8187 (gen-mach-bfd-name): New proc.
8188 (gen-arch-reg-access-{decls,defns}): New procs.
8189 (cgen-arch.[ch]): Output register access cover fns.
8191 * hardware.scm (hardware-builtin!): Set print handlers for
8193 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8195 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8196 (my_print_insn): Ditto. Delete args buf, buflen.
8197 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8198 (-hw-asm-specs): Add `handlers' spec.
8199 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8201 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8203 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8204 (<hw-asm>, parse!): New method.
8205 (gen-insn-table-entry): Print semantics.
8206 (gen-opcode-open): Renamed from gen-opcode-table.
8208 * utils.scm (string-write): No longer a macro.
8209 (-string-write): Handle procedure args.
8210 * opcodes.scm: Update all calls to string-write.
8211 * sim-cpu.scm: Ditto.
8212 * sim-decode.scm: Ditto.
8213 * sim-model.scm: Ditto.
8216 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8218 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8219 (-gen-insn-builders,-gen-insn-builder): New procs.
8221 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8223 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8224 (gen-opcode-table): Properly terminate comment.
8226 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8229 Clean up pass over everything, so starting fresh.