1 2010-01-24 Doug Evans <dje@sebabeach.org>
3 * cos.scm: Follow commenting convention. Why did a single ; have to
4 get indented like it does? :-(
6 2010-01-23 Doug Evans <dje@sebabeach.org>
8 * gen-all: Move build-configuration related parameters to an
9 external file. Add usage info. Add "force" option.
10 Be smarter about what diffs to generate.
12 * doc/rtl.texi (Expressions): Add more docs on conversion functions.
14 2010-01-21 Doug Evans <dje@sebabeach.org>
16 * doc/rtl.texi (Expressions): Fix docs on `subword'.
18 2010-01-20 Doug Evans <dje@sebabeach.org>
20 * rtx-funcs.scm (nan,qnan,snan): New rtl functions.
21 * rtl-c.scm (nan,qnan,snan): New rtl functions.
22 * doc/rtl.texi (Expressions): Add docs for them.
24 * rtl-traverse.scm (/rtx-canon-anycexprmode): New function.
25 (/rtx-make-canon-table): Add entry for ANYCEXPRMODE.
26 (/rtx-canon-operands): Print expr-mode if /rtx-canon-debug?
27 Do final error check on mode assigned to expression.
28 (/rtx-make-traverser-table): Add entry for ANYCEXPRMODE.
29 * rtl-xform.scm (/rtx-trim-args): Handle ANYCEXPRMODE.
30 * rtl.scm (/rtx-valid-mode-types): Add ANYCEXPRMODE.
31 * rtx-funcs.scm (c-code, c-call, c-raw-call): Use ANYCEXPRMODE.
32 (if, cond, case): Use ANYEXPRMODE.
34 2010-01-19 Doug Evans <dje@sebabeach.org>
36 * testsuite/pmacros-1.test: Add more .splice tests.
38 * read.scm (/cmd-include): Fix absolute path handling.
40 2010-01-05 Doug Evans <dje@sebabeach.org>
42 * mode.scm (<mode>) Rename member non-mode-c-type to c-type.
44 (mode:non-mode-c-type): Delete.
45 (mode:c-type): Update.
46 * rtl-c.scm (s-shop): Fix casting of DI mode values.
48 2010-01-04 Doug Evans <dje@sebabeach.org>
50 * gen-all (all_cgen_cpus): Add sh.
52 2010-01-02 Doug Evans <dje@sebabeach.org>
54 * utils.scm (copyright-fsf, copyright-red-hat): Update copyright year.
56 2009-12-17 Doug Evans <dje@sebabeach.org>
58 * mep.opc: Apply patches from opcodes to compile with -Wshadow.
59 mep-asm.c now regenerates correctly again.
61 * gen-all: Add support for building gcc/newlib.
62 Specify --prefix and install all built tools.
64 2009-12-16 Doug Evans <dje@sebabeach.org>
66 * sim.scm (/op-gen-written-update): Disable operand number is too
67 large warning, for now.
69 2009-12-11 Nick Clifton <nickc@redhat.com>
71 * cpu/fr30.opc: Fix shadowed variable warnings.
73 2009-12-10 Doug Evans <dje@sebabeach.org>
75 * gen-all: Rewrite. Build more ports. Split out building of sid.
77 2009-11-23 Doug Evans <dje@sebabeach.org>
79 * hardware.scm (hw-pc?): New function.
80 * ifield.scm (ifld-signed?): New function.
81 * iformat.scm (ifmt-analyze): Call insn-cti-attr? instead of insn-cti?.
82 * insn.scm (insn-cti-attr?): Renamed from insn-ctl?.
83 (insn-cti?): New function.
84 * rtl.scm (/hw): Create <pc> object for pcs.
85 * semantics.scm (/build-reg-operand!): New args ref-type, sem-attrs.
86 All callers updated. Watch for sets to the pc.
87 (semantic-attrs): Watch for sets to the pc.
88 * sid.scm (<pc> cxmake-get): Handle raw-reg.
89 * sim.scm (<pc> cxmake-get): Handle raw-reg.
90 (<operand> cxmake-get): Add debugging printf.
91 * utils-gen.scm (/gen-ifld-extract-base): Emit calls to
92 EXTRACT_[LM]SB0_LG[SU]INT for values > 32 bits.
93 (/gen-extract-word): Ditto.
95 * utils.scm (gen-c-hex-constant): New function.
96 * utils-sim.scm (/gen-decode-insn-entry): Call it.
98 2009-11-22 Doug Evans <dje@sebabeach.org>
100 * insn.scm (/parse-insn-format): Watch for duplicate ifields.
101 * read.scm (parse-error-continuable): New function.
102 (define /continuable-error-found?): New variable.
103 (/init-reader!): Initialize it.
104 (/finish-reader!): New function.
106 * utils-cgen.scm (obj-list-nub): New function.
108 * mach.scm (<derived-arch-data>): New member large-insn-word?.
109 (/adata-set-derived!): Set it.
110 (adata-large-insn-word?): New function.
111 * sim-arch.scm (/gen-cpuall-includes): Don't #include cgen-engine.h
113 * sim-cpu.scm (cgen-cpu.h): #include it here.
114 (/gen-cpu-defines): Define CGEN_INSN_WORD.
115 (/gen-no-scache-semantic-fn): Use CGEN_INSN_WORD instead of
117 * sim-decode.scm (/gen-idesc-decls): Ditto.
118 (/gen-extract-case, /gen-decode-fn): Ditto.
119 * sim-model.scm (/gen-model-insn-fn): Ditto.
120 * sim.scm (gen-argbuf-type): Ditto.
122 * rtl-c.scm (/use-gcc-stmt-expr?): New function.
123 (s-sequence): Call it.
125 2009-11-21 Doug Evans <dje@sebabeach.org>
127 * rtl-c.scm (s-sequence): Use gcc's statement expressions for
128 non-VOID-mode expressions with multiple statements.
130 * sim.scm (/operand-number-elaboration-written?): New variable.
131 (/op-gen-written-update op): New function.
132 (/op-gen-set-trace, /op-gen-set-trace-parallel): Call it.
134 * read.scm (/cmd-define-rtl-version): Only log rtl version if changed.
136 * operand.scm (op-nub): Delete.
138 * dev-utils.scm: New file.
139 * dev.scm (srcdir, load-doc, load-opc, load-gtest, load-sid,
140 load-sim, load-stest, load-testsuite): Moved to dev-utils.scm.
141 * read.scm (CHECK-LOADED?, libcpu.so, /loaded-file-list, /loaded-file?,
142 /loaded-file-record!, maybe-load): Delete.
143 Load cgen files directly instead of via maybe-load.
145 2009-11-14 Doug Evans <dje@sebabeach.org>
147 * rtl-traverse.scm (/rtx-canon): Flag an error for non-void
148 expressions used in a void context.
150 * gen-all: Explicitly build binutils, gas, ld, gdb, sid.
152 * cpu/xc16x.cpu: Delete, use copy in ../cpu.
153 * cpu/xc16x.opc: Ditto.
155 2009-11-12 Doug Evans <dje@sebabeach.org>
157 * rtl-c.scm (s-parallel): Use map-in-order instead of map.
159 * rtl-xform.scm (/rtx-trim-for-doc): Handle set-quiet, nop,
160 eq, ne, lt, le, gt, ge, ltu, leu, gtu, geu, index-of.
162 2009-11-11 Doug Evans <dje@sebabeach.org>
164 * html.scm (gen-insn-docs): Add logging message.
166 2009-11-05 Doug Evans <dje@sebabeach.org>
168 * utils-cgen.scm (gen-set-macro2): New function.
169 * sim.scm (<hw-register> gen-get-macro): Call it.
171 * co-for-gen-all: New file.
173 * testsuite/name-comments-1.test: Update call to current-insn-lookup.
175 * utils.scm (reduce): Delete.
177 * rtl-traverse.scm (/rtx-canon-rtx-enum): Tweak local name.
179 * enum.scm (gen-enum-sym): Make consistent with gen-enum-decl
180 regarding PREFIX attribute handling.
182 * operand.scm (<hw-index>): Add enum to possible types, all uses
184 (hw-index-constant?, hw-index-constant-value): New functions.
185 (make-enum-hw-index, hw-index-enum-name, hw-index-enum-value,
186 hw-index-enum-obj): New functions.
187 (/operand-parse): Handle enum indices.
188 * intrinsics.scm (md-operand:fixed-register): Use hw-index-constant?,
189 hw-index-constant-value.
190 * rtl.scm (rtx-constant-value): Fix handling of enums.
191 * rtx-funcs.scm (enum): Ditto.
192 * sid.scm (<hardware-base> cxmake-get): Only ifield indices are
193 currently supported here.
195 2009-11-02 Doug Evans <dje@sebabeach.org>
197 Specify isa(s) when doing ifield, operand, insn lookups.
198 ACU = all callers updated.
199 * attr.scm (/attr-eval): Call rtx-value instead of rtx-eval-with-estate.
200 * enum.scm (define-full-insn-enum): Pass isa-name-list to
202 * html.scm (get-insn-properties): Pass isa-name-list to
204 * ifield.scm (/ifld-parse-follows): New arg isas, ACU.
205 * insn.scm (/parse-insn-format-symbol): New arg isa-name-list, ACU.
206 (/parse-insn-format-list, /parse-insn-iformat-iflds): Ditto.
207 (/parse-insn-format, syntax-break-out): Ditto.
208 * mach.scm (obj-filter-by-isa): New function.
209 (current-ifld-lookup): New optional arg maybe-isa-name-list.
210 (/ifld-already-defined?, /op-already-defined?): Simplify.
211 (current-op-lookup): New optional arg maybe-isa-name-list.
212 (current-insn-lookup): New arg isa-name-list, ACU.
213 (/insn-already-defined?, /minsn-already-defined?): Simplify.
214 (current-minsn-lookup): New arg isa-name-list, ACU.
215 * minsn.scm (/minsn-compute-iflds): Pass isa-name-list to
217 * opc-itab.scm (compute-syntax): New arg isa-name-list, ACU.
218 (gen-syntax-entry): Ditto.
219 * operand.scm (/operand-parse): Pass isa-name-list to
221 (/derived-parse-encoding): New arg isa-name-list, ACU.
222 (/derived-parse-ifield-assertion): Ditto.
223 (/derived-operand-parse): Pass isa-name-list to current-op-lookup.
224 (/anyof-parse-choice): Ditto.
225 (anyof-satisfies-assertions?): Pass context to rtx-solve.
226 (/anyof-merge-syntax): New arg container, ACU.
227 (operand-builtin!): Add pc to all isas.
228 * rtl-c.scm (estate-make-for-rtl-c): Delete arg extra-vars-alist, ACU.
229 (estate-make-for-rtl-c++, rtl-c-expr-parsed): Ditto.
230 (rtl-c-parsed, rtl-c++-parsed): Ditto.
231 (rtl-c): New arg isa-name-list, ACU.
232 (rtl-c-expr, rtl-c++): Ditto.
233 (closure): New arg isa-name-list, ACU.
234 * rtl-traverse.scm (/make-cstate): New arg isa-name-list, ACU.
235 (/cstate-isas): New function.
236 (/rtx-canon-symbol-list): New function.
237 (/rtx-canon-env-stack): Renamed from /rtx-canon-env, ACU.
239 (/rtx-make-canon-table): Rename ENV to ENVSTACK, new entry SYMBOLLIST.
240 (/rtx-canon-rtx-operand): Pass isa list to current-op-lookup.
241 (/rtx-canon-rtx-ref, /rtx-canon): Ditto.
242 (rtx-canonicalize): New arg isa-name-list, ACU.
243 (rtx-canonicalize-stmt): Delete.
244 (tstate-make): New arg isas, ACU.
245 (tstate-isas, tstate--set-isas!): New functions.
246 (tstate-env-stack): Renamed from tstate-env, ACU.
247 (tstate-set-env-stack!): Renamed from tstate-set-env!, ACU.
248 (tstate-make-closure): Renamed from tstate-new-env, new arg
250 (/rtx-traverse-env): Delete.
251 (/rtx-make-traverser-table): Rename ENV to ENVSTACK, new entry
253 (/rtx-traverse): Include conditional flag in dump output.
254 Update isa,envstack for closures. Pass isa list to current-op-lookup.
255 (<eval-state>): New member isas. Rename env to env-stack.
256 (<eval-state> vmake!): Handle #:isas. #:env renamed to #:env-stack.
257 (<eval-state>): New getter/setter for isas. Rename env getter/setter
259 (estate-make-for-eval): Provide #:isas.
260 (estate-make-closure): Renamed from estate-new-env. New arg
262 * rtl-xform.scm (/rtx-simplify-expr-fn): Handle closures.
263 (/rtx-trim-args): ENV renamed to ENVSTACK. Ad ITERATION, SYMBOLLIST.
264 (/rtx-trim-for-doc): Handle closures.
265 * rtl.scm (/rtx-valid-types): Rename ENV to ENVSTACK. Add ITERATION,
267 (rtx-env-var-list): Delete.
268 (rtx-env-make): Handle already-compiled environments.
269 (rtx-var-alist-to-env): New function.
270 (rtx-var-alist-to-closure-env-stack, rtx-make-env-stack): New functions.
271 (rtx-env-stack-dump): Renamed from rtx-env-dump, ACU.
272 (rtx-operand-obj): New arg isa-name-list, ACU.
273 (rtx-closure-isas, rtx-closure-env-stack, rtx-closure-expr): New
275 * rtx-funcs.scm (closure): New arg isa-name-list, reorder args, ACU.
276 * sem-frags.scm (<sfrag>): Delete member compiled-semantics.
277 (/frag-compute-desired-frags): Minor simplification.
278 (/frag-pick-best): Ditto.
279 * sid-cpu.scm (gen-semantic-code): Require canonical rtl.
280 (/gen-sfrag-code): Update.
281 * sim-cpu.scm (gen-semantic-code): Require canonical rtl.
282 * utils-cgen.scm (sanitize): New arg isa-name-list, ACU.
283 * utils.scm (non-null-intersection?): New function.
285 * gen-all (do_src): Manually run cgen-all for sid.
287 2009-11-01 Doug Evans <dje@sebabeach.org>
291 * rtl-traverse.scm (/rtx-canon): Issue better error message for
292 invalid rtx function names.
294 2009-10-28 Doug Evans <dje@sebabeach.org>
296 * cos.scm (object-assign!): New function.
297 * mode.scm (/mode-set-word-params!): Call it.
299 2009-10-25 Doug Evans <dje@sebabeach.org>
301 Record bitset attributes internally as a list.
302 Record rtx attribute values internally as ((rtx-expr)).
303 * attr.scm (bitset-attr?): Delete, unused.
304 (<bitset-attribute> parse-value): Rewrite.
305 (/attr-parse): Rewrite bitset default value processing.
306 (/attr-read): Pick out values of scalar attributes to distinguish
307 them from bitset values which are a list.
308 Fix spelling errors for processing of default values.
309 Handle string attributes.
310 (bitset-attr->list): Delete, all callers updated.
311 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
313 (atlist-source-form): Rewrite.
314 * hardware.scm (<hardware-base> 'get-isas): Update recognition
316 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
318 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
319 values are now lists.
320 * mach.scm (def-isa-attr!): Update, bitset attribute values,
321 including the default, are now lists.
322 (all-isas-attr-value): Result is now a list.
323 * doc/rtl.texi: Clean up pass over attribute docs.
325 Change internal representation of rtx attribute values.
326 * attr.scm (/attr-val-is-rtx?): New function.
327 (attr-value): Call it.
328 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
329 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
330 Disallow rtx values for bitset attributes.
331 (/attr-read): Record rtx in default value as ((rtx-expr)).
332 (/attr-eval): Update.
334 2009-10-24 Doug Evans <dje@sebabeach.org>
336 * gen-all-doc: Add sh.cpu.
337 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
338 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
340 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
341 (/gen-sfrag-case): Ditto.
342 * sim-cpu.scm (/gen-sem-case): Ditto.
344 * doc/rtl.texi: Add note that different ifields, operands, insns,
345 and minsns may occur with the same name in different isas.
346 Add note on the canonical form of rtl expressions.
348 2009-10-23 Doug Evans <dje@sebabeach.org>
350 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
351 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
353 * decode.scm: Tweak various comments.
354 (/opcode-slots): Add FIXME.
355 (/build-decode-table-guts): Add assert.
356 * utils-sim.scm (/gen-set-itype-and-extract): New function.
357 (/gen-bracketed-set-itype-and-extract): New function.
358 (/gen-decode-default-entry): Rewrite.
359 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
360 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
361 updated. Don't unnecessarily emit check for whether all opcode bits
363 (/gen-decode-expr-set-itype): Delete.
364 (/gen-decode-expr-entry): Update.
365 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
366 updated. Keep track of decoder tables used thus far.
367 (/gen-decoder-switch): Ditto.
368 * utils.scm (word-bit-value): New function.
370 2009-10-14 Doug Evans <dje@sebabeach.org>
372 * ifield.scm (<ifield>, value): Provide default initial value.
373 (ifield-encode-mode): Delete
374 (ifield-decode-mode): Delete duplicate definition.
375 (<derived-ifield>, 'make!): Initialize members encode, decode.
376 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
378 (<multi-ifield>, 'gen-insert): Ditto.
380 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
382 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
383 for @foo@_init_idesc_table.
385 2009-09-30 Doug Evans <dje@sebabeach.org>
387 * doc/intro.texi: Mention SID.
388 * doc/sim.texi: Ditto.
389 * doc/porting.text (Doing a simulator port): Add some text.
391 2009-09-27 Doug Evans <dje@sebabeach.org>
393 * cos.scm (/class-table): New global.
394 (/class-uid, /class-set-uid!): New functions.
395 (/class-parent-name): Renamed from /class-parents.
396 (/class-make!): Change parents arg to parent-name, all callers updated.
398 (/class-lookup-uid): New function.
399 (/class-parent-classes): Rewrite.
400 (/class-mi?): Delete.
401 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
403 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
404 (/class-compute-class-desc, class-desc-dump): Update.
405 (/object-make!): Update.
406 (/object-make-with-values!): Delete arg class-desc, all callers
408 (/object-copy): Delete arg top?, all callers updated.
409 (/object-specialize): Delete.
410 (/object-elements, /object-top-class): Delete.
411 (/object-class-name, /object-class-desc): Update.
412 (/object-class-uid): New function.
413 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
414 class-make, /class-subclass? /class-lookup-element,
416 (/elm-delta, elm-list): Delete.
417 (/elm-make-method-getter, elm-get, elm-xget): Update.
418 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
419 (elm-make-getter, elm-make-setter): Update.
420 (/method-lookup-next): Update.
421 (send): Don't specialize class passed to method.
422 (send-next): New arg class-name, all callers updated.
423 (/class-parent, /class-parent-via-path, object-parent): Delete.
424 (class-cons-parent!, class-append-parent!): Delete.
425 (object-reset!): Init /class-table.
427 * cos.scm (/object-debug-classes): Delete.
428 (/object-debug-elements, /object-debug-methods): Delete.
430 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
431 (method-proc): Delete.
432 (method-make-virtual!, method-make-virtual-forward!): Delete.
433 * ifield.scm (<ifield> field-start): Update.
434 (<ifield> field-length, pretty-print): Update.
435 (<multi-ifield> field-length, field-start, pretty-print): Update.
436 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
437 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
438 (<array> gen-sym-defn): Ditto.
439 (<hardware-base> gen-defn): Renamed from gen-defn.
440 (<hw-register> gen-type): Update.
441 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
442 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
443 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
444 (<hw-immediate> gen-type): Update.
445 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
446 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
447 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
448 (<array> gen-sym-defn): Ditto.
449 (<hardware-base> gen-defn): Renamed from gen-defn.
450 (<hw-register> gen-type): Update.
451 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
452 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
453 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
454 (<hw-immediate> gen-type): Update.
455 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
457 2009-09-25 Doug Evans <dje@sebabeach.org>
459 * operand.scm (/anyof-merge-setter): Handle set-quiet.
460 * rtl.scm (rtx-single-set?): Handle set-quiet.
462 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
463 rtl-cover-fns?, macro?. All callers updated.
464 (estate-make-for-normal-rtl-c): Delete, have all callers call
465 estate-make-for-rtl-c directly.
466 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
467 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
469 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
470 replaces /par-replace-set-dests.
471 (/par-replace-set-src-expr-fn): New function, replaces
472 /par-replace-set-srcs.
473 (s-parallel): Rewrite.
475 * rtl.scm (rtx-pretty-strdump): New function.
476 * rtl-traverse.scm (/rtx-canon-error): Use it.
477 (<eval-state>): New member outer-expr.
478 (estate-error): Include outer expression in error message if present.
480 2009-09-23 Doug Evans <dje@sebabeach.org>
482 * xc16x.cpu (h-cr): New hardware.
483 (muls): Comment out parts that won't compile, add fixme.
484 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
485 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
486 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
488 Rewrite rtl processing to require it to be "canonicalized" first,
489 and write a full canonicalizer / expression checker.
490 Remove all appearances of DFLT in canonical rtl.
491 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
493 * iformat.scm (ifmt-analyze) Use canonical semantics.
494 * insn (<insn>): New member canonical-semantics.
495 * mach.scm (<arch>): New member multi-insns-instantiated?.
496 (/instantiate-multi-insns!): New function.
497 (/canonicalize-insns!): New function.
498 (arch-analyze-insns!): Canonicalize insn semantics before processing
500 * mode.scm (/mode-set-word-params!): New function.
501 (mode-void?): New function.
502 (mode-compatible?): VOID is compatible with VOID.
503 (/mode-word-sizes-defined?): New global.
504 (mode-set-word-modes!): Use/set it.
505 (mode-ensure-word-sizes-defined): Update.
506 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
507 Redo WI/UWI/AI/IAI handling.
508 (op:new-mode): No longer accept DFLT.
509 (<derived-operand> constructor): Ensure all fields are initialized.
510 (<anyof-operand> constructor): Ditto.
511 (/derived-parse-ifield-assertion): Delete arg `args'.
513 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
514 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
515 (rtl-c-expr, rtl-c++): Ditto.
516 (/rtl-c-get): Use mode of operand, not containing expression.
517 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
518 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
519 estate-for-insn? instead.
520 (s-unop): Use mode of expression, not first operand.
521 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
522 (s-sequence): Remove DFLT support.
523 (ifield): Use mode of expression, not UINT.
524 (pc): Comment out, unused.
525 (int-attr): New rtx kind.
527 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
528 * rtl-traverse.scm (/rtx-canon-debug?): New global.
529 (/make-cstate): New function.
530 (/cstate-context, /cstate-outer-expr): New functions.
531 (/rtx-canon-error): New function.
532 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
533 /rtx-get-last-cond-case-rtx): New functions.
534 (/rtx-canon-*): New functions.
535 (/rtx-canner-table, /rtx-operand-canoners): New globals.
536 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
537 (/rtx-option, /rtx-option-list?): Rewrite.
538 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
539 Rewritten, all callers updated.
540 (/rtx-canon-expr, /rtx-canon): New functions.
541 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
542 (rtx-canonicalize-stmt): New function.
543 (tstate-make): Remove arg `set?'. All callers updated.
544 (tstate-new-set?): Delete.
545 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
546 moved to /rtx-canon-*.
547 (/rtx-traverse-normal-operand): New function.
548 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
549 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
550 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
551 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
553 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
554 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
555 (/rtx-make-traverser-table): Update.
556 (/rtx-traverse-operands): Remove mode processing, now done during
558 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
559 (/rtx-traverse): Ditto.
560 (rtx-init-traverser-tables!): New function.
561 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
562 (rtx-verify-no-dflt-modes): New function.
563 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
564 (rtx-simplify-insn): Use insn-canonical-semantics.
565 (rtx-canonicalize): Moved to rtl-traverse.scm.
566 (/compile-expr-fn, rtx-compile): Delete.
567 (/rtx-trim-rtx-list): New function.
568 (/rtx-trim-for-doc): Handle set, if.
569 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
570 (/rtx-valid-mode-types): Update.
571 (/rtx-valid-matches): Update.
572 (/rtx-find-matchexpr-index): New function.
573 (rtx-lookup): Require rtx-kind to be the rtx name.
574 (def-rtx-node): New arg result-mode, all callers updated.
575 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
576 (rtx-lazy-sem-mode): Delete.
577 (/rtx-closure-make): New arg `mode', all callers updated.
578 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
579 (rtx-operand-obj): Rewrite.
580 (rtx-make-xop): New functions.
581 (/hw): Renamed from `hw', all callers updated.
582 Use the correct mode instead of DFLT for the index.
583 (rtl-builtin!): Call rtx-init-traversal-tables!.
584 (rtl-finish!): Update.
585 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
586 Update mode arg-type.
588 (int-attr): New rtx kind.
590 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
591 (/frag-cost-compute!): Ditto.
592 * semantics.scm (/build-operand!): Delete args op-name, op.
593 New arg op-expr. All callers updated.
594 (/build-mem-operand!): Remove DFLT support.
595 (semantic-compile): Update process-expr!, mode arg deleted.
596 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
598 (/gen-sem-case, /gen-sfrag-code): Ditto.
599 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
600 (/op-gen-set-trace): New function. If not doing profiling, or using
601 the pbb engine, call /op-gen-set-quiet.
602 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
603 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
604 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
605 * utils.scm (find-first-index): New function.
606 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
608 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
610 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
612 2009-09-21 Doug Evans <dje@sebabeach.org>
614 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
615 All callers updated. Add FIXME.
616 (all rtx functions): Rename local estate to *estate*. It's an
617 artificial argument added to the rtx, so make it stand out.
619 * openrisc.cpu (or32 isa): Fix setup-semantics.
621 * rtl.scm (rtx-class-*?): Delete, unused.
622 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
624 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
625 (init-reader!): Set /CGEN-RTL-VERSION to default.
627 * read.scm (cpu-load): Print load parameters.
629 * dev.scm (load-doc): Set verbose-level to 2.
631 2009-09-20 Doug Evans <dje@sebabeach.org>
633 * rtl.scm (rtx-strdump): Use write instead of display.
635 2009-09-17 Doug Evans <dje@sebabeach.org>
637 * utils-cgen.scm (obj-csv-names): New function.
638 * utils-sim.scm (/sfmt-contents): Use it in logging message.
640 2009-09-12 Doug Evans <dje@sebabeach.org>
642 Clean up pass of mode handling.
643 Make use of mode name vs <mode> object more consistent and clear.
644 * hardware.scm (/keyword-read): Default mode to the mode name,
645 not the <mode> object.
646 (/hw-parse-indices): Parse mode name and pass mode object to
647 <hw-asm> constructor.
648 (/hw-parse-values): Ditto.
649 (<hw-register> parse!): Pass mode name to /hw-parse-indices
650 and /hw-parse-values.
651 (<hw-memory> parse!): Ditto.
652 (<hw-address> parse!): Ditto.
653 * mode.scm (/mode-table): New global, replaces mode-list.
654 Modes stored in hashtable instead of list.
655 (/mode-class-table): New global.
656 (mode-list-non-alias-values): Update.
657 (mode:eq?, mode-compatible?, mode:add!): Update.
658 (mode:lookup): Restrict arg to the mode's name. All callers updated.
659 (mode-maybe-lookup): New function.
660 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
661 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
662 (mode-find, mode-set-word-modes!): Update
663 (mode-ensure-word-sizes-defined): Update.
664 (/sort-mode-classes!): New function.
665 (mode-builtin!): Update. Sort mode classes here.
666 (mode-finish!): Sort mode classes here too.
667 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
669 (rtl-c-set-quiet): Allow mode to be name of object.
670 (rtl-c-set-trace): Ditto.
671 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
672 <mode> object. All callers updated.
673 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
674 (rtx-lazy-sem-mode): Ditto.
675 (<rtx-temp> make!): Assert mode arg is a <mode> object.
676 (rtx-env-make): Allow var-list modes to be name or object.
677 * sem-frags.scm (/frag-expr-assq-locals): New function.
678 (/frag-compute-locals!): Call it.
679 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
681 * semantics.scm (/build-mem-operand!): Handle mode aliases.
683 * sim-test.scm (*): Symbols no longer can be passed to string-append.
685 2009-09-10 Doug Evans <dje@sebabeach.org>
687 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
688 Improve error message for missing or too many bits.
689 (/insn-parse): Don't verify iformat for virtual insns.
691 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
693 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
694 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
695 * sid.scm (pbb-engine-insns): Ditto.
696 * sim-decode.scm (cgen-decode.c): Ditto.
698 2009-09-09 Doug Evans <dje@sebabeach.org>
700 * rtl-traverse.scm: Comment tweaks.
701 * rtl-xform.scm: Comment and reformatting tweaks.
702 * doc/rtl.texi: Add text to docs on ifield-assertions.
704 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
707 Add support for controlling warnings/errors.
708 Add tests for iformat description errors.
709 * dev.scm (cload): New option #:diag.
710 * read.scm (<reader>): New member verify-iformat?.
711 (/parse-diagnostic, parse-warning): New functions.
712 (parse-error): Guts moved to /parse-diagnostic.
713 (/set-diagnostic-options!): New function.
714 (cpu-load): New arg diagnostic-options, all callers updated.
715 Recognize -w diagnostic-option-list.
716 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
717 (ifld-simple-ifields, ifields-simple-ifields): New function.
718 * insn.scm (/parse-insn-format-iflds): New function.
719 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
720 New arg isa, all callers updated. Do some basic validation of the
721 ifield list if requested.
722 * mach.scm (/sanity-check-insns): Improve error message text.
723 * doc/running.texi: Document -w option.
724 * doc/porting.texi: Document #:trace, #:diag options to cload.
726 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
728 * dev.scm (*): Change default verbosity level to 2.
730 * ifield.scm (<ifield> pretty-print): New method.
731 (ifld-pretty-print): New function.
732 (<multi-ifield> pretty-print): New method.
734 * ifield.scm (<ifield> field-start): Delete word-len arg.
737 (<multi-ifield> field-start): Ditto.
738 * operand.scm (<hw-index> field-start): Ditto.
740 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
741 total-bitsize. All callers updated.
742 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
743 New member /insn-base-value.
744 (insn-base-value): New function.
745 * mach.scm (/sanity-check-insns): New function.
746 (arch-analyze-insns!): Call it.
748 2009-09-08 Doug Evans <dje@sebabeach.org>
750 * iformat.scm (ifields-base-ifields): Simplify.
751 (compute-insn-length): Simplify, call ifields-base-ifields.
752 (compute-insn-base-mask): Ditto.
753 * ifield.scm (ifld-known-values): Ditto.
754 (ifld-base-ifields): Ditto.
755 * insn.scm (insn-value): Ditto.
756 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
758 2009-09-08 DJ Delorie <dj@redhat.com>
760 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
761 preprocessor macro, not an enum.
763 2009-09-08 Doug Evans <dje@sebabeach.org>
765 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
767 (*): Remove trailing ":" from error messages passed to estate-error.
769 2009-09-07 Doug Evans <dje@sebabeach.org>
771 * types.scm (<struct>): Delete.
773 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
775 (/pmacro-loc-error): New function.
777 * mach.scm (/isa-parse-decode-assist): New function.
778 (/isa-parse): Call it.
780 * decode.scm (/get-subopcode-value): New function.
781 (/opcode-slots): Call it.
782 (/fill-slot!): Add logging message.
784 * cos.scm (/object-error): Convert symbols to strings before passing
787 * read.scm (rtl-version-equal?): New function.
788 (rtl-version-at-least?, rtl-version-older?): New functions.
790 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
791 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
793 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
795 2009-09-03 Doug Evans <dje@sebabeach.org>
797 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
800 2009-09-01 DJ Delorie <dj@redhat.com>
802 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
803 (parse_unsigned16_range): Likewise.
804 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
807 2009-09-01 Doug Evans <dje@sebabeach.org>
809 Pmacro .equals -> .equal?
810 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
811 -pmacro-builtin-equals. All callers updated.
812 (pmacros-init!): Rename .equals to .equal?.
813 * doc/pmacros.texi: Update.
814 * testsuite/pmacros-1.test: Update.
816 * doc/porting.texi: Work around texi2html bug where it doesn't
817 properly escape <> inside double-quotes inside @code.
819 * doc/porting.texi (Doing an opcodes port): Add step to specify
822 2009-08-29 Doug Evans <dje@sebabeach.org>
824 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
826 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
828 2009-08-27 Doug Evans <dje@sebabeach.org>
830 Add do-count rtl function.
831 * rtl-c.scm (s-do-count): New function.
832 (do-count): New rtl handler.
833 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
834 (-rtx-make-traverser-table): Add ITERATION.
835 * rtl.scm (rtx-make-iteration-limit-var): New function.
836 (rtx-env-make-iteration-locals): New function.
837 * rtx-funcs.scm (do-count): New rtl function.
838 * cpu/play.cpu: Add do-count-test insn.
839 * doc/rtl.texi: Add docs on do-count.
841 2009-08-26 Doug Evans <dje@sebabeach.org>
843 * read.scm (parse-error): Change error message output format
844 to match context-owner-error.
845 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
846 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
847 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
848 (operand): Call estate-error instead of context-error.
849 (local, delay): Ditto.
850 (ref, attr): Call estate-error instead of error.
851 * rtl-traverse.scm (tstate-error): New function.
852 (-rtx-traverse-error): Call tstate-error instead of context-error.
853 (-rtx-traverse-operands, -rtx-traverse): Ditto.
854 (estate-error): New function.
855 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
857 (e-if): Call estate-error instead of error.
858 * rtx-funcs.scm (error): Call estate-error instead of context-error.
860 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
861 Rewrite to call context-owner-error.
862 (context-owner-error): New function.
864 * ifield.scm (<ifield> constructor): New arg `location',
866 * insn.scm (<insn> constructor): Ditto.
867 (<multi-insn> constructor): Ditto.
868 * minsn.scm (<macro-insn> constructor): Ditto.
869 * operand.scm (<operand> constructor): Ditto.
870 * utils-cgen.scm (builtin-location): New function.
871 (<source-ident>): Fix default value of member `location'.
872 (source-ident?): New function.
874 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
875 (estate-push-env, estate-with-modifiers): Ditto.
876 (estate-deepen): New function.
878 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
880 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
881 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
884 2009-08-25 Doug Evans <dje@sebabeach.org>
886 * doc/pmacros.texi (pmacro default argument values): Add text.
888 2009-08-23 Doug Evans <dje@sebabeach.org>
890 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
891 Rename member prefix -> name-prefix.
892 (<keyword> getters): Update.
893 (-keyword-parse): Update. Default enum-prefix to NAME-.
894 (-keyword-read): Update. Don't compute default value for
896 (define-keyword): Update.
897 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
898 * read.scm (cgen-rtl-version): New function.
899 (-supported-rtl-versions): Add (0 8).
900 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
901 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
902 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
903 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
904 Update, print-name -> enum-prefix, make uppercase.
905 Remove unnecessary name-prefix spec.
906 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
907 * cpu/ip2k.cpu (register-names): Ditto.
908 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
909 * cpu/sparc.cpu (gr-names): Ditto.
910 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
911 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
912 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
913 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
914 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
915 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
916 prefix -> name-prefix.
917 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
918 Update, print-name -> enum-prefix, make uppercase.
919 (drc-names, xf-names): Ditto.
920 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
921 * doc/rtl.texi (Keywords): New section.
922 (hardware indices): Update text.
923 (rtl versions): Add 0.8.
925 Add define-rtl-version.
926 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
927 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
928 (cgen-lang-fixlevel): Delete.
929 (-supported-rtl-versions): New variable.
930 (-cmd-define-rtl-version): New function.
931 (init-reader!): New command define-rtl-version.
932 (-cgen): Add rtl version to --version output.
933 * doc/rtl.texi: Document rtl version support.
934 * cpu/play.cpu: Add define-rtl-version.
936 2009-08-22 Doug Evans <dje@sebabeach.org>
938 * Makefile.am (OPTIONS): Define.
939 (desc): Just generate <arch>-desc.[ch] files.
940 * Makefile.in: Regenerate.
941 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
943 (cgen-desc.c): Similarly.
944 * gen-all-desc: New file.
945 * opcodes.scm (opc-file-provided?): New function.
947 * mach.scm (current-*-add!): Update calls to parse-error.
948 * operand.scm (op:new-mode): Update call to parse-error.
949 * utils-cgen.scm (make-obj-context): New function.
951 * NEWS: Copy over entries from 1.1 branch.
953 2009-08-20 Doug Evans <dje@sebabeach.org>
955 * gas-test.scm (<keyword> test-data): Catch invalid requests,
956 flag a warning and compensate.
957 (<hw-address test-data): Tweak for readability.
958 (<hw-iaddress test-data): Ditto.
959 (cgen-build.sh): Convert symbols to strings before passing to
961 (cgen-allinsn.exp): Ditto.
963 * doc/pmacros.texi (.splice): Add more text.
965 2009-08-19 Doug Evans <dje@sebabeach.org>
967 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
968 distinguish from 1.1.
969 * configure: Regenerate.
970 * read.scm (-CGEN-VERSION): Update.
971 * doc/version.texi: Update.
973 New builtin .pmacro?.
974 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
975 (pmacros-init!): Add .pmacro?.
976 * doc/pmacros.text: Document .pmacro?.
977 * testsuite/pmacros-1.test: Test .pmacro?.
979 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
980 of a pmacro begins before its arguments are evaluated, improves
983 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
984 * testsuite/pmacros-1.test: Ditto. Add better tests.
986 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
988 (Operands): Similarly.
990 2009-08-18 Doug Evans <dje@sebabeach.org>
992 * ifield.scm (ifld-encode-mode): Add FIXME.
993 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
995 (<ifield> gen-extract): Similarly.
997 * read.scm (parse-error): Handle #f for context-location.
998 * utils-cgen.scm (unspecified-location): Fix building of
1001 * doc/rtl.texi: Document how to write hex and boolean values.
1003 * gas-test.scm (<hw-asm> test-data): Handle () values.
1004 (<keyword> test-data): Convert symbols to strings before passing
1006 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
1009 * operand.scm (hw-index-scalar): Set `name'.
1010 (hw-index-anyof, hw-index-derived): Ditto.
1012 2009-08-17 Doug Evans <dje@sebabeach.org>
1014 * pmacros.scm (-pmacro-builtin-internal-test): New function.
1015 (pmacros-init!): Add .internal-test.
1016 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
1017 * testsuite/testsuite.cpu (internal-verify): New pmacro.
1018 * doc/pmacros.text: Document .internal-test.
1020 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
1021 (parse-comment): Allow numbers.
1022 * doc/porting.texi: Document that names and comments may be lists.
1024 * insn.scm (-insn-parse): Fix typo.
1026 Rename .eval -> .exec. Add new .eval.
1027 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
1028 (-pmacro-builtin-eval): New function.
1029 (pmacros-init!): Add .exec.
1030 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
1031 * testsuite/location-1.test: Update.
1032 * testsuite/pmacros-1.test: Add test for .eval.
1034 2009-08-16 Doug Evans <dje@sebabeach.org>
1036 * doc/porting.texi: Remove support for Guile 1.4.
1038 * read.scm (current-reader-location): Return unspecified location
1039 if reader hasn't been initialized yet.
1041 2009-08-13 Doug Evans <dje@sebabeach.org>
1043 * dev.scm: Document tracing options.
1045 * pmacros.scm (pmacro-dump): New function.
1046 (check-pmacro): Tweak debugging output.
1047 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
1048 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
1050 Add .let* pmacro builtin.
1051 * pmacros.scm (-pmacro-builtin-let*): New function.
1052 (pmacros-init!): Add .let*.
1053 * doc/pmacros.texi: Document .let*.
1054 * testsuite/pmacros-1.test: Test .let*.
1056 2009-08-12 Doug Evans <dje@sebabeach.org>
1058 Clean up cpu file parsing, pass context consistently instead of the
1059 old "errtxt" argument.
1060 NOTE: ACU == "All Callers Updated".
1061 * attr.scm (-parse-simple-attribute): Renamed from
1062 parse-simple-attribute, ACU.
1063 (-attr-parse): Change errtxt argument to context, ACU.
1064 (-attr-read): Ditto.
1065 (atlist-parse): Ditto. Put context arg first.
1066 (attr-parse): Use parse-error instead of context-error.
1067 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
1068 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
1069 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
1070 `context' arg is now a <context> object. ACU.
1071 (-keyword-read): `context' arg is now a <context> object. ACU.
1072 (-hw-parse-indices): Change errtxt argument to context, ACU.
1073 (-hw-parse-values, -hw-parse-handlers): Ditto.
1074 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
1075 (-hw-validate-layout, -hw-create-getter-from-layout,
1076 -hw-create-setter-from-layout): Ditto.
1077 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
1078 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
1079 (<hw-address>:parse!): Ditto.
1080 * ifield.scm (-ifield-parse, ifield-read): Ditto.
1081 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
1082 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
1083 (-multi-ifield-parse, -multi-ifield-read): Ditto.
1084 * insn.scm (-insn-parse, -insn-read): Ditto.
1085 (parse-syntax): Ditto. Put context arg first.
1086 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
1087 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
1088 (-parse-insn-format): Ditto.
1089 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
1090 (-arch-parse-isas): Ditto.
1091 (-isa-read): Add context arg, ACU.
1092 (-cpu-parse, -cpu-read, -mach-read): Ditto.
1093 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
1095 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
1096 (minsn-make-alias): Ditto.
1097 * mode.scm (-mode-parse): Ditto.
1098 (parse-mode-name): Ditto. Put context arg first.
1099 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
1100 errtxt argument to context, ACU.
1101 (-unit-parse, -model-parse, -model-read): Ditto.
1102 * operand.scm (-operand-parse-getter): Use parse-error instead of
1104 (-operand-parse-setter): Ditto.
1105 (-operand-parse): Change errtxt argument to context, ACU.
1106 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
1107 (-anyof-operand-parse, -anyof-operand-read): Ditto.
1108 * read.scm (reader-error): Delete. Use parse-error instead.
1109 (parse-error): Change errtxt argument to context, ACU. Split args
1110 argument into expr and maybe-help-text.
1111 (-reader-process-expanded-1!): Reorganize.
1112 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
1113 * types.scm (parse-type): Ditto.
1114 * utils-cgen.scm (single-location->simple-string): New function.
1115 (<context>): Replace members file,lineno with location.
1116 (make-prefix-context): Renamed from context-make-prefix, ACU.
1117 (make-current-context): New function.
1118 (context-append, context-append-name): New functions.
1119 (context-make-reader): Delete.
1120 (parse-name): Change errtxt argument to context, ACU.
1121 Put context arg first.
1122 (parse-comment): Ditto.
1123 (parse-number): Change errtxt argument to context, ACU.
1124 (arg-list-validate-name, arg-list-check-no-args,
1125 arg-list-symbol-arg): Ditto.
1127 * read.scm (-cmd-if): Don't assume test is a list.
1129 * html.scm (get-insn-properties): Delete errtxt, unused.
1131 2009-08-11 Doug Evans <dje@sebabeach.org>
1133 * doc/rtl.texi (hardware types): Add pc.
1135 2009-08-07 Doug Evans <dje@sebabeach.org>
1137 Add -t option for tracing things like commands, pmacro expansion.
1138 * dev.scm (cload): New arg #:trace.
1139 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
1140 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
1141 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
1142 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
1143 (-reader-process-expanded-1!): Trace commands if requested.
1144 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
1145 (-set-trace-options!): New function.
1146 (-init-reader!): New function.
1147 (cpu-load): New arg trace-options, all callers updated.
1148 Call -init-reader! and -set-trace-options!.
1149 (cgen-usage): Improve output formatting.
1150 (common-arguments): New option -t.
1151 (-cgen): Process -t.
1152 * utils-cgen.scm (single-location->string): Renamed from
1153 pretty-print-single-location. All callers updated.
1154 (location->string): Renamed from pretty-print-location.
1155 All callers updated.
1156 (source-properties-location->string): New function.
1157 * doc/running.texi: Document -t.
1159 2009-08-06 Doug Evans <dje@sebabeach.org>
1161 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
1162 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
1163 * utils.scm: ... here.
1165 2009-08-05 Doug Evans <dje@sebabeach.org>
1167 Track source location better, for better error messages.
1168 * pmacros.scm (-pmacro-eval): Delete, unused.
1169 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
1170 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
1171 (scan-list, scan): Ditto.
1172 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
1173 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
1174 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
1175 (scan-list1): New function.
1176 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
1177 * read.scm (<reader>): New member `location'.
1178 (-reader-lookup-command): Renamed from reader-lookup-command,
1179 all callers updated.
1180 (reader-error): Rewrite to produce better source location info.
1181 (current-reader-location): New function.
1182 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
1183 All callers updated. Record source location of expression.
1184 (reader-process-expanded!): Renamed from reader-process-expanded.
1185 All callers updated.
1186 (-reader-process!): Renamed from reader-process. New arg `loc'.
1187 All callers updated. Record source location of define-pmacro.
1188 * utils-cgen.scm (<location>): New class.
1189 (single-location): New (pseudo) class.
1190 (pretty-print-single-location, pretty-print-location): New functions.
1191 (location-top, location-push-single, location-push): New functions.
1192 (unspecified-location, current-input-location): New functions.
1193 (location-property): New object property.
1194 (location-property-set!): New function.
1195 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
1197 * testsuite/location-1.test: New testcase.
1198 * testsuite/run-tests.sh: Fix fail count handling.
1199 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
1200 to expect cgen to fail.
1202 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
1204 * read.scm (-cmd-include): Renamed from include. All callers updated.
1205 (-cmd-if): Renamed from cmd-if. All callers updated.
1206 Use reader-process-expanded! on then/else clauses instead of eval1.
1208 2009-07-22 Doug Evans <dje@sebabeach.org>
1210 * modes.scm (TI,OI): New modes.
1211 * types.scm (parse-type): Improve error checking. Don't hardwire
1213 * utils.scm (non-negative-integer?): New function.
1215 * pmacros.scm (-pmacro-builtin-find): New predicate.
1216 (pmacros-init!): Add .find.
1217 * doc/pmacros.tex: Document .find.
1218 * testsuite/pmacros-1.test: Test .find.
1220 2009-07-20 Doug Evans <dje@sebabeach.org>
1222 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
1223 commented out printfs.
1224 * rtl.scm (rtl-finish!): Whitespace tweaks.
1225 * model.scm (parse-insn-timing): Tweak logging message.
1226 * operand.scm: Comment and whitespace tweaks.
1227 (op:type): Tweak error message.
1228 (op-ifield): Tweak logging message.
1229 (-derived-operand-parse, anyof-merge-semantics): Ditto.
1230 * read.scm: Whitespace cleanup.
1231 * utils.scm: Whitespace cleanup.
1233 2009-07-19 Doug Evans <dje@sebabeach.org>
1235 Fix binding of nested pmacro parameters.
1236 * pmacros.scm (-pmacro-env-make): New arg prev-env.
1237 All callers updated.
1238 (-pmacro-bulid-lambda): Ditto.
1239 * doc/pmacros.texi: Update.
1240 * testsuite/pmacros-1.test: Add testcase.
1242 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
1244 (-multi-ifield-make-default-extract): Ditto.
1246 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
1247 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1248 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
1250 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
1251 * doc/rtl.texi: Update.
1253 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
1255 Rename builtin boolean pmacros, for consistency with rtl.
1256 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
1257 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
1258 * doc/pmacros.texi: Update.
1259 * testsuite/pmacros-1.test: Update.
1261 2009-07-17 Doug Evans <dje@sebabeach.org>
1263 Use hash tables to record ifields, operands, insns, macro-insns.
1264 * attr.scm (attr-builtin!): Tweak some comments.
1265 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
1266 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
1268 (<multi-ifield>): New constructor.
1269 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
1270 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
1272 (-sub-insn-make!): Add hack to avoid differences in generated code.
1273 (multi-insn-instantiate!): Add total number of multi-insns to
1275 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
1276 minsn-list to foo-table. New member next-ordinal.
1277 Update getters/setters.
1278 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
1280 (-get-next-ordinal!, -get-lowest-ordinal): New function.
1281 (-make-ident-object-table, -ident-object-table->list,
1282 -ident-object-table-add!, -ident-object-table-lookup): New functions.
1283 (current-ifld-list, current-ifld-add! current-ifld-lookup,
1284 -ifld-already-defined?): Rewrite.
1285 (current-op-list, current-op-add! current-op-lookup,
1286 -op-already-defined?): Rewrite.
1287 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1288 (current-insn-list, current-insn-add! current-insn-lookup,
1289 -insn-already-defined?): Rewrite.
1290 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1291 -minsn-already-defined?): Rewrite.
1292 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1293 (MAX-VIRTUAL-INSNS): Define.
1294 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1295 Update use of arch-insn-list.
1296 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1297 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1299 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1300 <ident>. New constructor.
1301 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1303 * sid.scm (-virtual-insn-add!): New function.
1304 (-create-virtual-insns!): Call it.
1305 (-fill-sim-insn-list!): Rewrite.
1306 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1307 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1308 * utils-cgen.scm (<ordered-ident>): New class.
1309 (obj-ordinal, obj-set-ordinal!): New functions.
1310 (add-ident-methods!): Delete.
1312 * model.scm (parse-insn-timing): Change logging message to level 3.
1314 2009-07-16 Doug Evans <dje@sebabeach.org>
1316 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1317 add a link to define-normal-insn-enum.
1319 * doc/porting.texi (Conventions): Add docs on writing integers.
1321 * cpu/simplify.inc (*): One line doc strings don't need \n.
1322 (df): Invoke define-full-ifield instead of claiming it's an alias.
1324 (dnop): Mark as deprecated.
1326 * cpu/play.cpu: Add example of hardware `layout'.
1327 * doc/porting.tex: Add docs on simplify.inc.
1328 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1331 * ifield.scm: Whitespace/formatting cleanup.
1333 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1335 * read.scm (parse-error): Don't print single entry args as a list.
1336 (-reader-process-expanded-1): Convert symbol to string for
1339 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1341 2009-07-15 Doug Evans <dje@sebabeach.org>
1343 * cpu/simplify.inc (dno): New pmacro.
1344 * doc/porting.texi: Add section on simplify.inc.
1345 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1347 2009-07-15 Doug Evans <devans@sourceware.org>
1349 * gen-all-doc: Generate index.html.
1351 2009-07-13 Doug Evans <dje@sebabeach.org>
1353 Extend pmacro language, add testsuite.
1354 * Makefile.am (SUBDIRS): Add testsuite.
1355 * Makefile.in: Regenerate.
1356 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1357 testsuite/test-utils.sh.
1358 * configure: Regenerate.
1359 * dev.scm (cload): Handle testsuite app.
1360 (load-testsuite): New function.
1361 * pmacros.scm: (-pmacro-debug?): New global.
1362 (-smacro-table): New global.
1363 (-smacro-lookup, -smacro-set!): New functions.
1364 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1365 (-pmacro-syntactic-form?): New function.
1366 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1367 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1368 (-pmacro-expected-non-negative-integer): New function.
1369 (-pmacro-verify-non-negative-integer): New function.
1370 (-pmacro-expand-expr-list): New function.
1371 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1372 (-pmacro-process-args): Renamed from -pmacro-invoke.
1373 (-pmacro-apply, -smacro-apply): New functions.
1374 (-pmacro-expand): Rewrite syntactic form processing.
1375 (-pmacro-build-lambda): Reformat.
1376 (define-pmacro): Watch for more errors in definition.
1377 (pmacro-debug): New function.
1378 (pmacro-trace): Set/reset -pmacro-debug?.
1379 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1380 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1381 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1382 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1383 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1384 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1385 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1386 (pmacros-init!): Initialize -smacro-table.
1387 Rewrite pmacro initialization.
1388 * read.scm (reader-process-expanded): Renamed from
1389 -reader-process-expanded. All callers updated.
1390 Recognize () as a no-op.
1391 (cpu-load): Tweak logging messages.
1392 * utils.scm (message): Add comment.
1393 * cpu/play.cpu: Add some instructions to play with .let.
1394 * doc/cgenint.texi: Move some debugging related docs to here from
1396 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1397 * testsuite/Makefile.am: New file.
1398 * testsuite/Makefile.in: New file.
1399 * testsuite/test-utils.sh.in: New file.
1400 * testsuite/run-tests.sh: New file.
1401 * testsuite/testsuite.cpu: New file.
1402 * testsuite/pmacros-1.test: New file.
1404 * decode.scm: Comment and formatting tweaks.
1405 (-build-decode-table-guts): Add more data to logging message.
1407 2009-07-12 Doug Evans <dje@sebabeach.org>
1409 Delete files that now live in ../cpu.
1410 * cpu/iq10.cpu: Delete.
1411 * cpu/iq2000.cpu: Delete.
1412 * cpu/iq2000.opc: Delete.
1413 * cpu/iq2000m.cpu: Delete.
1414 * cpu/m32r.cpu: Delete.
1415 * cpu/m32r.opc: Delete.
1417 2009-07-09 Doug Evans <dje@sebabeach.org>
1419 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1420 All callers updated. Work around -ve shifts by referencing the
1423 * utils.scm (message): Handle pairs.
1425 2009-07-08 DJ Delorie <dj@redhat.com>
1427 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1428 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1429 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1432 2009-07-07 Doug Evans <dje@sebabeach.org>
1434 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1435 * cpu/play.opc: New file.
1437 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1438 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1439 * doc/rtl.texi (Instructions): Update.
1441 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1442 (opc-arguments, -OPC): Call set-opc-file-path!.
1443 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1444 (set-opc-file-path!): New function.
1445 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1447 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1448 before passing to gen-c-args.
1450 2009-07-06 DJ Delorie <dj@redhat.com>
1452 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1453 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1454 unspecified accesses to control registers.
1456 2009-07-01 DJ Delorie <dj@redhat.com>
1458 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1459 unspecified accesses to control registers.
1461 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1462 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1464 2009-06-27 Doug Evans <dje@sebabeach.org>
1466 * gen-all-intrinsics: New file.
1468 2009-06-24 Doug Evans <dje@sebabeach.org>
1470 * All *.scm files: Update copyright year.
1471 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1473 2009-06-23 DJ Delorie <dj@redhat.com>
1475 * intrinsics.scm: Updates to support IVC2.
1476 (belongs-to-group?): Check IVC2 slots.
1477 (-slots-attribute): New.
1478 (targets::attributes): Add SLOTS.
1479 (target:add-well-known-intrinsics): Add CPMOV.
1480 (md-insn): Add CPTYPE and CRET?.
1481 (add-md-insn): Likewise.
1482 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1483 duplicate insns with different bit patterns.
1484 (write-cgen-insn?): Add cret? support.
1485 (intrinsics.h): Add vector types.
1486 (runtime-op): Add vector support.
1487 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1489 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1490 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1491 (h-cr-ivc2): Default to typeless.
1492 (h-ccr-ivc2): Fix register width.
1493 (SLOTS): Fix values and default.
1494 (ivc2_*): Add control register names.
1495 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1497 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1498 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1500 2009-06-22 Doug Evans <dje@sebabeach.org>
1502 * semantics.scm (insn-build-known-values): Fix typo in comment.
1504 2009-06-21 Doug Evans <dje@sebabeach.org>
1506 * rtl-xform.scm (rtx-simplify-insn): New function.
1507 * html.scm (gen-insn-docs): Call it.
1508 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1509 * iformat.scm (ifmt-analyze): Minor simplification.
1511 * semantics.scm (semantic-compile): Change arg sem-code-list to
1513 (semantic-attrs): Ditto.
1514 * iformat.scm (ifmt-analyze): Update.
1515 (ifmt-compute!): Update.
1516 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1518 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1519 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1520 * semantics.scm (rtx-simplify): Ditto.
1521 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1522 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1523 (-simplify-expr-fn): Move to rtl-xform.scm.
1524 (-solve-expr-fn, rtx-solve): Ditto.
1525 * rtl-xform.c: New file.
1526 * read.scm: Load it.
1528 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1529 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1530 (-rtx-traverse, rtx-traverse): Ditto.
1532 2009-06-20 Doug Evans <dje@sebabeach.org>
1534 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1536 * configure.in: Update version to 1.1.
1537 * configure: Regenerate.
1538 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1540 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1541 Doug Evans <dje@sebabeach.org>
1543 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1544 (cgen-desc.c): Ditto.
1545 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1546 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1547 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1548 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1549 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1550 (cgen-cpuall.h, cgen-ops.c): Ditto.
1551 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1552 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1553 (cgen-sem-switch.c): Ditto.
1554 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1555 * sim-model.c (cgen-model.c): Ditto.
1557 2009-06-18 Doug Evans <dje@sebabeach.org>
1559 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1561 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1563 * dev.scm (cload): Change #:arch argument to take the path to the
1564 .cpu file instead of just the name of the architecture.
1565 * read.scm (arch-path): Remove trailing '/'.
1566 (cpu-load): Set `arch-path' to directory of .cpu file.
1567 (-cgen): Don't set `arch-path' here.
1569 * doc/porting.texi: Update.
1571 2009-06-14 Doug Evans <dje@sebabeach.org>
1573 * gen-all-doc: Use files in ../cpu where possible.
1575 * Makefile.am (ARCHFILE): Fix path.
1576 * Makefile.in: Regenerate.
1577 * html.scm: Use "pre" instead of "plaintext".
1579 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1580 * doc/app.texi: Cleanup pass.
1581 * doc/cgen.texi: Cleanup pass.
1582 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1583 * doc/intro.texi: Cleanup pass.
1584 * doc/mdate-sh: New file.
1585 * doc/opcodes.texi: Cleanup pass.
1586 * doc/pmacros.texi: Cleanup pass.
1587 * doc/porting.texi: Cleanup pass.
1588 * doc/rtl.texi: Cleanup pass.
1589 * doc/running.texi: Cleanup pass. Document more runtime options.
1590 * doc/stamp-vti: Update.
1591 * doc/version.texi: Update.
1593 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1594 (GUILE): Fix definition.
1595 * Makefile.in: Regenerate with automake 1.9.6.
1596 * aclocal.m4: Regenerate with aclocal 1.9.6.
1597 * configure.in (AC_PREREQ): Set to 2.59.
1598 (GENINSRC_NEVER): Define.
1599 * configure: Regenerate with autoconf 2.59.
1600 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1601 (cgen.info,cgen.dvi): Delete.
1602 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1603 (noinst_TEXINFOS): Add cgenint.texi.
1604 (DOCFILES): Add missing files.
1605 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1606 * doc/Makefile.in: Regenerate with automake 1.9.6.
1608 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1610 * attr.scm: Removing trailing whitespace.
1611 * cgen-intrinsics.scm: Ditto.
1612 * cgen-sim.scm: Ditto.
1618 2009-05-28 DJ Delorie <dj@redhat.com>
1620 * cpu/mep.opc (parse_signed16_range): New.
1621 (parse_unsigned16_range): New.
1622 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1624 2009-05-26 DJ Delorie <dj@redhat.com>
1626 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1628 (f-ivc2-ccrn-c3hi): New.
1629 (f-ivc2-ccrn-c3lo): New.
1630 (f-ivc2-ccrn-c3): New.
1631 (ivc2c3ccrn): Use it.
1633 2009-05-22 DJ Delorie <dj@redhat.com>
1635 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1636 (mep_config_map): Regenerate.
1638 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1639 ivc2-specific names.
1641 (cmovc): move to after field definitions, use ivc2-specific
1643 (cpmovi_b_P0S_P1): New.
1645 2009-05-19 DJ Delorie <dj@redhat.com>
1647 * cpu/mep.opc: Regenerate configuration.
1648 (parse_cdisp10): Only check CPU flags, not COP flags.
1649 (check_configured_mach): Likewise.
1651 2009-05-13 DJ Delorie <dj@redhat.com>
1653 * intrinsics.scm (insns.md): Add RTL predicates.
1654 (intrinsics.h): Remove old C intrinsics.
1656 2009-04-29 DJ Delorie <dj@redhat.com>
1658 * mep-ivc2.cpu: New.
1659 * mep-core.cpu: Regenerated. Add support for deferred register
1661 (SLOT): Add IVC2 slot types.
1662 (sim-syscall): Rename to something more appropriate.
1663 * mep-ext-cop.cpu: Regenerate.
1664 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1665 (print_slot_insn): New.
1666 (mep_examine_ivc2_insns): New.
1667 (mep_print_insn_set_ivc2_mode): New.
1668 (mep_print_insn): Support IVC2 slotting.
1670 2009-04-20 DJ Delorie <dj@redhat.com>
1672 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1673 (guess-mode): Drop COP* syntax.
1674 (need-insn): Add "--syscall--" to the list.
1675 (enum-type): Drop COP* syntax.
1676 (intrinsics.h): Likewise.
1677 (intrinsic-protos.h): Change file header to allow it to be
1680 2009-04-17 DJ Delorie <dj@redhat.com>
1682 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1683 (lhucpm1): Limit to C5 mach.
1684 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1685 * cpu/mep-core.cpu (extend-cdisp10): New.
1686 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1688 2009-04-08 DJ Delorie <dj@redhat.com>
1690 * cpu/mep-c5.cpu: New.
1691 * cpu/mep-core.cpu: Add C5 support.
1692 * cpu/mep.opc: Likewise.
1694 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1696 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1697 about calling memset with a zero length.
1699 2009-02-03 DJ Delorie <dj@redhat.com>
1701 * cpu/mep-core.cpu: Update to new MeP configuration.
1702 * cpu/mep-ext-cop.cpu: Likewise.
1703 * cpu/mep.opc: Likewise.
1705 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1707 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1709 2008-06-17 Dave Brolley <brolley@redhat.com>
1711 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1714 2007-11-13 Dave Brolley <brolley@redhat.com>
1716 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1718 2007-11-05 Dave Brolley <brolley@redhat.com>
1720 * intrinsics.scm,cgen-intrinsics.scm: New application which
1721 generates code to support intrinsic functions for insns in the
1722 mep architecture in gcc.
1724 2007-09-21 Dave Brolley <brolley@redhat.com>
1726 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1727 (rn3us): CDATA attribute now LONG.
1729 2007-08-21 Dave Brolley <brolley@redhat.com>
1731 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1734 2007-07-05 Nick Clifton <nickc@redhat.com>
1736 * utils.scm (copyright-fsf): Update copyright notice to refer to
1739 2007-05-22 Nick Clifton <nickc@redhat.com>
1741 * doc/cgen.texi: Use @copying around the copyright notice.
1742 * doc/internals.texi: Likewise.
1744 2007-02-05 Dave Brolley <brolley@redhat.com>
1746 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1748 2007-02-05 Dave Brolley <brolley@redhat.com>
1750 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1751 in the generated code for @arch@_cgen_init_asm if it is defined.
1753 * Contribute the following changes:
1754 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1756 * attr.scm (<string-attribute>): New attribute class.
1757 (attr-kind): Handle <string-attribute>.
1758 (parse-simple-attribute): New function.
1759 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1760 (<bitset-attribute> 'parse-value): Likewise.
1761 (<boolean-attribute> 'parse-value): Likewise.
1762 (<enum-attribute> 'parse-value): Likewise.
1763 (<string-attribute> 'parse-value): New function.
1764 (-attr-parse): Handle <string-attribute>.
1765 (-attr-read): Likewise.
1766 (<string-attribute> 'gen-value-for-defn-raw): New function.
1767 (<string-attribute> 'gen-value-for-defn): New function.
1769 2006-11-07 Dave Brolley <brolley@redhat.com>
1771 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1774 2006-10-18 Dave Brolley <brolley@redhat.com>
1776 * Contribute the following changes:
1778 2006-07-11 Dave Brolley <brolley@redhat.com>
1780 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1782 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1783 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1784 hardware or memory mode which was used.
1785 * sid-cpu.scm (hw-need-write-stack?): New function.
1786 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1787 identify hardware which uses write stacks.
1788 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1789 Initialized to an empty list.
1790 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1791 hw-need-write-stack?.
1792 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1793 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1794 (used-in-delay-rtl?): New method of <hardware-base>.
1795 (hw-used-in-delay-rtl?): New function.
1797 2006-06-20 Dave Brolley <brolley@redhat.com>
1799 * sid.scm (gen-attr-type): Removed.
1800 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1801 (SH2a-MACH): Add sh5.
1802 (sh2a-nofpu-models): Add units for sh5.
1803 (sh2a-fpu-models): Likewise.
1805 2006-06-15 Dave Brolley <brolley@redhat.com>
1807 * cpu/sh-sim.cpu: New file.
1808 * cpu/sh-sid.cpu: New file.
1809 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1810 (All fields): Remap for (insn-lsb0? #f)
1811 (All insns): Add timing specs.
1812 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1813 'xattrs' and .splice it in.
1814 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1815 (h-frc,h-drc): Add PROFILE attribute.
1817 (h-vbr): New hardware.
1818 (All fields): Remap for (insn-lsb0? #f)
1819 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1820 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1821 (fpscr): Use h-fpscr.
1822 (fsdm,fsdn): Use h-fsd.
1823 (dshci): Add xtiming argument and splice it in.
1824 (dr,xd): pmacros removed.
1825 (All insns): Add timing specs, *-MACH attribibutes,
1826 SH4{A}-GROUP attributes.
1827 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1828 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1829 we're being processed for sim or sid.
1830 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1831 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1832 (define-isa compact): Add (isa-parallel-insns 2).
1833 (define-isa media): Add (isa-parallel-insns 2). Add
1834 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1835 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1837 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1838 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1839 (SH4al-MACH, SH5-MACH): New pmacros.
1840 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1841 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1842 (sh5-media-fp-units, common-model, common-model-with-fp)
1843 (sh3-model, sh3e-model): New pmacros.
1844 (define-model sh2): New model.
1845 (define-model sh2e): New model.
1846 (define-model sh3): New model.
1847 (define-model sh3e): New model.
1848 (define-model sh2a-nofpu): New model.
1849 (define-model sh2a-fpu): New model.
1850 (define-model sh4-nofpu): New model.
1851 (define-model sh4): New model.
1852 (define-model sh4a-nofpu): New model.
1853 (define-model sh4a): New model.
1854 (define-model sh4al): New model.
1855 (define-model sh5-media): New model.
1856 (define-model sh5): Add all units.
1857 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1858 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1859 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1860 (h-pc): Add PROFILE attribute.
1863 (h-gr,h-grc): Likewise.
1864 (h-cr): Set h-sr in setter.
1865 (h-frbit): Get/Set h-fpscr.
1866 (h-szbit,h-prbit): Likewise.
1867 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1868 Add getter and setter.
1869 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1870 Adjust getter and setter.
1871 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1872 Adjust getter and setter.
1873 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1874 (h-fsd,h-fmov): New hardware.
1876 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1878 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1879 doc/notes.texi, doc/porting.texi, doc/running.texi,
1880 doc/sim.texi: Fix some typos.
1882 2006-07-14 Dave Brolley <brolley@redhat.com>
1884 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1885 hardware or memory mode which was used.
1886 * sid-cpu.scm (hw-need-write-stack?): New function.
1887 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1888 identify hardware which uses write stacks.
1889 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1890 Initialized to an empty list.
1891 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1892 hw-need-write-stack?.
1893 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1894 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1895 (used-in-delay-rtl?): New method of <hardware-base>.
1896 (hw-used-in-delay-rtl?): New function.
1898 2006-06-20 Dave Brolley <brolley@redhat.com>
1900 * sid.scm (gen-attr-type): Removed.
1902 2006-05-10 Dave Brolley <brolley@redhat.com>
1904 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1905 support for (if (application-is? <appname>) (...) (...)).
1906 (-cgen): Add trailing "/" to arch-path.
1907 * utils.scm (dirname): Removed. dirname is a primitive function.
1909 2006-05-09 Dave Brolley <brolley@redhat.com>
1911 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1912 'entire_insn' not 'base_insn'.
1913 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1915 * sim.scm (-gen-arch-model-decls): Likewise.
1916 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1917 abuf->written if profiling.
1918 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1919 object->string om the mode.
1920 (-hw-gen-write-stack-decl): Likewise.
1921 * read.scm (include): Use arch-path as file location.
1922 (arch-path): Define it with a default setting.
1923 (-cgen): Update arch-path when "-a" option is specified.
1924 * utils.scm (dirname): New function.
1926 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1928 * configure.in: Remove AC_ARG_PROGRAM.
1929 * configure: Regenerate with autoconf 2.59.
1931 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1933 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1936 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1938 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1939 or an error message otherwise.
1940 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1941 Fix up comments to correctly describe the functions.
1943 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1944 Anil Paranjape <anilp1@kpitcummins.com>
1945 Shilin Shakti <shilins@kpitcummins.com>
1947 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1949 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1951 2006-02-10 Nick Clifton <nickc@redhat.com>
1953 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1955 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1957 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1959 (-hw-gen-write-stack-decl): Likewise.
1961 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1963 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1964 non-(adata-integral-insn? CURRENT-ARCH) case.
1966 2005-10-28 Dave Brolley <brolley@redhat.com>
1968 Contribute the following changes:
1969 2005-09-19 Dave Brolley <brolley@redhat.com>
1971 * attr.scm (gen-value-for-defn-raw): New methods.
1972 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1973 gen-value-for-defn-raw.
1974 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1976 2002-12-13 Dave Brolley <brolley@redhat.com>
1978 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1979 (-gen-attr-accessors): New function.
1980 (gen-obj-attr-defn): Update terminating initializer.
1981 (gen-obj-attr-end-defn): New function.
1982 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1983 * sid-cpu.scm (cgen-desc.h): Generate code to include
1984 "opcode/cgen-bitset.h"
1985 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1987 * desc.scm ('gen-defn): Update terminating initializer.
1988 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1989 terminatinig initializer.
1990 (gen-hw-decls): Ditto.
1991 (gen-operand-decls): Ditto.
1992 (gen-insn-decls): Ditto.
1993 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1994 (gen-insn-table): Update terminating initializer.
1995 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1996 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1997 * attr.scm (charmask-bytes): New function.
1998 (bitset-attr->charmask): New function.
1999 (<bitset-attribute>): Handle isa-attributes specially. Also handle
2000 differences for SID-SIMULATOR.
2001 (<integer-attribute>): Handle differences for SID-SIMULATOR.
2002 (<enum-attribute>): Ditto.
2004 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2006 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
2008 2005-10-24 DJ Delorie <dj@redhat.com>
2010 * operand.scm (-anyof-merge-syntax): Print a more useful error
2013 2005-10-19 Nick Clifton <nickc@redhat.com>
2015 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
2018 2005-10-18 Andreas Schwab <schwab@suse.de>
2020 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
2022 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2024 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
2027 2005-08-02 Dave Brolley <brolley@redhat.com>
2029 * rtl-c.scm (s-unop): Don't dereference
2030 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
2031 (s-binop, s-convop, s-cmpop): Likewise.
2033 2005-07-29 Dave Brolley <brolley@redhat.com>
2035 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
2036 if with-profile or with-parallel-write.
2037 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
2038 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
2041 2005-07-15 Alan Modra <amodra@bigpond.net.au>
2043 * cpu/fr30.opc (print_register_list): Correct format strings.
2044 * cpu/ip2k.opc: Likewise.
2046 2005-07-05 Nick Clifton <nickc@redhat.com>
2048 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
2049 unsigned in order to avoid compile time warnings about sign
2052 2005-07-01 Nick Clifton <nickc@redhat.com>
2054 * desc-cpu.scm: Update to ISO C90 function declaration style.
2055 * opc-asmdis.scm: Likewise.
2056 * opc-ibld.scm: Likewise.
2057 * opc-itab.scm: Likewise.
2058 * cpu/fr30.opc: Likewise.
2059 * cpu/i960.opc: Likewise.
2060 * cpu/ip2k.opc: Likewise.
2061 * cpu/iq2000.opc: Likewise.
2062 * cpu/m32r.opc: Likewise.
2063 * cpu/openrisc.opc: Likewise.
2064 * cpu/sh.opc: Likewise.
2065 * cpu/sparc.opc: Likewise.
2066 * cpu/xstormy16.opc: Likewise.
2068 2005-06-15 Dave Brolley <brolley@redhat.com>
2070 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
2071 (cgen-cpu.h): Call it.
2073 Contributed on behalf of Graydon Hoare
2074 2001-06-05 graydon hoare <graydon@redhat.com>
2076 * utils.scm (foldl): Define.
2080 (intersection): Simplify.
2081 * sid.scm : Set APPLICATION to SID-SIMULATOR.
2082 (-op-gen-delayed-set-maybe-trace): Define.
2083 (<operand> 'gen-set-{quiet,trace}): Delegate to
2084 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
2085 up and needs cleaning.
2086 (-with-parallel?): Hardwire with-parallel to #t.
2087 (<operand> 'cxmake-get): Replace with lookahead-aware code
2088 * sid-decode.scm: Remove per-insn writeback fns.
2089 (-gen-idesc-decls): Redefine sem_fn type.
2090 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
2091 with write stack stuff.
2092 (cgen-write.cxx): Replace per-insn writebacks with single write
2093 stack writeback. Add write stack reset function.
2094 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
2096 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
2097 estate attribute set.
2098 (delay): Set #:delayed attribute to calculated delay, update
2099 maximum delay of cpu, check (delay ...) usage.
2100 * operand.scm (<operand>): Add delayed slot to <operand>.
2101 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
2102 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
2103 * doc/rtl.texi (Expressions): Add section on (delay ...).
2105 2005-06-13 Jim Blandy <jimb@redhat.com>
2107 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
2110 2005-06-07 Zack Weinberg <zack@codesourcery.com>
2112 * doc/porting.texi: Change all mention of md_apply_fix3 and
2113 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
2116 2005-05-18 Dave Brolley <brolley@redhat.com>
2118 * utils-sim.scm (-gen-decode-default-entry): New function.
2119 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
2120 code to check that all opcodes bits match.
2121 (-gen-decoder-switch): Use -gen-decode-default-entry.
2123 2005-05-16 Jim Blandy <jimb@redhat.com>
2125 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
2126 fetched by one of our GETIMEM* methods.
2127 * utils-gen.scm (-extract-chunk-specs): Always fetch full
2128 base-insn-sized chunks.
2130 2005-05-10 Nick Clifton <nickc@redhat.com>
2132 * Update the address and phone number of the FSF organization in
2133 the GPL notices in the following files:
2134 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
2135 cpu/powerpc.cpu, slib/random.scm
2137 2005-05-06 Jim Blandy <jimb@redhat.com>
2139 * pprint.scm, cos-pprint.scm: Add documentation.
2141 * pprint.scm (pprint): Don't wipe out elide-table after each call.
2143 * pprint.scm, cos-pprint.scm: New files.
2145 2005-04-04 Nick Clifton <nickc@redhat.com>
2147 * opcodes.scm (-gen-parse-address): Initialise value to zero to
2148 avoid a compile time warning.
2150 2005-03-18 Nick Clifton <nickc@redhat.com>
2152 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
2153 "percent-operand" from "%operand" as the latter confuses xgettext
2154 into thinking that it is a C printf formating directive, which
2155 prevents proper translation.
2157 2005-02-23 Nick Clifton <nickc@redhat.com>
2159 * opcodes.scm (gen-parse-number): Add a cast to the desired
2160 pointer signed'ness in order to prevent compile time warnings.
2161 * cpu/ip2k.opc: Fixed compile time warnings about differing
2162 signed'ness of pointers passed to functions.
2163 * cpu/iq2000.opc: Likewise.
2164 * cpu/m32r.opc: Likewise.
2165 * cpu/openrisc.opc: Likewise.
2166 * cpu/xstormy16.opc: Likewise.
2168 2005-02-22 Alan Modra <amodra@bigpond.net.au>
2170 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
2171 (cgen-desc.h): ..to here, after opcode/cgen.h include.
2173 2005-02-16 Dave Brolley <brolley@redhat.com>
2175 * utils.scm: Update copyright years.
2176 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
2177 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
2178 * operand.scm (-derived-operand-parse): Move logit message from level 1
2181 2005-02-15 Nick Clifton <nickc@redhat.com>
2183 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
2184 prevent compile time warning messages.
2185 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
2186 * utils-gen.scm (attr-int-gen-defn): Likewise.
2187 (attr-gen-defn): Likewise.
2188 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
2189 (print_dollarhex16): Remove unused function.
2191 2005-02-15 Jim Blandy <jimb@redhat.com>
2193 * guile.scm (cgen-call-with-debugging): Doc fix.
2195 Make backtraces work more reliably.
2196 * guile.scm: Set up debugging parameters, and enable debugging and
2197 source positions while loading.
2198 (cgen-call-with-debugging, cgen-debugging-stack-start): New
2200 * read.scm: Don't set debugging parameters here.
2201 (catch-with-backtrace): Function deleted.
2202 (-cgen): Simply note the presence or absence of the -b option.
2203 Pass the flag to cgen-call-with-debugging, so debugging is turned
2204 off here if the user didn't request it, for faster computation.
2205 (cgen): Call cgen-debugging-stack-start here, instead of
2206 catch-with-backtrace.
2208 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
2210 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
2211 Don't write out the trailing -s here.
2212 * Makefile.in: Regenerated.
2213 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
2214 fixup.scm here; let the caller decide which Scheme's customization
2216 * dev.scm: Load guile.scm, not fixup.scm.
2217 * fixup.scm: Deleted; contents have all moved to guile.scm.
2220 * guile.scm (debug-write): New function.
2222 2005-02-14 Jim Blandy <jimb@redhat.com>
2224 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
2225 transformer procedure, not eval. Transformer procedures take one
2228 2005-02-11 Nick Clifton <nickc@redhat.com>
2230 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
2231 to 'bfd_vma *' in order avoid compile time warning message.
2233 2005-02-09 Jim Blandy <jimb@redhat.com>
2235 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
2236 corresponding change in the sim/common directory.)
2238 2005-02-07 Jim Blandy <jimb@redhat.com>
2240 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
2241 changes in the opcodes directory.)
2243 * guile.scm: New file, containing Guile-specific definitions and
2244 adaptations. This is loaded by the app-specific shell scripts.
2245 Initially identical to fixup.scm.
2246 * cgen-sid.scm: Don't load fixup.scm here.
2248 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
2251 2005-01-27 Jim Blandy <jimb@redhat.com>
2253 * utils.scm (string/symbol->append): Renamed from 'concat'.
2254 * opcodes.scm (gen-switch): Use new name.
2255 * insn.scm (-sub-insn-make!): Same.
2256 * rtl.scm (rtx-dump): Same.
2257 * semantics.scm (semantic-compile): Same.
2259 2005-01-20 Jim Blandy <jimb@redhat.com>
2261 * opcodes.scm (gen-switch): Use concat instead of string-map.
2263 * utils.scm (concat): New function.
2264 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
2265 * rtl.scm (rtx-dump): Same.
2266 * semantics.scm (semantic-compile): Same.
2268 2004-12-16 Jim Blandy <jimb@redhat.com>
2270 * utils-cgen.scm (parse-name): Don't assume that string-map can be
2271 applied to symbols. Process everything as strings, and then
2272 convert to a symbol at the end.
2274 * read.scm (debug-repl): Temporarily redirect input and output to
2275 /dev/tty while we debug, so we don't interfere with whatever CGEN
2276 is reading or writing.
2277 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
2280 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
2282 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
2283 will work with newer versions of guile.
2285 2004-10-27 Nick Clifton <nickc@redhat.com>
2287 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2288 * cpu/iq2000.cpu: Likewise.
2290 2004-07-21 DJ Delorie <dj@redhat.com>
2292 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2294 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2296 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2297 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2299 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2301 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2303 2004-03-22 Dave Brolley <brolley@redhat.com>
2305 * utils.scm (copyright-fsf): Update copyright years.
2306 (copyright-red-hat): Ditto.
2307 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2309 (-op-gen-set-trace-parallel): Ditto.
2311 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2313 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2314 disassembling codes for 0x*2 addresses.
2316 2004-01-29 Dave Brolley <brolley@redhat.com>
2318 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2319 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2320 in the extra bit positions.
2322 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2324 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2326 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2328 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2329 "short" being 16 bit.
2330 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2331 internationalize error message.
2332 (parse_lo16): Likewise. Remove useless code.
2334 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2336 * cpu/m32r.cpu : Add new model m32r2.
2337 Add new instructions.
2338 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2339 Changed PIPE attr of push from O to OS.
2340 Care for Little-endian of M32R.
2341 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2342 Care for Little-endian of M32R.
2343 (parse_slo16): signed extension for value.
2345 2003-10-26 Dave Brolley <brolley@redhat.com>
2347 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2348 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2349 (-gen-extract-fn): Call -gen-record-profile-args.
2351 2003-10-21 Dave Brolley <brolley@redhat.com>
2353 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2355 * decode.scm (-opcode-slots): Correct typo in logit call.
2357 2003-10-09 Jim Blandy <jimb@redhat.com>
2359 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2360 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2362 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2364 2003-10-06 Dave Brolley <brolley@redhat.com>
2366 * gen-all-doc: Add fr550.
2368 2003-09-11 Doug Evans <dje@sebabeach.org>
2370 * Makefile.am (ARCHFILE): New var.
2371 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2372 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2373 * Makefile.in: Regenerate.
2375 2003-09-08 Dave Brolley <brolley@redhat.com>
2377 On behalf of Doug Evans <dje@sebabeach.org>
2378 Pass in paths to input files, instead of assuming they live in
2379 $srcdir/cpu. Plus misc. option processing cleanup.
2380 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2381 Add pre-process pass to all options.
2382 * cgen-gas.scm (gas-arguments): Ditto.
2383 * cgen-sid.scm (sim-arguments): Ditto.
2384 * cgen-sim.scm (sim-arguments): Ditto.
2385 * cgen-stest.scm (stest-arguments): Ditto.
2386 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2387 (-opc-file-path): New global.
2388 (opc-file-path): New fn.
2389 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2390 All callers updated.
2391 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2392 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2393 Replace srcdir arg with opc-file. All callers updated.
2394 * read.scm (-opt-spec-update): Delete.
2395 (opt-get-first-pass,opt-get-second-pass): New fns.
2396 (-cgen): Process application-specific arguments in two passes.
2398 2003-08-29 Dave Brolley <brolley@redhat.com>
2400 * cpu/frv.cpu: Removed.
2401 * cpu/frv.opc: Removed.
2403 2003-08-21 Nick Clifton <nickc@redhat.com>
2405 * cpu/frv.cpu (mbtoh): Replace input parameter to
2406 u-media-dual-expand and u-media-dual-btoh with output parameter.
2407 (cmbtoh): Add profiling hack.
2409 2003-08-19 Michael Snyder <msnyder@redhat.com>
2411 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2413 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2415 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2416 the elements for the END record of CGEN_OPINST, silencing warnings.
2418 2003-07-15 Doug Evans <dje@sebabeach.org>
2420 Add guile 1.6.4 support.
2421 - empty list must be quoted
2422 - string functions have stricter type checking
2423 - eval now takes a second argument
2424 - symbol-bound? is deprecated
2425 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2426 (bitset-attr->list): Ensure arg to string-cut is a string.
2427 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2428 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2429 * cos.scm (-class-list): Must quote empty list.
2430 (-class-parent-classes,-class-compute-class-desc): Ditto.
2431 (class-make,make,object-reset!): Ditto.
2432 (method-make-make!): Call eval1 instead of eval.
2433 (method-make-forward!,method-make-virtual-forward!): Ditto.
2434 * decode.scm (subdtable-add): Use stringsym-append instead of
2436 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2437 (-build-decode-table-entry): Fetch string name of insn.
2438 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2439 (-gen-mach-table-defns): Ditto for mach.
2440 (gen-ifld-defns): Ditto for ifld.
2441 (gen-hw-table-defns): Ditto for hw.
2442 (gen-operand-table): Ditto for op.
2443 (gen-insn-table-entry): Ditto for insn.
2444 * desc.scm (gen-attr-table-defn): Ditto for attr.
2445 (<keyword>,gen-defn): Don't pass symbols to string-append.
2446 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2448 (enum-vals-upcase): Use symbol-upcase to build result.
2449 (-enum-parse): Use stringsym-append to build errtxt.
2450 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2451 (eval1): New function.
2452 (symbol-bound?): Provide own version if >= guile 1.6.
2453 * hardware.scm (define-keyword): Use string-append instead of
2455 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2456 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2458 (gen-list-entry): Handle either symbol or string `name' arg.
2459 (gen-obj-doc-header): Fetch string name of `o' arg.
2460 (define-cpu-intro): Ditto for cpu.
2461 (gen-mach-intro): Ditto for mach.
2462 (gen-model-intro): Ditto for model.
2463 (gen-isa-intro): Ditto for isa.
2464 (gen-machine-doc-1): Ditto for isa.
2465 (gen-reg-doc-1): Convert mach to string first.
2466 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2467 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2469 (gen-insn-categories): Fetch string name of mach. Convert
2470 enum-val-name to string first.
2471 (gen-insn-docs): Fetch string name of mach.
2472 * ifield.scm (ifld-ilk): Result is a string.
2473 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2474 Fetch string name of ifld.
2475 (-sfmt-search-key): Similarily for ifld and op.
2476 * insn.scm (syntax-make): Fetch string name of syntax element.
2477 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2478 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2479 * mode.scm (mode:c-type): Result is a string.
2480 (mode:enum): Fetch string name of mode.
2481 (-mode-parse): Use stringsym-append to build errtxt.
2482 * model.scm (model:enum): Fetch string name of model.
2483 (-model-parse): Use stringsym-append to build errtxt.
2484 (parse-insn-timing): Must quote empty list.
2485 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2486 (-gen-minsn-opcode-entry): Ditto.
2487 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2489 (read-cpu.opc): Convert current-arch-name to a string before using.
2490 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2491 (<derived-operand>): Must quote empty list.
2492 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2493 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2495 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2496 (-pmacro-sym): Must convert symbols to strings before passing to
2498 (-pmacro-str): Ditto.
2499 (pmacros-init!): Use eval1 instead of eval.
2500 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2501 (keep-isa-atlist?): Ditto.
2502 (cmd-if): Use eval1 instead of eval.
2503 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2504 (-rtl-c-get): Fetch string name of src.
2505 (s-unop): Ditto for mode.
2506 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2507 (-gen-par-temp-defns,subword): Ditto.
2508 (join): Use stringsym-append instead of string-append.
2509 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2510 (rtx-traverse-debug): Fetch string name of rtx-obj.
2511 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2512 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2513 (rtx-pretty-name): Result is a string.
2514 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2515 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2516 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2518 (-gen-sfrag-case): Fetch string name of user.
2519 * sid-model.scm (unit:enum): Fetch string name of unit.
2520 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2521 (<hw-memory>,gen-set-quiet): Ditto.
2522 (gen-mode-defs): Ditto.
2523 (sim-finish!): Convert current-arch-name to a string before using.
2524 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2525 (-gen-no-scache-semantic-fn): Ditto.
2526 (cgen-defs.h): Fetch string name of isa.
2527 (cgen-read.c): Convert current-arch-name to a string before using.
2528 (cgen-write.c): Ditto.
2529 * sim-model.scm (unit:enum): Fetch string name of unit.
2530 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2531 (-gen-model-timing-table): Fetch string name of model.
2532 (-gen-mach-model-table): Ditto.
2533 (-gen-mach-defns): Fetch string name of mach.
2534 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2535 (<hw-memory>,cxmake-get): Fetch string name of mode.
2536 (<hw-memory>,gen-set-quiet): Ditto.
2537 (gen-mode-defs): Ditto.
2538 (sim-finish!): Must quote empty list.
2539 * utils-cgen.scm (<ident>): Must quote empty list.
2540 (obj:str-name): New fn.
2541 (parse-comment): Result is a string.
2542 (parse-symbol): Result is a symbol.
2543 (parse-string): Result is a string.
2544 (keyword-list?): Convert arg to string before calling string-ref.
2545 (keyword-list->arg-list): Ditto.
2546 (gen-attr-name): Convert attr-name to string first.
2547 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2548 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2549 (gen-define-ifmt-ifields): Ditto for fld.
2550 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2552 (gen-file-name): Ditto.
2553 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2554 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2555 (reduce): Call eval1 instead of eval.
2556 * cpu/m32r.cpu (addi): Don't use `#.'.
2558 * gen-all-sim: Fix some typos.
2560 2003-07-08 Doug Evans <dje@sebabeach.org>
2562 * gen-all-doc: Ensure run from cgen src dir.
2563 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2564 * gen-all-sid: Similarily, in ./tmp-sid.
2565 * gen-all-sim: Similarily, in ./tmp-sim.
2567 2003-06-20 Doug Evans <dje@sebabeach.org>
2569 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2571 2003-06-19 Doug Evans <dje@sebabeach.org>
2573 * mach.scm (-ifld-already-defined?): New proc.
2574 (current-ifld-add!): Use it.
2575 (-op-already-defined?): New proc.
2576 (current-op-add!): Use it.
2577 (-insn-already-defined?): New proc.
2578 (current-insn-add!): Use it.
2579 (-minsn-already-defined?): New proc.
2580 (current-minsn-add!): Use it.
2581 (obj-isa-list): New proc.
2582 (isa-supports?): Use it.
2584 2003-06-10 Doug Evans <dje@sebabeach.org>
2586 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2587 * cpu/m32r.cpu (all insns): Ditto.
2589 * mach.scm (current-*-add!): Disallow redefinition. Make result
2592 * gen-all-doc: Split arm and frv docs up a bit.
2594 * cpu/arm.cpu: Add IDOC attribute.
2595 * cpu/frv.cpu: Ditto.
2596 * cpu/i960.cpu: Ditto.
2597 * cpu/openrisc.cpu: Ditto.
2598 * cpu/xstormy16.cpu: Ditto.
2599 * cpu/m32r.cpu: Ditto.
2600 (all insns): Explicitly specify IDOC attribute.
2602 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2603 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2604 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2605 * Makefile.in: Regenerate.
2606 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2607 (-attr-read): Defer computing default value until we know the type.
2608 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2609 (<attr-list>:attr-present?): New method.
2610 (atlist-attr-present?,obj-attr-present?): New fns.
2611 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2612 (attr-builtin!): New insn attr IDOC.
2613 * cgen-doc.scm (doc-arguments): New args -I,-N.
2614 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2615 Support comment as fourth element of enum value.
2616 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2617 * html.scm (gen-html-header): New arg kind, all callers updated.
2618 (gen-table-of-contents): New arg insn-file, all callers updated.
2619 (gen-list-entry,gen-doc-header): New fn.
2620 (get-operands): Delete.
2621 (gen-iformat-table): Rewrite.
2622 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2623 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2624 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2625 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2626 (get-insns-for-category,gen-categories-insn-lists): New fns.
2627 (gen-insn-docs): Simplify each insn's semantics first.
2628 Print insn tables sorted by IDOC categories.
2629 (*insn-html-file-name*): New global.
2630 (cgen-insn.html): New fn.
2632 * insn.scm (<insn>): Create a setter for the `tmp' member.
2633 * semantics.scm (insn-build-known-values): Renamed from
2634 -build-known-values. All callers updated.
2636 * rtl.scm: Move traveral/evaluation support to ...
2637 * rtl-traverse.scm: New file.
2638 * read.scm: Maybe-load rtl-traverse.scm.
2640 * rtl.scm (-rtx-valid-types): Add SETRTX.
2642 * rtx-funcs.scm (nop,parallel): Fix mode.
2644 * utils.scm (eqv-lookup-index): New fn.
2645 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2647 * dev.scm (load-doc): Set APPLICATION.
2649 2003-06-10 Dave Brolley <brolley@redhat.com>
2651 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2652 * sid-decode.scm: Generate #include of config.h into
2653 @prefix@-decode.cxx.
2654 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2656 2003-06-07 Doug Evans <dje@sebabeach.org>
2658 * gen-all-sid: New file.
2659 * gen-all-opcodes: New file.
2661 2003-06-05 Nick Clifton <nickc@redhat.com>
2663 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2664 version of the FRinti operand.
2665 (FRintjeven): Likewise for FRintj.
2666 (FRintkeven): Likewise for FRintk.
2667 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2668 media-quad-arith-sat-semantics, media-quad-arith-sat,
2669 conditional-media-quad-arith-sat, mdunpackh,
2670 media-quad-multiply-semantics, media-quad-multiply,
2671 conditional-media-quad-multiply, media-quad-complex-i,
2672 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2673 conditional-media-quad-multiply-acc, munpackh,
2674 media-quad-multiply-cross-acc-semantics, mdpackh,
2675 media-quad-multiply-cross-acc, mbtoh-semantics,
2676 media-quad-cross-multiply-cross-acc-semantics,
2677 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2678 media-quad-cross-multiply-acc-semantics, cmbtoh,
2679 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2680 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2681 cmhtob): Use new operands.
2682 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2683 (parse_even_register): New function.
2685 2003-06-04 Doug Evans <dje@sebabeach.org>
2687 Better handling of 64 bit and mixed 32/64 bit architectures.
2688 * hardware.scm (hw-update-word-modes!): New fn.
2689 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2690 hw-update-word-modes!.
2691 (state-word-bitsize): Replace FIXME with requested check.
2692 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2693 * mode.scm (mode-find): Ignore INT,UINT.
2694 (-mode-word-sizes-kind): New global.
2695 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2696 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2697 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2699 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2700 unusable, correct values set later.
2701 (mode-finish!): Remove cruft.
2702 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2703 * opcodes.scm (opcodes-init!): Ditto.
2704 * rtx-funcs.scm (annul): Fix mode of pc.
2705 * cpu/ia64.cpu: Remove cruft that sets word modes.
2706 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2708 2003-06-03 Nick Clifton <nickc@redhat.com>
2710 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2711 immediate value not unsigned.
2713 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2715 * cpu/sh.cpu: Amend comments to refer to SuperH.
2716 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2717 * cpu/sh64-media.cpu: Likewise.
2718 (Saturation): Update manual reference.
2720 2003-05-15 Doug Evans <dje@sebabeach.org>
2722 * Makefile.am (srcroot): New var.
2724 * Makefile.in: Regenerate.
2725 * cgen-doc.scm: New file.
2726 * html.scm: New file.
2727 * gen-all-doc: New file.
2728 * dev.scm (cload): Handle DOC application.
2730 * machs.scm (machs-for-cpu): New fn.
2731 * model.scm (models-for-cpu): New fn.
2732 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2734 (iota): Rewrite to be identical to pmacro version. All uses updated.
2735 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2737 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2738 (-gen-decode-bits): Instead put in better fix here.
2740 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2742 2003-05-01 DJ Delorie <dj@redhat.com>
2744 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2746 (set-alignfix-mem): Likewise.
2748 2003-04-16 Dave Brolley <brolley@redhat.com>
2750 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2751 * utils.scm (copyright-fsf): Update generate copyright years.
2752 (copyright-cygnus): Ditto.
2753 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2755 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2757 (<operand>'gen-profile-code): New parameter 'when'.
2758 (<iunit>'gen-profile-code): Ditto.
2759 (<insn>'gen-profile-code): Ditto.
2760 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2761 'insn_reference' for the 'after' function.
2762 * model.scm (unit:enum): Moved to sim-model.scm.
2763 * sim-model.scm (unit:enum): Moved from model.scm.
2764 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2765 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2766 * sid-model.scm (unit:enum): New version for sid.
2767 (gen-model-class-name): New function.
2768 (gen-model-unit-fn-decl): New function.
2769 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2770 (gen-model-unit-fn-name): New parameter 'when'.
2771 (-gen-model-insn-fn-name): Ditto.
2772 (-gen-model-insn-qualified-fn-name): New function.
2773 (-gen-model-insn-fn-decl): New function.
2774 (-gen-model-insn-fn-decls): New function.
2775 (-gen-model-insn-fn): New parameter 'when'. Call
2776 -gen-model-insn-qualified-fn-name.
2777 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2778 functions for modelling insn before and after execution.
2779 (-gen-model-class-decls): New function.
2780 (" (gen-model-class-name model) "): New function.
2781 (gen-model-classes): New function.
2782 (-gen-insn-timing): Generate functions for modelling insn before and after
2784 (-gen-insn-unit-timing): Generate class-qualified names.
2785 (-gen-model-timing-table): Ditto.
2786 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2787 not needed (yet) by sid.
2788 (cgen-model.h): New function.
2790 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2792 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2793 * cpu/sh64-compact.cpu: Likewise.
2794 * cpu/sh64-media.cpu: Likewise.
2796 2003-03-21 DJ Delorie <dj@redhat.com>
2798 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2799 which indicates if the sign flag is set from bit 15 or 7.
2801 (set-psw): New argument ws, propogate it.
2802 (set-psw-nowrite): Likewise.
2803 (set-mem-psw): Likewise.
2804 (set-psw-carry): Likewise. Use temporaries to prevent
2805 prematurely overwriting needed inputs.
2806 (set-psw-rrotate17): Fix logic.
2807 (shrgrgr): Preserve carry for zero-bit shifts.
2808 (shrgrimm): Likewise.
2809 (shlgrgr): Likewise.
2810 (shlgrimm): Likewise.
2811 (asrgrgr): Likewise.
2812 (asrgrimm): Likewise.
2815 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2817 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2819 2002-03-05 DJ Delorie <dj@redhat.com>
2821 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2822 prematurely overwriting needed inputs.
2823 (set-psw-sub): Likewise.
2825 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2827 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2829 2003-02-18 DJ Delorie <dj@redhat.com>
2831 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2832 (movlmemimm): Just mask the address.
2833 (movhmemimm): Likewise.
2834 (movlmemgr): Likewise.
2835 (movhmemgr): Likewise.
2836 (set-psw): Always set the psw last.
2837 (set-psw-carry): Likewise.
2838 (set-psw-add): Likewise.
2839 (set-psw-sub): Likewise.
2841 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2842 of 16 patterns from the set-psw-rotate17 function.
2843 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2844 movgriipostincgr, movgriipredecgr): Set psw correctly.
2845 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2846 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2847 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2849 2003-02-11 Dave Brolley <brolley@redhat.com>
2851 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2852 @arch@_cgen-ifld_table.
2853 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2854 @arch@_cgen-ifld_table.
2856 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2858 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2860 2003-01-09 Graydon Hoare <graydon@redhat.com>
2862 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2865 2003-01-07 Graydon Hoare <graydon@redhat.com>
2867 * utils-gen.scm (attr-int-gen-defn): Define.
2869 2002-12-21 Doug Evans <dje@sebabeach.org>
2871 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2872 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2874 * dev.scm (cload): Update location of .cpu files.
2876 2002-12-19 Doug Evans <dje@sebabeach.org>
2878 * utils-sim.scm (gen-profile-sym): New fn.
2879 (<operand>,sbuf-profile-sym): New method.
2880 (<operand>,sbuf-profile-elm): Use it.
2881 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2882 of hardcoding symbol name.
2883 (<operand>,gen-profile-code): Ditto.
2884 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2887 * mode.scm (mode-sem-mode): New fn.
2888 * operand.scm (op:new-mode): Update. mode-name.
2889 (op-natural-mode?) New fn.
2890 * rtl.scm (hw): Set hw-name,mode-name.
2892 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2894 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2895 as size of IDESC-TABLE-VAR.
2896 (@prefix@_init_idesc_table): Ditto.
2897 * sim-model.scm (-gen-mach-defns): Ditto.
2898 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2900 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2902 * insn.scm (-parse-insn-format-symbol): Improve error message.
2903 (-parse-insn-format): Ditto.
2905 * gen-all-sim: New script.
2907 2002-12-16 DJ Delorie <dj@delorie.com>
2909 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2911 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2913 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2914 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2915 (parse_immediate16): Handle immediate16 values, which now include
2916 @hi(label) and @lo(label)
2918 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2920 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2921 Add braces and cast for union field.
2922 (gen-multi-ifield-nodes): Add braces and cast for union field.
2923 (cgen_operand_table): Similarly fix sentinel.
2924 (cgen_cpu_close): Constify "insns". Formatting.
2925 (cgen-desc.c): Include xregex.h.
2926 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2928 <opc.c>: Include safe-ctype.h.
2929 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2930 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2931 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2932 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2933 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2934 (parse_addr16): Correct type of "value". Formatting.
2935 (parse_addr16_p): Likewise.
2936 (parse_addr16_cjp): Likewise.
2937 (parse_lit8): Likewise.
2938 (parse_bit3): Formatting.
2939 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2940 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2941 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2943 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2944 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2945 (print_dollarhex8): Likewise.
2946 (print_dollarhex16): Likewise.
2947 (print_dollarhex_addr16h): Likewise.
2948 (print_dollarhex_addr16l): Likewise.
2949 (print_dollarhex_p): Likewise.
2950 (print_dollarhex_cj): Likewise.
2951 (print_decimal): Likewise.
2952 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2954 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2956 * doc/rtl.texi (Model variants): Mention current limitations for
2957 unit inputs and outputs.
2958 (Hardware elements) <attribute PROFILE>: Be slightly more
2960 (Instructions) <timing>: input/output overrides have a direction
2963 2002-11-25 DJ Delorie <dj@redhat.com>
2965 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2967 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2969 * cpu/iq10.cpu: New file.
2970 * cpu/iq2000.cpu: Likewise.
2971 * cpu/iq2000.opc: Likewise.
2972 * cpu/iq2000m.cpu: Likewise.
2974 2002-11-19 DJ Delorie <dj@redhat.com>
2976 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2978 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2980 * dev.scm: Call getenv with a string, not a symbol.
2982 2002-10-08 Doug Evans <dje@transmeta.com>
2983 Hans-Peter Nilsson <hp@axis.com>
2985 * types.scm (bitrange-overlap?): Handle lsb0?.
2987 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2989 From Robert Cragie <rcc@jennic.com>:
2990 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2992 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2993 Ben Elliston <bje@redhat.com>
2994 John Healy <jhealy@redhat.com>
2995 Jeff Johnston <jjohnstn@redhat.com>
2996 Alan Lehotsky <alehotsky@redhat.com>
2997 Ubicom Inc. <SupportDesk@ubicom.com>
2999 * cpu/ip2k.cpu: New file.
3000 * cpu/ip2k.opc: Likewise.
3002 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
3004 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
3006 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
3008 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
3009 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
3010 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
3011 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
3012 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
3013 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
3014 (-sthi-byte): If there is a single byte to store, store it at
3016 (sthil, sthiq): Fix big-endian behaviour.
3017 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
3018 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
3019 (saturate): Use Dimode to check if saturation operation is required.
3020 (usaturate): Likewise.
3022 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
3023 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
3024 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
3025 (msadubq): Fix subword index in second operand of first subtraction.
3027 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
3029 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
3032 2002-06-18 Dave Brolley <brolley@redhat.com>
3034 * cpu/frv.cpu: New cpu description.
3035 * cpu/frv.opc: New cpu support code.
3037 2002-05-21 Dave Brolley <brolley@redhat.com>
3039 * decode.scm (-opcode-slots): Don't consider bits beyond the
3042 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
3044 * cpu/powerpc.cpu: New file.
3046 2002-05-01 Graydon Hoare <graydon@redhat.com>
3048 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
3050 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
3052 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
3053 results are expanded recursively.
3055 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
3057 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
3058 call scan-symbol on it, to enable recursive macro-expansion.
3060 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
3062 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
3063 for multiple-isa configurations.
3064 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
3066 2002-02-04 Ben Elliston <bje@redhat.com>
3068 * cpu/sh.cpu, cpu/sh.opc: New files.
3069 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
3071 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
3073 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
3074 (Enumerated constants): Mention that an ifield must not specify a
3076 (Instruction operands): Ditto for index.
3077 (Expressions) <parallel>: Remove misplaced mention of local
3079 <if>: Mention that mode must be specified and non-VOID when the
3082 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
3084 * doc/porting.texi: When referring to *.opc, mention they are in
3085 the cpu subdir. Call top-level directory toplevel, not devo.
3086 Close string in define-normal-insn example.
3088 * doc/pmacros.texi: Fix .substr typo to .substring.
3089 Mention that .sym expansions are not further expanded.
3091 2002-01-22 Graydon Hoare <graydon@redhat.com>
3093 * desc-cpu.scm (ifld-number-cache): Add.
3095 (gen-maybe-multi-ifld-of-op): Add.
3096 (gen-maybe-multi-ifld): Add.
3097 (gen-multi-ifield-nodes): Add.
3098 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
3100 2002-01-10 matthew green <mrg@redhat.com>
3102 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
3103 (gr-Rb-names): ... to this.
3104 (h-Rb): New hardware piece.
3105 (h-Rbj): Use gr-Rb-names.
3107 (holdx): New instruction.
3109 2002-01-07 Ben Elliston <bje@redhat.com>
3111 * utils.scm (package-cygnus-simulators): Rename from this ..
3112 (package-red-hat-simulators): .. to this.
3113 * opcodes.scm (option-set!): Use package-red-hat-simulators.
3114 * sid-cpu.scm (cgen-desc.h): Likewise.
3115 (cgen-cpu.h): Likewise.
3116 (cgen-defs.h): Likewise.
3117 (cgen-write.cxx): Likewise.
3118 (cgen-semantics.cxx): Likewise.
3119 (cgen-sem-switch.cxx): Likewise.
3120 * sid-decode.scm (cgen-decode.h): Likewise.
3121 (cgen-decode.cxx): Likewise.
3122 * sid-model.scm (cgen-model.cxx): Likewise.
3123 * sid.scm (option-set!): Likewise.
3124 * sim.scm (option-set!): Likewise.
3126 2002-01-07 Ben Elliston <bje@redhat.com>
3128 * utils.scm (copyright-fsf): Add 2002.
3129 (copyright-cygnus): Rename to copyright-red-hat.
3130 (copyright-red-hat): Add 2002.
3131 (CURRENT-COPYRIGHT): Update comment.
3132 * opcodes.scm (option-set!): Update callers.
3133 * sid-model.scm (cgen-model.cxx): Likewise.
3134 * sid-cpu.scm: Likewise.
3135 * sid-decode.scm: Likewise.
3136 * sid.scm (option-set!): Handle "redhat" as an option for
3137 "copyright"; use copyright-red-hat.
3138 * sim.scm (option-set!): Likewise.
3140 2002-01-03 Dave Brolley <brolley@redhat.com>
3142 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
3143 number of insns in the list. Update the population count function to
3144 identify and prioritize 3 catgories of useful bits.
3145 (-population-top-few): Don't consider bits with a population count of
3147 (-build-decode-table-entry): Don't call
3148 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
3149 identical insns at the next tree level.
3150 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
3151 this function is no longer used.
3152 (filter-non-specialized-ambiguous-insns): New function.
3153 (filter-identical-ambiguous-insns): New function.
3154 (find-identical-insn): New function.
3155 (filter-harmlessly-ambiguous-insns): Removed.
3157 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
3158 matthew green <mrg@redhat.com>
3159 Frank Ch. Eigler <fche@redhat.com>
3160 Nick Clifton <nickc@cambridge.redhat.com>
3162 * cpu/xstormy16.cpu: New file.
3163 * cpu/xstormy16.opc: New file.
3165 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
3167 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
3169 2001-11-14 Dave Brolley <brolley@redhat.com>
3171 * utils-gen.scm (-gen-extract-word): Correct computation of the length
3172 of the field being extracted.
3174 2001-10-29 Johan Rydberg <johan@rydberg.com>
3176 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
3177 (cos ...) and (sin ..) rtx.
3179 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
3181 * desc-cpu.scm: Do not include ctype.h in generated desc
3182 files. They will inherit safe-ctype.h instead.
3184 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
3186 * desc-cpu.scm: Add missing function prototypes (for generated
3187 C files). Fix compile time warning messages about unused
3188 parameters (for generated C files).
3189 * opc-asmdis.scm: The same.
3190 * opc-ibld.c: The same.
3191 * opc-itab.scm: The same.
3192 * cpu/fr30.opc: The same.
3193 * cpu/m32r.opc: The same.
3194 * cpu/openrisc.opc: The same.
3196 2001-09-17 graydon hoare <graydon@redhat.com>
3198 * insn.scm (syntax-break-out): Correct logic in handling escaped
3201 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
3203 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
3204 call @arch@_cgen_build_insn_regex now that regex support is in
3207 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
3209 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
3210 (mask-superset?): Look for strict supersets to allow rejection of
3213 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3215 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
3216 (cgen-desc.h): Call it.
3217 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
3219 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
3220 entire_insn for extraction, if it's shorter than base-insn-bitsize.
3222 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
3224 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
3225 mach->cpu insn-chunk-bitsize.
3226 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
3227 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
3228 * mach.scm (<cpu>): New field insn-chunk-bitsize.
3229 (-cpu-parse, -cpu-read): Parse/initialize it.
3230 * doc/rtl.texi (define-cpu): Document it.
3232 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
3234 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
3236 2001-07-06 Ben Elliston <bje@redhat.com>
3238 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
3240 2001-07-05 Ben Elliston <bje@redhat.com>
3244 * read.scm (include): Include files from srcdir/cpu.
3245 (-cgen): Likewise for loading .cpu files.
3246 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
3247 * *.cpu: Move all cpu descriptions into cpu subdirectory.
3249 * simplify.inc: Likewise.
3251 2001-07-04 Ben Elliston <bje@redhat.com>
3253 * read.scm (include): Log "Including file" message at level 1,
3254 rather than outputting it with (display).
3255 (cpu-load): Log "Loading cpu description" and "Processing cpu
3256 description" messages at levels 1 and 2, respectively, rather than
3259 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
3261 * desc.scm (<keyword> 'gen-defn): Add extra zero into
3262 CGEN_KEYWORD_ENTRY initializers.
3264 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
3265 (<operand> 'test-data): Involve both the index and the hardware
3266 in testcase generation.
3267 (<hw-indx> 'test-data): Generate test data from the underlying
3269 (<ifield> 'test-data): Generate test data by computing bit
3270 patterns for the field, then decoding them.
3271 (<hw-address> 'test-data): Allow for new calling convention.
3272 (<hw-iaddress> 'test-data): Likewise.
3273 (<keyword> 'test-data): Convert index values into keywords.
3274 (<hw-asm> 'test-data): Convert index values into integer strings.
3276 * gas-test.scm (cgen-build.sh): Escape '.' as well.
3278 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
3280 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
3281 is required for multi-mode hw types (memory).
3283 2001-05-11 Ben Elliston <bje@redhat.com>
3285 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3286 when generating allinsn.d from objdump output. Without it, the
3287 testsuite will treat $ as the regular expression for end of line.
3289 2001-05-09 Ben Elliston <bje@redhat.com>
3291 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3292 with `cgen_cpu_open'; documentation had become out of date.
3293 * doc/rtl.texi (Instruction operands): Likewise.
3295 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3297 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3298 various-base-length instruction sets.
3300 2001-04-02 Ben Elliston <bje@redhat.com>
3302 * sid-cpu.scm (-last-insn): New function.
3303 (-gen-sem-switch-engine): Loop through idesc while less than or
3304 equal to the last instruction enum, not less than the MAX enum.
3305 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3306 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3307 table's size to be the last instruction enum plus one, not
3309 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3310 instruction onto the instruction list.
3312 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3313 using the size of the table and its elements.
3314 (-gen-decode-insn-globals): Define the idesc table's size to be
3315 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3316 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3317 last instruction enum plus one, not @CPU@_INSN_MAX.
3319 2001-03-28 Ben Elliston <bje@redhat.com>
3321 * doc/version.texi (UPDATED, EDITION): Update.
3322 * doc/stamp-vti: Likewise.
3324 2001-03-26 Ben Elliston <bje@redhat.com>
3326 * doc/credits.texi (Credits): Update.
3328 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3329 specified prefix and, if necessary, escape `$' in gas-build.sh to
3330 prevent unwanted shell variable expansion.
3332 2001-03-24 Ben Elliston <bje@redhat.com>
3334 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3335 (<keyword>,test-data): Likewise.
3336 (<hw-address>,test-data): Likewise.
3337 (<hw-iaddress>,test-data): Likewise.
3338 (-collate-test-set): New function.
3339 (build-test-set): Use it.
3340 (gen-gas-test): Generate five test cases per instruction.
3341 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3343 * read.scm: Load "slib/random" if random is not defined.
3344 * slib/random.scm: New file.
3346 * utils.scm: Remove comments about the Hobbit compiler.
3347 (copyright-cygnus): Add 2001.
3348 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3349 (package-gnu-simulators): Tidy.
3351 2001-03-23 Ben Elliston <bje@redhat.com>
3353 * cgen-gas.scm: Inline documentation improvements.
3355 2001-03-21 Ben Elliston <bje@redhat.com>
3357 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3358 given in a syntax string is undefined.
3360 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3361 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3363 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3365 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3366 for arg_type CGEN_CPU_OPEN_BFDMACH.
3368 2001-03-20 Ben Elliston <bje@redhat.com>
3370 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3371 instruction onto the instruction list. Define MAX_INSNS to be the
3372 value of the last instruction enum plus one.
3374 2001-03-14 Nick Clifton <nickc@redhat.com>
3376 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3378 2001-03-05 Dave Brolley <brolley@redhat.com>
3380 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3381 if the number of ifields is greater than zero.
3383 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3385 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3386 Emit LIKELY/UNLIKELY branch probability hints.
3387 * sid-decode.cpu (-gen-record-args): Ditto.
3389 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3391 * desc-cpu.scm (-gen-hash-defines): Rename
3392 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3394 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3396 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3398 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3399 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3401 * sid.scm (<operand> gen-write): Use unsigned long long expression
3403 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3404 (<unit> gen-profile-code): Ditto.
3406 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3408 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3411 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3413 * operand.scm (<operand> pretty-sem-name): New field.
3414 (<operand> make): Initialize it from hw-name.
3415 (op:set-pretty-sem-name!): New function.
3416 (<operand> gen-pretty-name): Default to fetching new field.
3417 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3418 sem-name setting from -rtx-hw-name.
3420 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3422 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3423 its subsequent gen-pretty-name.
3425 * read.scm: Increase thread working stack limit and backtrace
3428 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3430 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3432 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3434 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3435 current insn plus 4.
3436 (h-delay-insn): New hardware register.
3437 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3441 * openrisc.opc (parse_hi16): Sign extend value.
3442 (parse_lo16): Likewise.
3444 2001-01-06 Ben Elliston <bje@redhat.com>
3446 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3447 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3448 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3449 (-gen-semantic-fn-table): Likewise.
3450 (-gen-scache-semantic-fn): Likewise.
3451 (-gen-no-scache-semantic-fn): Likewise.
3452 (cgen-read.c): Likewise.
3453 (cgen-sem-switch.c): Likewise.
3454 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3455 is a filename prefix.
3456 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3457 (-gen-decode-insn-globals): Likewise.
3458 (-gen-idesc-decls): Likewise.
3459 (cgen-decode.h): Likewise.
3460 (cgen-decode.c): Likewise.
3461 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3462 (gen-cpu-insn-enum): Likewise.
3463 (sim-finish!): Likewise.
3465 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3467 * openrisc.cpu: New file.
3468 * openrisc.opc: Likewise.
3470 2000-12-12 Ben Elliston <bje@redhat.com>
3472 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3474 2000-12-07 Ben Elliston <bje@redhat.com>
3476 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3477 "insn" when there are zero ifields to extract.
3479 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3481 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3482 used by simple/non-scache simulators.
3483 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3484 regardless of with-scache?.
3485 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3487 2000-12-03 Ben Elliston <bje@redhat.com>
3489 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3490 (cgen-desc.c): Likewise.
3492 2000-12-01 Greg McGary <greg@mcgary.org>
3494 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3496 2000-12-01 Ben Elliston <bje@redhat.com>
3498 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3499 definitions if run without with-multipla-isa?.
3500 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3501 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3503 2000-11-24 Ben Elliston <bje@redhat.com>
3505 * sim-cpu.scm (-gen-hardware-struct): New function.
3506 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3507 hardware elements wich have share one or more ISAs with the ISAs
3510 * sim.scm (-with-multiple-isa?): New symbol.
3511 (with-multiple-isa?): New function.
3512 (option-init!): Initialise -with-multiple-isa?.
3513 (option-set!): Handle with-multiple-isa option.
3515 2000-11-21 Ben Elliston <bje@redhat.com>
3517 * utils.scm (copyright-fsf): Add the year 2000.
3519 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3521 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3522 unneeded "\n\n" from F() macro definition.
3524 2000-11-15 Greg McGary <greg@mcgary.org>
3526 * utils-cgen.scm (gen-define-with-symcat): New function.
3527 * desc-cpu.scm (gen-ifld-defns): Use it.
3528 (gen-hw-table-defns): Use it.
3529 (-gen-hash-defines): Use it.
3530 (gen-operand-table): Use it.
3531 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3532 * opc-itab.scm (-gen-ifmt-table): Use it.
3533 (-gen-insn-opcode-table): Use it.
3534 (-gen-macro-insn-table): Use it.
3535 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3536 * sim-cpu.scm (cgen-semantics.c): Use it.
3537 (cgen-sem-switch.c): Use it.
3539 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3541 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3542 request to emit calls to insn extractors as functions rather than
3543 branches to inline blocks.
3544 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3545 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3547 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3548 to extractor clauses.
3550 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3552 * decode.scm (-distinguishing-bit-population): Significantly
3553 improve popularity heuristic. Renamed from
3554 (-mask-bit-population): Gone.
3555 (-population-above-threshold): Sort new bit numbers in order of
3557 (-population-top-few): Allow up to three more bits to be selected
3558 than requested. Correct selection order to prefer better bits.
3559 Correct bug in fewer-than-requested case. Keep threshold as
3561 (decode-best-get-bits): Pass also the insn-values.
3563 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3564 future optimization.
3566 * utils.scm (message): Format nested lists better.
3568 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3570 * dev.scm: Add srcdir to %load-path.
3572 * rtx-funcs.scm (subword): Mode of argument can be different
3573 than mode of result, so don't use OP0 to specify argument's mode.
3575 2000-11-02 Ben Elliston <bje@redhat.com>
3577 * doc/porting.texi (Building a GAS test suite): Document my change
3580 2000-11-01 Ben Elliston <bje@redhat.com>
3582 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3584 2000-10-31 Ben Elliston <bje@redhat.com>
3586 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3587 with no command line arguments if the gas build directory can be
3590 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3592 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3593 op-ifld -> op-ifield.
3595 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3597 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3599 2000-10-13 matthew green <mrg@cygnus.com>
3601 * utils-cgen.scm (get-ifetch): Move from here ...
3602 * sim.scm (get-ifetch): ... to here.
3603 * sid.scm (get-ifetch): Copy and port to c++.
3605 2000-10-06 Dave Brolley <brolley@redhat.com>
3607 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3608 ifld-start + ifld-word-offset.
3609 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3610 the field is beyond the base number of bits.
3611 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3612 (gen-extract-ifields): Ditto.
3613 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3614 characters in the regular expression.
3616 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3618 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3619 preprocessor constant.
3621 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3623 * slib/logical.scm: New file from slib. Provides robust bitwise
3624 logical operations for large integers.
3625 * read.scm: maybe-load it.
3627 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3629 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3630 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3631 single-isa predicate, but support keep-isa filtering.
3633 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3635 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3636 statement-expression and comma-expression contexts.
3637 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3639 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3641 * decode.scm (-population-top-few): Signal error gracefully if
3642 decoding is about to become ambiguous.
3644 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3646 * doc/rtl.texi (decode-assist): Describe this field as optional.
3648 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3650 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3653 2000-09-05 Dave Brolley <brolley@redhat.com>
3655 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3656 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3658 2000-08-29 Dave Brolley <brolley@redhat.com>
3660 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3661 adata-integral-insn is true for this architecture.
3663 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3665 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3666 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3667 * rtl-c.scm (-c-rtl-get): Improve an error message.
3668 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3670 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3672 * Makefile.in (DIST_COMMON): Regenerated.
3673 * ifield.scm (<derived-ifield> needed-iflds): New method.
3674 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3675 sfmts built from <derived-ifield>s.
3676 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3677 type symbol 'derived-ifield, not an unparseable string.
3678 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3679 (-sfmt-contents): Add tracing.
3681 From Doug Evans <dje@transmeta.com>:
3682 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3685 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3687 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3688 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3689 (-rtl-c-get): Rename from rtl-c-get.
3690 (rtl-c-get): New fn for getter logging.
3692 2000-07-28 Ben Elliston <bje@redhat.com>
3696 2000-07-25 Ben Elliston <bje@redhat.com>
3698 * doc/credits.texi (Credits): Add Frank Eigler.
3700 2000-07-24 Dave Brolley <brolley@redhat.com>
3702 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3704 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3705 (<keyword>): Initialize all elements fully.
3706 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3708 (-gen-mach-table-defns): Ditto.
3709 (-gen-ifld-defns): Ditto.
3710 (-gen-operand-table): Ditto.
3711 (-gen-insn-table): Ditto.
3712 (-gen-cpu-open): Nothing to do for the mach table.
3714 2000-07-13 Ben Elliston <bje@redhat.com>
3716 * doc/version.texi (UPDATED): Update.
3718 2000-07-05 Ben Elliston <bje@redhat.com>
3720 * configure.in (AC_PATH_PROG): Remove.
3721 * configure: Regenerate.
3722 * Makefile.am (GUILE): Locate guile dynamically.
3723 * Makefile.in: Regenerate.
3724 * doc/Makefile.in: Likewise.
3726 2000-07-03 Ben Elliston <bje@redhat.com>
3728 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3729 * opc-itab.scm (cgen-opc.c): Likewise.
3731 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3733 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3734 guile 1.4 compatibility.
3735 (rtx-env-dump): Comment out buggy display calls.
3737 2000-06-15 matthew green <mrg@redhat.com>
3739 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3741 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3743 * Makefile.in: Regenerated.
3745 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3746 (gen-ifld-defns): Ditto.
3747 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3748 * rtl.c (rtl-finish!): Ditto.
3749 * opc-itab.scm (-gen-ifield-decls): Ditto.
3750 * opcodes.scm (gen-switch): Exclude derived operands.
3751 * operand.scm (op-iflds-used): Expand derived operands.
3752 (hw-index-derived): New dummy function to create dummy object.
3753 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3754 constructor. Set object's hw-name and index fields.
3755 (-anyof-merge-subchoices): Set instance object's index also.
3756 (-anyof-name): New helper function.
3757 (anyof-merge-semantics): Correct replacement of operand names in
3759 (op-ifield): Tolerate derived-operands and their funny indices better.
3760 * ifield.scm (ifld-known-values): Expand derived ifields.
3761 (non-multi-ifields, non-derived-ifields): New utility functions.
3762 (ifld-decode-mode): Tolerate objects with unbound decode field.
3763 * iformat.scm (compute-insn-length): Expand derived ifields.
3764 (compute-insn-base-mask): Ditto.
3765 * insn.scm (insn-base-ifields): Remove.
3766 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3767 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3768 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3769 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3770 (-frag-test-data): Ditto.
3771 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3772 (-gen-sem-switch-engine); Ditto.
3773 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3774 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3775 (-gen-record-args): Tolerate unbound op-ifield.
3776 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3777 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3778 Exclude multi-insns.
3779 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3780 * utils-sim.scm (op-extract?): Handle derived operands.
3782 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3783 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3784 * hardware.scm (hardware-for-mode): New function.
3786 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3787 cleaning up decode tables.
3788 (mask-superset?): Little helper function for above.
3789 * decode.scm (-build-decode-table-entry): Call it.
3790 (-opcode-slots): Add some more tracing.
3791 * arm.cpu: Disable decode-splits construct due to implementation
3792 conflict with `filter-harmlessly-ambiguous-insns'
3794 * decode.scm (-population-top-few): New function for better decode
3795 bit generation. Includes minor helper functions.
3796 (decode-get-best-bits): Call it instead.
3797 (OLDdecode-get-best-bits): Renamed previous version of above.
3800 2000-06-13 Ben Elliston <bje@redhat.com>
3802 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3803 for the Guile library directory.
3804 * configure: Regenerate.
3805 * Makefile.in, doc/Makefile.in: Regenerate.
3807 * Makefile.in, doc/Makefile.in: Regenerate.
3808 * configure.in: Remove unnecessary tests. Move to version 1.0.
3809 * acconfig.h, config.in: Remove.
3810 * configure, aclocal.m4: Regenerate.
3811 * doc/stamp-vti, doc/version.texi: Likewise.
3812 * AUTHORS: New file.
3814 2000-06-07 Ben Elliston <bje@redhat.com>
3816 * fixup.scm (symbol-bound?): Reduce debugging output.
3818 2000-06-02 matthew green <mrg@redhat.com>
3820 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3821 a given instruction, replacing derived fields with their subfields.
3822 (insn-value): Use `insn-base-ifields' to find all constant values.
3823 (multi-insn-instantiate!): Comment some debug messages.
3825 2000-06-01 Ben Elliston <bje@redhat.com>
3827 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3828 symbol names used in a (c-call ..) rtx.
3830 * sim-test.scm (build-test-set): Return (()) for an instruction
3831 with no operands, so it too is included in the generated test set.
3833 2000-05-31 Ben Elliston <bje@redhat.com>
3835 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3836 (sim-test): Likewise.
3837 * Makefile.in: Regenerate.
3839 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3841 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3842 stack traceback, in an order that resembles gdb's `bt'.
3844 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3846 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3847 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3848 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3850 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3852 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3853 * iformat.scm (ifmt-expanded-ifields): Gone.
3854 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3856 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3859 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3862 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3864 * sid.scm (with-any-profile?): New function clone.
3866 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3868 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3870 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3872 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3873 (-multi-ifield-read): Parse them.
3874 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3875 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3876 (multi-ifield gen-extract): Add decode hook.
3877 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3879 * insn.scm (syntax-break-out): More correctly handle \-escaped
3881 (syntax-make-elements): Ditto.
3882 * opc-itab.scm (compute-syntax): Ditto.
3884 2000-05-17 Ben Elliston <bje@redhat.com>
3886 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3888 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3890 * gas-test.scm (build-test-set): Return (()) for an instruction
3891 with no operands, so it too is included in the generated test set.
3893 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3895 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3896 IFMT_OPERANDS and SYNTAX_BYTES.
3898 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3900 * sim.scm (with-any-profile?): New function.
3901 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3902 to decide whether or not to include profiling counters.
3904 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3906 Fuller derived-operand support for opcodes.
3907 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3908 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3909 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3910 (gen-operand-table): Omit derived- and anyof- operands from table.
3911 (gen-insn-table): Omit multi-insns from table.
3912 * iformat.scm (ifmt-expanded-fields): New function to expand
3913 subfields of derived-ifields.
3914 (ifmt-compute!): Ignore remaining multi-insns.
3915 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3917 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3918 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3919 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3920 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3921 (gen-switch): Omit anyof-operands.
3922 * operand.scm (-anyof-syntax): New function.
3923 (-anyof-merge-syntax): Call it.
3924 * utils.scm (collect): New idiomatic function.
3926 2000-05-10 Ben Elliston <bje@redhat.com>
3928 * m68k.cpu: New file (work in progress).
3930 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3932 * Makefile.am (all-local): New target. Create stamp-cgen.
3933 * Makefile.in: Regenerated.
3934 * doc/Makefile.in: Regenerated.
3936 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3938 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3939 (-operand-parse-setter): Ditto.
3940 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3941 for CACHE-ADDR operands.
3942 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3943 trace entries. Widen byte-wide values for printing.
3944 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3945 Widen byte-wide values for printing. Hexify memory addresses.
3947 2000-04-23 matthew green <mrg@redhat.com>
3949 * m32r.cpu: Fix a typo.
3951 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3953 * ia64.cpu (define-model): Change merced to Itanium.
3954 (f-qp): Change quilifying to qualifying.
3955 (movbr_ph, movbr_pvec): Delete.
3956 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3958 2000-04-07 Ben Elliston <bje@redhat.com>
3960 * doc/porting.texi (Building a simulator test suite): Clarify
3961 where generated test cases are placed.
3963 2000-04-07 Ben Elliston <bje@redhat.com>
3965 * Makefile.am (gas-test): Remove dependency on `cgen'.
3967 * Makefile.in: Regenerate.
3969 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3971 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3972 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3973 type reconfiguration.
3974 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3977 2000-03-30 Ben Elliston <bje@redhat.com>
3979 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3981 2000-03-24 Ben Elliston <bje@redhat.com>
3983 * Makefile.am (stamp-cgen): Reinstate target.
3984 * Makefile.in: Regenerate.
3986 2000-03-22 Ben Elliston <bje@redhat.com>
3988 * slib/ppfile.scm: Remove; unused.
3989 * slib/defmacex.scm: Likewise.
3991 2000-03-21 Ben Elliston <bje@redhat.com>
3993 * doc/internals.texi (Source file overview): Document.
3995 * Makefile.am (GUILEDIR): Remove.
3996 (CGEN): Ditto. Callers use $(GUILE) instead.
3997 (GUILEFLAGS): Ditto.
3999 (APPDESCFILES): Ditto.
4000 (OPCODESFILES): Ditto.
4002 (pkgdata_SCRIPTS): Ditto.
4003 (stamp-cgen): Remove target.
4004 * Makefile.in: Regenerate.
4006 * configure.in: Remove header and library tests.
4007 * configure: Regenerate.
4008 * config.in: Likewise.
4010 2000-03-20 Ben Elliston <bje@redhat.com>
4012 * read.scm: Cease loading "hob-sup.scm".
4013 * utils.scm: Inherit the fastcall family of procedures (for now).
4014 * hob-sup.scm: Remove.
4016 2000-03-20 Ben Elliston <bje@redhat.com>
4018 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
4019 * configure: Regenerate.
4020 * gdbinit.in: Remove.
4022 2000-03-17 Ben Elliston <bje@redhat.com>
4024 * Makefile.am (CGEN): Use guile, not cgen.
4025 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
4026 (bin_PROGRAMS, cgen_SOURCES): Likewise.
4027 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
4028 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
4029 (HOB_OBJS): Likewise.
4030 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
4031 (CGENOBJS): Likewise.
4032 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
4033 (hobbit, hobbit.o, hobbit.c): Remove targets.
4034 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
4035 (CLEANFILES): Update.
4036 * acconfig.h (WITH_HOBBIT): Remove.
4037 * configure.in: Do not test for 3 arg scm_make_vector. Remove
4038 option --with-cgen-hobbit.
4039 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
4040 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
4041 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
4042 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
4043 * Makefile.in: Regenerate.
4044 * config.in: Likewise.
4045 * aclocal.m4: Likewise.
4046 * configure: Likewise.
4047 * README (Hobbit support): Remove.
4048 * doc/internals.texi (Conventions): Do not mention Hobbit.
4049 * doc/porting.texi (Supported Guile versions): Likewise.
4051 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
4053 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
4054 callback convention to new sid sidutil::basic_cpu code.
4055 (-gen-sfrag-engine-fn): Ditto.
4056 * sid.scm (-create-virtual-insns!): Ditto.
4057 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
4059 (cxmake-skip): Implement properly for pbb mode.
4061 2000-03-03 Ben Elliston <bje@redhat.com>
4063 * doc/internals.texi: New file.
4065 2000-02-29 Ben Elliston <bje@redhat.com>
4067 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
4068 * doc/porting.texi: Formatting tweaks.
4070 2000-02-25 Nick Clifton <nickc@cygnus.com>
4072 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
4075 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
4077 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
4080 2000-02-23 Andrew Haley <aph@cygnus.com>
4082 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
4085 2000-02-24 Ben Elliston <bje@redhat.com>
4087 * doc/rtl.texi (Derived operands): Add some cindex entries.
4089 2000-02-23 Ben Elliston <bje@redhat.com>
4091 * ia32.cpu (dndo): Move general purpose macro from here ..
4092 * simplify.inc (dndo): .. to here.
4094 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
4096 * arm.cpu (h-tbit): Add c-call setter function.
4099 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
4101 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
4102 (-frag-cost-compute!): Ditto.
4103 * utils.scm (copyright-cygnus): Add Y2K.
4104 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
4106 2000-01-25 Nick Clifton <nickc@cygnus.com>
4108 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
4109 flags field of the CGEN_CPU_TABLE structure.
4111 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
4113 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
4114 All references updated.
4116 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
4118 * ia32.cpu: Rewrite addressing mode support.
4120 * ifield.scm (<ifield>): New member `follows'.
4121 (ifld-known-values): New proc.
4122 (<ifield>): New method set-word-offset!.
4123 (ifld-set-word-offset!): New proc.
4124 (ifld-new-word-offset): New proc.
4125 (<ifield>): New method next-word.
4126 (<multi-ifield>): New method next-word.
4127 (ifld-next-word): New proc.
4128 (ifld-precedes?): New proc.
4129 (-ifield-parse): New args word-offset,word-length,follows.
4130 All callers updated. Handle CISC-style vs RISC-style ifields.
4131 (-ifield-read): Recognize word-offset,word-length,follows specs.
4132 (-ifld-parse-follows): New proc.
4133 (-multi-ifield-make-default-insert): New proc.
4134 (-multi-ifield-make-default-extract): New proc.
4135 (-multi-ifield-parse): Provide default values for insert,extract
4136 handlers if not specified.
4137 (<derived-ifield>): New class.
4138 (derived-ifield?): New predicate.
4139 (ifld-derived-operand?): New predicate.
4140 (f-anyof): New global.
4141 (ifld-anyof?,ifld-anyof-operand?): New predicates.
4142 (f-derived,ifld-derived?): Delete.
4143 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
4144 * insn.scm (-sub-insn-ifields): New proc.
4145 (-sub-insn-make!): New proc.
4146 (multi-insn-instantiate!): Provide initial implementation.
4147 (-insn-parse): If insn contains "anyof" operands, create a
4148 <multi-insn> object instead of a plain <insn>.
4149 (-parse-insn-format-symbol): Rewrite derived operand handling.
4150 Add anyof operand handling.
4151 (-parse-insn-format-ifield-spec): Rewrite.
4152 (-parse-insn-format-operand-spec): Delete.
4153 (-parse-insn-format-list): Delete support for `(operand value)'.
4154 (anyof-operand-format?): Replaces derived-operand-format?.
4155 * operand.scm (-operand-parse-getter): Improve error messages.
4156 (-operand-parse-setter): Ditto.
4157 (<derived-operand>): New members args,syntax,base-ifield,encoding,
4159 (<anyof-operand>): Change baseclass from <derived-operand> to
4160 <operand>. Delete member values. New members base-ifield,choices.
4161 (anyof-operand?): New predicate.
4162 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
4163 (-derived-operand-parse): Rewrite.
4164 (-derived-operand-read): Rewrite.
4165 (-anyof-parse-choice): New proc.
4166 (-anyof-operand-parse): Rewrite.
4167 (-anyof-operand-read,define-anyof-operand): New procs.
4168 (<anyof-value>): Rewrite.
4169 (-anyof-initial-known): New proc.
4170 (anyof-satisfies-assertions?): New proc.
4171 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
4172 (-anyof-merge-getter,-anyof-merge-setter): New procs.
4173 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
4174 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
4175 (-anyof-value-from-derived): New proc.
4176 (-anyof-all-choices-1,anyof-all-choices): New procs.
4177 (operand-init!): Create define-anyof-operand reader command.
4179 * insn (syntax-break-out): Take syntax as argument instead of insn.
4180 All callers updated.
4181 (syntax-make): Move here, from ???.
4183 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
4184 bitrange-foo. All uses updated.
4185 (bitrange-next-word): New proc.
4187 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
4189 * rtl.scm (rtx-canonicalize): Provide initial implementation.
4190 (rtx-make-const,rtx-make-enum): New procs.
4191 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
4192 (rtx-mem-addr,rtx-mem-sel): New procs.
4193 (rtx-change-address): New proc.
4194 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
4195 (rtx-make-set,rtx-single-set?): New procs.
4196 (rtx-combine): New proc.
4198 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
4199 (rtx-traverse-with-locals): Ditto.
4200 (-rtx-traverse,-rtx-traverse-*): Ditto.
4202 * rtl.scm (define-subr): New proc.
4203 (rtl-init!): Create reader command `define-subr'.
4205 * cos.c (_object_mi_p): Ensure argument is an object.
4206 (indent): New function.
4207 (_object_print_elms): Add pretty-printing support.
4208 (_object_print): Ditto.
4210 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
4211 (*floats-s->c-fun-table*): Ditto.
4212 * hobbit.c,hobbit.h: Rebuild.
4213 * hob-sup.c (fastcall7): New proc.
4214 * hob-sup.h (fastcall7): Declare.
4215 * hob-sup.scm (fastcall7): New macro.
4217 * mach.scm (<arch>): New member subr-list.
4218 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
4219 (arch-finish!): Reverse recorded subr list.
4221 * read.scm (debug-env): New global.
4222 (debug-var-names,debug-var,debug-repl-env): New procs.
4223 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
4224 (debug-quit): Renamed from `continue'.
4226 * simplify.inc (dsmf): New pmacro.
4228 * utils.scm (plus-scan): New proc.
4229 (split-bits): Rewrite.
4230 (split-value): New proc.
4232 1999-10-13 Doug Evans <devans@casey.cygnus.com>
4234 * doc/Makefile.am (DOCFILES): Add notes.texi.
4235 * doc/Makefile.in: Rebuild.
4237 1999-10-11 Doug Evans <devans@casey.cygnus.com>
4239 * ifield.scm (ifld-derived?): New proc.
4240 (f-derived): New global.
4241 (ifield-builtin!): Create ifield f-derived.
4242 (<multi-insn>): New class.
4243 (multi-insn?): New predicate.
4244 (multi-insn-instantiate!): New proc.
4245 (-insn-parse): Create <multi-insn> objects for insns with derived
4247 (-parse-insn-format-symbol): Handle derived ifields.
4248 (-parse-insn-format-ifield-spec): New proc.
4249 (-parse-insn-format-operand-spec): New proc.
4250 (-parse-insn-format-list): Simplify.
4251 (-parse-insn-format): No longer allow (ifield-object value) spec.
4252 (derived-operand-format?): New proc.
4253 (insn-alias?): New proc.
4254 (non-alias-insns): Rewrite.
4255 (insn-real?): Renamed from real-insn?, all callers updated.
4256 (virutal-insns): Rewrite.
4257 (multi-insns): New proc.
4258 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
4259 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
4260 Return #f if operand doesn't have an index or if index is not an
4262 (hw-index-anyof): New proc.
4263 (-operand-parse): Allow integer indices.
4264 (<derived-operand>): New class.
4265 (derived-operand?): New predicate.
4266 (<anyof-operand>): New class.
4267 (<anyof-value>): New class.
4268 (-anyof-parse-value,-anyof-operand-parse): New procs.
4269 (-derived-operand-parse,-derived-operand-read): New procs.
4270 (define-derived-operand,define-full-derived-operand): New procs.
4271 (operand-init!): New reader command define-derived-operand.
4273 * utils.scm (list-take): Handle negative amount.
4274 (element?): Rewrite.
4276 1999-10-10 Doug Evans <devans@casey.cygnus.com>
4278 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
4280 1999-10-04 Richard Henderson <rth@cygnus.com>
4282 * ia64.cpu: Checkpoint.
4284 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4286 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4288 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4289 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4291 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4293 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4294 PC returned by sim_engine_invalid_insn.
4296 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4298 * ia32.cpu: New file.
4300 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4302 * utils.scm (bit-set?): Fix off by one error.
4304 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4306 * rtl.scm (hw): Check for valid hardware element before trying to
4309 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4310 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4311 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4312 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4313 compute_operand2_foo.
4315 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4316 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4317 Call delayed_branch/branch methods instead of assigning to `vpc'.
4318 (<hw-pc>,cxmake-skip): Call skip method.
4319 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4320 (<pc>,cxmake-skip): Ditto.
4321 (-create-virtual-insns!): Ditto.
4322 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4324 (op:record-profile): Specify #:output-language "c++".
4325 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4327 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4329 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4330 (gen-semantic-code): Ditto.
4331 (-gen-sem-case,-gen-sfrag-code): Ditto.
4332 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4333 (cgen-cpu.h): File is now #included by main cpu class, rather than
4335 (cgen-defs.h): New proc.
4336 (-gen-scache-semantic-fn): Change result type to sem_status.
4337 New local `status'. Call done_cti_insn/done_insn method at end.
4338 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4340 (cgen-sem-switch.cxx): Ditto.
4341 * sid-decode.scm (-gen-idesc-decls): Update return type of
4343 (cgen-decode.h): Add using namespace @arch@.
4344 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4346 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4347 (estate-output-language-c?,estate-output-language-c++?): New procs.
4348 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4349 (estate-make-for-normal-rtl-c++): New proc.
4350 (rtl-c++-parsed,rtl-c++): New proc.
4351 (s-c-call): Invoke cpu class method if c++.
4352 (join): Use s-c-raw-call.
4354 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4357 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4358 * rtl.scm (<eval-state>): New member `modifiers'.
4359 (<eval-state>,vmake!): Handle #:modifiers.
4360 (estate-with-modifiers): New proc.
4362 * rtl.scm (rtx-side-effects?): New proc.
4363 (rtx-canonical-bool): Don't change expr if it has side effects.
4364 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4367 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4369 * sim.scm (gen-scache-type): Fix typo in last patch.
4371 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4373 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4375 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4377 * sid.scm (<hw-pc>,cxmake-skip): New method.
4378 (<pc>,cxmake-skip): New method.
4380 * decode.scm (decode-build-table): Delete args startbit,index-list.
4381 All callers updated.
4382 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4383 All callers updated.
4384 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4385 to decode-get-best-bits.
4386 * sid-decode.scm (-gen-decode-fn): Ditto.
4388 * hardware.scm (hw-bits): New proc.
4389 (-hw-parse): New arg layout. All callers updated.
4390 (define-full-hardware): New arg layout. All callers updated.
4391 (-hw-validate-layout): New proc.
4392 (-hw-create-[gs]etter-from-layout): New procs.
4393 (<hw-register>,parse!): Handle layout spec.
4394 * types.scm (type-bits): New proc.
4396 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4397 UNARY, BINARY, TRINARY rtxs.
4399 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4400 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4401 Support '- as "unused spot" indicator.
4403 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4405 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4407 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4409 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4411 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4413 (tstate-make): New arg `depth'. All callers updated.
4414 (tstate-depth,tstate-set-depth!): New procs.
4415 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4416 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4417 (-rtx-traverse): Ditto. Keep track of traversal depth.
4419 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4421 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4422 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4423 * utils-sim.scm: Decoder generator support moved here.
4424 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4425 (-gen-decoder-switch): Sort entries for more fall-throughs.
4427 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4428 * Makefile.in: Rebuild.
4429 * sim-test.scm (build-sim-testcase): Add logging message.
4430 * dev.scm (cload): Recognize SIM-TEST application.
4431 (load-stest): Set APPLICATION to SIM-TEST.
4433 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4435 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4436 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4437 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4439 * insn.scm (syntax-break-out): Handle ${foo}.
4441 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4443 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4444 (bin_PROGRAMS): Define.
4445 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4446 (cgen-hob.c): Prepend $(srcdir)/ here.
4447 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4448 (libcpu_a_SOURCES): Delete.
4449 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4450 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4451 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4452 Add AC_CHECK_LIB(guile,main).
4453 * Makefile.in: Rebuild.
4454 * doc/Makefile.in: Rebuild.
4455 * aclocal.m4: Rebuild.
4456 * config.in: Rebuild.
4457 * configure: Rebuild.
4459 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4461 Rename rtx functions from name: to name, accept optional leading
4463 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4464 * attr.scm (-attr-eval): Update.
4465 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4466 (<hw-register>,mode-ok?): Disallow VOID.
4467 (<hw-immediate>,mode-ok?): Disallow VOID.
4468 (<hw-address>,mode-ok?): Disallow VOID.
4469 * mode.scm (mode-name?): New proc.
4470 (VOID): Renamed from VM.
4471 (DFLT): Renamed from DM.
4472 (mode-builtin!): Update.
4473 * opcodes.scm (<ifield>,gen-insert): Update.
4474 (<ifield>,gen-extract): Update.
4475 (<multi-ifield>,gen-insert,gen-extract): Update.
4476 * operand.scm (op:mode): Update.
4477 (<pc>,make!): Update.
4478 (op:new-mode): Update.
4479 (-operand-read): Update.
4480 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4481 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4482 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4483 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4484 (rtx-make): Call -rtx-munge-mode&options.
4485 (rtx accessors): Rewrite.
4486 (rtx-pretty-name): Update.
4487 (-rtx-traverse-*): Update.
4488 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4489 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4490 (-rtx-make-traverse-table): Update.
4491 (-rtx-traverse-operands): Update.
4492 (-rtx-option?,-rtx-option-list?): New procs.
4493 (-rtx-munge-mode&options): New proc.
4494 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4495 (-rtx-traverse): Update.
4496 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4497 (rtx-compile-time-constant?): Update.
4498 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4499 (rtx-value): Update.
4500 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4501 * rtx-funcs.scm (*): Update.
4502 * rtl-c.scm (rtl-c-get): Update.
4503 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4504 (s-c-call,s-c-raw-call): Update.
4505 (s-boolifop,s-convop,s-if,s-cond): Update.
4506 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4507 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4508 (s-parallel,s-sequence): Update.
4509 (rtl-c-build-table): Update.
4510 * sem-frags.scm (-frag-hash-compute!): Update.
4511 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4512 for temporary bug compatibility with previous version.
4513 (-frag-expr-locals,-frag-expr-stmts): Update.
4514 (-frag-compute-desired-frags,-frag-pick-best): Update.
4515 * semantics.scm (-simplify-expr-fn): Update.
4516 (rtx-simplify): Update.
4517 (-rtx-ref-type): Update. Account for modifiers.
4518 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4519 (-build-ifield-operand!): Update.
4520 (-build-known-values): Update.
4521 (semantic-compile): Update.
4522 (-gen-reg-access-defns): Update.
4523 (gen-semantic-code,-gen-sem-case): Update.
4524 (-gen-sfrag-code,-gen-sfrag-case): Update.
4525 * sim-cpu (gen-semantic-code): Update.
4526 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4527 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4528 (-hw-cxmake-get): Update.
4529 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4530 (<hw-index>,cxmake-get): Update.
4531 (<operand>,gen-type,gen-read,cxmake-get): Update.
4532 (<operand>,gen-set-quiet,gen-set-trace): Update.
4533 (<pc>,cxmake-get): Update.
4534 (sim-finish!): Update.
4535 * utils-gen.scm (-gen-ifld-extract-base): Update.
4536 (-gen-ifld-extract-beyond): Update.
4537 (gen-multi-ifld-extract): Update.
4538 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4539 * sid.scm (<hw-pc>,gen-write): Update.
4540 (-gen-decode-insn-globals): Update.
4541 (-hw-cxmake-get): Update.
4542 (<hw-register>,cxmake-get-raw): Update.
4543 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4544 (<hw-index>,cxmake-get): Update.
4545 (<operand>,gen-type,gen-read,cxmake-get): Update.
4546 (<operand>,gen-set-quiet,gen-set-trace): Update.
4547 (<pc>,cxmake-get): Update.
4548 (-create-virtual-insns!): Update.
4549 (-decode-split-build-assertion): Update.
4551 * simplify.inc: Update.
4553 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4555 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4556 Prefix queue function name with sim_ instead of @cpu@_.
4558 * sim.scm (-with-parallel-only?): New global.
4559 (option-init!): Initialize it.
4560 (option-set!): Set it.
4561 (with-parallel-only?): New proc.
4562 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4563 and writeback markers if with-parallel-only.
4564 (-gen-idesc-init-fn): Update.
4565 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4568 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4570 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4571 with the invalid insn handler.
4573 * utils.scm (list-maybe-ref): New proc.
4575 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4577 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4579 * i960.cpu (test*-*): Delete `expr' arg.
4580 (test-op,branch-op): Update.
4582 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4584 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4585 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4587 (gen-reg-access-defn): Ditto.
4588 (-gen-hw-addr): Rewrite.
4589 (-op-gen-queued-write): Rewrite.
4590 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4591 (-gen-scache-semantic-fn): Handle with-generic-write.
4592 (-gen-no-scache-semantic-fn): Ditto.
4594 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4596 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4598 * sim.scm (-with-generic-write?): New global.
4599 (option-init!): Initialize it.
4600 (option-set!): Set it.
4601 (with-generic-write?): New proc.
4602 (-gen-hw-addr): New proc.
4603 (-op-gen-queued-write): New proc.
4604 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4606 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4608 (-gen-sem-switch): Preserve existing with-parallel? value.
4609 (-gen-sem-parallel-switch): Ditto.
4610 (-gen-write-case): Add /indent support.
4611 (cgen-write.c): Rewrite.
4613 * utils.scm (-current-print-state): New global.
4614 (make-print-state): New proc.
4615 (pstate-indent,pstate-set-indent!): New procs.
4616 (pstate-cmd?,pstate-cmd-do): New procs.
4617 (/indent): New global.
4618 (/indent-set,/indent-add): New procs.
4619 (string-write): Set -current-print-state.
4620 (-string-write): New arg pstate, all callers updated.
4621 Handle print-state commands.
4622 (-string-list-flatten): New proc.
4623 (string-list->string): Use it.
4625 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4626 (-gen-sem-fn-table-entry): New proc.
4627 (-gen-semantic-fn-table): New proc.
4628 (-gen-scache-semantic-fn): Make fn static.
4629 (-gen-no-scache-semantic-fn): Ditto.
4630 (cgen-semantics.c): Define macro SEM_FN_NAME.
4631 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4632 FAST,FULL. Update @cpu@_insn_sem contents.
4633 (-gen-semf-fn-name): Delete.
4634 (-gen-sem-fn-decls): Delete.
4635 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4636 @cpu@_semf_init_idesc_table.
4637 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4639 (cgen-decode.h): Print sfmt enum.
4640 * sid-decode.scm (-gen-semf-fn-name): Delete.
4641 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4643 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4644 (ifmt-compute!): Ditto.
4645 * sim-decode.scm (-gen-decoder-switch): Ditto.
4646 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4647 (-gen-decoder-switch): Ditto.
4649 * insn.scm (insn-virtual?): New proc.
4651 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4653 * mach.scm (<arch>): attr-list is now a pair of lists.
4654 (current-attr-list): Rewrite.
4655 (current-attr-add!,current-attr-lookup): Rewrite.
4656 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4658 1999-08-06 Richard Henderson <rth@cygnus.com>
4660 * ia64.cpu: Initial checkpoint.
4662 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4664 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4665 (pmacros-init!): Update .apply help string.
4667 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4669 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4670 (<hw-pc>,cxmake-skip): New method.
4671 (<pc>,cxmake-skip): New method.
4672 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4673 (gen-argbuf-type): New member `skip_count'.
4674 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4675 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4677 * utils-sim.scm: New file.
4678 * dev.scm (load-sim): Load it.
4679 (load-sid): Load it.
4680 * cgen-sid.scm: Load it.
4681 * cgen-sim.scm: Load it.
4682 * iformat.scm (<sformat>): New member sbuf, not initialized by
4684 * rtx-funcs.scm (skip): Rewrite.
4685 * rtl-c.scm (skip): Rewrite.
4686 * m32r.cpu (sc,snc): Update `skip' usage.
4687 * mode.scm (mode-real-mode): New proc.
4688 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4689 Distinguish fragments by the <sformat-abuf> they use.
4690 * sim.scm (gen-profile-index-type): Delete.
4691 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4692 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4693 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4694 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4695 (-gen-argbuf-elm): Rewrite.
4696 (-gen-argbuf-hw-elm): Delete.
4697 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4699 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4700 (sim-init!): Initialize them.
4701 (sim-analyze-insns!): Set them.
4702 (current-sbuf-list): New proc.
4703 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4704 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4705 * sim-model.scm (-gen-model-insn-fn): Ditto.
4706 * sim-decode.scm (-gen-extract-decls): Delete.
4707 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4708 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4710 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4711 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4712 (-gen-op-extract,-gen-op-trace-extract): New procs.
4713 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4714 gen-sfmt-argvars-foo and rewrite.
4715 (-gen-record-args): Rewrite.
4716 (-gen-extract-case): Tweak.
4717 * sid.scm (gen-profile-index-type): Delete.
4718 (ifield argbuf support): Move to utils-sim.scm.
4719 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4720 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4721 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4722 (-sim-sformat-argbuf-list): New global.
4723 (sim-init!): Initialize it.
4724 (sim-analyze-insns!): Set it.
4725 (current-sbuf-list): New proc.
4726 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4727 (-gen-argbuf-hw-elm): Delete.
4728 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4730 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4731 (-gen-extract-decls): Delete.
4732 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4734 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4735 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4736 (-gen-op-extract,-gen-op-trace-extract): New procs.
4737 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4738 gen-sfmt-argvars-foo and rewrite.
4739 (-gen-record-args): Rewrite.
4740 (-gen-extract-case): Tweak.
4742 * cgen-gh.c (gh_putc,gh_puts): New functions.
4743 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4744 * cos.c (_object_print_elms,_object_print): Use them.
4745 * hob-sup.c (fastcall_print): Use them.
4746 * configure.in: Check for scm_gen_puts, scm_puts.
4747 * config.in: Rebuild.
4748 * configure: Rebuild.
4749 * aclocal.m4: Rebuild.
4750 * Makefile.in: Rebuild.
4752 * dev.scm (load-opc): Use load instead of maybe-load.
4753 (load-gtest,load-sim,load-stest): Ditto.
4756 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4758 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4759 up to avoid g++ 'goto crosses initialization' warning.
4760 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4761 (-gen-sfrag-case): Update use of NEXT_FRAG.
4763 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4765 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4767 * read.scm: Load sem-frags.scm.
4768 * sem-frags.scm (*): Lots rewritten.
4769 * sid.scm (-with-sem-frags?): New global
4770 (with-sem-frags?): New proc.
4771 (option-init!): Initialize -with-sem-frags?.
4772 (option-set!): Recognize with-sem-frags.
4773 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4774 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4776 (-gen-sfrag-engine-decls): New proc.
4777 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4778 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4779 (-gen-sfrag-engine): New proc.
4780 (-gen-sem-case): Emit setup-semantics if specified.
4781 (-gen-sem-switch-engine): Update init/use of computed goto label.
4782 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4784 (-gen-idesc-decls): Replace sem_address with cgoto.
4785 (-gen-scache-decls): Rewrite definition of `execute' member.
4786 * arm.cpu (arm isa): Enable decode-splits.
4787 * arm7.cpu (multiply insns): Rename result to mul-result.
4789 Rename decode-specialize to decode-split.
4790 * decode.scm (*): Update.
4791 * insn.scm (*): Update.
4792 * mach.scm (*): Update.
4793 * sid.scm (*): Update.
4795 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4797 Record objects as a smob.
4798 * cos.c (scm_tc16_object): New static global.
4799 (cos_init): Initialize it.
4800 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4801 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4802 (_object_tag): Delete.
4803 (_object_make_smob): New function.
4804 (_object_make_x,_object_make_with_values_x): Rewrite.
4805 (_object_elements,_object_class_desc): Rewrite.
4806 (_object_copy,object_p): Rewrite.
4807 (_object_specialize): Rewrite.
4808 (_object_print_elms,_object_print): New functions.
4809 (object_smob): New static global.
4810 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4812 * cos.c (_make_x_symbol): New static global.
4813 (object_make): Use it.
4814 (cos_init): Initialize it.
4816 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4818 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4819 instead to determine whether to use FLD macro.
4820 (<rtl-c-eval-state>): New member ifield-var?.
4821 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4822 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4823 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4825 * rtl.scm (rtx-sequence-assq-locals): New proc.
4827 * cos.scm (-object-error): Don't crash on non-objects.
4829 * Makefile.am (CLEANFILES): Add hobbit.
4830 * Makefile.in: Rebuild.
4832 * rtl-c.scm (s-c-call): Delete unnecessary code.
4834 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4836 * rtl-c.scm (ifield): Always reference value via `FLD'.
4838 * cos.c (elm_bound_p): Return problem SCM boolean values.
4840 * utils-cgen.scm (display-argv): New proc.
4841 * cgen-opc.scm (cgen): Call it.
4842 * cgen-sim.scm (cgen): Ditto.
4843 * cgen-gas.scm (cgen): Ditto.
4844 * cgen-stest.scm (cgen): Ditto.
4845 * cgen-sid.scm (cgen): Ditto.
4847 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4849 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4850 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4851 (-gen-extract-switch): Initialize result to 1.
4852 * opcodes.scm (gen-ifield-default-type): New proc.
4853 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4855 (<hw-index>,gen-insert): Handle non-ifield indices.
4856 (<hw-index>,gen-extract): Ditto.
4857 (<hw-asm>,gen-parse): Ditto.
4858 (<hw-asm>,gen-print): Ditto.
4859 (<keyword>,gen-parse): Ditto.
4860 (<keyword>,gen-print): Ditto.
4861 (<operand>,gen-fget): Ditto.
4862 (<operand>,gen-fset): Ditto.
4864 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4865 (-gen-hw-index): Ditto.
4866 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4867 (-gen-hw-index): Ditto.
4869 * sem-frags.scm: New file.
4871 * attr.scm (attr-parse): Add better checking of input.
4873 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4875 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4877 * ifield.scm (ifld-nil?): New proc.
4879 * operand.scm (<operand>): New members getter,setter.
4880 (<operand>,make!): New args getter,setter. All uses updated.
4881 (op:getter,op:setter): New procs.
4882 (<hw-index>,field-start): Return 0 for non-ifield indices.
4883 (<hw-index>,field-length): Return 0 for non-ifield indices.
4884 (-operand-parse-getter,-operand-parse-setter): New procs.
4885 (-operand-parse): New args getter,setter. All callers updated.
4886 Always use hw-index-scalar for scalar operands.
4887 (-operand-read): Handle getter,setter.
4888 (define-full-operand): New args getter,setter. All uses updated.
4889 * semantics.scm (-build-ifield-operand!): Update.
4890 (-build-index-of-operand!): Update.
4891 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4892 * simplify.inc (define-normal-operand): Update.
4894 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4895 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4896 (s-binop,s-cmpop,s-convop): Ditto.
4897 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4898 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4899 (fcc-tests): New insn-enum.
4900 (fcc-value): Rename from fcc-type.
4901 * sparcfpu.cpu: New file. All fp support moved here.
4903 * rtl.scm (<rtx-func>): New member class.
4904 (rtx-class-*?): New procs.
4905 (def-rtx-node): New arg class. All callers updated.
4906 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4907 * rtx-funcs.scm (*): Specify class.
4909 * utils-cgen.scm (context-make-reader): New proc.
4911 * utils.scm (assert-fail-msg): New variable.
4913 (list-drop,list-tail-drop): New procs.
4915 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4917 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4918 CGEN_MIN_INSN_SIZE deleted on March 22.
4920 * ifield.scm (<ifield>,needed-iflds): New method.
4921 (<multi-ifield>,needed-iflds): New method.
4922 (ifld-needed-iflds): New proc.
4923 (multi-ifield?): New proc.
4924 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4925 (-sfmt-search-key): Include insn length in key.
4926 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4927 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4928 (-ifmt-lookup-ifmt!): Compute key here.
4929 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4930 All callers updated.
4931 (ifmt-build): Delete arg desc. New args search-key,iflds.
4932 All callers updated.
4933 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4934 in-ops,out-ops,sorted-used-iflds. All callers updated.
4935 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4937 * operand.scm (op-iflds-used): New proc.
4938 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4940 And from sid.scm,sid-cpu.scm as well.
4941 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4942 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4943 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4944 (gen-extracted-ifld-value): Ditto.
4945 (-extract-chunk-specs): Ditto.
4946 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4947 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4948 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4949 (-extract-insert-subfields): New function.
4950 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4951 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4952 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4953 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4955 (-gen-no-scache-semantic-fn): Ditto.
4956 (-gen-sem-case): Ditto.
4957 (-gen-read-case): Update calls to gen-define-ifields,
4958 gen-extract-ifields.
4959 * sim-decode.scm (-gen-record-args): Update.
4960 (-gen-sfmt-argvars-assigns): Update.
4961 (-gen-extract-case): Update.
4962 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4963 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4965 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4966 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4967 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4968 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4969 gen-define-ifields, gen-extract-ifields.
4970 (-gen-record-args): Update.
4971 (gen-sfmt-argvars-assigns): Update.
4972 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4973 with gen-define-ifields. Ditto for gen-extract-foo.
4974 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4975 procs rather than method calls.
4977 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4979 * sid.scm (-create-virtual-insns!): New local `context', pass it
4982 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4983 (operand name) not (operand object), (local name) not (local object).
4984 (rtx-traverse-with-locals): New proc.
4985 (-compile-expr-fn): New proc.
4986 (rtx-compile): Rewrite.
4987 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4988 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4989 (rtl-c-set-trace): Ditto.
4990 (operand define-fn): Recognize operand name argument.
4991 (local define-fn): Recognize sequence temp name argument.
4992 * rtx-funcs.scm (operand): Argument is operand name, not object,
4993 so call current-op-lookup.
4994 (local): Similarily, so call rtx-temp-lookup.
4996 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4997 (rtx-operand?): Ditto.
4998 (rtx-pretty-name): Ditto.
4999 (rtx-local-obj): Flag symbol argument as an error.
5000 (rtx-local-name): New proc.
5001 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
5003 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
5005 * read.scm (debug-repl): Renamed from -debug-repl. All callers
5008 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
5011 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
5012 (*floats-s->c-fun-table*): Ditto.
5013 * hobbit.c,hobbit.h: Rebuild.
5014 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
5015 * semantics.scm (rtx-simplify): Use /fastcall-make.
5017 * iformat.scm (-sfmt-search-key): Don't include memory modes.
5019 * insn.scm (<insn>): Delete members condition, compiled-condition.
5020 (<insn>,make!): Update
5021 (<insn> getters,setters): Update.
5022 (-insn-parse,insn-read,define-full-insn): Update.
5023 * minsn.scm (minsn-make-alias): Update.
5024 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
5025 (ifmt-compute!): Ditto.
5026 * sim.scm (sim-finish!): Update.
5027 * simplify.inc: (define-normal-insn): Update.
5028 * sid-cpu.scm (gen-semantic-code): Update.
5030 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
5031 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
5032 (ifmt-compute!): Ditto.
5034 1999-06-16 Doug Evans <devans@casey.cygnus.com>
5036 * minsn.scm (minsn-compute-iflds): Print better error message for
5039 1999-06-12 Doug Evans <devans@casey.cygnus.com>
5041 * rtl.scm (tstate->estate): Don't copy over expr-fn.
5043 * Makefile.am (HOBFLAGS): New variable.
5044 (cgen-hob.c): Use it.
5046 (libcpu_a_SOURCES): Add hob-sup.c.
5047 (hob-sup.o): New rule.
5048 * Makefile.in: Rebuild.
5049 * cgen.c: #include hob-sup.h.
5050 (cgen_init_c): Call hobbit_init_support.
5051 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
5052 (*special-scm->c-functions*): Add them.
5053 (display-c-expression): Handle *c-symbol*.
5054 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
5055 (*floats-s->c-fun-table*): Ditto.
5056 (normalize): Recognize /fastcall-make.
5057 (normalize-fastcall-make): New proc.
5058 * hobbit.c,hobbit.h: Rebuild.
5059 * hob-sup.scm: New file.
5060 * hob-sup.c: New file.
5061 * hob-sup.h: New file.
5062 * read.scm: Load hob-sup.scm.
5063 * rtl.scm (-rtx-name-list): New variable.
5064 (rtx-name-list): New proc.
5065 (rtx-lookup): Try symbol first.
5066 (def-rtx-node): Add name to -rtx-name-list.
5067 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
5068 (-rtx-traverse-anymode): New proc.
5069 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
5070 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
5071 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
5072 (-rtx-traverse-{symornum,object}): New procs.
5073 (-rtx-make-traverse-table): Rewrite.
5074 (-rtx-traverse-operands): Rewrite arg-types handling.
5075 Handle #f result of traverser.
5076 (-rtx-traverse): Renamed from -rtx-traverse-normal.
5077 Move debug handling here.
5078 (-rtx-traverse-debug): Delete.
5079 (rtl-finish!): Change -rtx-traverse-table into list of handlers
5081 * semantics.scm (semantic-compile:process-expr!): Fix call to
5083 * utils.scm (map1-improper): New proc.
5085 1999-06-08 Doug Evans <devans@casey.cygnus.com>
5087 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
5089 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
5090 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
5091 (<operand>,cxmake-get): Tweak.
5092 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
5094 1999-06-07 Doug Evans <devans@casey.cygnus.com>
5096 * thumb.cpu (dnti): Delete timing spec.
5099 * arm.cpu (arm isa): New fields condition, setup-semantics.
5100 (thumb isa): New field setup-semantics.
5101 (h-gr): Add attribute CACHE-ADDR.
5102 * arm7.cpu (dnai): Delete condition.
5103 (eval-cond): Delete.
5105 * mach.scm (<isa>): New member setup-semantics.
5106 (-isa-parse-setup-semantics): New proc.
5107 (-isa-parse): New arg setup-semantics.
5108 (-isa-read): Recognize setup-semantics.
5110 * sid-cpu.scm (gen-extract-fields): Split into two:
5111 gen-extract-ifields, gen-extract-ifmt-ifields.
5112 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
5113 tracing begin/end messages (done by caller now).
5114 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
5115 tracing begin/end messages (done by x-before,x-after virtual insns).
5116 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
5117 end so don't have to look it up again next time.
5118 * sid-decode.scm (-decode-expr-ifield-values): New proc.
5119 (-decode-expr-ifield-tracking-key): New proc.
5120 (-decode-expr-ifield-tracking): New proc.
5121 (-decode-expr-ifield-values-used): New proc.
5122 (-decode-expr-ifield-mark-used!): New proc.
5123 (-gen-decode-expr-set-itype): New proc.
5124 (-gen-decode-expr-entry): Rewrite.
5125 (-gen-decode-table-entry): New proc.
5126 (-gen-decoder-switch): Use it.
5127 (-gen-virtual-insn-finder): New proc.
5128 (-gen-argbuf-elm): Move here from sid.scm.
5129 (-gen-argbuf-hw-elm): Ditto.
5130 (-gen-argbuf-fields-union): Add entries for chain,before insns.
5131 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
5132 conditional-execution isas.
5133 (-gen-decode-fn): Record conditional-exec ifield.
5134 * sid.scm (-current-pbb-engine?): New global.
5135 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
5136 (<ifield>,gen-ifld-extract): New arg `indent'.
5137 (<multi-ifield>,gen-ifld-extract): Ditto.
5138 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
5139 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
5140 (-gen-arch-model-decls): Only scan real insns.
5141 (scache-engine-insns,pbb-engine-insns): New procs.
5142 (-create-virtual-insns!): New proc.
5143 (sim-finish!): Call it.
5144 (-decode-specialize-insn?): New proc.
5145 (-decode-specialize-build-assertion): New proc.
5146 (-decode-specialize-insn-1): New proc.
5147 (-decode-specialize-insn): New proc.
5148 (-fill-sim-insn-list!): New proc.
5149 (sim-analyze!): Create copies of insns to be specialized.
5150 * utils-cgen.scm (obj-set-name!): New proc.
5152 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
5153 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
5155 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
5157 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
5158 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
5159 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
5160 (attr): Rewrite test for insn owner.
5161 (member): New rtx function.
5162 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
5163 as separate function.
5164 (rtx-ifield?,rtx-ifield-name): New procs.
5165 (rtx-operand-obj): Rewrite.
5166 (rtx-operand-name): New proc.
5167 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
5168 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
5169 (tstate-make): New args owner, known. All callers updated.
5170 (tstate-known-lookup): New proc.
5171 (rtx-traverse): New arg owner. All callers updated.
5172 (rtx-make-bool): New proc.
5173 (rtl-find-ifields): Rewrite.
5174 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
5175 * semantics.scm: ... here.
5176 (rtx-const-equal,rtx-const-list-equal): New procs.
5177 (-build-known-values): New proc.
5178 (semantic-compile): New arg `insn'. Call rtx-simplify.
5179 (semantic-attrs): Ditto.
5180 * rtx-funcs.scm (member,number-list): New rtx functions.
5182 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
5183 Rewrite. Delete arg `all-attrs'. All callers updated.
5184 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
5186 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
5188 * decode.scm (subdtable-add): Handle `expr' entries.
5189 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
5190 (exprtable-entry-*): Update.
5191 (exprtable-entry-iflds): New proc.
5192 (exprentry-cost): New proc.
5193 (exprtable-sort,-gen-exprtable-name): New procs.
5194 (exprtable-make): New arg `name'. All callers updated. use vector.
5195 (exprtable-*): Update.
5196 (-build-decode-table-entry): Don't issue collision warning if all are
5197 specialized insns. Sort exprtable entries before building table.
5199 * read.scm (-reader-process-expanded-1): Move pretty printing of
5200 input to logging level 4.
5202 * utils.scm (string-list->string): New proc.
5204 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
5206 (insn-read): Delete leading '-' in name. All callers updated.
5207 (real-insn?): New proc.
5208 (real-insns): Rewrite.
5209 (insn-has-ifield?): New proc.
5210 (insn-builtin!): Create insn attribute SPECIALIZED.
5212 * mach.scm (<arch>): Delete member app-data.
5213 (current-raw-insn-list): New proc.
5214 (insn-list-car,insn-list-splice!): New procs.
5215 (<decode-specialize>): New class.
5216 (-isa-parse-decode-specialize): New proc.
5217 (-isa-parse-decode-specializes): New proc.
5218 (<isa>): New members `condition', `decode-specializes'.
5219 (-isa-parse-condition): New proc.
5220 (-isa-parse): New args condition, decode-specializes.
5221 (-isa-read): Recognize condition, decode-specializes.
5222 (-isa-add-decode-specialize!): New proc.
5223 (modify-isa): New proc.
5224 (isa-conditional-exec?,state-conditional-exec?): New procs.
5225 (arch-init!): New reader command `modify-isa'.
5227 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
5228 (mode-signed,mode-unsigned?): New procs.
5230 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
5232 * types.scm (<array>): New method get-shape.
5233 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
5235 (hw-shape,hw-num-elms): New procs.
5236 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
5237 if there's more than 255 registers.
5238 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
5240 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
5243 1999-05-21 Doug Evans <devans@casey.cygnus.com>
5245 * cgen-sid.scm (sim-arguments): Add -X.
5246 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
5247 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
5248 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
5249 Simplify by supporting pbb engine only.
5250 (-gen-sem-switch-init): New proc.
5251 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
5252 (cgen-sem-switch.cxx): New proc.
5253 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
5254 with with-pbb?. Support dual scache/pbb engines.
5255 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
5256 Support dual scache/pbb engines.
5257 (cgen-decode.h): Generate semantic fn decls if with-scache?.
5258 * sid.scm (*) with-pbb? replaces with-sem-switch?.
5259 (sim-finish!): Create pbb support virtual insns if with-pbb?.
5261 1999-05-10 Ben Elliston <bje@cygnus.com>
5263 * arm7.cpu: Remove coprocessor related fields, operands and insn
5264 definitions for now. Take the undefined instruction trap instead.
5265 (ldmda-wb): New instruction.
5266 (ldmib-wb): Likewise.
5267 (ldmdb-wb): Likewise.
5268 (stmdb-wb): Likewise.
5269 (stmib-wb): Likewise.
5270 (stmda-wb): Likewise.
5272 1999-05-08 Doug Evans <devans@casey.cygnus.com>
5274 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
5275 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
5277 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
5278 hobbit can't handle optional third arg.
5280 1999-05-07 Doug Evans <devans@casey.cygnus.com>
5282 * arm.cpu (h-tbit): Delete set spec.
5283 (h-mbits): Don't call arm_mbits_set in set spec.
5284 * arm.sim: New file.
5285 * hardware.scm (modify-hardware): New proc.
5286 (hardware-init!): Add modify-hardware command.
5287 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5288 (-hw-gen-set-quiet): Ditto.
5289 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5290 hardware attribute. Load $arch.sim file if present.
5291 * utils-cgen.scm (keyword-list?): New proc.
5292 (keyword-list->arg-list,arg-list-validate-name): New procs.
5293 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5295 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5297 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5300 * attr.scm (obj-prepend-atlist!): New proc.
5302 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5304 * sid.scm (<operand>,profilable?): Use op:type.
5305 * sim.scm (<operand>,profilable?): Use op:type.
5307 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5309 * utils.scm (find-index,find): Be more stack friendly.
5311 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5314 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5316 * arm.cpu (h-gr-usr): New hardware element.
5317 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5318 (arm-mode): New keyword.
5319 (h-mbits): Add set spec.
5320 (h-spsr): Implement get/set specs.
5322 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5323 (-reader-process-expanded-1): Pretty print logging output.
5325 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5326 (cgen-cpu.h): Print enums before hardware elements.
5327 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5328 * sid-decode.scm (cgen-decode.cxx): Ditto.
5329 * sid-model.scm (cgen-model.cxx): Ditto.
5331 * utils-cgen.scm (context-error): Accept variable number of
5334 * rtx-funcs.scm (error:): New rtx function.
5335 * rtl-c.scm (s-case-vm): New proc.
5336 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5337 (s-case): Simplify, handle non-VM result.
5338 (error:): New rtx function.
5340 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5342 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5343 (test-hi,test-ls): Fix cbit handling.
5344 (shift-type,h-operand2-shifttype): Move here ...
5345 * arm7.cpu: ... from here.
5346 (set-cond,set-cond-maybe,dnix): Delete, unused.
5347 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5348 * arm.cpu: ... to here.
5349 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5350 (alu-cmn): Use set-add-flags.
5351 (alu-tst): Use set-zn-flags.
5352 (alu-cmp): Use set-sub-flags.
5353 (lsl,lsr,asr): Set condition codes.
5354 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5355 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5357 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5358 All callers updated.
5359 (sub-sp): Rename from add-sp-neg.
5360 (f-lbwl-offset): Delete.
5361 (f-lbwl-hi,f-lbwl-lo): New ifields.
5362 (lbwl-hi,lbwl-lo): Update.
5363 (bl-hi): Add 4 to pc.
5364 (push-reg,pop-reg): Simplify.
5365 (push,push-lr): Push registers in correct order.
5366 (pop,pop-pc): Pop registers in correct order.
5367 (save-reg-inc,load-reg-inc): Simplify.
5368 (ldmia): Save registers in correct order.
5370 1999-04-30 Ben Elliston <bje@cygnus.com>
5372 * arm7.cpu (f-op-hdt): Remove; unused.
5373 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5374 (f-ror-imm8): New multi-ifield.
5375 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5377 (f-uimm12): New field.
5378 (ror-imm8): New operand.
5380 (hdt-offset8): Reinstate operand.
5381 (offset4-hi,offset4-lo): Remove.
5382 (set-cond): Remove macro; unused.
5383 (set-cond-maybe): Likewise.
5384 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5385 (store-word/byte): Likewise.
5386 (load-halfword): Use hdt-offset8 multifield operand instead of two
5387 4-bit operands that are explicitly combined by semantic code.
5388 (do-halfword-store): Bug fix. Set address when not preindexing.
5389 (store-halfword): Also use hdt-offset8 operand.
5390 (arith-op): Avoid clobbering source registers when one of them is
5391 the destination register.
5392 (arith-imm-op): Likewise.
5393 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5394 (teq-imm): Likewise.
5395 (ldm-p): Rename to ldmdb.
5396 (stm-pw): Rename to stmdb-wb.
5397 (multi-action): New macro; test reg-list bits and execute a
5398 semantic fn if the bit is set.
5399 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5400 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5401 (all insns): Use dnai entries for simplicity rather than dni.
5402 (*): Use short-form of (const ..).
5404 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5406 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5407 member eval to evaluator.
5408 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5409 (tstate-make): Delete arg op-fn. All callers updated.
5410 (tstate-op-fn,tstate-set-op-fn!): Delete.
5411 (rtx-traverse): Delete op-fn arg. All callers updated.
5412 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5413 split out of -simplify-for-compilation.
5415 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5416 (cgen_DEPENDENCIES): Add stamp-cgen.
5417 (stamp-cgen): New rule.
5418 * Makefile.in: Rebuild.
5420 * rtl-c.scm (enum:): Define emitter for.
5421 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5423 (rtx-constant-value,rtx-enum-value): New procs.
5424 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5425 (rtx-compile-time-constant?): Return #t for enums.
5426 (rtx-true?,rtx-false?): Handle enums.
5427 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5428 building result by hand.
5429 (rtx-simplify-eq-attr-insn): Ditto.
5430 * rtx-funcs.scm (enum:,enum): New rtx functions.
5432 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5434 (arch-analyze-insns!): New proc.
5435 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5436 of calling ifmt-compute! directly.
5437 * sid.scm (-sim-insns-analyzed?): Delete.
5438 (sim-analyze!): Call arch-analyze-insns! instead of calling
5439 ifmt-compute! directly.
5440 * sim.scm (-sim-insns-analyzed?): Delete.
5441 (sim-analyze!): Call arch-analyze-insns! instead of calling
5442 ifmt-compute! directly.
5444 * utils.scm (string-take-with-filler): New proc.
5445 (string-take): Use it.
5447 * pgmr-tools.scm: New file.
5448 * read.scm: Load it.
5449 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5451 * insn.scm (insn-base-mask): Renamed from insn:mask.
5452 All callers updated.
5453 (insn-base-mask-length): Renamed from insn:mask-length.
5454 All callers updated.
5455 (insn-foo): Renamed from insn:foo. All callers updated.
5456 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5457 * iformat.scm (compute-insn-base-mask-length): Renamed from
5458 compute-insn-mask-length. All callers updated.
5459 (compute-insn-base-mask): Renamed from compute-insn-mask.
5460 All callers updated.
5462 * enum.scm (-enum-parse-prefix): New proc.
5463 (<enum>,make!): Don't parse enum values here.
5464 (-enum-parse): Do it here. Call -enum-parse-prefix.
5465 (define-full-insn-enum): Ditto.
5466 (enum-vals-upcase): New proc.
5467 * hardware.scm (define-keyword): Make enum prefix uppercase.
5468 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5470 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5471 (<ifield>,field-extract): New method.
5472 (<multi-ifield>,field-extract): New method.
5473 (ifld-extract): New proc.
5474 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5475 (ifld-extract-fn-name): Renamed from ifld-extract.
5477 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5478 All callers updated.
5480 * ifield.scm (ifld-lsb0?): New proc.
5481 (sort-ifield-list): New arg up?. All callers updated.
5482 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5483 rather than global state.
5485 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5487 * insn.scm (pretty-print-insn-format): New proc.
5489 * Makefile.in: Rebuild.
5490 * aclocal.m4: Rebuild
5491 * configure: Rebuild.
5493 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5495 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5496 * configure: Rebuild.
5497 * aclocal.m4: Rebuild.
5498 * Makefile.in: Rebuild.
5499 * doc/Makefile.in: Rebuild.
5500 * doc/version.texi: Rebuild.
5502 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5504 * utils.scm (bits->bools): New proc.
5506 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5508 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5509 subfield's gen-ifld-extract-decl method.
5511 1999-04-23 Ben Elliston <bje@cygnus.com>
5513 * arm7.cpu (ldrsh-pu): Remove.
5514 (do-halfword-load): New pmacro.
5515 (load-halfword): Likewise.
5516 (do-halfword-store): Likewise.
5517 (store-halfword): Likewise.
5518 (strh-*): New instructions.
5519 (ldrsb-*): Likewise.
5521 (ldrsh-*): Likewise.
5523 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5525 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5528 * arm7.cpu (do-word/byte-store): Fix typo.
5530 1999-04-22 Ben Elliston <bje@cygnus.com>
5532 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5533 register is the program counter (R15).
5535 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5536 (str-*): Implement using store-word-byte. Remove older versions.
5537 (bic): Use the `inv' rtx for obtaining bitwise complements.
5538 (bic-imm): Likewise.
5540 (mvn-imm): Likewise.
5541 (store-indev-reg): Remove crufty pmacro.
5542 (load-indiv-reg): Likewise.
5543 (ldm-p): Reverse the order of register processing for decrement.
5545 (stbi): Remove; handled by the str-* insns.
5547 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5549 * thumb.cpu (cmp): Fix carry bit computation.
5552 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5554 * arm.cpu (h-tbit): Specify set spec.
5556 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5557 (set-sub-flags): Interpret "carry bit" as a borrow.
5558 (all sub/cmp insns): Carry bit is actually a borrow bit.
5559 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5560 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5562 (hireg-add,hireg-cmp,hireg-move): Ditto.
5564 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5565 (-CGEN-LANG-VERSION): Ditto.
5567 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5569 * pmacros.scm (-pmacro-make): New arg `default-values',
5570 all callers updated.
5571 (-pmacro-default-values): New proc.
5572 (-pmacro-process-keyworded-args): New proc.
5573 (-pmacro-process-args): New proc.
5574 (-pmacro-invoke): Process arguments before expanding macro.
5575 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5576 (define-pmacro): Handle default values specified in arg list.
5577 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5578 (rtx-boolif-op-arg[01]): New procs.
5579 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5580 (rtx-simplify): Handle not,orif,andif.
5581 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5582 * utils.scm (alist-copy): New proc.
5583 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5585 (swi): Explicitly set pc.
5587 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5589 1999-04-17 Ben Elliston <bje@cygnus.com>
5591 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5592 correctly adjusts the program counter now.
5594 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5595 (f-signed?): Rename from `f-hdt-signed?'.
5596 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5597 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5598 (f-hdt-offset8): Use new field names.
5599 (ldr): Use `imm12' field, not `offset12', since we do our own
5601 (str, str-*): Likewise.
5602 (ldu-*): Remove most; better not implemented than broken.
5604 (ldrsh-pu): New insn.
5608 (ldm-p): Likewise; replace (load-indiv-reg) version.
5610 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5612 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5613 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5614 (*): Explicitly specify mode in c-call.
5615 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5617 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5618 (arith-imm-op): New pmacro.
5619 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5620 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5622 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5624 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5626 * rtl.scm (rtl-find-ifields): Implement.
5628 * utils-gen.scm: New file.
5629 * read.scm: Load it.
5630 * desc.scm: Move generic attribute code to utils-gen.scm.
5631 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5632 * Makefile.in: Rebuild.
5634 * arm7.cpu (R15-OFFSET): New attribute.
5636 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5637 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5638 for reg-shift version.
5640 (data processing insns): Reorganize. Use dnai.
5642 * attr.scm (attr-kind): New proc.
5643 (attr-list-enum-list): Rewrite.
5644 (-attr-sort): Split result into two lists, bools and non-bools.
5645 (current-attr-list-for): Update.
5647 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5648 * sid-cpu.scm (-gen-attr-decls): New proc.
5649 (-gen-insn-attr-decls): New proc.
5650 (cgen-desc.h): New proc.
5651 (cgen-cpu.h): Put everything in @cpu@ namespace.
5652 (gen-parallel-exec-type): Change prefix of parexec struct from
5654 (-gen-trace-record-type): Ditto for trace_record struct.
5655 (-gen-write-case): Update.
5656 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5657 @prefix@. Update scache struct references.
5658 (-gen-sem-case): Update scache struct references.
5659 (-gen-sem-switch-fn): Update idesc struct reference.
5660 Update insn_type enum reference.
5661 (cgen-write.cxx): Update scache,argbuf references.
5662 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5663 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5664 from @cpu@ to @prefix@.
5665 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5666 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5667 from @CPU@ to @PREFIX@.
5668 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5669 from @CPU@ to @PREFIX@.
5670 (-gen-decode-insn-globals): Generate insn attributes.
5671 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5672 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5673 semantic fn typedef.
5674 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5675 Change prefix of scache struct from @cpu@ to @prefix@.
5676 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5677 Change prefix of idesc struct from @cpu@ to @prefix@.
5678 Change prefix of insn_type enum from @cpu@ to @prefix@.
5679 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5680 from @cpu@ to @prefix@.
5681 (-gen-scache-decls): Change prefix of scache struct from
5682 @cpu@ to @prefix@. Update idesc struct name.
5683 Update decode,execute methods.
5684 (-gen-extract-case): Update to type name changes.
5685 (-gen-decode-fn): Ditto.
5686 (cgen-decode.h): Put everything in @cpu@ namespace (except
5687 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5688 (cgen-decode.cxx): Add using namespace @cpu@.
5689 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5690 model_mark_get/set from @cpu@ to @prefix@.
5691 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5693 (gen-model-fn-decls): Update idesc struct name. Change prefix
5694 of model_insn_before/after from @cpu@ to @prefix@.
5695 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5696 Update insn_word type name.
5697 (-gen-model-timing-table): Update INSN_TIMING struct name.
5698 (-gen-model-init-fn): Update MODEL_DATA struct name.
5699 (-gen-mach-defns): Update name of init_idesc_table fn.
5700 (cgen-model.cxx): Add using namespace @cpu@.
5701 * sid.scm (gen-cpu-class): Delete.
5702 (gen-attr-type): New proc.
5703 (gen-obj-attr-sid-defn): New proc.
5704 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5705 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5707 (gen-cpu-insn-enum): Update name of insn enum.
5708 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5710 (swi): Rename @cpu@_swi to @prefix@_swi.
5712 * decode.scm (-build-decode-table-entry): Remove heuristic for
5713 distinguishing insns, and use insn ifield-assertion specs.
5715 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5716 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5717 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5718 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5719 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5720 all callers updated.
5721 (gen-attr-name): New proc
5722 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5723 (gen-obj-attr-defn): Delete num_nonbools count.
5725 * iformat.scm (ifmt-analyze): Handle insn-condition.
5726 (ifmt-compute!): Ditto.
5727 * insn.scm (<insn>): Specify default value for condition,
5728 post-cond-trap,compiled-condition,compiled-semantics.
5729 (<insn>,make!): New arg condition.
5730 (<insn>): Add getters for condition,compiled-condition.
5731 (-insn-parse): New arg condition, all callers updated.
5732 (-insn-read): Recognize condition spec.
5733 (define-full-insn): New arg condition.
5734 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5735 * semantics.scm (semantic-compile): Change arg sem-code to
5737 (semantic-attrs): Ditto.
5738 * sim.scm (sim-finish!): Update calls to define-full-insn.
5739 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5740 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5741 * sid.scm (sim-finish!): Update call to define-full-insn.
5743 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5745 * Makefile.am (sim-cpu): Allow specification of ISA.
5746 * Makefile.in: Rebuild.
5748 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5750 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5752 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5754 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5756 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5758 * attr.scm (atlist?): New proc.
5759 (-attr-eval): Rewrite.
5760 (attr-parse): New proc.
5761 (atlist-parse): Use it.
5763 * decode.scm (exprtable-entry-make): New proc.
5764 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5765 (exprtable-make,exprtable-insns): New procs.
5767 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5769 (hardware-builtin!): Make h-memory a vector.
5771 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5772 All callers updated.
5773 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5775 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5777 (-insn-parse): Set semantics to #f if not specified.
5778 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5780 (-parse-insn-format): Recognize `=' iformat spec.
5782 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5783 (isa-max-insn-bitsize): Ditto.
5785 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5787 (<ifield>,gen-extract): Ditto.
5788 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5789 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5790 (gen-define-ifmt-ifields): New proc.
5791 (gen-semantic-code): Rewrite.
5792 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5793 (-gen-decoder-switch): Handle expression tables.
5794 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5796 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5797 instead of gen-define-fields.
5798 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5800 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5801 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5802 (-gen-ifld-extract-beyond): Ditto.
5803 (<multi-ifield>,gen-ifld-extract): Ditto.
5804 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5805 rtl evaluation code.
5806 (op:read): Build an <eval-state> to pass to gen-read.
5807 (op:write): Build an <eval-state> to pass to gen-write.
5808 (op:record-profile): Build an <eval-state> to pass to
5810 * sim-cpu.scm (gen-semantic-code): Rewrite.
5811 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5813 (-gen-ifld-extract-beyond): Ditto.
5814 (<multi-ifield>,gen-ifld-extract): Ditto.
5815 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5816 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5817 rtl evaluation code.
5818 (op:read): Build an <eval-state> to pass to gen-read.
5819 (op:write): Build an <eval-state> to pass to gen-write.
5820 (op:record-profile): Build an <eval-state> to pass to
5823 * operand.scm (<operand>): Give `selector' default value of #f.
5824 Give `num' default value of -1. Give `cond?' default value of #f.
5825 (op:new-mode): Delete arg `set?', all uses updated.
5827 * read.scm (reader-error): Handle #f return from port-filename.
5828 (-init-parse-cpu!): Call rtl-c-init!.
5829 (reader-install-builtin!): Call rtl-builtin!.
5831 * rtl-c.scm: New file.
5832 * semantics.scm: New file.
5833 * read.scm: Load them.
5834 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5836 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5838 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5839 (-rtx-num-text,-rtx-max-num): New globals.
5840 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5841 (-rtx-macro-lookup): New proc.
5842 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5843 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5844 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5845 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5846 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5847 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5848 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5849 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5850 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5851 (rtx-pretty-name): New proc.
5852 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5853 (rtx-traverse-*): Rewrite rtx traversing.
5854 (rtx-eval-*): Rewrite rtx evaluation.
5855 (rtx-compile): New proc.
5856 (rtx-simplify): New proc.
5857 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5858 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5859 (ifield,index-of): Rewrite.
5860 (name): Renamed from `operand:'.
5861 (operand,xop,local): New rtx's.
5862 (current-insn): Rewrite.
5863 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5864 (cgen-hob.h): Remove rule for.
5865 (cgen-hob.o): Depend on cgen-hob.c only.
5866 * Makefile.in: Rebuild.
5868 * utils-cgen.scm (vmake): New proc.
5869 (<context>): New class.
5870 (context-make-prefix,context-error): New procs.
5872 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5874 * i960.cpu: Add some ??? comments.
5875 (xnor, ornot): New instructions.
5876 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5878 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5880 * cos.scm (-object-error): Print better error message.
5882 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5883 (-pmacro-env-ref): Renamed from -env-ref.
5885 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5887 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5889 (hardware-builtin!): Delete h-pc builtin.
5890 * arm.cpu (h-pc): Define.
5891 (h-gr): Delete get,set specs. Make array of 16 regs again.
5892 * arm7.cpu (set-logical-cc-maybe): Delete.
5893 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5894 (data processing insns): Rewrite.
5895 * m32r.cpu (h-pc): Define.
5896 * fr30.cpu (h-pc): Define.
5897 * i960.cpu (h-pc): Define.
5898 * sparc.cpu (h-pc): Define.
5900 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5901 (s-parallel): Replace do {...} while (0) with {...}.
5902 (s-sequence): Ditto.
5904 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5906 (-gen-write-case,-gen-sem-case): Ditto.
5907 (-gen-sem-case): Only specify `written' if profiling or
5908 parallel-write-back.
5909 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5910 (-gen-sem-switch-fn): New proc.
5911 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5912 based on with-sem-switch option.
5913 * sid-decode.scm (-gen-decode-insn-globals): Only define
5914 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5915 addresses in idesc_table if !with-sem-switch.
5916 (-gen-sem-fn-decls): Rewrite.
5917 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5918 member based on with-sem-switch. Only define
5919 `idesc_table_initialized_p' member if with-sem-switch.
5920 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5921 * sid.scm (-with-sem-switch?): New variable.
5922 (option-init!): Initialize it.
5923 (option-set!): Set it.
5924 (with-sem-switch?): New proc.
5925 (-op-gen-set-trace): Only emit `written' reference if profiling.
5926 (sim-finish!): Use h_pc_set to set pc.
5928 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5930 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5931 All callers updated.
5932 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5934 * sid.scm (gen-argbuf-type): Delete.
5935 (-gen-argbuf-fields-union): Move to ...
5936 * sid-decode.scm: ... here.
5938 * read.scm (-reader-process-expanded-1): New proc.
5939 (-reader-process-expanded): Call it to catch nested begin's.
5940 (reader-process): Move `begin' handling to -reader-process-expanded.
5942 * insn.scm (-insn-read): Fix name of `format' spec.
5944 * pmacros.scm (.pmacro): New builtin.
5945 (scan-symbol): If procedure macro, return macro rather than its symbol.
5946 (check-macro): Don't do lookup, instead check if (car expr) is
5948 (scan-list): Handle .pmacro.
5949 (scan): No longer re-examine text for another macro invocation.
5950 (-pmacro-build-lambda): New proc.
5951 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5952 another, fetch the other's value (rather than doing it during
5955 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5957 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5958 * Makefile.in: Rebuild.
5960 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5961 (-fill-slot!): Simplify.
5962 (-build-slots): Simplify.
5964 * dev.scm (load-sid): Don't load sid-arch.scm.
5966 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5968 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5971 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5973 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5974 * decode.scm: ... here. New file.
5975 * sid-decode.scm: Use decoder computation code in decode.scm.
5976 * read.scm: Load decode.scm.
5978 * arm.cpu (arm710 model): Add u-exec function unit.
5979 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5980 Add get/set specs to redirect reg 15 to h-pc.
5981 (h-*): Indicate for both ARM and THUMB isas.
5982 (cbit,nbit,vbit,zbit): Ditto.
5983 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5984 (h-cpsr): Make virtual. Add get/set specs.
5985 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5986 (h-spsr): New virtual reg.
5987 * arm7.cpu (shift-type): New explicitly defined keyword.
5988 (h-operand2-shifttype): Use it.
5989 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5990 All callers updated. Don't set cbit.
5991 (logical-op): Add rm to ifield list. Change case to case:. Use
5992 shift-type enum as case choices. Set cbit.
5993 (and,orr,eor,add-imm): Uncomment out.
5994 (undefined): Temporarily comment out.
5995 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5996 (lda-pc,lda-sp): Ditto.
5997 (ldr-pc): Rename from ldr.
5998 (cbranch): Mark insns as being thumb insns.
6000 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
6002 * cgen-sid.scm: Don't load sid-arch.scm.
6003 (sim-arguments): Delete unused entries.
6004 * sid-arch.scm: Delete.
6006 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
6007 (<insn>,ifld-assertions): New member.
6008 (<insn>,make!): New arg ifld-assertions, all callers updated.
6009 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
6010 (insn:fields): Delete.
6011 (-insn-parse): New arg ifld-assertions. All callers updated.
6012 (-insn-read,define-insn): New procs.
6013 (define-full-insn): New arg ifld-assertions. All callers updated.
6014 (insn-init!): New comment define-insn.
6016 * model.scm (-model-parse): Ensure at least one unit specified.
6018 * rtl.scm (-rtx-traverse-operands): Recognize environments.
6019 (<c-expr-temp>,get-name): New method.
6020 (-rtx-make-current-closure,s-closure): New proc.
6021 (hw:): Wrap rtx indices in a closure.
6022 (-gen-case-prefix): New proc.
6024 * rtx-funcs.scm (case:): Fix call to s-case.
6025 (closure): New rtx func.
6027 * hardware.scm (<hardware-base>): New member isas-cache.
6028 (<hardware-base>,get-isas): New method.
6029 (hardware-builtin): Indicate for all isas.
6030 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
6031 * mach.scm (current-arch-mach-name-list): Return list of names.
6032 (current-isa-mach-name-list): Ditto.
6033 (define-arch): Install builtin objects here.
6034 * read.scm (keep-atlist?): Only keep if both mach and isa are
6036 (keep-mach-atlist?): New proc.
6037 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
6038 (reader-install-builtin!): Renamed from -install-builtin!.
6039 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
6040 -gen-cpu-reg-access-defns. Rewrite.
6041 (gen-reg-access-defn): Delete.
6042 (-gen-hardware-struct): New proc.
6043 (-gen-hardware-types): Simplify. Add multiple-isa support.
6044 (gen-semantic-fn,-gen-all-semantics): Delete.
6045 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
6046 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
6047 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
6048 Call sem-analyze-insns!.
6049 (cgen-semantics.cxx): Add multiple-isa support.
6050 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
6051 (-gen-scache-decls,-gen-decode-fn): Ditto.
6052 (cgen-decode.h): Call sem-analyze-insns!.
6053 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
6054 * sid.scm (-with-multiple-isa?): New variable.
6055 (option-init!): Initialize it.
6056 (option-set!): Set it.
6057 (with-multiple-isa?): New proc.
6058 (gen-cpu-ref): New arg isas. All callers updated.
6059 (gen-cpu-class): New proc.
6060 (*-get-macro,*-set-macro): Delete.
6061 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
6062 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
6063 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
6064 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
6065 (-sim-insns-analyzed): New global variable.
6066 (sim-init!): Reset it.
6067 (sim-analyze-insns!): New proc.
6068 (sim-analyze!): Don't do instruction analysis here.
6069 (sim-finish!): Specify isa of x-invalid insn.
6070 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
6072 1999-03-22 Doug Evans <devans@casey.cygnus.com>
6074 * thumb.cpu (cpu,mach,model): Delete.
6075 (dntf): New pmacro. Use it for all field definitions.
6076 (dntop): New pmacro. Use it for all operand definitions.
6077 (asr): Correct field list.
6078 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
6080 * utils-cgen.scm (define-getters): New macro to simplify
6081 writing class accessors.
6082 (define-setters): Ditto.
6083 (sanitize): Recognize isa elements.
6085 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
6086 state-parallel-exec?.
6087 * sid-model.scm (*): Ditto.
6088 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
6089 state-decode-assist.
6091 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
6092 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
6093 * sim-decode.scm (-gen-decode-switch): Ditto.
6095 * sim-arch.scm (-regs-for-access-fns): Delete.
6096 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
6097 (-gen-arch-reg-access-defns): Delete.
6099 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
6100 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
6101 with state-parallel=exec?.
6102 (cgen-*): Call sim-analyze-insns! here.
6103 * sim-decode.scm (cgen-*): Ditto.
6104 * sim-model.scm (cgen-*): Ditto.
6105 * sim.scm (-sim-insns-analyzed): New global variable.
6106 (sim-init!): Reset it.
6107 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
6108 already done the analysis.
6110 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
6113 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
6114 (arm arch): Update isa spec.
6115 (arm,thumb isas): Define.
6116 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
6117 (arm7tdmi mach): Add isa spec.
6118 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
6119 `const' on word number.
6120 * fr30.cpu (fr30 arch): Update isa spec.
6122 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6124 * i960.cpu (i960 arch): Update isa spec.
6126 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6127 liw-insns,parallel-insns moved to isas spec.
6128 * m32r.cpu (m32r arch): Update isas spec.
6130 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
6131 liw-insns,parallel-insns moved to isa spec.
6132 * sparc.cpu (sparc arch): Update isas spec.
6133 (sparc isa): Define.
6134 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
6135 decode-assist moved to isa spec.
6136 * sparc64.cpu (sparc64 cpu): Ditto.
6137 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
6138 * desc-cpu.scm (-gen-isa-table-defns): New proc.
6139 (-gen-mach-table-defns): Output mach table.
6140 (-gen-hash-defines): Delete insn size macros, except for
6142 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
6143 (cgen-desc.h): Define MAX_ISAS.
6144 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
6145 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
6146 (arch-* accessors): Renamed from arch:*. All callers updated.
6147 (current-arch-isa-name-list): New proc.
6148 (-arch-parse-isas): Renamed from -arch-parse-isa.
6149 (def-isa-attr!): Rewrite.
6150 (<iframe>): New class.
6151 (<itype>): New class.
6153 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
6154 (isa-integral-insn?,isa-parallel-exec?): New procs.
6155 (-isa-parse,-isa-read,define-isa): New proc.
6156 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
6157 liw-insns moved to <isa>.
6158 (cpu-* accessors): Renamed from cpu:*. All callers updated.
6159 (-cpu-parse,-cpu-read): Update.
6160 (state-*): Renamed from state:*. All callers updated.
6161 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
6163 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
6164 (state-decode-assist): New proc.
6165 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
6166 (-adata-set-derived!): Rewrite.
6167 (adata-integral-insn?): Renamed from adata:integral-insn?. All
6169 (arch-init!): Add define-isa command.
6170 * read.scm (<reader>): Default keep-isa member to (all).
6171 (reader-* accessors): Renamed from reader:*. All callers updated.
6172 (-keep-isa-set!): Call string->symbol on isa name list.
6173 (keep-isa-validate!): Rewrite.
6174 (current-isa): New proc.
6175 (keep-isa?): Recognize "all".
6176 (-init-parse-cpu!): New arg keep-isa. All callers updated.
6177 Call -keep-isa-set!.
6178 (cmd-if): Recognize keep-isa?.
6179 (cpu-load): New arg keep-isa. All callers updated.
6180 (-opt-spec-update): New proc.
6181 (common-arguments): First arg is string, not symbol.
6182 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
6184 * rtl.scm (rtx-get): Default mode of string arg is INT.
6186 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
6188 * rtx-funcs.scm (join:): Pass cpu to handler.
6190 * configure.in (guile_include_dir): Delete.
6191 * configure: Rebuild.
6192 * Makefile.in: Rebuild.
6193 * doc/Makefile.in: Rebuild.
6195 * sid-cpu.scm (-extract-chunk-specs): New proc.
6196 (gen-define-fields): Use it.
6197 (-extract-chunk): New proc.
6198 (-gen-extract-beyond-var-list): Use it.
6199 (gen-extract-fields): Simplify.
6201 1999-03-22 Ben Elliston <bje@cygnus.com>
6203 * arm7.cpu (ldri-p): New instruction.
6204 (swi): Do not vector through 0x8 yet--there is nothing there.
6207 (all): Use (const x) in subreg expressions.
6209 1999-03-19 Ben Elliston <bje@cygnus.com>
6211 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
6214 1999-03-17 Doug Evans <devans@casey.cygnus.com>
6216 * fr30.cpu (define-arch): Specify "forced" default-alignment.
6217 * mach.scm (-parse-alignment): Recognize "forced" alignment.
6218 * sim-cpu.scm (-extract-chunk-specs): New proc.
6219 (gen-define-fields): Use it.
6220 (-extract-chunk): New proc.
6221 (-gen-extract-beyond-var-list): Use it.
6222 (gen-extract-fields): Simplify.
6224 Port to guile 1.3.1.
6225 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
6226 (LIBIBERTY): New var.
6227 (HOB_OBJS): Add cgen-gh.o.
6228 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
6229 * Makefile.in: Rebuild.
6230 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
6231 * config.in: Rebuild.
6232 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
6233 libncurses, libtermcap.
6234 Add checks for needed functions in guile 1.2 not in guile 1.3,
6235 and vice versa. Add test for 3 argument scm_make_vector.
6236 * configure: Rebuild.
6237 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
6238 definitions if guile doesn't have them.
6239 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
6240 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
6241 with gh_vector_set_x.
6242 (cgh_qsort): Replace gh_list_length with gh_length.
6243 * cgen-gh.h: Add decls for added functions.
6244 (cgh_qsort): Don't declare if IN_HOBBIT.
6245 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
6246 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
6247 scm_make_vector with gh_make_vector.
6248 * cos.scm: Use vector-length instead of length on vectors.
6249 * dev.scm (cload): Make varargs proc with keyword/value args.
6250 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
6251 provide version that works with guile 1.2 or 1.3.
6252 Include private copy of scmhob.h.
6253 * scmhob.h: New file. Keep our own copy for now.
6255 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
6257 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
6259 (-rtx-traverse-operands): Dump cx temp stack if debugging.
6260 (-cx-temp-dump-stack): Pretty up output.
6262 * arm.cpu: comment out thumb.cpu until isa support ready.
6263 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
6264 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
6265 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
6267 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6269 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6271 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
6272 (<hw-address>,mode-ok?): unsigned/signed are compatible.
6274 * operand (op:new-mode): Improve error message.
6276 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
6277 * arm7.cpu: New file.
6279 1999-03-12 Ben Elliston <bje@cygnus.com>
6281 * arm.cpu: Lots of minor fixes after desk checking.
6283 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6285 * thumb.cpu: snapshot of current work
6287 * rtl.scm (rtx-get): Tweak error message.
6289 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6291 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6292 * Makefile.in: Rebuild.
6294 * cos.c (cos_vector_copy): New function.
6295 (_object_copy): Use it.
6297 * mode.scm (mode:eq?): Clean up.
6298 * rtl.scm (cx-new-mode): Copy attributes.
6299 (rtx-get): Don't make copy if <c-expr> with identical mode.
6301 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6303 (gr-names): h-gr register names moved here.
6305 (cr-names): h-cr register names moved here.
6307 (dr-names): h-dr register names moved here.
6309 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6310 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6311 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6313 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6315 (gr-names): h-gr register names moved here.
6317 (cr-names): h-cr register names moved here.
6319 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6320 (h-accums,h-psw): Ditto.
6321 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6323 (gr-names): h-gr register names moved here.
6324 (h-gr-indices): Delete.
6325 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6326 (sparc64 h-gr): Ditto.
6327 (h-y): Add get/set specs.
6329 (fp operands): Rewrite.
6330 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6331 (h-tbr,h-cwp,h-wim): Ditto.
6332 * sparc64.cpu (h-fpsr): Add get/set specs.
6333 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6334 (fp-ld-op): New arg `dest', all callers updated.
6335 (*): Replace `make-di' with `join'.
6337 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6339 (gen-semantic-code): Save/restore rtl generator state.
6340 (cgen-cpu.h): Call rtl-gen-init!.
6341 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6342 (-gen-ifld-extract-beyond): Ditto.
6343 (<multi-ifield>,gen-ifld-extract): Ditto.
6344 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6346 (-hw-gen-set-quiet-pc): Ditto.
6347 (<hw-pc>,gen-write): Ditto.
6348 (-hw-cxmake-get): Ditto. Call getter function if present.
6349 (<hw-register>,cxmake-get-raw): New method.
6350 (<hw-register>,gen-set-quiet-raw): New method.
6351 (-hw-gen-set-quiet): New arg `gstate'.
6352 (hw-fun-access?): Delete.
6353 (gen-reg-access-defn): Output function contents.
6354 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6356 (-gen-hw-index): Ditto.
6357 (op:read): Update gen-read invocation.
6358 (op:write): Update gen-write invocation.
6359 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6361 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6362 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6363 (<unit>,gen-profile-code): Update to sim.scm version.
6365 * sim-arch.scm (-regs-for-access-fns): New proc.
6366 (-biggest-reg-mode): New proc.
6367 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6368 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6369 virtual regs separately.
6370 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6372 (gen-semantic-code): Save/restore rtl generator state.
6373 (cgen-cpu.h): Call rtl-gen-init!.
6374 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6375 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6376 renamed to mach-bfd-name.
6377 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6378 (-gen-ifld-extract-beyond): Ditto.
6379 (<multi-ifield>,gen-ifld-extract): Ditto.
6380 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6381 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6382 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6384 (hw-fun-access?): Delete.
6385 (-hw-gen-set-quiet-pc): New arg `gstate'.
6386 (<hw-register>,gen-get-macro): Rewrite.
6387 (<hw-register>,gen-set-macro): Rewrite.
6388 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6389 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6390 (<hw-register>,cxmake-get-raw): New method.
6391 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6392 (<hw-register>,gen-set-quiet-raw): New method.
6393 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6395 (-gen-hw-index): Ditto.
6396 (<hw-index>): New arg `gstate'.
6397 (-gen-hw-selector): Update call to rtx-c.
6398 (<pc>): New arg `gstate'.
6399 (op:read): Update gen-read invocation.
6400 (op:write): Update gen-write invocation.
6401 (<operand>,cxmake-get): Handle raw-reg.
6402 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6403 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6404 (<operand>,gen-set-quiet): Handle raw-reg.
6405 (<operand>,gen-set-trace): Handle raw-reg.
6406 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6408 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6409 cgen_operand_type enum.
6410 (gen-operand-table): Add operand type enum. Replace pointer to
6411 hardware element with its enum. Null terminate table.
6412 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6413 Build operand table.
6414 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6415 * mach.scm (<arch-data>): New member `isas'.
6416 (adata-isas): New accessor.
6418 (isa-default-insn-word-bitsize): New accessor.
6419 (isa-enum): New proc.
6420 (current-arch-default-insn-word-bitsize): Delete.
6421 (current-isa-list,current-isa-lookup): New procs.
6422 (-arch-parse-isa): New proc.
6423 (-arch-parse): Rewrite.
6424 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6425 (define-arch): Define ISA attribute.
6426 (def-isa-attr!,isa-supports?): New procs.
6427 (<mach>): New member `isas'.
6428 (mach-isas): New accessor.
6429 (-mach-parse): New arg `isas', all callers updated.
6430 (-mach-read): Recognize `isas'.
6431 (arch-finish!): Rewrite.
6432 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6433 @arch@_cgen_get_{int,vma}_operand.
6434 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6435 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6436 of pointer to table entry.
6437 * opcodes.scm (gen-switch): Handle multiply defined operands.
6438 * operand.scm (op-sort): New proc.
6440 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6441 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6442 (hw-enum): Accept symbol argument.
6443 (hardware-builtin!): Delete attribute FUN-ACCESS.
6444 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6446 * attr.scm (atlist-source-form): New proc.
6447 (attr-builtin!): New attr `PRIVATE'.
6448 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6449 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6450 if they have `PRIVATE' attribute.
6451 (gen-hw-table-defns): Output definitions of explicitly defined
6453 * hardware.scm (<keyword>): New member print-name. Rename member
6454 `value' to `values', all uses updated.
6455 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6456 (keyword-parse): Rewrite.
6457 (-keyword-read): New proc.
6458 (define-keyword): New proc.
6459 (-hw-parse-keyword): New proc.
6460 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6462 (-hw-parse-values): Ditto.
6463 (-hw-parse-get,-hw-parse-set): Rewrite.
6464 (hardware-init!): Add new comment define-keyword.
6465 * mach.scm (<arch>): New member `kw-list'.
6466 (arch:kw-list,arch_set-kw-list!): New accessors.
6467 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6469 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6470 * mode.scm (mode-class-integral?): New proc.
6471 (mode-class-float?,mode-class-numeric?): New procs.
6472 (mode-integral?,mode-float?,mode-numeric?): New procs.
6473 (mode-compatible?): New proc.
6474 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6476 (<ifield>,gen-extract): Ditto.
6477 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6478 (<gstate>): New class.
6479 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6480 (gstate-context,gstate-set-context!): New accessors.
6481 (gstate-macro?,gstate-set-macro?!): New accessors.
6482 (gstate-make,gstate-copy): New procs.
6483 (-rtl-current-gstate): New global.
6484 (current-gstate-simulator?): New proc.
6485 (current-gstate-context,current-gstate-macro?): New procs.
6486 (current-gstate,current-gstate-set!): New procs.
6487 (rtl-gen-init!): Rewrite.
6488 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6489 (tstate-make): New arg `gstate', all callers updated.
6490 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6491 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6492 (tstate-gstate,tstate-set-gstate!): New accessors.
6493 (tstate-copy): New proc.
6494 (tstate-new-cond?,tstate-new-set?): Rewrite.
6495 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6496 (rtx-traverse): New arg `gstate', all callers updated.
6497 (rtx-strdump): New proc.
6498 (-simplify-for-compilation): New arg `gstate', all callers updated.
6499 (semantic-in-out-operands): Ditto.
6500 (semantic-attrs): Ditto.
6501 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6502 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6503 (rtx-value): Rewrite.
6504 (<c-expr>,gen-name): New method.
6505 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6506 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6507 (cx-new-mode): New proc.
6508 (-rtx-c-with-tstate): New proc.
6509 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6511 (-rtx-mode): Rewrite.
6512 (-rtx-mode-compatible?): New proc.
6513 (<c-expr-temp>): New member `value'.
6514 (cx-temp:value): New accessor.
6515 (<c-expr-temp>,make!): Override default method.
6516 (<c-expr-temp>,cxmake-get): Rewrite.
6517 (<c-expr-temp>,gen-set-quiet): Rewrite.
6518 (<c-expr-temp>,gen-set-trace): Rewrite.
6519 (gen-temp-defs): Use cx-temp:value.
6520 (record-temp!): New arg value, all callers updated.
6521 (cx-temp:cx:make): Delete.
6522 (-cx-temp-dump-stack): New proc.
6523 (rtx-get): New arg `gstate', all callers updated. Do mode
6524 compatibility checks. Ensure result has specified mode.
6525 (rtx-set-quiet): New arg `gstate', all callers updated.
6526 (rtx-set-trace): Ditto.
6527 (s-c-call): New arg `tstate', all callers updated.
6528 (s-c-raw-call): Ditto.
6529 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6530 (s-cmpop,s-if,e-if): Ditto.
6531 (s-subreg): New proc.
6532 (-par-new-temp!): New proc.
6533 (-par-next-temp!): Rewrite.
6534 (-par-replace-set-dests): Use -par-new-temp!.
6535 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6536 (s-sequence): Use -rtx-c-with-state.
6537 * rtx-funcs.scm (*): Update.
6538 (raw-reg:): New rtx function.
6540 (join:,subreg:): New rtx functions.
6542 * insn.scm (<insn>): New members pre-cond-trap, condition,
6543 post-cond-trap, compiled-condition.
6545 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6547 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6549 * utils-cgen.scm (parse-symbol): New proc.
6550 (parse-string): New proc.
6551 (gen-get-macro,gen-set-macro): New arg `index-args'.
6552 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6553 Prepend \ to newlines.
6555 * utils.scm (alist-remove-duplicates): Delete.
6557 * sid.scm (sim-init!): Delete private debugging code.
6559 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6561 * cgen-sid.scm: New file for C++ simulator application.
6562 * sid-arch.scm: Ditto.
6563 * sid-cpu.scm: Ditto.
6564 * sid-decode.scm: Ditto.
6565 * sid-model.scm: Ditto.
6567 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6569 1999-03-05 Ben Elliston <bje@cygnus.com>
6571 * arm.cpu: New file.
6573 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6575 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6576 * Makefile.in: Rebuild.
6578 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6579 (-attr-parse): Validate default value.
6581 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6582 (-CGEN-LANG-VERSION): Ditto.
6583 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6584 (<reader>): New member keep-isa plus accessors.
6585 (-keep-isa-set!,keep-isa-validate!): New procs.
6586 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6587 (common-arguments): New variable.
6588 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6589 (-debug-repl,continue): New procs.
6590 (-cgen,cgen): New procs.
6591 * cgen-gas.scm: Rewrite.
6592 * cgen-opc.scm: Rewrite.
6593 * cgen-sim.scm: Rewrite.
6594 * cgen-stest.scm: Rewrite.
6596 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6597 (gas-test-finish!): Call opcodes-finish!.
6598 (gas-test-analyze!): Call opcodes-analyze!.
6599 (<hw-asm>): New method test-data.
6600 (<operand>,testdata): Rewrite.
6601 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6602 (sim-test-finish!): Call opcodes-finish!.
6603 (sim-test-analyze!): Call opcodes-analyze!.
6604 (<hw-asm>): New method test-data.
6605 (<operand>,testdata): Rewrite.
6607 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6609 * fixup.scm (reverse!): Define if missing.
6610 * *.scm: Use reverse! instead of list-reverse!.
6612 * utils.scm (leading-id-char?): New proc.
6613 (id-char?): Rewrite.
6614 (chars-until-delimiter): New proc.
6615 * opc-itab.scm (extract-syntax-operands): Rewrite.
6616 (strip-mnemonic): Rewrite.
6617 (compute-syntax): Rewrite.
6619 * pmacros.scm (-pmacro-substr): New proc.
6620 (pmacros-init!): Add builtin .substr.
6622 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6624 * thumb.cpu: New file.
6626 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6628 * Makefile.am (CGENCFLAGS): New variable.
6629 (WITH_HOBBIT): Use automake conditional.
6630 (CGEN_HOB_SRC): New variable.
6631 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6632 (*.o): Compile with CGENCFLAGS.
6633 (cgen-hob.c): Simplify.
6634 (cgen-nohob.c): New rule.
6635 (hobbit): Renamed from hob.x.
6636 (CLEANFILES): Add cgen-nohob.c.
6637 * Makefile.in: Rebuild.
6638 * doc/Makefile.in: Rebuild.
6639 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6640 (WITH_HOBBIT): Use AM_CONDITIONAL.
6641 * configure: Rebuild.
6642 * aclocal.m4: Rebuild.
6644 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6645 with string-write-map.
6647 * sim-cpu.scm (hw-need-storage?): New proc.
6648 (-gen-hardware-types): Use it.
6649 (gen-parallel-exec-elm): Call op-save-index?.
6651 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6653 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6655 (-gen-ifld-extract-beyond): Ditto.
6656 (<integer>): Delete all references.
6657 (<sim-hardware>): Delete.
6658 (hw-profilable?): New proc.
6659 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6660 (<hw-register>): Rename method get-index-mode to save-index?.
6661 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6662 (<hw-register>,gen-sym-decl): Make virtual.
6663 (<hw-memory>,gen-sym-decl): Make virtual.
6664 (<hw-memory>): Rename method get-index-mode to save-index?.
6665 (<hw-address>,gen-sym-decl): Make virtual.
6666 (<operand>): New method save-index?.
6667 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6669 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6670 prefix added. All uses updated.
6672 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6673 rather than pointer to table entry.
6675 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6676 Remove all hw-asm,op-asm support.
6677 (-gen-parse-number,-gen-parse-address): New procs.
6678 (<keyword>,gen-parse): Redo function name computation.
6679 (<keyword>,gen-print): Ditto.
6680 (<operand>,gen-function-name): Rewrite.
6681 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6682 (opcodes-init!): Delete call to add-parser!.
6684 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6685 Define enum using hardware semantic name.
6686 (-gen-hw-decl,-gen-hw-defn): New procs.
6687 (gen-hw-table-decls): Use -gen-hw-decl.
6688 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6689 CGEN_HW_ENTRY structs.
6690 (gen-operand-table): Output hw's enum, not pointer to table entry.
6691 (-gen-cpu-open): Build table of selected hardware elements.
6693 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6694 (<hardware> support): Delete.
6695 (<hw-asm>): Delete, moved to hardware.scm.
6696 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6697 (<hw-asm>,gen-table-entry): New method.
6698 (<hw-asm>,parse!): Delete.
6699 (<keyword>,gen-table-entry): New method.
6700 (<keyword>,parse!): Delete.
6701 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6702 for gen-decl,gen-defn,gen-ref,gen-init.
6703 (desc-init!): Don't create parser for operand asm specs.
6705 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6706 * ifield.scm (<ifield>): New member `mode'.
6707 (<ifield>,make!): New arg `mode'.
6708 (ifld-mode): Rewrite.
6709 (ifld-hw-type): Rewrite.
6710 (<ifield>,min-value): Rewrite.
6711 (<ifield>,max-value): Rewrite.
6712 (-ifield-parse): New arg `mode'.
6713 (-ifield-read): Update.
6714 (define-full-ifield): New arg `mode'.
6715 (define-full-multi-ifield): Ditto.
6716 (-multi-ifield-parse): Ditto.
6717 (-multi-ifield-read): Update.
6718 (define-full-multi-ifield): New arg `mode'.
6719 (ifield-builtin!): Update definition of f-nil.
6720 * simplify.inc (define-normal-ifield): Update call to
6722 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6723 (define-normal-hardware): Delete arg asm. New args indices, values,
6724 handlers. Update call to define-full-hardware.
6725 (define-simple-hardware,dsh): New pmacros.
6726 (define-normal-operand): Update call to define-full-operand.
6727 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6728 Specify INT/UINT mode instead.
6729 (h-gr,h-cr): Use "indices" instead of "asm".
6730 (h-dr,h-ps): Update keyword syntax.
6731 (h-r13,h-r14,h-r15): Ditto.
6732 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6733 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6734 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6735 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6736 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6737 Specify INT/UINT mode instead.
6738 (h-gr): Use "indices" instead of "asm".
6739 (h-cc): Update keyword syntax.
6740 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6741 Specify INT/UINT mode instead.
6742 (h-hi16,h-slo16,h-ulo16): Update.
6743 (h-gr,h-cr): Use "indices" instead of "asm".
6744 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6745 (h-accums): Update keyword syntax.
6746 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6747 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6748 Specify INT/UINT mode instead.
6749 (h-gr-indices): New pmacro.
6750 (h-gr32,h-gr64): Split up from h-gr.
6751 (h-a): Update type spec. Use values instead of asm spec.
6752 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6753 (h-y,h-annul-p): Ditto.
6754 (h-asr): Update keyword spec.
6755 (h-lo10,h-lo13,h-hi22): Update.
6756 (get-freg-spec,set-freg-spec): New pmacros.
6757 (h-fr32,h-fr64): Split up from h-fr.
6758 (rdd): Comment out get/set specs.
6759 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6760 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6761 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6762 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6763 UNSIGNED. Specify INT/UINT mode instead.
6764 (h-*): Use dsh instead of dnh where appropriate.
6765 (h-ixcc): Update type spec. Use "values" instead of "asm".
6766 (h-p,h-membarmask): Ditto.
6767 (membarmask): Use "handlers" instead of "asm".
6769 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6770 values,handlers,getters,setters plus accessors.
6771 (hw-mode-ok?,hw-default-mode): New procs.
6772 (<hardware-base>): Rename method new-mode to mode-ok?
6773 (<hardware-base>): New method get-index-mode.
6774 (hw-index-mode): New proc.
6775 (pc?): Delete, moved to operand.scm.
6776 (address?): New proc.
6777 (<hardware>): Delete.
6778 (<hw-asm>): Definition moved here from desc.scm.
6779 (keyword-parse): New proc.
6780 (hardware-parsers): Delete.
6781 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6782 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6783 (-hw-parse-get,-hw-parse-set): New procs.
6784 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6785 indices,values,handlers,get,set. Rewrite.
6786 (-hw-read-extra): Delete.
6788 (define-hardware): Don't add object if not selected.
6789 (define-full-hardware): Ditto.
6790 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6791 (<hw-register>): Member `type' moved to baseclass. Delete member
6793 (<hw-register>,parse!): Rewrite.
6794 (<hw-register>): Delete methods get-rank,get-mode.
6795 (<hw-register>): Method new-mode renamed to mode-ok?
6796 (<hw-register>): New method get-index-mode.
6797 (<hw-pc>,parse!): Rewrite.
6798 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6799 (<hw-memory>,parse!): Rewrite.
6800 (<hw-memory>): Delete methods get-rank,get-mode.
6801 (<hw-memory>): Method new-mode renamed to mode-ok?
6802 (<hw-memory>): New method get-index-mode.
6803 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6805 (<hw-immediate>,parse!): Rewrite.
6806 (<hw-immediate>): Delete methods get-rank,get-mode.
6807 (<hw-immediate>): Method new-mode renamed to mode-ok?
6808 (<hw-address>): Delete member hw-asm.
6809 (<hw-address>,parse!): Rewrite.
6810 (<hw-address>): Delete methods get-rank,get-mode.
6811 (<hw-address>): Method new-mode renamed to mode-ok?
6812 (hw-profilable?): Delete.
6813 (hardware-init!): Delete hardware-parsers reference.
6814 Update argument specs of command define-full-hardware.
6815 (hardware-builtin!): Update definitions of hardware builtins.
6816 * operand.scm (<operand>): New members hw-name,mode-name.
6817 Delete member op-asm. New member handlers.
6818 (<operand>,make!): Update.
6819 (op:hw-name,op:mode-name,op:handlers): New procs.
6822 (<operand>): New method get-index-mode.
6823 (<pc>,make!): Update.
6824 (op:new-mode): Rewrite.
6825 (operand-parsers): Delete.
6826 (-operand-parse): Rewrite. Return #f if insn not selected.
6827 (-op-read-extra): Delete.
6828 (-operand-read): Update.
6829 (define-operand,define-full-operand): Update.
6830 (operand-init!): Delete operand-parsers reference.
6831 Update syntax of define-full-operand command.
6833 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6834 (define-full-insn): Update.
6835 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6836 (define-full-minsn): Update.
6838 * mode.scm (<mode>): New member class.
6839 (mode:class): New proc.
6841 (-mode-parse): New arg class.
6842 (define-full-mode): Update.
6843 (mode-find): Rewrite.
6844 (mode-make-int,mode-make-uint): New procs.
6845 (mode-init!): Update syntax of define-full-mode command.
6846 (mode-builtin!): Update definitions of builtin modes.
6848 * model.scm (<profile>): Delete.
6850 * read.scm (keep-atlist?): New proc.
6851 (keep-multiple?): New proc.
6852 (<parser-list>): Delete.
6853 (add-parser!,parse-spec!): Delete.
6855 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6856 (def-rtx-syntax-node): Ditto.
6857 (-rtx-traverse-debug?): New variable.
6858 (tstate-make): New proc.
6859 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6860 (tstate-new-cond?,tstate-new-set?): New procs.
6861 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6862 tstate. All callers updated.
6863 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6864 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6865 (-build-operand!): Replace arg cond? with tstate.
6866 (-build-reg-operand!,-build-mem-operand!): Ditto.
6867 (-build-index-of-operand!): Update making of <operand> object.
6868 (s-ifield): New arg tstate. All callers updated.
6869 (hw:): New arg tstate. All callers updated. Replace call to
6870 current-hw-lookup with current-hw-sem-lookup-1.
6871 (s-index-of): New arg tstate. All callers updated.
6873 (-rtx-use-sem-fn?): New proc.
6874 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6876 (s-convop): Only use semantic mode when using semantic cover fns.
6877 (s-cmpop): Call -rtx-use-sem-fn?.
6878 (s-cond,s-case): New arg tstate. All callers updated.
6879 (s-parallel,s-sequence): Ditto.
6881 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6883 * types.scm (<scalar>): Rewrite implementation.
6884 (<integer>): Delete.
6885 (parse-type): Rewrite.
6887 * utils-cgen.scm (parse-handlers): New proc.
6889 * utils.scm (!=): New proc.
6891 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6893 * pmacros.scm (-pmacro-expand): Fix typo.
6895 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6897 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6898 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6899 * i960.cpu (build-hex2): New pmacro.
6900 (insn-opcode): Simplify.
6901 (insn-opcode2): Ditto.
6903 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6904 * cgen-stest.scm (catch-with-backtrace): Ditto.
6906 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6908 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6909 All callers updated.
6910 (-pmacro-invoke): New proc.
6911 (-pmacro-sym,-pmacro-str): New procs.
6912 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6913 (pmacros-init!): Install builtins .iota, .map, .apply.
6914 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6915 (h-fr): Simplify register name spec.
6916 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6917 * utils.scm (num-args-ok?): New proc.
6919 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6921 * pmacros.scm (-pmacro-error): New proc.
6922 (-pmacro-expand): Use it.
6923 (-pmacro-splice): New proc.
6924 (pmacros-init!): Install new builtin .splice.
6926 * sparc.cpu: Include sparc64.cpu when appropriate.
6927 (f-mmask,f-simm11): Moved to sparc64.cpu.
6928 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6929 (ANNUL attribute): Delete.
6930 (test-* pmacros): New arg cc, all callers updated.
6931 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6932 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6934 (ldstub,swap): Moved to sparccom.cpu.
6935 * sparc64.cpu: Add more insns.
6937 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6939 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6941 (cgen-sem-switch.c): Ditto.
6942 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6943 moved to cgen-engine.h.
6944 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6945 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6946 global. Cache attributes and insn length in IDESC.
6947 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6948 @cpu@_opcode renamed to @cpu@_get_idata.
6949 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6950 done later underneath sim_resume.
6951 (@mach@_mach): Record @cpu@_prepare_run.
6952 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6954 (-hw-gen-set-quiet-pc): Ditto.
6955 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6956 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6957 (<hw-addr>,cxmake-get): Ditto.
6958 (<hw-iaddr>,cxmake-get): Ditto.
6959 (<pc>,cxmake-get): Ditto.
6960 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6961 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6962 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6963 (<hw-pc>,gen-write): Use hw-selector-default.
6964 (<hw-register>,gen-write): Ditto.
6965 (<hw-memory>,gen-write): Ditto.
6966 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6967 (-gen-hw-selector): New proc.
6969 * desc.scm: New file.
6970 * desc-cpu.scm: New file.
6971 * opcodes.scm: Split up into several smaller files.
6972 * opc-asmdis.scm: New file.
6973 * opc-ibld.scm: New file.
6974 * opc-itab.scm: New file.
6975 * opc-opinst.scm: New file.
6976 * Makefile.am (desc): New target.
6977 (opcodes): Update args to cgen-opc.scm.
6978 * Makefile.in: Rebuild.
6979 * aclocal.m4: Rebuild.
6980 * config.in: Rebuild.
6981 * configure.in: Update arg to AC_INIT.
6982 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6983 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6985 * configure: Rebuild.
6986 * cgen-gas.scm: Update files to load.
6987 * cgen-opc.scm: Ditto. Reorganize option letters.
6988 * cgen-sim.scm: Update files to load.
6989 * cgen-stest.scm: Ditto.
6990 * dev.scm (cload): New app "DESC".
6991 (load-opc): Update files to load.
6992 (load-gtest,load-sim,load-stest): Ditto.
6994 * attr.scm (bool-attr?): New proc.
6995 (attr-list-enum-list): New proc.
6996 (-attr-sort): Rewrite.
6997 (attr-builtin!): Give ALIAS attribute a fixed index.
6998 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6999 calculate attribute enum list.
7000 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
7002 * insn.scm (-insn-parse): Renamed from parse-insn.
7004 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
7007 * mode.scm (-mode-parse): Renamed from parse-mode.
7009 * operand.scm (<operand>): New member `selector'.
7010 (<operand>,make!): Use default selector.
7011 (hw-selector-default): New variable.
7012 (hw-selector-default?): New proc.
7014 * pmacros.scm (pmacros-init!): New proc.
7015 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
7016 (-env-set!): Delete.
7017 (-pmacro-expand): New proc apply-macro.
7018 Use it in scan-list,scan. Scan list first, then see if macro
7020 (define-pmacro): Rewrite.
7021 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
7023 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
7024 selected if (current-mach) seen.
7025 (rtx?): Renamed from rtx-uneval?, all callers updated.
7026 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
7028 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
7029 selector, all callers updated.
7030 (hw:): New arg selector, all callers updated. Delete old comments
7032 (reg:,mem:): Handle selectors
7033 * rtx-funcs.scm (reg:): Handle selectors.
7035 * read.scm: Renamed from cpu.scm.
7036 (<command>): New class.
7037 (<reader>): New member commands.
7038 (reader-add-command!): New proc.
7039 (reader-lookup-command): New proc.
7040 (reader-error,-reader-process-expanded,reader-process): New procs.
7041 (reader-read-file!): New proc.
7042 (include): Call reader-read-file!.
7044 (cpu-load): Call reader-read-file!.
7045 * utils.scm (num-args): New proc.
7046 * simplify.inc: New file.
7047 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
7048 procs. Move define-normal-foo procs (and abbreviated forms) to
7049 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
7051 * fr30.cpu: Include simplify.inc.
7052 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7053 * i960.cpu: Include simplify.inc.
7054 * m32r.cpu: Include simplify.inc.
7055 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7056 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
7057 * sparc.cpu: Include simplify.inc.
7058 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
7059 * utils-cgen.scm (parse-error): Moved to read.scm.
7060 (sanitize): Rewrite.
7061 (utils-init!): New proc.
7063 1999-02-02 Doug Evans <devans@casey.cygnus.com>
7065 * sparc.cpu: New file.
7066 * sparc32.cpu: New file.
7067 * sparc64.cpu: New file.
7068 * sparccom.cpu: New file.
7069 * sparc.opc: New file.
7071 1999-01-27 Frank Eigler <fche@cygnus.com>
7073 * utils.scm (gen-copyright): New proc.
7075 1999-01-27 Doug Evans <devans@casey.cygnus.com>
7077 Parameterize rtl parsing, rather than having lots of little handlers.
7078 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
7079 Delete member traverse.
7080 (rtx:set-traverse!): Delete.
7081 (-rtx-valid-types,-rtx-valid-matches): New variables.
7082 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
7083 instead of expression. All callers updated.
7084 (def-rtx-node): New args arg-types,arg-modes.
7085 (def-rtx-syntax-node): Ditto.
7086 (def-rtx-dual-mode): Ditto.
7087 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
7088 All callers updated.
7089 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
7090 All callers updated.
7091 (rtx-macro-expand): New proc.
7092 (-rtx-traverse-check-args): Delete.
7093 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
7094 an rtx specific traverser.
7095 (-rtx-any-mode?,-rtx-symornum?): New procs.
7096 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
7097 (-rtx-traverse-no-mode): Delete.
7098 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
7099 (-rtx-traverse-operands): Rewrite.
7100 (-rtx-traverse-expr): Rewrite.
7101 (rtx-traverse): Don't expand macros here, leave for caller to do.
7102 (rtx-simplify): Delete.
7103 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
7105 (rtx-true?,rtx-false?): Ditto.
7106 (-rtx-ref-type): Set dest is operand 1 now.
7107 (-simplify-for-compilation): New proc.
7108 (semantic-in-out-operands): Recognize regno as an alias for index-of.
7109 Expand macros before calling rtx-traverse. Sort operands by name
7110 to avoid unnecessary semantic formats.
7111 (semantic-attrs): New proc.
7112 (rtx-uneval?): Handle (<rtx-func> ...).
7113 (s-boolifop): Delete arg mode. All callers updated.
7114 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
7115 (eq-attr): New arg obj.
7117 * m32r.cpu (rach): Update calls to andif.
7119 * minsn.scm (-minsn-parse-expansion): Renamed from
7120 parse-minsn-expansion.
7121 (-minsn-parse): Renamed from parse-minsn.
7122 (-minsn-read): Renamed from read-minsn.
7123 (def-minsn): Don't check APPLICATION here.
7124 (def-full-minsn): New proc.
7125 (define-macro-insn): Check APPLICATION here. Expand macros.
7126 (define-normal-macro-insn): Ditto.
7128 * utils.scm (word-value): New arg start-lsb?.
7129 (word-mask,word-extract): Ditto.
7130 (split-bits,powers-of-2): Use integer-expt instead of expt.
7131 (bit-set?): Handle 32 bit values (which are bignums).
7132 (cg-logand,cg-logxor): New functions.
7133 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
7134 (<ifield>,field-value): Update call to word-value.
7135 (<ifield>,min-value): Use integer-expt instead of expt.
7136 (<ifield>,max-value): Ditto.
7138 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
7140 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
7142 Compute raw instruction format in addition to semantic based format.
7143 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
7144 (<iformat> accessors): Rename accessors to ifmt-*.
7145 (<sformat>): New class.
7146 (fmt-enum): Renamed from fmt:enum.
7147 (-ifmt-search-key): Rewrite.
7148 (-sfmt-search-key): New proc.
7149 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
7150 Compute iformat and sformat search keys.
7151 (ifmt-build): Update.
7152 (sfmt-build): New proc.
7153 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
7154 (ifmt-compute!): Compute instruction format <iformat> based on
7155 instruction fields alone. Compute new semantic format <sformat>
7156 based on instruction fields and semantic information.
7157 (ifmt:lookup): Delete.
7158 * mach.scm (<arch>): New member sfmt-list, plus accessors.
7159 (current-sfmt-list): New proc.
7160 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
7161 Rename member fmt to ifmt. New members fmt-desc, sfmt.
7162 (insn-length,insn-length-bytes): Update.
7163 (insn:mask-length,insn:mask): Update.
7164 (insn-lookup-op): Update.
7165 * gas-test.scm (gas-test-analyze!): Update.
7166 (gen-gas-test): Ditto.
7167 * sim-test.scm (sim-test-analyze!): Update.
7168 (gen-sim-test): Ditto.
7169 * opcodes.scm (gen-operand-instance-table): Update.
7170 (gen-operand-instance-ref): Ditto.
7171 (max-operand-instances): Use heuristic if semantics not parsed.
7172 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
7173 (opcodes-analyze!): Only scan semantics of building operand instance
7175 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
7176 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
7177 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
7178 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
7179 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
7180 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
7181 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
7183 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
7184 New arg lsb0? All callers updated.
7185 (decode-bits): New arg lsb0?. All callers updated.
7186 (opcode-slots): Update call to bit-set?. Call integer-expt instead
7188 (-gen-decode-bits): New arg lsb0?. All callers updated.
7189 (build-slots): Call integer-expt instead of expt.
7190 (build-decode-table-entry): Handle crossing word boundaries better.
7191 (-gen-decode-switch): New arg lsb0?. All callers updated.
7192 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
7194 * enum.scm (define-enum): Rewrite.
7195 (define-normal-enum): Ditto.
7196 (def-full-insn-enum): New proc.
7197 (define-normal-insn-enum): Rewrite.
7199 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
7201 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
7203 * dev.scm: Add sid support.
7205 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
7206 (CLEANFILES): Add tmp-*.
7207 * Makefile.in: Rebuild.
7209 * doc/Makefile.am: New file.
7210 * doc/Makefile.in: New file.
7211 * doc/cgen.texi: New file.
7212 * Makefile.am (SUBDIRS): Define.
7213 * Makefile.in: Rebuild.
7214 * configure.in: Create doc/Makefile.
7215 * configure: Rebuild.
7217 1999-01-18 Doug Evans <devans@casey.cygnus.com>
7219 * insn.scm (insn:syn): Delete.
7221 1999-01-15 Doug Evans <devans@casey.cygnus.com>
7223 * fr30.cpu (model fr30-1): Add state variables load-regs,
7224 load-regs-pending. Delete h-gr. Clean up operand names of all units.
7225 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
7226 (model m32rx): Ditto.
7227 (addi): Simplify function unit usage spec.
7228 (ld-plus): Rewrite operand names in function unit usage spec.
7229 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
7230 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
7231 overridden. Allow operand to appear in input and output spec.
7232 (<insn>,gen-profile-code): string-append -> string-list.
7234 * ifield.scm (define-ifield): Call pmacro-expand.
7235 (define-full-ifield,define-normal-ifield): Ditto.
7236 (define-multi-ifield,define-normal-multi-ifield): Ditto.
7238 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
7239 with-scache and without-scache cases.
7241 1999-01-14 Doug Evans <devans@casey.cygnus.com>
7243 * fr30.cpu (fr30-1): Add state variable h-gr.
7244 Add units u-cti, u-load, u-store, u-ldm, u-stm.
7245 (all insns): First pass at providing cycle counts.
7246 * sim.scm (<unit>,gen-profile-code): Only check for output operands
7247 when initializing unit output operands, ditto for input operands.
7249 * insn.scm (insn-length,insn-length-bytes): New procs.
7250 * mach.scm (-adata-set-derived!): Use them.
7251 * sim-cpu.scm (-gen-sem-case): Ditto.
7253 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
7254 (-gen-write-case): Ditto.
7255 (gen-semantic-fn): Ditto. Split into two:
7256 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
7258 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
7259 scache/no-scache appropriately. All callers updated.
7260 (-gen-sem-case): PCADDR->IADDR.
7261 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
7263 * sim-decode.scm (*): Replace string-append,string-map with
7264 string-list,string-list-map where the result is sufficiently large.
7265 (-gen-decode-insn-table): Go back to simple version for non-scache
7266 case: just record IDESC in decoder tables and leave field extraction
7268 (-gen-decode-switch): Ditto.
7269 (-gen-decode-fn): Ditto.
7270 (-gen-extract-decls): Only emit format enum if with-scache?.
7271 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
7273 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
7274 (-gen-insn-timing): Ditto.
7275 * sim.scm (gen-argbuf-type): Only output sem_fields union in
7278 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
7279 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
7281 1999-01-12 Doug Evans <devans@casey.cygnus.com>
7283 * cpu.scm (keep-mach-validate!): New proc.
7284 (include): New proc.
7286 * mach.scm (current-arch-mach-name-list): New proc.
7287 (-parse-arch-machs): Always return canonical form.
7288 (def-arch): Validate user specified machs to be kept.
7289 (def-mach-attr!): Simplify.
7291 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7292 (option-init!): Initialize it.
7293 (option-set!): Set it.
7294 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7295 output operand instance tables.
7296 (cgen-opc.in): Only output operand instance tables if asked to.
7298 * sim.scm (option-init!,option-set!): Clarify returned value.
7300 * sim.scm (gen-mach-bfd-name): Move from here.
7301 * utils-cgen.scm: To here.
7303 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7305 * fr30.cpu (ilm): Fix comment field.
7306 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7309 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7310 (rtx-true?, rtx-false?): New procs.
7311 * rtx-funcs.scm (annul): Rename vpc to pc.
7312 (-rtx-traverse-if): Improve determination of whether then/else parts
7313 are conditionally executed.
7315 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7317 (gen-argbuf-type): Simplify generated definition (big sem_fields
7318 union moved outside).
7320 1999-01-11 Ben Elliston <bje@cygnus.com>
7322 * doc/porting.texi: New file.
7324 * doc/intro.texi: New file.
7325 (Layout): Use @example to insert preformatted ASCII text (such as
7326 diagrams). @code is inappropriate here.
7328 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7330 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7332 * m32r.opc (print_hash): Cast dis_info.
7334 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7335 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7338 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7340 * i960.cpu (f-br-disp): Remove RELOC attribute.
7341 (f-ctrl-disp): Ditto.
7342 (callx-disp): set-quiet -> set for (reg h-gr 2).
7343 (callx-indirect,callx-indirect-offset): Ditto.
7345 * Makefile.am (gas-test): Fix dependencies.
7346 * Makefile.in: Rebuild.
7347 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7348 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7349 (gas-test-analyze!): Use syntax-break-out.
7350 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7351 (sim-test-analyze!): Use syntax-break-out.
7352 (cgen-build.sh): Use gen-file-name.
7353 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7354 * insn.scm (syntax-break-out): New proc.
7355 * utils.scm (gen-file-name): New proc.
7357 * fixup.scm (nil,<?,<=?,>?): Delete.
7359 * utils.scm (count-true): Rewrite.
7361 * slib/sort.scm: Move sort.scm to slib directory.
7364 * iformat.scm (ifmt-compute!): Record empty format.
7366 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7367 internal procs outside. Handle expression register numbers.
7370 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7372 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7374 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7375 (gen-semantic-fn,-gen-sem-case): Ditto.
7376 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7377 (cgen-semantics.c): Ditto.
7378 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7379 (gen-ifmt-argvars-defns): New proc.
7380 (gen-ifmt-argvars-assigns): New proc.
7381 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7382 (-gen-decode-fn): Handle non-with-scache case.
7383 (cgen-decode.c): Define WANT_CPU to @cpu@.
7384 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7385 (cgen-model.c): Define WANT_CPU to @cpu@.
7386 * sim.scm (gen-ifld-extract-argvar): New proc.
7387 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7388 with FUN-ACCESS specified.
7389 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7390 (<hw-register>,gen-extract): New arg local?.
7391 (<hw-address>,gen-extract): Ditto.
7392 (-hw-cxmake-get): Handle non-with-scache case.
7393 (-hw-gen-set-quiet): Ditto.
7394 (<hw-address>,cxmake-get): Handle non-with-scache case.
7395 (gen-op-extract-argvar): New proc.
7396 (<operand>,gen-record-profile): Rewrite.
7397 (<operand>,gen-profile-code): Rewrite.
7398 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7399 (gen-argbuf-fields-union): New proc.
7400 (gen-argbuf-type): Use it. Handle non-scache case.
7402 * *.scm: class:foo procs renamed to class-foo.
7403 * attr.scm (<attribute>): New member `for'.
7404 (-attr-parse): New first value in list for default if
7406 (non-bool-attr-list,attr:add!): Delete.
7407 (def-attr): Use current-attr-add!.
7408 (atlist-attr-value-no-default): New proc.
7409 (attr-lookup-default): Handle boolean attributes.
7410 (gen-attr-enum): New proc.
7411 (-attr-remove-meta-attrs-alist): New proc.
7412 (attr-nub): New proc.
7413 (current-attr-list-for): New proc.
7414 (current-{ifld,hw,op,insn}-attr-list): New procs.
7415 (attr-builtin!): New proc.
7416 * cpu.scm (keep-obj?): Rewrite.
7417 (-init-parse-cpu!): Call arch-init!.
7418 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7419 (-finish-parse-cpu!): Call arch-finish!.
7420 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7421 (def-enum,def-full-enum): Use current-enum-add!.
7422 (gen-obj-list-enums): New proc.
7423 * hardware.scm (hw:add!,hw:lookup): Delete.
7424 (def-hardware,def-hardware-ext): Use current-hw-add!.
7425 (hw:std-attrs,hw:attr-list): Delete.
7426 (hardware-builtin!): Define builtin hardware attributes.
7427 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7428 (def-ifield,def-full-ifield): Use current-ifld-add!.
7429 (ifld:std-attrs,ifld:attr-list): Delete.
7430 (ifield-builtin!): New proc.
7431 * insn.scm (insn:add!,insn:lookup): Delete.
7432 (def-full-insn): Use current-insn-add!.
7433 (insn:std-attrs): Delete.
7434 (insn-builtin!): New proc.
7435 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7437 (<arch-data>): New member machs.
7438 (current-attr-list,current-enum-list): New procs.
7439 (current-op-list,current-minsn-list): New procs.
7440 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7441 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7443 (-parse-arch-machs): New proc.
7444 (-arch-parse): New arg machs, all callers updated.
7445 (-arch-read): Handle machs spec.
7446 (def-arch): Define MACH attribute here.
7447 (mach-init!,mach-finish!): Not here.
7448 (cpu:add!,cpu:lookup): Delete.
7449 (def-cpu): Use current-cpu-add!.
7450 (<mach>): New member bfd-name.
7451 (-mach-parse): New arg bfd-name, all callers updated.
7452 (-mach-read): Handle bfd-name spec.
7453 (mach:add!,mach:lookup): Delete.
7454 (def-mach): Use current-mach-add!.
7455 (def-mach-attr!): New proc.
7456 (arch-init!): New proc.
7457 (arch-finish!): New proc. Reverse all object lists here.
7458 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7459 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7460 (define-normal-macro-insn): Ignore minsn if mach not kept.
7461 * mode.scm (mode-builtin!): New proc.
7462 * model.scm (model:add!,model:lookup): Delete.
7463 (def-model): Use current-model-add!.
7464 * opcodes.scm (insn:attr-list): Delete.
7465 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7466 (gen-attr-table-defn): Emit value for default.
7467 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7468 (op:attr-list): Delete.
7469 (gen-operand-decls,gen-insn-decls): New proc.
7470 (compute-insn-attr-list): Delete.
7471 (cgen-opc.h): Reorganize and simplify.
7472 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7473 (def-operand,def-full-operand): Use current-op-add!.
7474 (op:std-attrs): Delete.
7475 (operand-enum): Delete.
7476 (operand-builtin!): Define builtin operand attrs.
7477 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7478 (gen-attr-enum-decl): Use gen-obj-list-enums.
7479 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7481 * fr30.cpu (define-arch): Add machs spec.
7482 (f-i4): SIGNED attribute -> !UNSIGNED.
7483 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7484 (HASH-PREFIX): Define operand attribute.
7485 (NOT-IN-DELAY-SLOT): Define insn attribute.
7486 * i960.cpu (define-arch): Add machs spec.
7487 * m32r.cpu (define-arch): Add machs spec.
7488 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7489 (HASH-PREFIX): Define operand attribute.
7490 (FILL-SLOT): Define insn attribute.
7492 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7494 * fr30.cpu (stilm): Correct mask for and operation.
7496 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7498 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7499 Replace START/EXIT with start/pass.
7500 (gen-sim-test): Delete ".text".
7502 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7504 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7506 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7508 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7509 (h-sbit): Make it FUN-ACCESS.
7510 (h-gr): Reorder so that general regs are always printed by number.
7512 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7514 * i960.cpu (flushreg): Use nop.
7516 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7518 * m32r.cpu (default-alignment): Specify.
7519 * mach.scm (<arch-data>): New member default-alignment.
7520 (adata:default-alignment): New proc.
7521 (current-arch-default-alignment): New proc.
7522 (-arch-parse): New arg default-alignment.
7523 (parse-alignment): New proc.
7524 (-arch-read): Handle default-alignment spec.
7526 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7528 * insn.scm (f-%): Delete.
7529 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7530 be readded if proved useful.
7531 (gen-extract-fields): Ditto. Use gen-ifetch.
7532 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7533 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7535 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7537 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7539 1998-12-14 Dave Brolley <brolley@cygnus.com>
7541 * fr30.cpu: Remove stub macros.
7542 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7543 (div2): Don't use addc/subc.
7545 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7547 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7550 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7552 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7554 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7556 * cpu.scm (keep-all?): New proc.
7557 (assert-keep-all): Use it.
7558 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7559 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7560 Check for spelling errors.
7562 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7564 * rtl.scm (s-convop): Call -rtx-sem-mode.
7566 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7568 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7569 (-parse-hw-profile): Ditto.
7570 (<hw-register>, parse!): Return `void' result.
7571 (<hw-pc>, parse!): Ditto.
7572 (<hw-memory>, parse!): Ditto.
7573 (<hw-immediate>, parse!): Ditto.
7574 (<hw-address>, parse!): Ditto.
7576 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7577 (-ifld-parse-encode-decode): New proc.
7578 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7579 (-multi-ifield-parse): Set encode/decode to #f.
7580 (ifld:decode-mode): New proc.
7581 * utils.scm (nub): Rewrite.
7582 * operand.scm (op-nub): Rewrite.
7583 * sim.scm (<ifield>, gen-type): Rewrite.
7584 (-gen-ifld-argbuf-defn): New proc.
7585 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7586 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7587 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7588 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7589 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7590 New method gen-trace-extract.
7591 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7592 from gen-argbuf-elm, return "" if not caching register address.
7593 Rewrite gen-extract. New method gen-trace-extract.
7594 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7595 gen-extract, gen-trace-extract, cxmake-get.
7596 (<hw-iaddress>): New method cxmake-get.
7597 (op-needed-iflds): New proc.
7598 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7599 (-gen-op-argbuf-defn): New proc.
7600 (gen-op-extract): Renamed from op:extract.
7601 (gen-op-trace-extract): Renamed from op:trace-extract.
7602 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7604 (gen-argbuf-elm): Rewrite.
7605 * sim-decode.scm (-gen-record-args): Update.
7607 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7609 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7610 argument position. Flag symbolic macros in function position as
7612 (define-pmacro): Handle quoting in definition of symbolic macros.
7613 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7615 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7617 * fr30.opc (parse_register_list): Account for reverse masks
7619 (print_register_list): Ditto.
7620 (parse_low_register_list_ld): New function.
7621 (parse_hi_register_list_ld): New function.
7622 (parse_low_register_list_st): New function.
7623 (parse_hi_register_list_st): New function.
7624 (print_hi_register_list_ld): New function.
7625 (print_hi_register_list_st): New function.
7626 (print_low_register_list_ld): New function.
7627 (print_low_register_list_st): New function.
7628 * fr30.cpu (ldr15dr): Implement workaround.
7629 (ldm0,ldm1,stm0,stm1): Implemented.
7631 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7633 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7634 * configure: Regenerate.
7635 * Makefile.am (WITH_HOBBIT): Update.
7636 (cgen-hob.c): Remove Makefile dependency.
7637 (cgen.o): Depend on cgen-gh.h, config.h.
7638 * Makefile.in: Regenerate.
7639 * aclocal.m4: Regenerate.
7641 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7643 * i960.cpu, i960.opc: New files.
7645 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7647 * fr30.opc (parse_register_number): New function.
7648 (parse_register_list): New function.
7649 (parse_low_register_list): Use parse_register_list.
7650 (parse_hi_register_list): Use parse_register_list.
7651 * fr30.cpu (sth): Fix assembler syntax. Implement more
7654 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7656 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7657 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7658 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7659 (-op-gen-set-trace-parallel): Ditto.
7660 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7662 * fr30.cpu (call,calld): Fix setting of pc.
7663 (f-op5): Fix start bit number.
7665 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7667 * fr30.cpu (st): Fix operand ordering. Implement more
7670 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7672 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7673 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7674 (fmt-semantic-operands): Move to sim.scm.
7675 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7676 * operand.scm (<hw-index>): New member `name'. All builders updated.
7677 (<hw-index>): New method get-name.
7678 (op-profilable?): Moved to sim.scm.
7680 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7681 (op-profilable?): Moved here from operand.scm.
7682 (gen-extract-type): Delete.
7683 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7684 (-gen-argfld-ref): New proc.
7685 (-gen-ifld-argfld-name): New proc.
7686 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7687 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7688 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7689 (<hardware-base>): Delete method gen-extract-type. New method
7691 (<hw-register): Ditto. Update method gen-extract.
7692 (<operand>, method gen-argbuf-elm): Rewrite.
7693 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7694 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7695 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7697 * sim-decode.scm (-gen-record-args): Tweak.
7699 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7701 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7703 * doc/porting: Fix typo: gas->sim.
7704 * fr30.opc (print_m4): New function.
7705 * fr30.cpu: Implemented many insns.
7707 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7709 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7711 * fr30.cpu (f-rel9): Delete RELOC attribute.
7712 (f-rel12): Add PCREL-ADDR attribute.
7713 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7714 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7715 * fr30.opc (print_label9): Delete.
7717 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7718 code for CTI indicators.
7719 * insn.scm (insn-cti?): Simplify.
7720 * utils-cgen.scm (atlist:cti?): New proc.
7722 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7724 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7725 (f-i20-4,f-i20-16,f-i20): New fields.
7731 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7732 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7733 * mach.scm (arch-data): Ditto.
7734 (current-arch-default-insn-word-bitsize): Renamed from
7735 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7736 (-arch-read): Update.
7738 * hardware.scm (hw:attr-list): Move here ...
7739 * opcodes.scm: ... from here.
7741 * ifield.scm (fld:bitrange): Delete.
7742 (fld:word-offset,fld:word-length): New procs.
7743 (ifield?): Use class-instance.
7744 (<ifield>, method field-start): Rewrite.
7745 (ifld:enum): New proc.
7746 (<ifield>, methods field-mask,field-value): Rewrite.
7747 (-ifield-parse): Rewrite.
7748 (<multi-ifield> support): Rewrite.
7749 (ifld-beyond-base?): Rewrite.
7750 (ifld:std-attrs): New variable.
7751 (ifld:attr-list): New proc.
7752 * iformat.scm (-compute-insn-mask): Rewrite.
7753 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7755 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7756 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7758 (<operand>): Ditto. Forward onto index instead.
7759 (gen-ifld-decls,gen-ifld-defns): New procs.
7760 (ifld:insert,ifld:extract): New procs.
7761 (<ifield>): New methods gen-insert, gen-extract.
7762 (<multi-ifield>): Ditto.
7763 (<hw-index>): Forward gen-insert,gen-extract onto value.
7764 (<hw-asm>): Delete insert/extract support.
7765 (<hw-register,hw-memory,hw-immediate>): Ditto.
7766 (gen-hash-defines): Use string-list.
7767 Define CGEN_MAX_IFMT_OPERANDS.
7768 (gen-switch): Use string-list,string-list-map.
7769 (gen-fget-switch,gen-fset-switch): Use string-list.
7770 (gen-parse-switch,gen-insert-switch): Ditto.
7771 (gen-extract-switch,gen-print-switch): Ditto.
7772 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7773 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7774 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7775 (gen-ivalue-entry): New proc.
7776 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7777 computation. Use 0 for operand ref table if ALIAS insn.
7778 (gen-minsn-table-entry): Use string-list.
7779 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7780 (gen-opcode-open): Record address of ifield table.
7781 (cgen-opc.h): Call gen-ifld-decls.
7782 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7783 * types.scm (<bitrange>): New members word-offset,word-length.
7784 Delete member total-length. Delete methods start,mask,value.
7785 (bitrange:word-offset,bitrange:word-length): New procs.
7786 * sim-cpu.scm (gen-define-fields): Simplify.
7787 (gen-extract-fields): Simplify.
7788 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7789 (<ifield>): New methods gen-ifld-extract-decl.
7790 Delete method gen-ifld-extract-beyond.
7791 (<multi-ifield>): New methods gen-ifld-extract-decl.
7792 (<multi-ifield>, method gen-ifld-extract): Implement.
7793 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7794 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7796 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7797 (-rtx-traverse-syntax-no-mode): New proc.
7798 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7799 (s-ifield): New proc.
7800 (s-shop): Don't prepend `unsigned' for unsigned modes.
7801 * rtx-funcs.scm (ifield): New rtx function.
7802 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7803 (delay): New rtx function.
7804 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7806 * cos.scm (-elm-make-method-getter): Fix typo.
7808 * utils.scm (backslash): Handle lists of strings.
7810 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7812 * fr30.cpu (f-rel9): Correct for pc+2.
7813 (label9): Use print_label9.
7814 * fr30.opc (print_label9): New function.
7816 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7818 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7819 * fr30.opc (parse_low_register_list): Renamed.
7820 (parse_hi_register_list): Renamed.
7821 (print_hi_register_list): Renamed.
7822 (print_low_register_list): Renamed.
7824 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7826 * fr30.cpu (f-rel9): Now a pc relative offset.
7828 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7830 * opcodes.scm (op-asm): Move to here, from operands.scm.
7831 (<op-asm>, method parse!): Validate arguments.
7832 (<operand>, method gen-function-name): Fix thinko.
7833 * operand.scm (<operand>, method make!): Don't set op-asm here.
7834 * utils.scm (list-elements-ok?): New proc.
7836 * opcodes.scm: Clean up pass.
7838 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7840 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7841 the fr30_int function.
7842 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7843 (h-dr): Add FUN-ACCESS attribute.
7845 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7847 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7848 for C symbol for models array.
7850 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7852 * fr30.opc (parse_reglist_low): New function.
7853 (parse_reglist_hi): New function.
7854 (print_reglist_low): New function.
7855 (print_reglist_hi): New function.
7856 * fr30.cpu: Finish remaining insn stubs.
7858 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7860 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7862 * fr30.cpu (ldi32m): Don't use for disassembly.
7864 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7866 * fr30.cpu (int): Implement it.
7868 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7870 * rtx-funcs.scm (nop): Fix C code.
7872 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7874 * fr30.cpu (f-i32): New ifield.
7877 (ldi32m): New macro insn.
7878 (inte): Provide simple version for now.
7880 * sim-arch.scm: New file.
7881 * sim.scm: Move architecture support generation to sim-arch.scm.
7882 * cgen-sim.scm: Load sim-arch.scm.
7885 * hardware.scm (pc?) New proc.
7886 (class <hardware-base>): Rewrite method 'pc?.
7887 (class <hardware>): Forward 'pc? to the hardware type.
7888 (class <hw-pc>): New method 'pc?.
7890 Add support for variable length ISAs.
7891 * ifield.scm (ifld-beyond-base?): New proc.
7892 * m32r.cpu: Remove integral-insn? spec.
7893 * mach.scm (arch:derived,arch:set-derived!): New procs.
7894 (arch:app-data,arch:set-app-data!): New procs.
7895 (class <arch>): New members derived, app-data.
7896 (class <cpu>): Delete member integral-insn?.
7897 (cpu:integral-insn?): Delete.
7898 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7899 (-cpu-read): Delete integral-insn? support.
7900 (state:decode-assist): Delete.
7901 (state:int-insn?): Delete.
7902 (<derived-arch-data>): New class.
7903 (-adata-set-derived!): New proc.
7904 (mach-finish!): Call it.
7905 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7906 (gen-operand-instance): Add COND_REF support.
7907 (gen-operand-instance-table): Ditto.
7908 (gen-hash-defines): Update.
7909 (gen-extract-switch): Update type of `insn_value' arg.
7910 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7911 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7913 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7914 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7915 beyond the base insn (for large insns).
7916 (-gen-extract-beyond-var-list): New proc.
7917 (gen-extract-fields): Handle large insns.
7918 (-gen-write-case): Update sem_arg computation.
7919 Update initial vpc computation.
7920 (gen-semantic-fn): Ditto. Update type of `insn'.
7921 (-gen-sem-case): Update sem_arg computation.
7922 Update initial vpc computation.
7923 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7924 (-gen-extract-word): New proc.
7925 (<ifield>): New method gen-ifld-extract-beyond.
7926 (gen-ifld-extract-beyond): New proc.
7927 * types.scm (bitrange-overlap?): New proc.
7929 * utils.scm (bits->bytes): New proc.
7930 (bytes->bits): New proc.
7932 Move extraction support into decoder.
7933 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7934 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7935 support to sim-decode.scm.
7936 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7937 be array of IDESC,FMT entries. Make the array const.
7938 (-gen-gcc-label-table): Make array const.
7939 (-gen-decode-switch): Branch to extraction code after insn has been
7941 (-gen-decode-insn-globals): Delete extract handler from
7943 (gen-decode-fn): Add extraction support.
7944 (-gen-sem-fn-decls): Delete extraction fn decls.
7945 (-gen-idesc-decls): Update @cpu@_decode decl.
7946 (-gen-idesc-init-fn): Delete extraction support.
7947 (-gen-extract-decls): New proc.
7949 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7950 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7952 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7953 All callers updated.
7954 (table-entry:make): Record insn value as insn object, not name.
7957 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7958 collision with C function.
7959 (path_dirname): Similarily.
7960 * hobbit.c,hobbit.h: Rebuild.
7962 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7964 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7966 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7968 * fr30.cpu: Implement more instruction stubs.
7970 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7972 * fr30.cpu: Implement more instruction stubs.
7974 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7976 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7978 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7980 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7981 (op:std-attrs): Ditto.
7982 * opcodes.scm (gen-operand-instance): Ditto.
7983 (gen-switch): Ditto.
7984 * m32r.cpu (condbit,accum): Update.
7985 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7987 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7989 * enum.scm (-enum-read): Fix typo.
7991 * iformat.scm (-ifmt-search-key): Simplify a little.
7993 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7995 * doc/porting: semantics.c -> sem.c.
7996 * Makefile.in: Regenerate.
7997 * fr30.cpu (add): Change ADD to add. Add more registers and set
7998 status bits on 'add' instruction.
8000 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
8002 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
8005 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
8007 * minsn.scm (minsn:enum): Update, call current-arch-name.
8009 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
8011 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
8012 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
8013 (ARCH,CGEN,CGENFLAGS): New variables.
8014 (gas-test,sim-test): New rules.
8015 * Makefile.in: Rebuild.
8016 * configure.in (arch): Define.
8017 * configure: Rebuild.
8019 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
8020 * All .scm files: Ditto.
8022 * dev.scm: Fix gas-test call to cpu-load.
8023 * gas-test.scm: Clean up pass to remove bit-rot.
8024 * sim-test.scm: Ditto.
8026 * enum.scm (read-enum): Fix typo in `vals' handling.
8028 * hardware.scm (-parse-hw-type): Fix typo.
8029 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
8030 (def-hardware,define-normal-hardware): Ditto.
8032 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
8033 (display-var): Use it.
8034 * hobbit.c: Rebuild.
8035 * hobbit.h: Rebuild.
8037 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
8038 avoid hobbit problem.
8039 * mach.scm (-cpu-read): Rename local `parallel-insns' to
8040 `parallel-insns-' to avoid hobbit problem.
8042 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
8044 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
8045 (parse_slo16,parse_ulo16): Ditto.
8046 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
8048 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
8050 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
8051 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
8052 * Makefile.in: Rebuild.
8053 * insn.scm (define-normal-insn): Expand pmacros.
8054 * mode.scm (<mode>): New member `host?'. All uses updated.
8055 (mode:host?): New proc.
8056 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
8057 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
8058 (define-rtx-dual-mode): Ditto.
8059 (s-index-of): New proc.
8060 (s-unop): Use plain C for host mode operations.
8061 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
8062 * rtx-funcs.scm (index-of): New rtx function.
8063 * sim.scm (<hw-index>): New method cxmake-get.
8065 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
8067 * sim-cpu.scm (-gen-engine-decls): Delete.
8069 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
8071 * doc/rtl (Example): Correct Typo.
8072 * doc/porting: Add 'make dep' step to opcodes port instructions.
8073 * fr30.opc: New file.
8074 * fr30.cpu: New file.
8076 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
8078 * configure.in: Handle guile $exec_prefix = $prefix/foo.
8079 * Makefile.am (GUILEINCDIR): New variable.
8081 * configure: Regenerate.
8082 * Makefile.in: Ditto.
8083 * aclocal.m4: Ditto.
8085 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
8087 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
8088 (cgen-semantics.c): Ditto.
8089 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
8090 * sim-model.scm (cgen-model.c): Ditto.
8091 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
8092 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
8094 * opcodes.scm (read-cpu.opc): Handle empty file.
8096 * cos.scm (-elm-make-method-setter): Fix typo.
8098 * cpu.scm (-init-parse-cpu!): Call types-init!.
8099 (-finish-parse-cpu!): Call types-finish!.
8100 * ifield.scm (<ifield>): Delete members start,length.
8101 New member bitrange.
8102 (<ifield>, methods field-start,field-length): Update.
8103 (fld:start): New arg insn-len. All callers updated.
8104 (<ifield>, methods field-mask,field-value): Update.
8105 (-ifield-parse): Update.
8106 (ifield-init!): Update.
8107 * iformat.scm (compute-insn-length): Simplify.
8108 (compute-insn-mask): Update.
8109 * insn.scm (insn:value): Update.
8110 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
8111 (current-arch-default-insn-bitsize): New proc.
8112 (current-arch-insn-lsb0?): New proc.
8113 (-arch-parse,-arch-read): Update.
8114 (<cpu>): New member file-transform.
8115 (-cpu-parse,-cpu-read): Update.
8116 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
8117 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
8118 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
8119 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
8120 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
8121 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
8122 * operand.scm (op:start): Update call to field-start method.
8123 * sim-decode.scm (opcode-slots): New arg lsb0?.
8124 (fill-slot!,build-slots): Ditto.
8125 (build-decode-table-entry,build-decode-table-guts): Ditto.
8126 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
8127 (gen-decode-fn): Ditto.
8128 (cgen-decode.c): Update call to gen-decode-fn.
8129 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
8130 (-gen-cpu-header,-gen-cpuall-includes): New procs.
8131 (cgen-cpuall.h): Call -gen-cpuall-includes.
8132 * types.scm (<bitrange>): New class.
8133 (types-init!,types-finish!): New procs.
8134 * utils-cgen.scm (parse-number): New proc.
8135 (parse-boolean): New proc.
8136 * utils.scm (word-value): Renamed from shift-bits, rewrite.
8137 (word-mask): Rewrite.
8138 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
8139 (m32rxf): New field `file-transform'.
8140 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
8142 * hobbit.h: Fix include file name.
8144 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
8146 * slib: New directory of slib files used by cgen/hobbit.
8147 * hobbit.scm: New file.
8148 * hobbit.c: New file.
8149 * hobbit.h: New file.
8150 * hobscmif.h: New file.
8151 * hob-main.c: New file.
8152 * hobslib.scm: New file.
8154 * Makefile.am: Add support for compiling hobbit, and using compiled
8155 version of hobbit to compile cgen.
8156 * Makefile.in: Regenerate.
8157 * configure.in: Support --with-hobbit.
8158 * configure: Regenerate.
8159 * acconfig.h (WITH_HOBBIT): Add.
8160 * config.in: Regenerate.
8162 * rtl.scm: New file, was cdl-c.scm.
8163 Definition of rtx funcs moved to rtx-funcs.scm.
8164 (semantic-in-out-operands): Rewrite to compute object form of
8166 * rtx-funcs.scm: New file.
8168 * cgen-gh.c: #include "config.h".
8169 (gh_cadddr,gh_cddddr): New fns.
8170 (cgh_vector_to_list): New fn.
8171 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
8172 (cgh_init): Prefix qsort procs with "cgh-".
8173 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
8174 * cgen.c: #include "config.h".
8176 * attr.scm (bitset-attr?): New proc.
8177 (<bitset-attribute>, method parse-value): Value syntax changed from
8178 (val1 val2 ...) to val1,val2,....
8179 (<bitset-attribute>): New method gen-value.
8180 (<integer-attribute>): New method gen-value.
8181 (<enum-attribute>): New method gen-value.
8182 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
8183 (<reader>): New class.
8184 (CURRENT-ARCH,CURRENT-READER): New globals.
8185 (keep-mach?): Move here from mach.scm.
8186 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
8187 (<arch>): New class.
8188 (<arch-data>): New class.
8189 (<cpu>): Make subclass of <ident>.
8190 (*ENDIAN* variables): Delete.
8191 (process-state-vars): Delete.
8192 (mach-finish!): Add `base' value to MACH attribute.
8193 * hardware.scm (<hardware>): Make subclass of <ident>.
8194 (hw:std-attrs): New global.
8195 (hw-profilable?): New proc.
8196 * ifield.scm (<ifield>): Make subclass of <ident>.
8197 (sort-ifield-list): Move here from iformat.scm.
8198 * iformat.scm (<iformat>): Renamed from <insn-format>.
8199 Make subclass of <ident>.
8200 (-ifmt-search-key): Include cti? in categorization of formats.
8201 (ifmt-analyze): Compile semantics (turn to object form).
8202 * insn.scm (<insn>): Make subclass of <ident>.
8203 New member compiled-semantics.
8204 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
8205 * mode.scm (<mode>): Make subclass of <ident>.
8207 * model.scm (<unit>): Make subclass of <ident>.
8208 New members inputs,outputs.
8209 (<model>): Make subclass of <ident>. New member state.
8210 (-unit-parse): Parse inputs,outputs.
8211 (<iunit>): New class.
8212 (-insn-timing-parse-model): New proc.
8213 (parse-insn-timing): Function unit spec rewritten.
8214 * operand.scm (<operand>): Make subclass of <ident>.
8215 New members sem-name,num,cond? New method gen-pretty-name.
8216 (hw-index-scalar): New global.
8217 (op-nub-hw): Move here from rtl.scm.
8218 (op:lookup-sem-name,op-profilable?): New procs.
8219 * pmacros.scm: Rewrite to pass through hobbit.
8220 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
8221 * utils.scm (logit): Make a macro.
8222 (bit-set?): Rewrite.
8223 (high-part): Rewrite.
8225 * m32r.cpu (define-arch): Move to top of file.
8226 (cpu family m32rbf): Renamed from m32rb.
8227 (model m32r/d): Function unit spec rewritten.
8228 (all insns): Ditto. Replace UBI with BI.
8230 * opcodes.scm (gen-attr-table-decls): Declare
8231 @arch@_cgen_hw_attr_table.
8232 (gen-attr-table-defns): Generate hw attribute table.
8234 * sim-cpu.scm (-gen-engine-decls): New proc.
8235 (-gen-model-decls): New proc.
8236 (gen-parallel-exec-type): Add new member `written' to struct parexec.
8237 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
8238 (-gen-record-profile-args): Simplify.
8239 (-gen-parallel-sem-case): Delete.
8240 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
8241 New local `written'. Delete profiling code.
8242 (-gen-sem-case): Ditto.
8243 (-uncond-written-mask,-any-cond-written?): New procs.
8244 (cgen-sem-switch.c): Include duplicates of insns that can be executed
8245 parallelly or serially, and write-back handlers for all parallel insns.
8246 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
8247 support to initialization of struct insn_sem.
8248 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
8249 (-gen-insn-sem-type): Add parallel write-back support to struct
8251 (-gen-idesc-init-fn): Add support for virtual insns.
8252 Add parallel write-back support.
8253 * sim-model.scm (gen-model-profile-fn): Delete
8254 (-gen-model-fn-decls): New proc.
8255 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
8256 (-gen-model-init-fn): New proc.
8257 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
8258 members in @mach@_init_cpu.
8259 (cgen-model.c): Generate model handlers for each insn.
8260 * sim.scm (gen-define-field-macro): Cti insns handled differently.
8261 (<hw-pc>): New method gen-write.
8262 (<hw-register>, method gen-write): New arg `mode'.
8263 (<hw-register>): Delete method gen-record-profile!.
8264 New method gen-profile-index-type.
8265 (<hw-memory>, method gen-write): New arg `mode'.
8266 (<hw-address>, method gen-extract): Delete.
8267 (<hw-address>, method gen-write): New arg `mode'.
8268 (<hw-index>, method get-write-index): Rewrite.
8269 (<pc>, method cxmake-get-direct): Delete.
8270 (<pc>): New method cxmake-get. Comment out methods
8271 gen-set-quiet,gen-set-trace.
8272 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
8273 gen-profile-index-type,gen-profile-code.
8274 Delete method gen-pretty-name. Rewrite method gen-write.
8275 Delete method cxmake-get-direct.
8276 (-op-gen-set-trace): Update `written'.
8277 (-op-gen-set-trace-parallel): Ditto.
8278 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
8279 (gen-cpu-insn-enum-decl): Add extra entries for parallel
8280 insns and their write-back handlers.
8281 (insn-op-lookup): New proc.
8282 (<unit>): New method gen-profile-code.
8283 (<iunit>): New method gen-profile-code.
8284 (gen-argbuf-elm): Add profiling elements.
8285 (gen-argbuf-type): Define cti insns separately in their own struct.
8286 Add member `addr_cache' to this struct. Add entries for pbb virtual
8287 insns. Move semantic entries here from struct scache.
8288 Delete everything from struct scache except argbuf.
8289 (<insn>, method gen-profile-locals): Rewrite.
8290 (<insn>, method gen-profile-code): Rewrite.
8291 (sim-finish!): Create virtual pbb insns.
8293 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8295 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8296 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8297 (h-psw,h-bpsw,h-bbpsw): Define.
8298 (rte,trap): Handle bbpc,bbpsw.
8299 * opcodes.scm (max-operand-instances): Fix typo.
8300 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8301 hardware elements to be fun-access.
8302 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8304 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8306 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8308 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8310 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8312 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8314 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8316 (mach m32r): Update.
8318 * mach.scm (mach:supports?): New proc.
8319 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8320 gen-reg-access-{decls,defns}.
8321 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8322 (gen-mach-bfd-name): New proc.
8323 (gen-arch-reg-access-{decls,defns}): New procs.
8324 (cgen-arch.[ch]): Output register access cover fns.
8326 * hardware.scm (hardware-builtin!): Set print handlers for
8328 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8330 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8331 (my_print_insn): Ditto. Delete args buf, buflen.
8332 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8333 (-hw-asm-specs): Add `handlers' spec.
8334 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8336 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8338 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8339 (<hw-asm>, parse!): New method.
8340 (gen-insn-table-entry): Print semantics.
8341 (gen-opcode-open): Renamed from gen-opcode-table.
8343 * utils.scm (string-write): No longer a macro.
8344 (-string-write): Handle procedure args.
8345 * opcodes.scm: Update all calls to string-write.
8346 * sim-cpu.scm: Ditto.
8347 * sim-decode.scm: Ditto.
8348 * sim-model.scm: Ditto.
8351 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8353 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8354 (-gen-insn-builders,-gen-insn-builder): New procs.
8356 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8358 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8359 (gen-opcode-table): Properly terminate comment.
8361 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8364 Clean up pass over everything, so starting fresh.