1 2009-11-01 Doug Evans <dje@sebabeach.org>
5 * rtl-traverse.scm (/rtx-canon): Issue better error message for
6 invalid rtx function names.
8 2009-10-28 Doug Evans <dje@sebabeach.org>
10 * cos.scm (object-assign!): New function.
11 * mode.scm (/mode-set-word-params!): Call it.
13 2009-10-25 Doug Evans <dje@sebabeach.org>
15 Record bitset attributes internally as a list.
16 Record rtx attribute values internally as ((rtx-expr)).
17 * attr.scm (bitset-attr?): Delete, unused.
18 (<bitset-attribute> parse-value): Rewrite.
19 (/attr-parse): Rewrite bitset default value processing.
20 (/attr-read): Pick out values of scalar attributes to distinguish
21 them from bitset values which are a list.
22 Fix spelling errors for processing of default values.
23 Handle string attributes.
24 (bitset-attr->list): Delete, all callers updated.
25 (/bitset-attr->charmask): Renamed from bitset-attr->charmask.
27 (atlist-source-form): Rewrite.
28 * hardware.scm (<hardware-base> 'get-isas): Update recognition
30 (hardware-builtin!): Update spec of ISA attribute, (ISA foo,bar)
32 * intrinsics.scm (target:belongs-to-group?): Update, bitset attribute
34 * mach.scm (def-isa-attr!): Update, bitset attribute values,
35 including the default, are now lists.
36 (all-isas-attr-value): Result is now a list.
37 * doc/rtl.texi: Clean up pass over attribute docs.
39 Change internal representation of rtx attribute values.
40 * attr.scm (/attr-val-is-rtx?): New function.
41 (attr-value): Call it.
42 (atlist-attr-value-no-default, attr-lookup-default): Ditto.
43 (/attr-parse): Use /attr-val-is-rtx? to detect rtx values.
44 Disallow rtx values for bitset attributes.
45 (/attr-read): Record rtx in default value as ((rtx-expr)).
48 2009-10-24 Doug Evans <dje@sebabeach.org>
50 * gen-all-doc: Add sh.cpu.
51 * gen-all-desc: Use cpu/sh.cpu instead of ../cpu/sh.cpu
52 (until ../cpu/sh.cpu is updated and cpu/sh.cpu is deleted).
54 * sid-cpu.scm (/gen-sem-case): Tweaking debugging printf.
55 (/gen-sfrag-case): Ditto.
56 * sim-cpu.scm (/gen-sem-case): Ditto.
58 * doc/rtl.texi: Add note that different ifields, operands, insns,
59 and minsns may occur with the same name in different isas.
60 Add note on the canonical form of rtl expressions.
62 2009-10-23 Doug Evans <dje@sebabeach.org>
64 * desc-cpu.scm (/gen-hash-defines): Remove #include of cgen-bitset.h.
65 * sid-cpu.scm (cgen-desc.h): Update location of cgen's bitset.h.
67 * decode.scm: Tweak various comments.
68 (/opcode-slots): Add FIXME.
69 (/build-decode-table-guts): Add assert.
70 * utils-sim.scm (/gen-set-itype-and-extract): New function.
71 (/gen-bracketed-set-itype-and-extract): New function.
72 (/gen-decode-default-entry): Rewrite.
73 (/table-guts-to-mask, /all-opcode-bits-used?): New functions.
74 (/gen-decode-insn-entry): New arg table-guts-thus-far, all callers
75 updated. Don't unnecessarily emit check for whether all opcode bits
77 (/gen-decode-expr-set-itype): Delete.
78 (/gen-decode-expr-entry): Update.
79 (/gen-decode-table-entry): New arg table-guts-thus-far, all callers
80 updated. Keep track of decoder tables used thus far.
81 (/gen-decoder-switch): Ditto.
82 * utils.scm (word-bit-value): New function.
84 2009-10-14 Doug Evans <dje@sebabeach.org>
86 * ifield.scm (<ifield>, value): Provide default initial value.
87 (ifield-encode-mode): Delete
88 (ifield-decode-mode): Delete duplicate definition.
89 (<derived-ifield>, 'make!): Initialize members encode, decode.
90 * opcode.scm (<ifield>, 'gen-insert): Use ifld-decode-mode instead of
92 (<multi-ifield>, 'gen-insert): Ditto.
94 2009-10-05 Dave Korn <dave.korn.cygwin@googlemail.com>
96 * sim-model.scm (@cpu@_prepare_run): Use @prefix@, not @cpu@,
97 for @foo@_init_idesc_table.
99 2009-09-30 Doug Evans <dje@sebabeach.org>
101 * doc/intro.texi: Mention SID.
102 * doc/sim.texi: Ditto.
103 * doc/porting.text (Doing a simulator port): Add some text.
105 2009-09-27 Doug Evans <dje@sebabeach.org>
107 * cos.scm (/class-table): New global.
108 (/class-uid, /class-set-uid!): New functions.
109 (/class-parent-name): Renamed from /class-parents.
110 (/class-make!): Change parents arg to parent-name, all callers updated.
112 (/class-lookup-uid): New function.
113 (/class-parent-classes): Rewrite.
114 (/class-mi?): Delete.
115 (/class-desc-mi?, /class-desc-offset-case, /class-desc-offset-case):
117 (/class-desc-offset, /class-desc-child, /class-desc-parents): Update.
118 (/class-compute-class-desc, class-desc-dump): Update.
119 (/object-make!): Update.
120 (/object-make-with-values!): Delete arg class-desc, all callers
122 (/object-copy): Delete arg top?, all callers updated.
123 (/object-specialize): Delete.
124 (/object-elements, /object-top-class): Delete.
125 (/object-class-name, /object-class-desc): Update.
126 (/object-class-uid): New function.
127 (/object-elm-get, /object-elm-set!, object?, /class-check-init!,
128 class-make, /class-subclass? /class-lookup-element,
130 (/elm-delta, elm-list): Delete.
131 (/elm-make-method-getter, elm-get, elm-xget): Update.
132 (/elm-make-method-setter, elm-set!, elm-xset!): Update.
133 (elm-make-getter, elm-make-setter): Update.
134 (/method-lookup-next): Update.
135 (send): Don't specialize class passed to method.
136 (send-next): New arg class-name, all callers updated.
137 (/class-parent, /class-parent-via-path, object-parent): Delete.
138 (class-cons-parent!, class-append-parent!): Delete.
139 (object-reset!): Init /class-table.
141 * cos.scm (/object-debug-classes): Delete.
142 (/object-debug-elements, /object-debug-methods): Delete.
144 * cos.scm (/method-lookup): Delete arg virtual?, all callers updated.
145 (method-proc): Delete.
146 (method-make-virtual!, method-make-virtual-forward!): Delete.
147 * ifield.scm (<ifield> field-start): Update.
148 (<ifield> field-length, pretty-print): Update.
149 (<multi-ifield> field-length, field-start, pretty-print): Update.
150 * sid-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
151 * sid.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
152 (<array> gen-sym-defn): Ditto.
153 (<hardware-base> gen-defn): Renamed from gen-defn.
154 (<hw-register> gen-type): Update.
155 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
156 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
157 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
158 (<hw-immediate> gen-type): Update.
159 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
160 * sim-cpu.scm (/gen-hardware-struct): Use gen-defn instead of gen-decl.
161 * sim.scm (<scalar> gen-sym-defn): Renamed from gen-sym-decl.
162 (<array> gen-sym-defn): Ditto.
163 (<hardware-base> gen-defn): Renamed from gen-defn.
164 (<hw-register> gen-type): Update.
165 (<hw-register> gen-defn): Renamed from gen-sym-decl, rewrite.
166 (<hw-memory>, <hw-address>, <hw-iaddress> gen-type): Update.
167 (<hw-memory>, <hw-address> gen-defn): Renamed from gen-sym-decl.
168 (<hw-immediate> gen-type): Update.
169 (<hw-immediate> gen-defn): Renamed from gen-sym-decl, rewrite.
171 2009-09-25 Doug Evans <dje@sebabeach.org>
173 * operand.scm (/anyof-merge-setter): Handle set-quiet.
174 * rtl.scm (rtx-single-set?): Handle set-quiet.
176 * rtl-c.scm (estate-make-for-rtl-c): Delete args context, owner,
177 rtl-cover-fns?, macro?. All callers updated.
178 (estate-make-for-normal-rtl-c): Delete, have all callers call
179 estate-make-for-rtl-c directly.
180 (rtl-c-parsed): Pass #:outer-expr to estate-make-for-rtl-c.
181 (rtl-c, rtl-c-expr-parsed, rtl-c-expr, rtl-c++-parsed, rtl-c++): Ditto.
183 * rtl-c.scm (/par-replace-set-dest-expr-fn): New function,
184 replaces /par-replace-set-dests.
185 (/par-replace-set-src-expr-fn): New function, replaces
186 /par-replace-set-srcs.
187 (s-parallel): Rewrite.
189 * rtl.scm (rtx-pretty-strdump): New function.
190 * rtl-traverse.scm (/rtx-canon-error): Use it.
191 (<eval-state>): New member outer-expr.
192 (estate-error): Include outer expression in error message if present.
194 2009-09-23 Doug Evans <dje@sebabeach.org>
196 * xc16x.cpu (h-cr): New hardware.
197 (muls): Comment out parts that won't compile, add fixme.
198 (mulu, divl, divlu, jmpabs, jmpa-, jmprel, jbc, jnbs, callr): Ditto.
199 (scxti, scxtmg, scxtm, bclear, bclr18, bset19, bitset, bmov): Ditto.
200 (bmovn, band, bor, bxor, bcmp, bfldl, bfldh): Ditto.
202 Rewrite rtl processing to require it to be "canonicalized" first,
203 and write a full canonicalizer / expression checker.
204 Remove all appearances of DFLT in canonical rtl.
205 * attr.scm (/attr-eval atval owner): Call rtx-canonicalize,
207 * iformat.scm (ifmt-analyze) Use canonical semantics.
208 * insn (<insn>): New member canonical-semantics.
209 * mach.scm (<arch>): New member multi-insns-instantiated?.
210 (/instantiate-multi-insns!): New function.
211 (/canonicalize-insns!): New function.
212 (arch-analyze-insns!): Canonicalize insn semantics before processing
214 * mode.scm (/mode-set-word-params!): New function.
215 (mode-void?): New function.
216 (mode-compatible?): VOID is compatible with VOID.
217 (/mode-word-sizes-defined?): New global.
218 (mode-set-word-modes!): Use/set it.
219 (mode-ensure-word-sizes-defined): Update.
220 (mode-builtin!): New builtin "modes" SYM, INSN, MACH.
221 Redo WI/UWI/AI/IAI handling.
222 (op:new-mode): No longer accept DFLT.
223 (<derived-operand> constructor): Ensure all fields are initialized.
224 (<anyof-operand> constructor): Ditto.
225 (/derived-parse-ifield-assertion): Delete arg `args'.
227 * rtl-c.scm (<rtl-c-eval-state>): New member `for-insn?'.
228 (rtl-c): Call rtx-canonicalize instead of rtx-compile.
229 (rtl-c-expr, rtl-c++): Ditto.
230 (/rtl-c-get): Use mode of operand, not containing expression.
231 (rtl-c-set-quiet, rtl-c-set-trace): Remove DFLT support.
232 (/rtx-use-sem-fn?): Don't check for (insn? owner), check
233 estate-for-insn? instead.
234 (s-unop): Use mode of expression, not first operand.
235 (s-binop, s-binop-with-bit, s-shop, s-cmpop): Ditto.
236 (s-sequence): Remove DFLT support.
237 (ifield): Use mode of expression, not UINT.
238 (pc): Comment out, unused.
239 (int-attr): New rtx kind.
241 (set, set-quiet): Pass src to rtl-c-set-{trace,quiet} for expansion.
242 * rtl-traverse.scm (/rtx-canon-debug?): New global.
243 (/make-cstate): New function.
244 (/cstate-context, /cstate-outer-expr): New functions.
245 (/rtx-canon-error): New function.
246 (/rtx-lookup-hw, /rtx-pick-mode, /rtx-pick-mode3, /rtx-pick-op-mode,
247 /rtx-get-last-cond-case-rtx): New functions.
248 (/rtx-canon-*): New functions.
249 (/rtx-canner-table, /rtx-operand-canoners): New globals.
250 (/rtx-make-canon-table, /rtx-special-expr-canoners): New functions.
251 (/rtx-option, /rtx-option-list?): Rewrite.
252 (rtx-munge-mode&options): Replaces /rtx-munge-mode&options.
253 Rewritten, all callers updated.
254 (/rtx-canon-expr, /rtx-canon): New functions.
255 (rtx-canonicalize): Move here from rtl-xform.scm and rewrite.
256 (rtx-canonicalize-stmt): New function.
257 (tstate-make): Remove arg `set?'. All callers updated.
258 (tstate-new-set?): Delete.
259 (/rtx-traverse-options, /rtx-traverse-*mode): Delete,
260 moved to /rtx-canon-*.
261 (/rtx-traverse-normal-operand): New function.
262 (/rtx-traverse-rtx-list): Delete arg `mode', all callers updated.
263 (/rtx-traverse-rtx, /rtx-traverse-setrtx,, /rtx-traverse-testrtx,
264 /rtx-traverse-condrtx, /rtx-traverse-casertx, /rtx-traverse-locals,
265 /rtx-traverse-iteration, /rtx-traverse-env, /rtx-traverse-attrs):
267 (/rtx-traverse-symbol, /rtx-traverse-string, /rtx-traverse-number,
268 /rtx-traverse-symornum, /rtx-traverse-object): Delete.
269 (/rtx-make-traverser-table): Update.
270 (/rtx-traverse-operands): Remove mode processing, now done during
272 (/rtx-traverse-expr): Delete arg `mode', all callers updated.
273 (/rtx-traverse): Ditto.
274 (rtx-init-traverser-tables!): New function.
275 * rtl-xform (/rtx-verify-no-dflt-modes-expr-fn): New function.
276 (rtx-verify-no-dflt-modes): New function.
277 (/rtx-simplify-expr-fn): Update, `arg' mode deleted.
278 (rtx-simplify-insn): Use insn-canonical-semantics.
279 (rtx-canonicalize): Moved to rtl-traverse.scm.
280 (/compile-expr-fn, rtx-compile): Delete.
281 (/rtx-trim-rtx-list): New function.
282 (/rtx-trim-for-doc): Handle set, if.
283 * rtl.scm (<rtx-func>): New members result-mode, matchexpr-index.
284 (/rtx-valid-mode-types): Update.
285 (/rtx-valid-matches): Update.
286 (/rtx-find-matchexpr-index): New function.
287 (rtx-lookup): Require rtx-kind to be the rtx name.
288 (def-rtx-node): New arg result-mode, all callers updated.
289 (def-rtx-syntax-node, def-rtx-operand-node): Ditto.
290 (rtx-lazy-sem-mode): Delete.
291 (/rtx-closure-make): New arg `mode', all callers updated.
292 (rtx-make-ifield, rtx-make-operand, rtx-make-local): Ditto.
293 (rtx-operand-obj): Rewrite.
294 (rtx-make-xop): New functions.
295 (/hw): Renamed from `hw', all callers updated.
296 Use the correct mode instead of DFLT for the index.
297 (rtl-builtin!): Call rtx-init-traversal-tables!.
298 (rtl-finish!): Update.
299 * rtx-funcs.scm (all rtx functions): New parameter: result-mode.
300 Update mode arg-type.
302 (int-attr): New rtx kind.
304 * sem-frags.scm (/frag-hash-compute!): Update, mode arg deleted.
305 (/frag-cost-compute!): Ditto.
306 * semantics.scm (/build-operand!): Delete args op-name, op.
307 New arg op-expr. All callers updated.
308 (/build-mem-operand!): Remove DFLT support.
309 (semantic-compile): Update process-expr!, mode arg deleted.
310 * sid-cpu.scm (gen-semantic-code): Specify #:for-insn? in
312 (/gen-sem-case, /gen-sfrag-code): Ditto.
313 * sid.scm (/op-gen-set-trace1): Renamed from /op-gen-set-trace.
314 (/op-gen-set-trace): New function. If not doing profiling, or using
315 the pbb engine, call /op-gen-set-quiet.
316 * sim-cpu.scm (gen-semantic-code): Specify #:for-insn? in rtl-c calls.
317 * utils-gen.scm (/gen-ifld-extract-base): Update call to rtl-c.
318 (/gen-ifld-extract-beyond, gen-multi-ifld-extract): Ditto.
319 * utils.scm (find-first-index): New function.
320 * doc/rtl.texi: Delete docs for `attr'. Add `int-attr'.
322 * rtx-funcs.scm (eq,ne,lt,gt,le,ge,ltu,leu,gtu,geu): Change class
324 * sem-frags.scm (/frag-cost-compute!): Add COMPARE.
326 2009-09-21 Doug Evans <dje@sebabeach.org>
328 * rtl-c.scm (/rtl-c-build-table): Renamed from rtl-c-build-table.
329 All callers updated. Add FIXME.
330 (all rtx functions): Rename local estate to *estate*. It's an
331 artificial argument added to the rtx, so make it stand out.
333 * openrisc.cpu (or32 isa): Fix setup-semantics.
335 * rtl.scm (rtx-class-*?): Delete, unused.
336 (rtx-style-function?, rtx-style-operand?, rtx-style-macro?): Ditto.
338 * read.scm (/CGEN-RTL-VERSION): Initialize to #f.
339 (init-reader!): Set /CGEN-RTL-VERSION to default.
341 * read.scm (cpu-load): Print load parameters.
343 * dev.scm (load-doc): Set verbose-level to 2.
345 2009-09-20 Doug Evans <dje@sebabeach.org>
347 * rtl.scm (rtx-strdump): Use write instead of display.
349 2009-09-17 Doug Evans <dje@sebabeach.org>
351 * utils-cgen.scm (obj-csv-names): New function.
352 * utils-sim.scm (/sfmt-contents): Use it in logging message.
354 2009-09-12 Doug Evans <dje@sebabeach.org>
356 Clean up pass of mode handling.
357 Make use of mode name vs <mode> object more consistent and clear.
358 * hardware.scm (/keyword-read): Default mode to the mode name,
359 not the <mode> object.
360 (/hw-parse-indices): Parse mode name and pass mode object to
361 <hw-asm> constructor.
362 (/hw-parse-values): Ditto.
363 (<hw-register> parse!): Pass mode name to /hw-parse-indices
364 and /hw-parse-values.
365 (<hw-memory> parse!): Ditto.
366 (<hw-address> parse!): Ditto.
367 * mode.scm (/mode-table): New global, replaces mode-list.
368 Modes stored in hashtable instead of list.
369 (/mode-class-table): New global.
370 (mode-list-non-alias-values): Update.
371 (mode:eq?, mode-compatible?, mode:add!): Update.
372 (mode:lookup): Restrict arg to the mode's name. All callers updated.
373 (mode-maybe-lookup): New function.
374 (mode-real-name): Restrict arg to a <mode> object. All callers updated.
375 (mode-real-mode, mode-sem-mode, mode-bigger?): Ditto.
376 (mode-find, mode-set-word-modes!): Update
377 (mode-ensure-word-sizes-defined): Update.
378 (/sort-mode-classes!): New function.
379 (mode-builtin!): Update. Sort mode classes here.
380 (mode-finish!): Sort mode classes here too.
381 * rtl-c.scm (/rtl-c-get): Restrict mode arg to a <mode> object.
383 (rtl-c-set-quiet): Allow mode to be name of object.
384 (rtl-c-set-trace): Ditto.
385 * rtl-traverse.scm (rtl-eval-with-estate): Restrict mode arg to
386 <mode> object. All callers updated.
387 * rtl.scm (rtx-sem-mode): Restrict arg to <mode> object.
388 (rtx-lazy-sem-mode): Ditto.
389 (<rtx-temp> make!): Assert mode arg is a <mode> object.
390 (rtx-env-make): Allow var-list modes to be name or object.
391 * sem-frags.scm (/frag-expr-assq-locals): New function.
392 (/frag-compute-locals!): Call it.
393 (/sfrag-create-cse-mapping): Renamed from sfrag-create-cse-mapping.
395 * semantics.scm (/build-mem-operand!): Handle mode aliases.
397 * sim-test.scm (*): Symbols no longer can be passed to string-append.
399 2009-09-10 Doug Evans <dje@sebabeach.org>
401 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
402 Improve error message for missing or too many bits.
403 (/insn-parse): Don't verify iformat for virtual insns.
405 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
407 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
408 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
409 * sid.scm (pbb-engine-insns): Ditto.
410 * sim-decode.scm (cgen-decode.c): Ditto.
412 2009-09-09 Doug Evans <dje@sebabeach.org>
414 * rtl-traverse.scm: Comment tweaks.
415 * rtl-xform.scm: Comment and reformatting tweaks.
416 * doc/rtl.texi: Add text to docs on ifield-assertions.
418 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
421 Add support for controlling warnings/errors.
422 Add tests for iformat description errors.
423 * dev.scm (cload): New option #:diag.
424 * read.scm (<reader>): New member verify-iformat?.
425 (/parse-diagnostic, parse-warning): New functions.
426 (parse-error): Guts moved to /parse-diagnostic.
427 (/set-diagnostic-options!): New function.
428 (cpu-load): New arg diagnostic-options, all callers updated.
429 Recognize -w diagnostic-option-list.
430 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
431 (ifld-simple-ifields, ifields-simple-ifields): New function.
432 * insn.scm (/parse-insn-format-iflds): New function.
433 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
434 New arg isa, all callers updated. Do some basic validation of the
435 ifield list if requested.
436 * mach.scm (/sanity-check-insns): Improve error message text.
437 * doc/running.texi: Document -w option.
438 * doc/porting.texi: Document #:trace, #:diag options to cload.
440 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
442 * dev.scm (*): Change default verbosity level to 2.
444 * ifield.scm (<ifield> pretty-print): New method.
445 (ifld-pretty-print): New function.
446 (<multi-ifield> pretty-print): New method.
448 * ifield.scm (<ifield> field-start): Delete word-len arg.
451 (<multi-ifield> field-start): Ditto.
452 * operand.scm (<hw-index> field-start): Ditto.
454 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
455 total-bitsize. All callers updated.
456 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
457 New member /insn-base-value.
458 (insn-base-value): New function.
459 * mach.scm (/sanity-check-insns): New function.
460 (arch-analyze-insns!): Call it.
462 2009-09-08 Doug Evans <dje@sebabeach.org>
464 * iformat.scm (ifields-base-ifields): Simplify.
465 (compute-insn-length): Simplify, call ifields-base-ifields.
466 (compute-insn-base-mask): Ditto.
467 * ifield.scm (ifld-known-values): Ditto.
468 (ifld-base-ifields): Ditto.
469 * insn.scm (insn-value): Ditto.
470 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
472 2009-09-08 DJ Delorie <dj@redhat.com>
474 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
475 preprocessor macro, not an enum.
477 2009-09-08 Doug Evans <dje@sebabeach.org>
479 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
481 (*): Remove trailing ":" from error messages passed to estate-error.
483 2009-09-07 Doug Evans <dje@sebabeach.org>
485 * types.scm (<struct>): Delete.
487 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
489 (/pmacro-loc-error): New function.
491 * mach.scm (/isa-parse-decode-assist): New function.
492 (/isa-parse): Call it.
494 * decode.scm (/get-subopcode-value): New function.
495 (/opcode-slots): Call it.
496 (/fill-slot!): Add logging message.
498 * cos.scm (/object-error): Convert symbols to strings before passing
501 * read.scm (rtl-version-equal?): New function.
502 (rtl-version-at-least?, rtl-version-older?): New functions.
504 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
505 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
507 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
509 2009-09-03 Doug Evans <dje@sebabeach.org>
511 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
514 2009-09-01 DJ Delorie <dj@redhat.com>
516 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
517 (parse_unsigned16_range): Likewise.
518 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
521 2009-09-01 Doug Evans <dje@sebabeach.org>
523 Pmacro .equals -> .equal?
524 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
525 -pmacro-builtin-equals. All callers updated.
526 (pmacros-init!): Rename .equals to .equal?.
527 * doc/pmacros.texi: Update.
528 * testsuite/pmacros-1.test: Update.
530 * doc/porting.texi: Work around texi2html bug where it doesn't
531 properly escape <> inside double-quotes inside @code.
533 * doc/porting.texi (Doing an opcodes port): Add step to specify
536 2009-08-29 Doug Evans <dje@sebabeach.org>
538 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
540 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
542 2009-08-27 Doug Evans <dje@sebabeach.org>
544 Add do-count rtl function.
545 * rtl-c.scm (s-do-count): New function.
546 (do-count): New rtl handler.
547 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
548 (-rtx-make-traverser-table): Add ITERATION.
549 * rtl.scm (rtx-make-iteration-limit-var): New function.
550 (rtx-env-make-iteration-locals): New function.
551 * rtx-funcs.scm (do-count): New rtl function.
552 * cpu/play.cpu: Add do-count-test insn.
553 * doc/rtl.texi: Add docs on do-count.
555 2009-08-26 Doug Evans <dje@sebabeach.org>
557 * read.scm (parse-error): Change error message output format
558 to match context-owner-error.
559 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
560 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
561 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
562 (operand): Call estate-error instead of context-error.
563 (local, delay): Ditto.
564 (ref, attr): Call estate-error instead of error.
565 * rtl-traverse.scm (tstate-error): New function.
566 (-rtx-traverse-error): Call tstate-error instead of context-error.
567 (-rtx-traverse-operands, -rtx-traverse): Ditto.
568 (estate-error): New function.
569 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
571 (e-if): Call estate-error instead of error.
572 * rtx-funcs.scm (error): Call estate-error instead of context-error.
574 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
575 Rewrite to call context-owner-error.
576 (context-owner-error): New function.
578 * ifield.scm (<ifield> constructor): New arg `location',
580 * insn.scm (<insn> constructor): Ditto.
581 (<multi-insn> constructor): Ditto.
582 * minsn.scm (<macro-insn> constructor): Ditto.
583 * operand.scm (<operand> constructor): Ditto.
584 * utils-cgen.scm (builtin-location): New function.
585 (<source-ident>): Fix default value of member `location'.
586 (source-ident?): New function.
588 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
589 (estate-push-env, estate-with-modifiers): Ditto.
590 (estate-deepen): New function.
592 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
594 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
595 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
598 2009-08-25 Doug Evans <dje@sebabeach.org>
600 * doc/pmacros.texi (pmacro default argument values): Add text.
602 2009-08-23 Doug Evans <dje@sebabeach.org>
604 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
605 Rename member prefix -> name-prefix.
606 (<keyword> getters): Update.
607 (-keyword-parse): Update. Default enum-prefix to NAME-.
608 (-keyword-read): Update. Don't compute default value for
610 (define-keyword): Update.
611 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
612 * read.scm (cgen-rtl-version): New function.
613 (-supported-rtl-versions): Add (0 8).
614 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
615 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
616 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
617 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
618 Update, print-name -> enum-prefix, make uppercase.
619 Remove unnecessary name-prefix spec.
620 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
621 * cpu/ip2k.cpu (register-names): Ditto.
622 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
623 * cpu/sparc.cpu (gr-names): Ditto.
624 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
625 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
626 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
627 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
628 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
629 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
630 prefix -> name-prefix.
631 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
632 Update, print-name -> enum-prefix, make uppercase.
633 (drc-names, xf-names): Ditto.
634 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
635 * doc/rtl.texi (Keywords): New section.
636 (hardware indices): Update text.
637 (rtl versions): Add 0.8.
639 Add define-rtl-version.
640 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
641 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
642 (cgen-lang-fixlevel): Delete.
643 (-supported-rtl-versions): New variable.
644 (-cmd-define-rtl-version): New function.
645 (init-reader!): New command define-rtl-version.
646 (-cgen): Add rtl version to --version output.
647 * doc/rtl.texi: Document rtl version support.
648 * cpu/play.cpu: Add define-rtl-version.
650 2009-08-22 Doug Evans <dje@sebabeach.org>
652 * Makefile.am (OPTIONS): Define.
653 (desc): Just generate <arch>-desc.[ch] files.
654 * Makefile.in: Regenerate.
655 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
657 (cgen-desc.c): Similarly.
658 * gen-all-desc: New file.
659 * opcodes.scm (opc-file-provided?): New function.
661 * mach.scm (current-*-add!): Update calls to parse-error.
662 * operand.scm (op:new-mode): Update call to parse-error.
663 * utils-cgen.scm (make-obj-context): New function.
665 * NEWS: Copy over entries from 1.1 branch.
667 2009-08-20 Doug Evans <dje@sebabeach.org>
669 * gas-test.scm (<keyword> test-data): Catch invalid requests,
670 flag a warning and compensate.
671 (<hw-address test-data): Tweak for readability.
672 (<hw-iaddress test-data): Ditto.
673 (cgen-build.sh): Convert symbols to strings before passing to
675 (cgen-allinsn.exp): Ditto.
677 * doc/pmacros.texi (.splice): Add more text.
679 2009-08-19 Doug Evans <dje@sebabeach.org>
681 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
682 distinguish from 1.1.
683 * configure: Regenerate.
684 * read.scm (-CGEN-VERSION): Update.
685 * doc/version.texi: Update.
687 New builtin .pmacro?.
688 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
689 (pmacros-init!): Add .pmacro?.
690 * doc/pmacros.text: Document .pmacro?.
691 * testsuite/pmacros-1.test: Test .pmacro?.
693 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
694 of a pmacro begins before its arguments are evaluated, improves
697 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
698 * testsuite/pmacros-1.test: Ditto. Add better tests.
700 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
702 (Operands): Similarly.
704 2009-08-18 Doug Evans <dje@sebabeach.org>
706 * ifield.scm (ifld-encode-mode): Add FIXME.
707 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
709 (<ifield> gen-extract): Similarly.
711 * read.scm (parse-error): Handle #f for context-location.
712 * utils-cgen.scm (unspecified-location): Fix building of
715 * doc/rtl.texi: Document how to write hex and boolean values.
717 * gas-test.scm (<hw-asm> test-data): Handle () values.
718 (<keyword> test-data): Convert symbols to strings before passing
720 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
723 * operand.scm (hw-index-scalar): Set `name'.
724 (hw-index-anyof, hw-index-derived): Ditto.
726 2009-08-17 Doug Evans <dje@sebabeach.org>
728 * pmacros.scm (-pmacro-builtin-internal-test): New function.
729 (pmacros-init!): Add .internal-test.
730 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
731 * testsuite/testsuite.cpu (internal-verify): New pmacro.
732 * doc/pmacros.text: Document .internal-test.
734 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
735 (parse-comment): Allow numbers.
736 * doc/porting.texi: Document that names and comments may be lists.
738 * insn.scm (-insn-parse): Fix typo.
740 Rename .eval -> .exec. Add new .eval.
741 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
742 (-pmacro-builtin-eval): New function.
743 (pmacros-init!): Add .exec.
744 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
745 * testsuite/location-1.test: Update.
746 * testsuite/pmacros-1.test: Add test for .eval.
748 2009-08-16 Doug Evans <dje@sebabeach.org>
750 * doc/porting.texi: Remove support for Guile 1.4.
752 * read.scm (current-reader-location): Return unspecified location
753 if reader hasn't been initialized yet.
755 2009-08-13 Doug Evans <dje@sebabeach.org>
757 * dev.scm: Document tracing options.
759 * pmacros.scm (pmacro-dump): New function.
760 (check-pmacro): Tweak debugging output.
761 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
762 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
764 Add .let* pmacro builtin.
765 * pmacros.scm (-pmacro-builtin-let*): New function.
766 (pmacros-init!): Add .let*.
767 * doc/pmacros.texi: Document .let*.
768 * testsuite/pmacros-1.test: Test .let*.
770 2009-08-12 Doug Evans <dje@sebabeach.org>
772 Clean up cpu file parsing, pass context consistently instead of the
773 old "errtxt" argument.
774 NOTE: ACU == "All Callers Updated".
775 * attr.scm (-parse-simple-attribute): Renamed from
776 parse-simple-attribute, ACU.
777 (-attr-parse): Change errtxt argument to context, ACU.
779 (atlist-parse): Ditto. Put context arg first.
780 (attr-parse): Use parse-error instead of context-error.
781 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
782 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
783 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
784 `context' arg is now a <context> object. ACU.
785 (-keyword-read): `context' arg is now a <context> object. ACU.
786 (-hw-parse-indices): Change errtxt argument to context, ACU.
787 (-hw-parse-values, -hw-parse-handlers): Ditto.
788 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
789 (-hw-validate-layout, -hw-create-getter-from-layout,
790 -hw-create-setter-from-layout): Ditto.
791 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
792 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
793 (<hw-address>:parse!): Ditto.
794 * ifield.scm (-ifield-parse, ifield-read): Ditto.
795 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
796 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
797 (-multi-ifield-parse, -multi-ifield-read): Ditto.
798 * insn.scm (-insn-parse, -insn-read): Ditto.
799 (parse-syntax): Ditto. Put context arg first.
800 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
801 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
802 (-parse-insn-format): Ditto.
803 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
804 (-arch-parse-isas): Ditto.
805 (-isa-read): Add context arg, ACU.
806 (-cpu-parse, -cpu-read, -mach-read): Ditto.
807 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
809 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
810 (minsn-make-alias): Ditto.
811 * mode.scm (-mode-parse): Ditto.
812 (parse-mode-name): Ditto. Put context arg first.
813 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
814 errtxt argument to context, ACU.
815 (-unit-parse, -model-parse, -model-read): Ditto.
816 * operand.scm (-operand-parse-getter): Use parse-error instead of
818 (-operand-parse-setter): Ditto.
819 (-operand-parse): Change errtxt argument to context, ACU.
820 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
821 (-anyof-operand-parse, -anyof-operand-read): Ditto.
822 * read.scm (reader-error): Delete. Use parse-error instead.
823 (parse-error): Change errtxt argument to context, ACU. Split args
824 argument into expr and maybe-help-text.
825 (-reader-process-expanded-1!): Reorganize.
826 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
827 * types.scm (parse-type): Ditto.
828 * utils-cgen.scm (single-location->simple-string): New function.
829 (<context>): Replace members file,lineno with location.
830 (make-prefix-context): Renamed from context-make-prefix, ACU.
831 (make-current-context): New function.
832 (context-append, context-append-name): New functions.
833 (context-make-reader): Delete.
834 (parse-name): Change errtxt argument to context, ACU.
835 Put context arg first.
836 (parse-comment): Ditto.
837 (parse-number): Change errtxt argument to context, ACU.
838 (arg-list-validate-name, arg-list-check-no-args,
839 arg-list-symbol-arg): Ditto.
841 * read.scm (-cmd-if): Don't assume test is a list.
843 * html.scm (get-insn-properties): Delete errtxt, unused.
845 2009-08-11 Doug Evans <dje@sebabeach.org>
847 * doc/rtl.texi (hardware types): Add pc.
849 2009-08-07 Doug Evans <dje@sebabeach.org>
851 Add -t option for tracing things like commands, pmacro expansion.
852 * dev.scm (cload): New arg #:trace.
853 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
854 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
855 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
856 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
857 (-reader-process-expanded-1!): Trace commands if requested.
858 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
859 (-set-trace-options!): New function.
860 (-init-reader!): New function.
861 (cpu-load): New arg trace-options, all callers updated.
862 Call -init-reader! and -set-trace-options!.
863 (cgen-usage): Improve output formatting.
864 (common-arguments): New option -t.
866 * utils-cgen.scm (single-location->string): Renamed from
867 pretty-print-single-location. All callers updated.
868 (location->string): Renamed from pretty-print-location.
870 (source-properties-location->string): New function.
871 * doc/running.texi: Document -t.
873 2009-08-06 Doug Evans <dje@sebabeach.org>
875 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
876 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
877 * utils.scm: ... here.
879 2009-08-05 Doug Evans <dje@sebabeach.org>
881 Track source location better, for better error messages.
882 * pmacros.scm (-pmacro-eval): Delete, unused.
883 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
884 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
885 (scan-list, scan): Ditto.
886 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
887 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
888 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
889 (scan-list1): New function.
890 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
891 * read.scm (<reader>): New member `location'.
892 (-reader-lookup-command): Renamed from reader-lookup-command,
894 (reader-error): Rewrite to produce better source location info.
895 (current-reader-location): New function.
896 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
897 All callers updated. Record source location of expression.
898 (reader-process-expanded!): Renamed from reader-process-expanded.
900 (-reader-process!): Renamed from reader-process. New arg `loc'.
901 All callers updated. Record source location of define-pmacro.
902 * utils-cgen.scm (<location>): New class.
903 (single-location): New (pseudo) class.
904 (pretty-print-single-location, pretty-print-location): New functions.
905 (location-top, location-push-single, location-push): New functions.
906 (unspecified-location, current-input-location): New functions.
907 (location-property): New object property.
908 (location-property-set!): New function.
909 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
911 * testsuite/location-1.test: New testcase.
912 * testsuite/run-tests.sh: Fix fail count handling.
913 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
914 to expect cgen to fail.
916 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
918 * read.scm (-cmd-include): Renamed from include. All callers updated.
919 (-cmd-if): Renamed from cmd-if. All callers updated.
920 Use reader-process-expanded! on then/else clauses instead of eval1.
922 2009-07-22 Doug Evans <dje@sebabeach.org>
924 * modes.scm (TI,OI): New modes.
925 * types.scm (parse-type): Improve error checking. Don't hardwire
927 * utils.scm (non-negative-integer?): New function.
929 * pmacros.scm (-pmacro-builtin-find): New predicate.
930 (pmacros-init!): Add .find.
931 * doc/pmacros.tex: Document .find.
932 * testsuite/pmacros-1.test: Test .find.
934 2009-07-20 Doug Evans <dje@sebabeach.org>
936 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
937 commented out printfs.
938 * rtl.scm (rtl-finish!): Whitespace tweaks.
939 * model.scm (parse-insn-timing): Tweak logging message.
940 * operand.scm: Comment and whitespace tweaks.
941 (op:type): Tweak error message.
942 (op-ifield): Tweak logging message.
943 (-derived-operand-parse, anyof-merge-semantics): Ditto.
944 * read.scm: Whitespace cleanup.
945 * utils.scm: Whitespace cleanup.
947 2009-07-19 Doug Evans <dje@sebabeach.org>
949 Fix binding of nested pmacro parameters.
950 * pmacros.scm (-pmacro-env-make): New arg prev-env.
952 (-pmacro-bulid-lambda): Ditto.
953 * doc/pmacros.texi: Update.
954 * testsuite/pmacros-1.test: Add testcase.
956 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
958 (-multi-ifield-make-default-extract): Ditto.
960 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
961 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
962 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
964 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
965 * doc/rtl.texi: Update.
967 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
969 Rename builtin boolean pmacros, for consistency with rtl.
970 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
971 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
972 * doc/pmacros.texi: Update.
973 * testsuite/pmacros-1.test: Update.
975 2009-07-17 Doug Evans <dje@sebabeach.org>
977 Use hash tables to record ifields, operands, insns, macro-insns.
978 * attr.scm (attr-builtin!): Tweak some comments.
979 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
980 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
982 (<multi-ifield>): New constructor.
983 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
984 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
986 (-sub-insn-make!): Add hack to avoid differences in generated code.
987 (multi-insn-instantiate!): Add total number of multi-insns to
989 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
990 minsn-list to foo-table. New member next-ordinal.
991 Update getters/setters.
992 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
994 (-get-next-ordinal!, -get-lowest-ordinal): New function.
995 (-make-ident-object-table, -ident-object-table->list,
996 -ident-object-table-add!, -ident-object-table-lookup): New functions.
997 (current-ifld-list, current-ifld-add! current-ifld-lookup,
998 -ifld-already-defined?): Rewrite.
999 (current-op-list, current-op-add! current-op-lookup,
1000 -op-already-defined?): Rewrite.
1001 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
1002 (current-insn-list, current-insn-add! current-insn-lookup,
1003 -insn-already-defined?): Rewrite.
1004 (current-minsn-list, current-minsn-add! current-minsn-lookup,
1005 -minsn-already-defined?): Rewrite.
1006 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
1007 (MAX-VIRTUAL-INSNS): Define.
1008 (arch-analyze-insns!): Add hack to avoid differences in generated code.
1009 Update use of arch-insn-list.
1010 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
1011 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
1013 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
1014 <ident>. New constructor.
1015 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
1017 * sid.scm (-virtual-insn-add!): New function.
1018 (-create-virtual-insns!): Call it.
1019 (-fill-sim-insn-list!): Rewrite.
1020 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
1021 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
1022 * utils-cgen.scm (<ordered-ident>): New class.
1023 (obj-ordinal, obj-set-ordinal!): New functions.
1024 (add-ident-methods!): Delete.
1026 * model.scm (parse-insn-timing): Change logging message to level 3.
1028 2009-07-16 Doug Evans <dje@sebabeach.org>
1030 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
1031 add a link to define-normal-insn-enum.
1033 * doc/porting.texi (Conventions): Add docs on writing integers.
1035 * cpu/simplify.inc (*): One line doc strings don't need \n.
1036 (df): Invoke define-full-ifield instead of claiming it's an alias.
1038 (dnop): Mark as deprecated.
1040 * cpu/play.cpu: Add example of hardware `layout'.
1041 * doc/porting.tex: Add docs on simplify.inc.
1042 * doc/rtl.texi: Cleanup pass over "Simplification macros",
1045 * ifield.scm: Whitespace/formatting cleanup.
1047 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
1049 * read.scm (parse-error): Don't print single entry args as a list.
1050 (-reader-process-expanded-1): Convert symbol to string for
1053 * insn.scm (multi-insn-instantiate!): Tweak logging message.
1055 2009-07-15 Doug Evans <dje@sebabeach.org>
1057 * cpu/simplify.inc (dno): New pmacro.
1058 * doc/porting.texi: Add section on simplify.inc.
1059 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
1061 2009-07-15 Doug Evans <devans@sourceware.org>
1063 * gen-all-doc: Generate index.html.
1065 2009-07-13 Doug Evans <dje@sebabeach.org>
1067 Extend pmacro language, add testsuite.
1068 * Makefile.am (SUBDIRS): Add testsuite.
1069 * Makefile.in: Regenerate.
1070 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
1071 testsuite/test-utils.sh.
1072 * configure: Regenerate.
1073 * dev.scm (cload): Handle testsuite app.
1074 (load-testsuite): New function.
1075 * pmacros.scm: (-pmacro-debug?): New global.
1076 (-smacro-table): New global.
1077 (-smacro-lookup, -smacro-set!): New functions.
1078 (-pmacro-make): New argument `syntactic-form?', all callers updated.
1079 (-pmacro-syntactic-form?): New function.
1080 (-pmacro-expected-number, -pmacro-verify-number): New functions.
1081 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
1082 (-pmacro-expected-non-negative-integer): New function.
1083 (-pmacro-verify-non-negative-integer): New function.
1084 (-pmacro-expand-expr-list): New function.
1085 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
1086 (-pmacro-process-args): Renamed from -pmacro-invoke.
1087 (-pmacro-apply, -smacro-apply): New functions.
1088 (-pmacro-expand): Rewrite syntactic form processing.
1089 (-pmacro-build-lambda): Reformat.
1090 (define-pmacro): Watch for more errors in definition.
1091 (pmacro-debug): New function.
1092 (pmacro-trace): Set/reset -pmacro-debug?.
1093 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
1094 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
1095 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
1096 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
1097 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
1098 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
1099 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
1100 (pmacros-init!): Initialize -smacro-table.
1101 Rewrite pmacro initialization.
1102 * read.scm (reader-process-expanded): Renamed from
1103 -reader-process-expanded. All callers updated.
1104 Recognize () as a no-op.
1105 (cpu-load): Tweak logging messages.
1106 * utils.scm (message): Add comment.
1107 * cpu/play.cpu: Add some instructions to play with .let.
1108 * doc/cgenint.texi: Move some debugging related docs to here from
1110 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
1111 * testsuite/Makefile.am: New file.
1112 * testsuite/Makefile.in: New file.
1113 * testsuite/test-utils.sh.in: New file.
1114 * testsuite/run-tests.sh: New file.
1115 * testsuite/testsuite.cpu: New file.
1116 * testsuite/pmacros-1.test: New file.
1118 * decode.scm: Comment and formatting tweaks.
1119 (-build-decode-table-guts): Add more data to logging message.
1121 2009-07-12 Doug Evans <dje@sebabeach.org>
1123 Delete files that now live in ../cpu.
1124 * cpu/iq10.cpu: Delete.
1125 * cpu/iq2000.cpu: Delete.
1126 * cpu/iq2000.opc: Delete.
1127 * cpu/iq2000m.cpu: Delete.
1128 * cpu/m32r.cpu: Delete.
1129 * cpu/m32r.opc: Delete.
1131 2009-07-09 Doug Evans <dje@sebabeach.org>
1133 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
1134 All callers updated. Work around -ve shifts by referencing the
1137 * utils.scm (message): Handle pairs.
1139 2009-07-08 DJ Delorie <dj@redhat.com>
1141 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
1142 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
1143 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
1146 2009-07-07 Doug Evans <dje@sebabeach.org>
1148 * cpu/play.cpu (add): Use (ifield enum) for one format element.
1149 * cpu/play.opc: New file.
1151 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
1152 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
1153 * doc/rtl.texi (Instructions): Update.
1155 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
1156 (opc-arguments, -OPC): Call set-opc-file-path!.
1157 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
1158 (set-opc-file-path!): New function.
1159 * dev.scm: Mention set-opc-file-path!. Mention doc options.
1161 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
1162 before passing to gen-c-args.
1164 2009-07-06 DJ Delorie <dj@redhat.com>
1166 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
1167 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
1168 unspecified accesses to control registers.
1170 2009-07-01 DJ Delorie <dj@redhat.com>
1172 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
1173 unspecified accesses to control registers.
1175 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
1176 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
1178 2009-06-27 Doug Evans <dje@sebabeach.org>
1180 * gen-all-intrinsics: New file.
1182 2009-06-24 Doug Evans <dje@sebabeach.org>
1184 * All *.scm files: Update copyright year.
1185 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
1187 2009-06-23 DJ Delorie <dj@redhat.com>
1189 * intrinsics.scm: Updates to support IVC2.
1190 (belongs-to-group?): Check IVC2 slots.
1191 (-slots-attribute): New.
1192 (targets::attributes): Add SLOTS.
1193 (target:add-well-known-intrinsics): Add CPMOV.
1194 (md-insn): Add CPTYPE and CRET?.
1195 (add-md-insn): Likewise.
1196 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
1197 duplicate insns with different bit patterns.
1198 (write-cgen-insn?): Add cret? support.
1199 (intrinsics.h): Add vector types.
1200 (runtime-op): Add vector support.
1201 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
1203 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
1204 * cpu/mep-ivc2.cpu: Update all insns to include type information.
1205 (h-cr-ivc2): Default to typeless.
1206 (h-ccr-ivc2): Fix register width.
1207 (SLOTS): Fix values and default.
1208 (ivc2_*): Add control register names.
1209 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
1211 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
1212 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
1214 2009-06-22 Doug Evans <dje@sebabeach.org>
1216 * semantics.scm (insn-build-known-values): Fix typo in comment.
1218 2009-06-21 Doug Evans <dje@sebabeach.org>
1220 * rtl-xform.scm (rtx-simplify-insn): New function.
1221 * html.scm (gen-insn-docs): Call it.
1222 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
1223 * iformat.scm (ifmt-analyze): Minor simplification.
1225 * semantics.scm (semantic-compile): Change arg sem-code-list to
1227 (semantic-attrs): Ditto.
1228 * iformat.scm (ifmt-analyze): Update.
1229 (ifmt-compute!): Update.
1230 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
1232 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
1233 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
1234 * semantics.scm (rtx-simplify): Ditto.
1235 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
1236 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
1237 (-simplify-expr-fn): Move to rtl-xform.scm.
1238 (-solve-expr-fn, rtx-solve): Ditto.
1239 * rtl-xform.c: New file.
1240 * read.scm: Load it.
1242 * rtl-c.scm (delay): Add FIXME, tweak formatting.
1243 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
1244 (-rtx-traverse, rtx-traverse): Ditto.
1246 2009-06-20 Doug Evans <dje@sebabeach.org>
1248 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
1250 * configure.in: Update version to 1.1.
1251 * configure: Regenerate.
1252 * read.scm (-CGEN-VERSION): Update to 1.1.0.
1254 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
1255 Doug Evans <dje@sebabeach.org>
1257 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
1258 (cgen-desc.c): Ditto.
1259 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
1260 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
1261 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
1262 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
1263 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
1264 (cgen-cpuall.h, cgen-ops.c): Ditto.
1265 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
1266 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
1267 (cgen-sem-switch.c): Ditto.
1268 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
1269 * sim-model.c (cgen-model.c): Ditto.
1271 2009-06-18 Doug Evans <dje@sebabeach.org>
1273 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
1275 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
1277 * dev.scm (cload): Change #:arch argument to take the path to the
1278 .cpu file instead of just the name of the architecture.
1279 * read.scm (arch-path): Remove trailing '/'.
1280 (cpu-load): Set `arch-path' to directory of .cpu file.
1281 (-cgen): Don't set `arch-path' here.
1283 * doc/porting.texi: Update.
1285 2009-06-14 Doug Evans <dje@sebabeach.org>
1287 * gen-all-doc: Use files in ../cpu where possible.
1289 * Makefile.am (ARCHFILE): Fix path.
1290 * Makefile.in: Regenerate.
1291 * html.scm: Use "pre" instead of "plaintext".
1293 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
1294 * doc/app.texi: Cleanup pass.
1295 * doc/cgen.texi: Cleanup pass.
1296 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
1297 * doc/intro.texi: Cleanup pass.
1298 * doc/mdate-sh: New file.
1299 * doc/opcodes.texi: Cleanup pass.
1300 * doc/pmacros.texi: Cleanup pass.
1301 * doc/porting.texi: Cleanup pass.
1302 * doc/rtl.texi: Cleanup pass.
1303 * doc/running.texi: Cleanup pass. Document more runtime options.
1304 * doc/stamp-vti: Update.
1305 * doc/version.texi: Update.
1307 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
1308 (GUILE): Fix definition.
1309 * Makefile.in: Regenerate with automake 1.9.6.
1310 * aclocal.m4: Regenerate with aclocal 1.9.6.
1311 * configure.in (AC_PREREQ): Set to 2.59.
1312 (GENINSRC_NEVER): Define.
1313 * configure: Regenerate with autoconf 2.59.
1314 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
1315 (cgen.info,cgen.dvi): Delete.
1316 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
1317 (noinst_TEXINFOS): Add cgenint.texi.
1318 (DOCFILES): Add missing files.
1319 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
1320 * doc/Makefile.in: Regenerate with automake 1.9.6.
1322 * guile.scm: Add "." to %load-path if >= guile version 1.8.
1324 * attr.scm: Removing trailing whitespace.
1325 * cgen-intrinsics.scm: Ditto.
1326 * cgen-sim.scm: Ditto.
1332 2009-05-28 DJ Delorie <dj@redhat.com>
1334 * cpu/mep.opc (parse_signed16_range): New.
1335 (parse_unsigned16_range): New.
1336 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
1338 2009-05-26 DJ Delorie <dj@redhat.com>
1340 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
1342 (f-ivc2-ccrn-c3hi): New.
1343 (f-ivc2-ccrn-c3lo): New.
1344 (f-ivc2-ccrn-c3): New.
1345 (ivc2c3ccrn): Use it.
1347 2009-05-22 DJ Delorie <dj@redhat.com>
1349 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
1350 (mep_config_map): Regenerate.
1352 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
1353 ivc2-specific names.
1355 (cmovc): move to after field definitions, use ivc2-specific
1357 (cpmovi_b_P0S_P1): New.
1359 2009-05-19 DJ Delorie <dj@redhat.com>
1361 * cpu/mep.opc: Regenerate configuration.
1362 (parse_cdisp10): Only check CPU flags, not COP flags.
1363 (check_configured_mach): Likewise.
1365 2009-05-13 DJ Delorie <dj@redhat.com>
1367 * intrinsics.scm (insns.md): Add RTL predicates.
1368 (intrinsics.h): Remove old C intrinsics.
1370 2009-04-29 DJ Delorie <dj@redhat.com>
1372 * mep-ivc2.cpu: New.
1373 * mep-core.cpu: Regenerated. Add support for deferred register
1375 (SLOT): Add IVC2 slot types.
1376 (sim-syscall): Rename to something more appropriate.
1377 * mep-ext-cop.cpu: Regenerate.
1378 * mep.opc: Regenerate. Add "coprocessor supported" define area.
1379 (print_slot_insn): New.
1380 (mep_examine_ivc2_insns): New.
1381 (mep_print_insn_set_ivc2_mode): New.
1382 (mep_print_insn): Support IVC2 slotting.
1384 2009-04-20 DJ Delorie <dj@redhat.com>
1386 * intrinsics.scm (intrinsics-analyze!): Include aliases.
1387 (guess-mode): Drop COP* syntax.
1388 (need-insn): Add "--syscall--" to the list.
1389 (enum-type): Drop COP* syntax.
1390 (intrinsics.h): Likewise.
1391 (intrinsic-protos.h): Change file header to allow it to be
1394 2009-04-17 DJ Delorie <dj@redhat.com>
1396 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1397 (lhucpm1): Limit to C5 mach.
1398 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1399 * cpu/mep-core.cpu (extend-cdisp10): New.
1400 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1402 2009-04-08 DJ Delorie <dj@redhat.com>
1404 * cpu/mep-c5.cpu: New.
1405 * cpu/mep-core.cpu: Add C5 support.
1406 * cpu/mep.opc: Likewise.
1408 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1410 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1411 about calling memset with a zero length.
1413 2009-02-03 DJ Delorie <dj@redhat.com>
1415 * cpu/mep-core.cpu: Update to new MeP configuration.
1416 * cpu/mep-ext-cop.cpu: Likewise.
1417 * cpu/mep.opc: Likewise.
1419 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1421 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1423 2008-06-17 Dave Brolley <brolley@redhat.com>
1425 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1428 2007-11-13 Dave Brolley <brolley@redhat.com>
1430 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1432 2007-11-05 Dave Brolley <brolley@redhat.com>
1434 * intrinsics.scm,cgen-intrinsics.scm: New application which
1435 generates code to support intrinsic functions for insns in the
1436 mep architecture in gcc.
1438 2007-09-21 Dave Brolley <brolley@redhat.com>
1440 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1441 (rn3us): CDATA attribute now LONG.
1443 2007-08-21 Dave Brolley <brolley@redhat.com>
1445 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1448 2007-07-05 Nick Clifton <nickc@redhat.com>
1450 * utils.scm (copyright-fsf): Update copyright notice to refer to
1453 2007-05-22 Nick Clifton <nickc@redhat.com>
1455 * doc/cgen.texi: Use @copying around the copyright notice.
1456 * doc/internals.texi: Likewise.
1458 2007-02-05 Dave Brolley <brolley@redhat.com>
1460 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1462 2007-02-05 Dave Brolley <brolley@redhat.com>
1464 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1465 in the generated code for @arch@_cgen_init_asm if it is defined.
1467 * Contribute the following changes:
1468 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1470 * attr.scm (<string-attribute>): New attribute class.
1471 (attr-kind): Handle <string-attribute>.
1472 (parse-simple-attribute): New function.
1473 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1474 (<bitset-attribute> 'parse-value): Likewise.
1475 (<boolean-attribute> 'parse-value): Likewise.
1476 (<enum-attribute> 'parse-value): Likewise.
1477 (<string-attribute> 'parse-value): New function.
1478 (-attr-parse): Handle <string-attribute>.
1479 (-attr-read): Likewise.
1480 (<string-attribute> 'gen-value-for-defn-raw): New function.
1481 (<string-attribute> 'gen-value-for-defn): New function.
1483 2006-11-07 Dave Brolley <brolley@redhat.com>
1485 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1488 2006-10-18 Dave Brolley <brolley@redhat.com>
1490 * Contribute the following changes:
1492 2006-07-11 Dave Brolley <brolley@redhat.com>
1494 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1496 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1497 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1498 hardware or memory mode which was used.
1499 * sid-cpu.scm (hw-need-write-stack?): New function.
1500 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1501 identify hardware which uses write stacks.
1502 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1503 Initialized to an empty list.
1504 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1505 hw-need-write-stack?.
1506 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1507 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1508 (used-in-delay-rtl?): New method of <hardware-base>.
1509 (hw-used-in-delay-rtl?): New function.
1511 2006-06-20 Dave Brolley <brolley@redhat.com>
1513 * sid.scm (gen-attr-type): Removed.
1514 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1515 (SH2a-MACH): Add sh5.
1516 (sh2a-nofpu-models): Add units for sh5.
1517 (sh2a-fpu-models): Likewise.
1519 2006-06-15 Dave Brolley <brolley@redhat.com>
1521 * cpu/sh-sim.cpu: New file.
1522 * cpu/sh-sid.cpu: New file.
1523 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1524 (All fields): Remap for (insn-lsb0? #f)
1525 (All insns): Add timing specs.
1526 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1527 'xattrs' and .splice it in.
1528 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1529 (h-frc,h-drc): Add PROFILE attribute.
1531 (h-vbr): New hardware.
1532 (All fields): Remap for (insn-lsb0? #f)
1533 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1534 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1535 (fpscr): Use h-fpscr.
1536 (fsdm,fsdn): Use h-fsd.
1537 (dshci): Add xtiming argument and splice it in.
1538 (dr,xd): pmacros removed.
1539 (All insns): Add timing specs, *-MACH attribibutes,
1540 SH4{A}-GROUP attributes.
1541 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1542 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1543 we're being processed for sim or sid.
1544 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1545 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1546 (define-isa compact): Add (isa-parallel-insns 2).
1547 (define-isa media): Add (isa-parallel-insns 2). Add
1548 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1549 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1551 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1552 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1553 (SH4al-MACH, SH5-MACH): New pmacros.
1554 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1555 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1556 (sh5-media-fp-units, common-model, common-model-with-fp)
1557 (sh3-model, sh3e-model): New pmacros.
1558 (define-model sh2): New model.
1559 (define-model sh2e): New model.
1560 (define-model sh3): New model.
1561 (define-model sh3e): New model.
1562 (define-model sh2a-nofpu): New model.
1563 (define-model sh2a-fpu): New model.
1564 (define-model sh4-nofpu): New model.
1565 (define-model sh4): New model.
1566 (define-model sh4a-nofpu): New model.
1567 (define-model sh4a): New model.
1568 (define-model sh4al): New model.
1569 (define-model sh5-media): New model.
1570 (define-model sh5): Add all units.
1571 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1572 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1573 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1574 (h-pc): Add PROFILE attribute.
1577 (h-gr,h-grc): Likewise.
1578 (h-cr): Set h-sr in setter.
1579 (h-frbit): Get/Set h-fpscr.
1580 (h-szbit,h-prbit): Likewise.
1581 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1582 Add getter and setter.
1583 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1584 Adjust getter and setter.
1585 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1586 Adjust getter and setter.
1587 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1588 (h-fsd,h-fmov): New hardware.
1590 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1592 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1593 doc/notes.texi, doc/porting.texi, doc/running.texi,
1594 doc/sim.texi: Fix some typos.
1596 2006-07-14 Dave Brolley <brolley@redhat.com>
1598 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1599 hardware or memory mode which was used.
1600 * sid-cpu.scm (hw-need-write-stack?): New function.
1601 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1602 identify hardware which uses write stacks.
1603 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1604 Initialized to an empty list.
1605 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1606 hw-need-write-stack?.
1607 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1608 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1609 (used-in-delay-rtl?): New method of <hardware-base>.
1610 (hw-used-in-delay-rtl?): New function.
1612 2006-06-20 Dave Brolley <brolley@redhat.com>
1614 * sid.scm (gen-attr-type): Removed.
1616 2006-05-10 Dave Brolley <brolley@redhat.com>
1618 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1619 support for (if (application-is? <appname>) (...) (...)).
1620 (-cgen): Add trailing "/" to arch-path.
1621 * utils.scm (dirname): Removed. dirname is a primitive function.
1623 2006-05-09 Dave Brolley <brolley@redhat.com>
1625 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1626 'entire_insn' not 'base_insn'.
1627 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1629 * sim.scm (-gen-arch-model-decls): Likewise.
1630 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1631 abuf->written if profiling.
1632 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1633 object->string om the mode.
1634 (-hw-gen-write-stack-decl): Likewise.
1635 * read.scm (include): Use arch-path as file location.
1636 (arch-path): Define it with a default setting.
1637 (-cgen): Update arch-path when "-a" option is specified.
1638 * utils.scm (dirname): New function.
1640 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1642 * configure.in: Remove AC_ARG_PROGRAM.
1643 * configure: Regenerate with autoconf 2.59.
1645 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1647 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1650 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1652 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1653 or an error message otherwise.
1654 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1655 Fix up comments to correctly describe the functions.
1657 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1658 Anil Paranjape <anilp1@kpitcummins.com>
1659 Shilin Shakti <shilins@kpitcummins.com>
1661 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1663 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1665 2006-02-10 Nick Clifton <nickc@redhat.com>
1667 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1669 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1671 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1673 (-hw-gen-write-stack-decl): Likewise.
1675 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1677 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1678 non-(adata-integral-insn? CURRENT-ARCH) case.
1680 2005-10-28 Dave Brolley <brolley@redhat.com>
1682 Contribute the following changes:
1683 2005-09-19 Dave Brolley <brolley@redhat.com>
1685 * attr.scm (gen-value-for-defn-raw): New methods.
1686 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1687 gen-value-for-defn-raw.
1688 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1690 2002-12-13 Dave Brolley <brolley@redhat.com>
1692 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1693 (-gen-attr-accessors): New function.
1694 (gen-obj-attr-defn): Update terminating initializer.
1695 (gen-obj-attr-end-defn): New function.
1696 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1697 * sid-cpu.scm (cgen-desc.h): Generate code to include
1698 "opcode/cgen-bitset.h"
1699 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1701 * desc.scm ('gen-defn): Update terminating initializer.
1702 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1703 terminatinig initializer.
1704 (gen-hw-decls): Ditto.
1705 (gen-operand-decls): Ditto.
1706 (gen-insn-decls): Ditto.
1707 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1708 (gen-insn-table): Update terminating initializer.
1709 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1710 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1711 * attr.scm (charmask-bytes): New function.
1712 (bitset-attr->charmask): New function.
1713 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1714 differences for SID-SIMULATOR.
1715 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1716 (<enum-attribute>): Ditto.
1718 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1720 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1722 2005-10-24 DJ Delorie <dj@redhat.com>
1724 * operand.scm (-anyof-merge-syntax): Print a more useful error
1727 2005-10-19 Nick Clifton <nickc@redhat.com>
1729 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1732 2005-10-18 Andreas Schwab <schwab@suse.de>
1734 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1736 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1738 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1741 2005-08-02 Dave Brolley <brolley@redhat.com>
1743 * rtl-c.scm (s-unop): Don't dereference
1744 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1745 (s-binop, s-convop, s-cmpop): Likewise.
1747 2005-07-29 Dave Brolley <brolley@redhat.com>
1749 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1750 if with-profile or with-parallel-write.
1751 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1752 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1755 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1757 * cpu/fr30.opc (print_register_list): Correct format strings.
1758 * cpu/ip2k.opc: Likewise.
1760 2005-07-05 Nick Clifton <nickc@redhat.com>
1762 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1763 unsigned in order to avoid compile time warnings about sign
1766 2005-07-01 Nick Clifton <nickc@redhat.com>
1768 * desc-cpu.scm: Update to ISO C90 function declaration style.
1769 * opc-asmdis.scm: Likewise.
1770 * opc-ibld.scm: Likewise.
1771 * opc-itab.scm: Likewise.
1772 * cpu/fr30.opc: Likewise.
1773 * cpu/i960.opc: Likewise.
1774 * cpu/ip2k.opc: Likewise.
1775 * cpu/iq2000.opc: Likewise.
1776 * cpu/m32r.opc: Likewise.
1777 * cpu/openrisc.opc: Likewise.
1778 * cpu/sh.opc: Likewise.
1779 * cpu/sparc.opc: Likewise.
1780 * cpu/xstormy16.opc: Likewise.
1782 2005-06-15 Dave Brolley <brolley@redhat.com>
1784 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1785 (cgen-cpu.h): Call it.
1787 Contributed on behalf of Graydon Hoare
1788 2001-06-05 graydon hoare <graydon@redhat.com>
1790 * utils.scm (foldl): Define.
1794 (intersection): Simplify.
1795 * sid.scm : Set APPLICATION to SID-SIMULATOR.
1796 (-op-gen-delayed-set-maybe-trace): Define.
1797 (<operand> 'gen-set-{quiet,trace}): Delegate to
1798 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1799 up and needs cleaning.
1800 (-with-parallel?): Hardwire with-parallel to #t.
1801 (<operand> 'cxmake-get): Replace with lookahead-aware code
1802 * sid-decode.scm: Remove per-insn writeback fns.
1803 (-gen-idesc-decls): Redefine sem_fn type.
1804 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1805 with write stack stuff.
1806 (cgen-write.cxx): Replace per-insn writebacks with single write
1807 stack writeback. Add write stack reset function.
1808 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1810 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1811 estate attribute set.
1812 (delay): Set #:delayed attribute to calculated delay, update
1813 maximum delay of cpu, check (delay ...) usage.
1814 * operand.scm (<operand>): Add delayed slot to <operand>.
1815 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1816 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1817 * doc/rtl.texi (Expressions): Add section on (delay ...).
1819 2005-06-13 Jim Blandy <jimb@redhat.com>
1821 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1824 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1826 * doc/porting.texi: Change all mention of md_apply_fix3 and
1827 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1830 2005-05-18 Dave Brolley <brolley@redhat.com>
1832 * utils-sim.scm (-gen-decode-default-entry): New function.
1833 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1834 code to check that all opcodes bits match.
1835 (-gen-decoder-switch): Use -gen-decode-default-entry.
1837 2005-05-16 Jim Blandy <jimb@redhat.com>
1839 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1840 fetched by one of our GETIMEM* methods.
1841 * utils-gen.scm (-extract-chunk-specs): Always fetch full
1842 base-insn-sized chunks.
1844 2005-05-10 Nick Clifton <nickc@redhat.com>
1846 * Update the address and phone number of the FSF organization in
1847 the GPL notices in the following files:
1848 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1849 cpu/powerpc.cpu, slib/random.scm
1851 2005-05-06 Jim Blandy <jimb@redhat.com>
1853 * pprint.scm, cos-pprint.scm: Add documentation.
1855 * pprint.scm (pprint): Don't wipe out elide-table after each call.
1857 * pprint.scm, cos-pprint.scm: New files.
1859 2005-04-04 Nick Clifton <nickc@redhat.com>
1861 * opcodes.scm (-gen-parse-address): Initialise value to zero to
1862 avoid a compile time warning.
1864 2005-03-18 Nick Clifton <nickc@redhat.com>
1866 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1867 "percent-operand" from "%operand" as the latter confuses xgettext
1868 into thinking that it is a C printf formating directive, which
1869 prevents proper translation.
1871 2005-02-23 Nick Clifton <nickc@redhat.com>
1873 * opcodes.scm (gen-parse-number): Add a cast to the desired
1874 pointer signed'ness in order to prevent compile time warnings.
1875 * cpu/ip2k.opc: Fixed compile time warnings about differing
1876 signed'ness of pointers passed to functions.
1877 * cpu/iq2000.opc: Likewise.
1878 * cpu/m32r.opc: Likewise.
1879 * cpu/openrisc.opc: Likewise.
1880 * cpu/xstormy16.opc: Likewise.
1882 2005-02-22 Alan Modra <amodra@bigpond.net.au>
1884 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1885 (cgen-desc.h): ..to here, after opcode/cgen.h include.
1887 2005-02-16 Dave Brolley <brolley@redhat.com>
1889 * utils.scm: Update copyright years.
1890 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1891 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1892 * operand.scm (-derived-operand-parse): Move logit message from level 1
1895 2005-02-15 Nick Clifton <nickc@redhat.com>
1897 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1898 prevent compile time warning messages.
1899 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1900 * utils-gen.scm (attr-int-gen-defn): Likewise.
1901 (attr-gen-defn): Likewise.
1902 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1903 (print_dollarhex16): Remove unused function.
1905 2005-02-15 Jim Blandy <jimb@redhat.com>
1907 * guile.scm (cgen-call-with-debugging): Doc fix.
1909 Make backtraces work more reliably.
1910 * guile.scm: Set up debugging parameters, and enable debugging and
1911 source positions while loading.
1912 (cgen-call-with-debugging, cgen-debugging-stack-start): New
1914 * read.scm: Don't set debugging parameters here.
1915 (catch-with-backtrace): Function deleted.
1916 (-cgen): Simply note the presence or absence of the -b option.
1917 Pass the flag to cgen-call-with-debugging, so debugging is turned
1918 off here if the user didn't request it, for faster computation.
1919 (cgen): Call cgen-debugging-stack-start here, instead of
1920 catch-with-backtrace.
1922 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1924 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1925 Don't write out the trailing -s here.
1926 * Makefile.in: Regenerated.
1927 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1928 fixup.scm here; let the caller decide which Scheme's customization
1930 * dev.scm: Load guile.scm, not fixup.scm.
1931 * fixup.scm: Deleted; contents have all moved to guile.scm.
1934 * guile.scm (debug-write): New function.
1936 2005-02-14 Jim Blandy <jimb@redhat.com>
1938 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1939 transformer procedure, not eval. Transformer procedures take one
1942 2005-02-11 Nick Clifton <nickc@redhat.com>
1944 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1945 to 'bfd_vma *' in order avoid compile time warning message.
1947 2005-02-09 Jim Blandy <jimb@redhat.com>
1949 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
1950 corresponding change in the sim/common directory.)
1952 2005-02-07 Jim Blandy <jimb@redhat.com>
1954 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
1955 changes in the opcodes directory.)
1957 * guile.scm: New file, containing Guile-specific definitions and
1958 adaptations. This is loaded by the app-specific shell scripts.
1959 Initially identical to fixup.scm.
1960 * cgen-sid.scm: Don't load fixup.scm here.
1962 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1965 2005-01-27 Jim Blandy <jimb@redhat.com>
1967 * utils.scm (string/symbol->append): Renamed from 'concat'.
1968 * opcodes.scm (gen-switch): Use new name.
1969 * insn.scm (-sub-insn-make!): Same.
1970 * rtl.scm (rtx-dump): Same.
1971 * semantics.scm (semantic-compile): Same.
1973 2005-01-20 Jim Blandy <jimb@redhat.com>
1975 * opcodes.scm (gen-switch): Use concat instead of string-map.
1977 * utils.scm (concat): New function.
1978 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1979 * rtl.scm (rtx-dump): Same.
1980 * semantics.scm (semantic-compile): Same.
1982 2004-12-16 Jim Blandy <jimb@redhat.com>
1984 * utils-cgen.scm (parse-name): Don't assume that string-map can be
1985 applied to symbols. Process everything as strings, and then
1986 convert to a symbol at the end.
1988 * read.scm (debug-repl): Temporarily redirect input and output to
1989 /dev/tty while we debug, so we don't interfere with whatever CGEN
1990 is reading or writing.
1991 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1994 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
1996 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1997 will work with newer versions of guile.
1999 2004-10-27 Nick Clifton <nickc@redhat.com>
2001 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
2002 * cpu/iq2000.cpu: Likewise.
2004 2004-07-21 DJ Delorie <dj@redhat.com>
2006 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
2008 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
2010 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
2011 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
2013 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2015 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
2017 2004-03-22 Dave Brolley <brolley@redhat.com>
2019 * utils.scm (copyright-fsf): Update copyright years.
2020 (copyright-red-hat): Ditto.
2021 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
2023 (-op-gen-set-trace-parallel): Ditto.
2025 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
2027 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
2028 disassembling codes for 0x*2 addresses.
2030 2004-01-29 Dave Brolley <brolley@redhat.com>
2032 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
2033 zeroes in the extra bit positions and generate 'opcode-mask' with ones
2034 in the extra bit positions.
2036 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2038 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
2040 2003-12-04 Alan Modra <amodra@bigpond.net.au>
2042 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
2043 "short" being 16 bit.
2044 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
2045 internationalize error message.
2046 (parse_lo16): Likewise. Remove useless code.
2048 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2050 * cpu/m32r.cpu : Add new model m32r2.
2051 Add new instructions.
2052 Replace occurrances of 'Mitsubishi' with 'Renesas'.
2053 Changed PIPE attr of push from O to OS.
2054 Care for Little-endian of M32R.
2055 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
2056 Care for Little-endian of M32R.
2057 (parse_slo16): signed extension for value.
2059 2003-10-26 Dave Brolley <brolley@redhat.com>
2061 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
2062 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
2063 (-gen-extract-fn): Call -gen-record-profile-args.
2065 2003-10-21 Dave Brolley <brolley@redhat.com>
2067 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
2069 * decode.scm (-opcode-slots): Correct typo in logit call.
2071 2003-10-09 Jim Blandy <jimb@redhat.com>
2073 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
2074 for @arch@_cgen_hw_table. GDB needs to be able to find this.
2076 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
2078 2003-10-06 Dave Brolley <brolley@redhat.com>
2080 * gen-all-doc: Add fr550.
2082 2003-09-11 Doug Evans <dje@sebabeach.org>
2084 * Makefile.am (ARCHFILE): New var.
2085 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
2086 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
2087 * Makefile.in: Regenerate.
2089 2003-09-08 Dave Brolley <brolley@redhat.com>
2091 On behalf of Doug Evans <dje@sebabeach.org>
2092 Pass in paths to input files, instead of assuming they live in
2093 $srcdir/cpu. Plus misc. option processing cleanup.
2094 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
2095 Add pre-process pass to all options.
2096 * cgen-gas.scm (gas-arguments): Ditto.
2097 * cgen-sid.scm (sim-arguments): Ditto.
2098 * cgen-sim.scm (sim-arguments): Ditto.
2099 * cgen-stest.scm (stest-arguments): Ditto.
2100 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
2101 (-opc-file-path): New global.
2102 (opc-file-path): New fn.
2103 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
2104 All callers updated.
2105 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
2106 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
2107 Replace srcdir arg with opc-file. All callers updated.
2108 * read.scm (-opt-spec-update): Delete.
2109 (opt-get-first-pass,opt-get-second-pass): New fns.
2110 (-cgen): Process application-specific arguments in two passes.
2112 2003-08-29 Dave Brolley <brolley@redhat.com>
2114 * cpu/frv.cpu: Removed.
2115 * cpu/frv.opc: Removed.
2117 2003-08-21 Nick Clifton <nickc@redhat.com>
2119 * cpu/frv.cpu (mbtoh): Replace input parameter to
2120 u-media-dual-expand and u-media-dual-btoh with output parameter.
2121 (cmbtoh): Add profiling hack.
2123 2003-08-19 Michael Snyder <msnyder@redhat.com>
2125 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
2127 2003-08-07 Michael Meissner <gnu@the-meissners.org>
2129 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
2130 the elements for the END record of CGEN_OPINST, silencing warnings.
2132 2003-07-15 Doug Evans <dje@sebabeach.org>
2134 Add guile 1.6.4 support.
2135 - empty list must be quoted
2136 - string functions have stricter type checking
2137 - eval now takes a second argument
2138 - symbol-bound? is deprecated
2139 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
2140 (bitset-attr->list): Ensure arg to string-cut is a string.
2141 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
2142 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
2143 * cos.scm (-class-list): Must quote empty list.
2144 (-class-parent-classes,-class-compute-class-desc): Ditto.
2145 (class-make,make,object-reset!): Ditto.
2146 (method-make-make!): Call eval1 instead of eval.
2147 (method-make-forward!,method-make-virtual-forward!): Ditto.
2148 * decode.scm (subdtable-add): Use stringsym-append instead of
2150 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
2151 (-build-decode-table-entry): Fetch string name of insn.
2152 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
2153 (-gen-mach-table-defns): Ditto for mach.
2154 (gen-ifld-defns): Ditto for ifld.
2155 (gen-hw-table-defns): Ditto for hw.
2156 (gen-operand-table): Ditto for op.
2157 (gen-insn-table-entry): Ditto for insn.
2158 * desc.scm (gen-attr-table-defn): Ditto for attr.
2159 (<keyword>,gen-defn): Don't pass symbols to string-append.
2160 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
2162 (enum-vals-upcase): Use symbol-upcase to build result.
2163 (-enum-parse): Use stringsym-append to build errtxt.
2164 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
2165 (eval1): New function.
2166 (symbol-bound?): Provide own version if >= guile 1.6.
2167 * hardware.scm (define-keyword): Use string-append instead of
2169 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
2170 cgen.html,cgen-insn.html): Convert current-arch-name to a string
2172 (gen-list-entry): Handle either symbol or string `name' arg.
2173 (gen-obj-doc-header): Fetch string name of `o' arg.
2174 (define-cpu-intro): Ditto for cpu.
2175 (gen-mach-intro): Ditto for mach.
2176 (gen-model-intro): Ditto for model.
2177 (gen-isa-intro): Ditto for isa.
2178 (gen-machine-doc-1): Ditto for isa.
2179 (gen-reg-doc-1): Convert mach to string first.
2180 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
2181 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
2183 (gen-insn-categories): Fetch string name of mach. Convert
2184 enum-val-name to string first.
2185 (gen-insn-docs): Fetch string name of mach.
2186 * ifield.scm (ifld-ilk): Result is a string.
2187 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
2188 Fetch string name of ifld.
2189 (-sfmt-search-key): Similarily for ifld and op.
2190 * insn.scm (syntax-make): Fetch string name of syntax element.
2191 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
2192 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
2193 * mode.scm (mode:c-type): Result is a string.
2194 (mode:enum): Fetch string name of mode.
2195 (-mode-parse): Use stringsym-append to build errtxt.
2196 * model.scm (model:enum): Fetch string name of model.
2197 (-model-parse): Use stringsym-append to build errtxt.
2198 (parse-insn-timing): Must quote empty list.
2199 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
2200 (-gen-minsn-opcode-entry): Ditto.
2201 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
2203 (read-cpu.opc): Convert current-arch-name to a string before using.
2204 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
2205 (<derived-operand>): Must quote empty list.
2206 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
2207 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
2209 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
2210 (-pmacro-sym): Must convert symbols to strings before passing to
2212 (-pmacro-str): Ditto.
2213 (pmacros-init!): Use eval1 instead of eval.
2214 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
2215 (keep-isa-atlist?): Ditto.
2216 (cmd-if): Use eval1 instead of eval.
2217 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
2218 (-rtl-c-get): Fetch string name of src.
2219 (s-unop): Ditto for mode.
2220 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
2221 (-gen-par-temp-defns,subword): Ditto.
2222 (join): Use stringsym-append instead of string-append.
2223 * rtl-traverse.scm (rtx-option?): Convert option to string first.
2224 (rtx-traverse-debug): Fetch string name of rtx-obj.
2225 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
2226 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
2227 (rtx-pretty-name): Result is a string.
2228 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
2229 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
2230 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
2232 (-gen-sfrag-case): Fetch string name of user.
2233 * sid-model.scm (unit:enum): Fetch string name of unit.
2234 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
2235 (<hw-memory>,gen-set-quiet): Ditto.
2236 (gen-mode-defs): Ditto.
2237 (sim-finish!): Convert current-arch-name to a string before using.
2238 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
2239 (-gen-no-scache-semantic-fn): Ditto.
2240 (cgen-defs.h): Fetch string name of isa.
2241 (cgen-read.c): Convert current-arch-name to a string before using.
2242 (cgen-write.c): Ditto.
2243 * sim-model.scm (unit:enum): Fetch string name of unit.
2244 (gen-model-fn-decls): Use stringsym-append instead of string-append.
2245 (-gen-model-timing-table): Fetch string name of model.
2246 (-gen-mach-model-table): Ditto.
2247 (-gen-mach-defns): Fetch string name of mach.
2248 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
2249 (<hw-memory>,cxmake-get): Fetch string name of mode.
2250 (<hw-memory>,gen-set-quiet): Ditto.
2251 (gen-mode-defs): Ditto.
2252 (sim-finish!): Must quote empty list.
2253 * utils-cgen.scm (<ident>): Must quote empty list.
2254 (obj:str-name): New fn.
2255 (parse-comment): Result is a string.
2256 (parse-symbol): Result is a symbol.
2257 (parse-string): Result is a string.
2258 (keyword-list?): Convert arg to string before calling string-ref.
2259 (keyword-list->arg-list): Ditto.
2260 (gen-attr-name): Convert attr-name to string first.
2261 (alpha-sort-obj-list): Use symbol<? instead of string<?.
2262 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
2263 (gen-define-ifmt-ifields): Ditto for fld.
2264 * utils.scm (gen-c-symbol): Ensure str is a string before calling
2266 (gen-file-name): Ditto.
2267 (symbol-downcase,symbol-upcase,symbol<?): New fns.
2268 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
2269 (reduce): Call eval1 instead of eval.
2270 * cpu/m32r.cpu (addi): Don't use `#.'.
2272 * gen-all-sim: Fix some typos.
2274 2003-07-08 Doug Evans <dje@sebabeach.org>
2276 * gen-all-doc: Ensure run from cgen src dir.
2277 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
2278 * gen-all-sid: Similarily, in ./tmp-sid.
2279 * gen-all-sim: Similarily, in ./tmp-sim.
2281 2003-06-20 Doug Evans <dje@sebabeach.org>
2283 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
2285 2003-06-19 Doug Evans <dje@sebabeach.org>
2287 * mach.scm (-ifld-already-defined?): New proc.
2288 (current-ifld-add!): Use it.
2289 (-op-already-defined?): New proc.
2290 (current-op-add!): Use it.
2291 (-insn-already-defined?): New proc.
2292 (current-insn-add!): Use it.
2293 (-minsn-already-defined?): New proc.
2294 (current-minsn-add!): Use it.
2295 (obj-isa-list): New proc.
2296 (isa-supports?): Use it.
2298 2003-06-10 Doug Evans <dje@sebabeach.org>
2300 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
2301 * cpu/m32r.cpu (all insns): Ditto.
2303 * mach.scm (current-*-add!): Disallow redefinition. Make result
2306 * gen-all-doc: Split arm and frv docs up a bit.
2308 * cpu/arm.cpu: Add IDOC attribute.
2309 * cpu/frv.cpu: Ditto.
2310 * cpu/i960.cpu: Ditto.
2311 * cpu/openrisc.cpu: Ditto.
2312 * cpu/xstormy16.cpu: Ditto.
2313 * cpu/m32r.cpu: Ditto.
2314 (all insns): Explicitly specify IDOC attribute.
2316 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
2317 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
2318 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
2319 * Makefile.in: Regenerate.
2320 * attr.scm (<integer-attribute>:parse-value-def): Implement.
2321 (-attr-read): Defer computing default value until we know the type.
2322 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
2323 (<attr-list>:attr-present?): New method.
2324 (atlist-attr-present?,obj-attr-present?): New fns.
2325 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
2326 (attr-builtin!): New insn attr IDOC.
2327 * cgen-doc.scm (doc-arguments): New args -I,-N.
2328 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
2329 Support comment as fourth element of enum value.
2330 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
2331 * html.scm (gen-html-header): New arg kind, all callers updated.
2332 (gen-table-of-contents): New arg insn-file, all callers updated.
2333 (gen-list-entry,gen-doc-header): New fn.
2334 (get-operands): Delete.
2335 (gen-iformat-table): Rewrite.
2336 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
2337 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
2338 (get-insn-properties,guess-insn-idoc-attr!): New fn.
2339 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
2340 (get-insns-for-category,gen-categories-insn-lists): New fns.
2341 (gen-insn-docs): Simplify each insn's semantics first.
2342 Print insn tables sorted by IDOC categories.
2343 (*insn-html-file-name*): New global.
2344 (cgen-insn.html): New fn.
2346 * insn.scm (<insn>): Create a setter for the `tmp' member.
2347 * semantics.scm (insn-build-known-values): Renamed from
2348 -build-known-values. All callers updated.
2350 * rtl.scm: Move traveral/evaluation support to ...
2351 * rtl-traverse.scm: New file.
2352 * read.scm: Maybe-load rtl-traverse.scm.
2354 * rtl.scm (-rtx-valid-types): Add SETRTX.
2356 * rtx-funcs.scm (nop,parallel): Fix mode.
2358 * utils.scm (eqv-lookup-index): New fn.
2359 (assq-lookup-index): Renamed from lookup-index. All callers updated.
2361 * dev.scm (load-doc): Set APPLICATION.
2363 2003-06-10 Dave Brolley <brolley@redhat.com>
2365 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
2366 * sid-decode.scm: Generate #include of config.h into
2367 @prefix@-decode.cxx.
2368 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
2370 2003-06-07 Doug Evans <dje@sebabeach.org>
2372 * gen-all-sid: New file.
2373 * gen-all-opcodes: New file.
2375 2003-06-05 Nick Clifton <nickc@redhat.com>
2377 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
2378 version of the FRinti operand.
2379 (FRintjeven): Likewise for FRintj.
2380 (FRintkeven): Likewise for FRintk.
2381 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
2382 media-quad-arith-sat-semantics, media-quad-arith-sat,
2383 conditional-media-quad-arith-sat, mdunpackh,
2384 media-quad-multiply-semantics, media-quad-multiply,
2385 conditional-media-quad-multiply, media-quad-complex-i,
2386 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
2387 conditional-media-quad-multiply-acc, munpackh,
2388 media-quad-multiply-cross-acc-semantics, mdpackh,
2389 media-quad-multiply-cross-acc, mbtoh-semantics,
2390 media-quad-cross-multiply-cross-acc-semantics,
2391 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
2392 media-quad-cross-multiply-acc-semantics, cmbtoh,
2393 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2394 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2395 cmhtob): Use new operands.
2396 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2397 (parse_even_register): New function.
2399 2003-06-04 Doug Evans <dje@sebabeach.org>
2401 Better handling of 64 bit and mixed 32/64 bit architectures.
2402 * hardware.scm (hw-update-word-modes!): New fn.
2403 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2404 hw-update-word-modes!.
2405 (state-word-bitsize): Replace FIXME with requested check.
2406 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2407 * mode.scm (mode-find): Ignore INT,UINT.
2408 (-mode-word-sizes-kind): New global.
2409 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2410 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2411 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2413 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2414 unusable, correct values set later.
2415 (mode-finish!): Remove cruft.
2416 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2417 * opcodes.scm (opcodes-init!): Ditto.
2418 * rtx-funcs.scm (annul): Fix mode of pc.
2419 * cpu/ia64.cpu: Remove cruft that sets word modes.
2420 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2422 2003-06-03 Nick Clifton <nickc@redhat.com>
2424 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2425 immediate value not unsigned.
2427 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2429 * cpu/sh.cpu: Amend comments to refer to SuperH.
2430 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2431 * cpu/sh64-media.cpu: Likewise.
2432 (Saturation): Update manual reference.
2434 2003-05-15 Doug Evans <dje@sebabeach.org>
2436 * Makefile.am (srcroot): New var.
2438 * Makefile.in: Regenerate.
2439 * cgen-doc.scm: New file.
2440 * html.scm: New file.
2441 * gen-all-doc: New file.
2442 * dev.scm (cload): Handle DOC application.
2444 * machs.scm (machs-for-cpu): New fn.
2445 * model.scm (models-for-cpu): New fn.
2446 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2448 (iota): Rewrite to be identical to pmacro version. All uses updated.
2449 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2451 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2452 (-gen-decode-bits): Instead put in better fix here.
2454 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2456 2003-05-01 DJ Delorie <dj@redhat.com>
2458 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2460 (set-alignfix-mem): Likewise.
2462 2003-04-16 Dave Brolley <brolley@redhat.com>
2464 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2465 * utils.scm (copyright-fsf): Update generate copyright years.
2466 (copyright-cygnus): Ditto.
2467 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2469 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2471 (<operand>'gen-profile-code): New parameter 'when'.
2472 (<iunit>'gen-profile-code): Ditto.
2473 (<insn>'gen-profile-code): Ditto.
2474 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2475 'insn_reference' for the 'after' function.
2476 * model.scm (unit:enum): Moved to sim-model.scm.
2477 * sim-model.scm (unit:enum): Moved from model.scm.
2478 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2479 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2480 * sid-model.scm (unit:enum): New version for sid.
2481 (gen-model-class-name): New function.
2482 (gen-model-unit-fn-decl): New function.
2483 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2484 (gen-model-unit-fn-name): New parameter 'when'.
2485 (-gen-model-insn-fn-name): Ditto.
2486 (-gen-model-insn-qualified-fn-name): New function.
2487 (-gen-model-insn-fn-decl): New function.
2488 (-gen-model-insn-fn-decls): New function.
2489 (-gen-model-insn-fn): New parameter 'when'. Call
2490 -gen-model-insn-qualified-fn-name.
2491 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2492 functions for modelling insn before and after execution.
2493 (-gen-model-class-decls): New function.
2494 (" (gen-model-class-name model) "): New function.
2495 (gen-model-classes): New function.
2496 (-gen-insn-timing): Generate functions for modelling insn before and after
2498 (-gen-insn-unit-timing): Generate class-qualified names.
2499 (-gen-model-timing-table): Ditto.
2500 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2501 not needed (yet) by sid.
2502 (cgen-model.h): New function.
2504 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2506 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2507 * cpu/sh64-compact.cpu: Likewise.
2508 * cpu/sh64-media.cpu: Likewise.
2510 2003-03-21 DJ Delorie <dj@redhat.com>
2512 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2513 which indicates if the sign flag is set from bit 15 or 7.
2515 (set-psw): New argument ws, propogate it.
2516 (set-psw-nowrite): Likewise.
2517 (set-mem-psw): Likewise.
2518 (set-psw-carry): Likewise. Use temporaries to prevent
2519 prematurely overwriting needed inputs.
2520 (set-psw-rrotate17): Fix logic.
2521 (shrgrgr): Preserve carry for zero-bit shifts.
2522 (shrgrimm): Likewise.
2523 (shlgrgr): Likewise.
2524 (shlgrimm): Likewise.
2525 (asrgrgr): Likewise.
2526 (asrgrimm): Likewise.
2529 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2531 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2533 2002-03-05 DJ Delorie <dj@redhat.com>
2535 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2536 prematurely overwriting needed inputs.
2537 (set-psw-sub): Likewise.
2539 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2541 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2543 2003-02-18 DJ Delorie <dj@redhat.com>
2545 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2546 (movlmemimm): Just mask the address.
2547 (movhmemimm): Likewise.
2548 (movlmemgr): Likewise.
2549 (movhmemgr): Likewise.
2550 (set-psw): Always set the psw last.
2551 (set-psw-carry): Likewise.
2552 (set-psw-add): Likewise.
2553 (set-psw-sub): Likewise.
2555 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2556 of 16 patterns from the set-psw-rotate17 function.
2557 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2558 movgriipostincgr, movgriipredecgr): Set psw correctly.
2559 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2560 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2561 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2563 2003-02-11 Dave Brolley <brolley@redhat.com>
2565 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2566 @arch@_cgen-ifld_table.
2567 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2568 @arch@_cgen-ifld_table.
2570 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2572 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2574 2003-01-09 Graydon Hoare <graydon@redhat.com>
2576 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2579 2003-01-07 Graydon Hoare <graydon@redhat.com>
2581 * utils-gen.scm (attr-int-gen-defn): Define.
2583 2002-12-21 Doug Evans <dje@sebabeach.org>
2585 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2586 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2588 * dev.scm (cload): Update location of .cpu files.
2590 2002-12-19 Doug Evans <dje@sebabeach.org>
2592 * utils-sim.scm (gen-profile-sym): New fn.
2593 (<operand>,sbuf-profile-sym): New method.
2594 (<operand>,sbuf-profile-elm): Use it.
2595 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2596 of hardcoding symbol name.
2597 (<operand>,gen-profile-code): Ditto.
2598 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2601 * mode.scm (mode-sem-mode): New fn.
2602 * operand.scm (op:new-mode): Update. mode-name.
2603 (op-natural-mode?) New fn.
2604 * rtl.scm (hw): Set hw-name,mode-name.
2606 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2608 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2609 as size of IDESC-TABLE-VAR.
2610 (@prefix@_init_idesc_table): Ditto.
2611 * sim-model.scm (-gen-mach-defns): Ditto.
2612 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2614 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2616 * insn.scm (-parse-insn-format-symbol): Improve error message.
2617 (-parse-insn-format): Ditto.
2619 * gen-all-sim: New script.
2621 2002-12-16 DJ Delorie <dj@delorie.com>
2623 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2625 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2627 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2628 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2629 (parse_immediate16): Handle immediate16 values, which now include
2630 @hi(label) and @lo(label)
2632 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2634 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2635 Add braces and cast for union field.
2636 (gen-multi-ifield-nodes): Add braces and cast for union field.
2637 (cgen_operand_table): Similarly fix sentinel.
2638 (cgen_cpu_close): Constify "insns". Formatting.
2639 (cgen-desc.c): Include xregex.h.
2640 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2642 <opc.c>: Include safe-ctype.h.
2643 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2644 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2645 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2646 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2647 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2648 (parse_addr16): Correct type of "value". Formatting.
2649 (parse_addr16_p): Likewise.
2650 (parse_addr16_cjp): Likewise.
2651 (parse_lit8): Likewise.
2652 (parse_bit3): Formatting.
2653 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2654 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2655 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2657 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2658 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2659 (print_dollarhex8): Likewise.
2660 (print_dollarhex16): Likewise.
2661 (print_dollarhex_addr16h): Likewise.
2662 (print_dollarhex_addr16l): Likewise.
2663 (print_dollarhex_p): Likewise.
2664 (print_dollarhex_cj): Likewise.
2665 (print_decimal): Likewise.
2666 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2668 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2670 * doc/rtl.texi (Model variants): Mention current limitations for
2671 unit inputs and outputs.
2672 (Hardware elements) <attribute PROFILE>: Be slightly more
2674 (Instructions) <timing>: input/output overrides have a direction
2677 2002-11-25 DJ Delorie <dj@redhat.com>
2679 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2681 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2683 * cpu/iq10.cpu: New file.
2684 * cpu/iq2000.cpu: Likewise.
2685 * cpu/iq2000.opc: Likewise.
2686 * cpu/iq2000m.cpu: Likewise.
2688 2002-11-19 DJ Delorie <dj@redhat.com>
2690 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2692 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2694 * dev.scm: Call getenv with a string, not a symbol.
2696 2002-10-08 Doug Evans <dje@transmeta.com>
2697 Hans-Peter Nilsson <hp@axis.com>
2699 * types.scm (bitrange-overlap?): Handle lsb0?.
2701 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2703 From Robert Cragie <rcc@jennic.com>:
2704 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2706 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2707 Ben Elliston <bje@redhat.com>
2708 John Healy <jhealy@redhat.com>
2709 Jeff Johnston <jjohnstn@redhat.com>
2710 Alan Lehotsky <alehotsky@redhat.com>
2711 Ubicom Inc. <SupportDesk@ubicom.com>
2713 * cpu/ip2k.cpu: New file.
2714 * cpu/ip2k.opc: Likewise.
2716 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2718 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2720 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2722 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2723 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2724 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2725 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2726 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2727 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2728 (-sthi-byte): If there is a single byte to store, store it at
2730 (sthil, sthiq): Fix big-endian behaviour.
2731 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2732 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2733 (saturate): Use Dimode to check if saturation operation is required.
2734 (usaturate): Likewise.
2736 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2737 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2738 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2739 (msadubq): Fix subword index in second operand of first subtraction.
2741 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2743 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2746 2002-06-18 Dave Brolley <brolley@redhat.com>
2748 * cpu/frv.cpu: New cpu description.
2749 * cpu/frv.opc: New cpu support code.
2751 2002-05-21 Dave Brolley <brolley@redhat.com>
2753 * decode.scm (-opcode-slots): Don't consider bits beyond the
2756 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2758 * cpu/powerpc.cpu: New file.
2760 2002-05-01 Graydon Hoare <graydon@redhat.com>
2762 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2764 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
2766 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2767 results are expanded recursively.
2769 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
2771 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2772 call scan-symbol on it, to enable recursive macro-expansion.
2774 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
2776 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2777 for multiple-isa configurations.
2778 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2780 2002-02-04 Ben Elliston <bje@redhat.com>
2782 * cpu/sh.cpu, cpu/sh.opc: New files.
2783 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2785 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
2787 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2788 (Enumerated constants): Mention that an ifield must not specify a
2790 (Instruction operands): Ditto for index.
2791 (Expressions) <parallel>: Remove misplaced mention of local
2793 <if>: Mention that mode must be specified and non-VOID when the
2796 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
2798 * doc/porting.texi: When referring to *.opc, mention they are in
2799 the cpu subdir. Call top-level directory toplevel, not devo.
2800 Close string in define-normal-insn example.
2802 * doc/pmacros.texi: Fix .substr typo to .substring.
2803 Mention that .sym expansions are not further expanded.
2805 2002-01-22 Graydon Hoare <graydon@redhat.com>
2807 * desc-cpu.scm (ifld-number-cache): Add.
2809 (gen-maybe-multi-ifld-of-op): Add.
2810 (gen-maybe-multi-ifld): Add.
2811 (gen-multi-ifield-nodes): Add.
2812 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2814 2002-01-10 matthew green <mrg@redhat.com>
2816 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2817 (gr-Rb-names): ... to this.
2818 (h-Rb): New hardware piece.
2819 (h-Rbj): Use gr-Rb-names.
2821 (holdx): New instruction.
2823 2002-01-07 Ben Elliston <bje@redhat.com>
2825 * utils.scm (package-cygnus-simulators): Rename from this ..
2826 (package-red-hat-simulators): .. to this.
2827 * opcodes.scm (option-set!): Use package-red-hat-simulators.
2828 * sid-cpu.scm (cgen-desc.h): Likewise.
2829 (cgen-cpu.h): Likewise.
2830 (cgen-defs.h): Likewise.
2831 (cgen-write.cxx): Likewise.
2832 (cgen-semantics.cxx): Likewise.
2833 (cgen-sem-switch.cxx): Likewise.
2834 * sid-decode.scm (cgen-decode.h): Likewise.
2835 (cgen-decode.cxx): Likewise.
2836 * sid-model.scm (cgen-model.cxx): Likewise.
2837 * sid.scm (option-set!): Likewise.
2838 * sim.scm (option-set!): Likewise.
2840 2002-01-07 Ben Elliston <bje@redhat.com>
2842 * utils.scm (copyright-fsf): Add 2002.
2843 (copyright-cygnus): Rename to copyright-red-hat.
2844 (copyright-red-hat): Add 2002.
2845 (CURRENT-COPYRIGHT): Update comment.
2846 * opcodes.scm (option-set!): Update callers.
2847 * sid-model.scm (cgen-model.cxx): Likewise.
2848 * sid-cpu.scm: Likewise.
2849 * sid-decode.scm: Likewise.
2850 * sid.scm (option-set!): Handle "redhat" as an option for
2851 "copyright"; use copyright-red-hat.
2852 * sim.scm (option-set!): Likewise.
2854 2002-01-03 Dave Brolley <brolley@redhat.com>
2856 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2857 number of insns in the list. Update the population count function to
2858 identify and prioritize 3 catgories of useful bits.
2859 (-population-top-few): Don't consider bits with a population count of
2861 (-build-decode-table-entry): Don't call
2862 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
2863 identical insns at the next tree level.
2864 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2865 this function is no longer used.
2866 (filter-non-specialized-ambiguous-insns): New function.
2867 (filter-identical-ambiguous-insns): New function.
2868 (find-identical-insn): New function.
2869 (filter-harmlessly-ambiguous-insns): Removed.
2871 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
2872 matthew green <mrg@redhat.com>
2873 Frank Ch. Eigler <fche@redhat.com>
2874 Nick Clifton <nickc@cambridge.redhat.com>
2876 * cpu/xstormy16.cpu: New file.
2877 * cpu/xstormy16.opc: New file.
2879 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
2881 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2883 2001-11-14 Dave Brolley <brolley@redhat.com>
2885 * utils-gen.scm (-gen-extract-word): Correct computation of the length
2886 of the field being extracted.
2888 2001-10-29 Johan Rydberg <johan@rydberg.com>
2890 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2891 (cos ...) and (sin ..) rtx.
2893 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
2895 * desc-cpu.scm: Do not include ctype.h in generated desc
2896 files. They will inherit safe-ctype.h instead.
2898 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
2900 * desc-cpu.scm: Add missing function prototypes (for generated
2901 C files). Fix compile time warning messages about unused
2902 parameters (for generated C files).
2903 * opc-asmdis.scm: The same.
2904 * opc-ibld.c: The same.
2905 * opc-itab.scm: The same.
2906 * cpu/fr30.opc: The same.
2907 * cpu/m32r.opc: The same.
2908 * cpu/openrisc.opc: The same.
2910 2001-09-17 graydon hoare <graydon@redhat.com>
2912 * insn.scm (syntax-break-out): Correct logic in handling escaped
2915 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
2917 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2918 call @arch@_cgen_build_insn_regex now that regex support is in
2921 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
2923 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2924 (mask-superset?): Look for strict supersets to allow rejection of
2927 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2929 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2930 (cgen-desc.h): Call it.
2931 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2933 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2934 entire_insn for extraction, if it's shorter than base-insn-bitsize.
2936 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2938 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2939 mach->cpu insn-chunk-bitsize.
2940 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2941 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2942 * mach.scm (<cpu>): New field insn-chunk-bitsize.
2943 (-cpu-parse, -cpu-read): Parse/initialize it.
2944 * doc/rtl.texi (define-cpu): Document it.
2946 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
2948 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2950 2001-07-06 Ben Elliston <bje@redhat.com>
2952 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2954 2001-07-05 Ben Elliston <bje@redhat.com>
2958 * read.scm (include): Include files from srcdir/cpu.
2959 (-cgen): Likewise for loading .cpu files.
2960 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2961 * *.cpu: Move all cpu descriptions into cpu subdirectory.
2963 * simplify.inc: Likewise.
2965 2001-07-04 Ben Elliston <bje@redhat.com>
2967 * read.scm (include): Log "Including file" message at level 1,
2968 rather than outputting it with (display).
2969 (cpu-load): Log "Loading cpu description" and "Processing cpu
2970 description" messages at levels 1 and 2, respectively, rather than
2973 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
2975 * desc.scm (<keyword> 'gen-defn): Add extra zero into
2976 CGEN_KEYWORD_ENTRY initializers.
2978 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2979 (<operand> 'test-data): Involve both the index and the hardware
2980 in testcase generation.
2981 (<hw-indx> 'test-data): Generate test data from the underlying
2983 (<ifield> 'test-data): Generate test data by computing bit
2984 patterns for the field, then decoding them.
2985 (<hw-address> 'test-data): Allow for new calling convention.
2986 (<hw-iaddress> 'test-data): Likewise.
2987 (<keyword> 'test-data): Convert index values into keywords.
2988 (<hw-asm> 'test-data): Convert index values into integer strings.
2990 * gas-test.scm (cgen-build.sh): Escape '.' as well.
2992 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
2994 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2995 is required for multi-mode hw types (memory).
2997 2001-05-11 Ben Elliston <bje@redhat.com>
2999 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
3000 when generating allinsn.d from objdump output. Without it, the
3001 testsuite will treat $ as the regular expression for end of line.
3003 2001-05-09 Ben Elliston <bje@redhat.com>
3005 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
3006 with `cgen_cpu_open'; documentation had become out of date.
3007 * doc/rtl.texi (Instruction operands): Likewise.
3009 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
3011 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
3012 various-base-length instruction sets.
3014 2001-04-02 Ben Elliston <bje@redhat.com>
3016 * sid-cpu.scm (-last-insn): New function.
3017 (-gen-sem-switch-engine): Loop through idesc while less than or
3018 equal to the last instruction enum, not less than the MAX enum.
3019 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
3020 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
3021 table's size to be the last instruction enum plus one, not
3023 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
3024 instruction onto the instruction list.
3026 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
3027 using the size of the table and its elements.
3028 (-gen-decode-insn-globals): Define the idesc table's size to be
3029 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
3030 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
3031 last instruction enum plus one, not @CPU@_INSN_MAX.
3033 2001-03-28 Ben Elliston <bje@redhat.com>
3035 * doc/version.texi (UPDATED, EDITION): Update.
3036 * doc/stamp-vti: Likewise.
3038 2001-03-26 Ben Elliston <bje@redhat.com>
3040 * doc/credits.texi (Credits): Update.
3042 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
3043 specified prefix and, if necessary, escape `$' in gas-build.sh to
3044 prevent unwanted shell variable expansion.
3046 2001-03-24 Ben Elliston <bje@redhat.com>
3048 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
3049 (<keyword>,test-data): Likewise.
3050 (<hw-address>,test-data): Likewise.
3051 (<hw-iaddress>,test-data): Likewise.
3052 (-collate-test-set): New function.
3053 (build-test-set): Use it.
3054 (gen-gas-test): Generate five test cases per instruction.
3055 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
3057 * read.scm: Load "slib/random" if random is not defined.
3058 * slib/random.scm: New file.
3060 * utils.scm: Remove comments about the Hobbit compiler.
3061 (copyright-cygnus): Add 2001.
3062 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
3063 (package-gnu-simulators): Tidy.
3065 2001-03-23 Ben Elliston <bje@redhat.com>
3067 * cgen-gas.scm: Inline documentation improvements.
3069 2001-03-21 Ben Elliston <bje@redhat.com>
3071 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3072 given in a syntax string is undefined.
3074 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
3075 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
3077 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
3079 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
3080 for arg_type CGEN_CPU_OPEN_BFDMACH.
3082 2001-03-20 Ben Elliston <bje@redhat.com>
3084 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
3085 instruction onto the instruction list. Define MAX_INSNS to be the
3086 value of the last instruction enum plus one.
3088 2001-03-14 Nick Clifton <nickc@redhat.com>
3090 * utils.scm (copyright-fsf): Add 2001. Remove (C).
3092 2001-03-05 Dave Brolley <brolley@redhat.com>
3094 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
3095 if the number of ifields is greater than zero.
3097 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
3099 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
3100 Emit LIKELY/UNLIKELY branch probability hints.
3101 * sid-decode.cpu (-gen-record-args): Ditto.
3103 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
3105 * desc-cpu.scm (-gen-hash-defines): Rename
3106 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
3108 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
3110 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
3112 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
3113 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
3115 * sid.scm (<operand> gen-write): Use unsigned long long expression
3117 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
3118 (<unit> gen-profile-code): Ditto.
3120 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
3122 * doc/rtl.texi (Expressions): Document the (index-of ...) and
3125 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3127 * operand.scm (<operand> pretty-sem-name): New field.
3128 (<operand> make): Initialize it from hw-name.
3129 (op:set-pretty-sem-name!): New function.
3130 (<operand> gen-pretty-name): Default to fetching new field.
3131 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
3132 sem-name setting from -rtx-hw-name.
3134 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3136 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
3137 its subsequent gen-pretty-name.
3139 * read.scm: Increase thread working stack limit and backtrace
3142 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
3144 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
3146 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
3148 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
3149 current insn plus 4.
3150 (h-delay-insn): New hardware register.
3151 (l-jal): Uses h-delay-insn instead of pc when setting link register.
3155 * openrisc.opc (parse_hi16): Sign extend value.
3156 (parse_lo16): Likewise.
3158 2001-01-06 Ben Elliston <bje@redhat.com>
3160 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
3161 instead of @cpu@ and @CPU@ to generically prefix symbol names.
3162 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
3163 (-gen-semantic-fn-table): Likewise.
3164 (-gen-scache-semantic-fn): Likewise.
3165 (-gen-no-scache-semantic-fn): Likewise.
3166 (cgen-read.c): Likewise.
3167 (cgen-sem-switch.c): Likewise.
3168 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
3169 is a filename prefix.
3170 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
3171 (-gen-decode-insn-globals): Likewise.
3172 (-gen-idesc-decls): Likewise.
3173 (cgen-decode.h): Likewise.
3174 (cgen-decode.c): Likewise.
3175 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
3176 (gen-cpu-insn-enum): Likewise.
3177 (sim-finish!): Likewise.
3179 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
3181 * openrisc.cpu: New file.
3182 * openrisc.opc: Likewise.
3184 2000-12-12 Ben Elliston <bje@redhat.com>
3186 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
3188 2000-12-07 Ben Elliston <bje@redhat.com>
3190 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
3191 "insn" when there are zero ifields to extract.
3193 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
3195 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
3196 used by simple/non-scache simulators.
3197 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
3198 regardless of with-scache?.
3199 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
3201 2000-12-03 Ben Elliston <bje@redhat.com>
3203 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
3204 (cgen-desc.c): Likewise.
3206 2000-12-01 Greg McGary <greg@mcgary.org>
3208 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
3210 2000-12-01 Ben Elliston <bje@redhat.com>
3212 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
3213 definitions if run without with-multipla-isa?.
3214 (cgen-defs.h): New function. Emit an ISA-specific defs file.
3215 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
3217 2000-11-24 Ben Elliston <bje@redhat.com>
3219 * sim-cpu.scm (-gen-hardware-struct): New function.
3220 (-gen-hardware-types): If with-multiple-isa is specified, emit all
3221 hardware elements wich have share one or more ISAs with the ISAs
3224 * sim.scm (-with-multiple-isa?): New symbol.
3225 (with-multiple-isa?): New function.
3226 (option-init!): Initialise -with-multiple-isa?.
3227 (option-set!): Handle with-multiple-isa option.
3229 2000-11-21 Ben Elliston <bje@redhat.com>
3231 * utils.scm (copyright-fsf): Add the year 2000.
3233 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
3235 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
3236 unneeded "\n\n" from F() macro definition.
3238 2000-11-15 Greg McGary <greg@mcgary.org>
3240 * utils-cgen.scm (gen-define-with-symcat): New function.
3241 * desc-cpu.scm (gen-ifld-defns): Use it.
3242 (gen-hw-table-defns): Use it.
3243 (-gen-hash-defines): Use it.
3244 (gen-operand-table): Use it.
3245 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
3246 * opc-itab.scm (-gen-ifmt-table): Use it.
3247 (-gen-insn-opcode-table): Use it.
3248 (-gen-macro-insn-table): Use it.
3249 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
3250 * sim-cpu.scm (cgen-semantics.c): Use it.
3251 (cgen-sem-switch.c): Use it.
3253 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3255 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
3256 request to emit calls to insn extractors as functions rather than
3257 branches to inline blocks.
3258 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
3259 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
3261 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
3262 to extractor clauses.
3264 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
3266 * decode.scm (-distinguishing-bit-population): Significantly
3267 improve popularity heuristic. Renamed from
3268 (-mask-bit-population): Gone.
3269 (-population-above-threshold): Sort new bit numbers in order of
3271 (-population-top-few): Allow up to three more bits to be selected
3272 than requested. Correct selection order to prefer better bits.
3273 Correct bug in fewer-than-requested case. Keep threshold as
3275 (decode-best-get-bits): Pass also the insn-values.
3277 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
3278 future optimization.
3280 * utils.scm (message): Format nested lists better.
3282 2000-11-09 Doug Evans <dje@casey.transmeta.com>
3284 * dev.scm: Add srcdir to %load-path.
3286 * rtx-funcs.scm (subword): Mode of argument can be different
3287 than mode of result, so don't use OP0 to specify argument's mode.
3289 2000-11-02 Ben Elliston <bje@redhat.com>
3291 * doc/porting.texi (Building a GAS test suite): Document my change
3294 2000-11-01 Ben Elliston <bje@redhat.com>
3296 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
3298 2000-10-31 Ben Elliston <bje@redhat.com>
3300 * gas-test.scm (cgen-build.sh): Allow the generated script to run
3301 with no command line arguments if the gas build directory can be
3304 2000-10-26 Doug Evans <dje@casey.transmeta.com>
3306 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
3307 op-ifld -> op-ifield.
3309 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
3311 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
3313 2000-10-13 matthew green <mrg@cygnus.com>
3315 * utils-cgen.scm (get-ifetch): Move from here ...
3316 * sim.scm (get-ifetch): ... to here.
3317 * sid.scm (get-ifetch): Copy and port to c++.
3319 2000-10-06 Dave Brolley <brolley@redhat.com>
3321 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
3322 ifld-start + ifld-word-offset.
3323 (gen-ifld-extract): Check adata-integral-insn? before checking whether
3324 the field is beyond the base number of bits.
3325 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
3326 (gen-extract-ifields): Ditto.
3327 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
3328 characters in the regular expression.
3330 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
3332 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
3333 preprocessor constant.
3335 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
3337 * slib/logical.scm: New file from slib. Provides robust bitwise
3338 logical operations for large integers.
3339 * read.scm: maybe-load it.
3341 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
3343 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
3344 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
3345 single-isa predicate, but support keep-isa filtering.
3347 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3349 * rtl-c.scm (s-sequence): Handle nested c-calls in both
3350 statement-expression and comma-expression contexts.
3351 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
3353 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
3355 * decode.scm (-population-top-few): Signal error gracefully if
3356 decoding is about to become ambiguous.
3358 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3360 * doc/rtl.texi (decode-assist): Describe this field as optional.
3362 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
3364 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
3367 2000-09-05 Dave Brolley <brolley@redhat.com>
3369 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
3370 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
3372 2000-08-29 Dave Brolley <brolley@redhat.com>
3374 * utils-gen.scm (gen-ifld-extract): Pass total-len if
3375 adata-integral-insn is true for this architecture.
3377 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
3379 * hardware.scm (<hw-immediate> get-index-mode): Define method.
3380 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
3381 * rtl-c.scm (-c-rtl-get): Improve an error message.
3382 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
3384 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
3386 * Makefile.in (DIST_COMMON): Regenerated.
3387 * ifield.scm (<derived-ifield> needed-iflds): New method.
3388 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
3389 sfmts built from <derived-ifield>s.
3390 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
3391 type symbol 'derived-ifield, not an unparseable string.
3392 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
3393 (-sfmt-contents): Add tracing.
3395 From Doug Evans <dje@transmeta.com>:
3396 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3399 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3401 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3402 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3403 (-rtl-c-get): Rename from rtl-c-get.
3404 (rtl-c-get): New fn for getter logging.
3406 2000-07-28 Ben Elliston <bje@redhat.com>
3410 2000-07-25 Ben Elliston <bje@redhat.com>
3412 * doc/credits.texi (Credits): Add Frank Eigler.
3414 2000-07-24 Dave Brolley <brolley@redhat.com>
3416 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3418 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3419 (<keyword>): Initialize all elements fully.
3420 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3422 (-gen-mach-table-defns): Ditto.
3423 (-gen-ifld-defns): Ditto.
3424 (-gen-operand-table): Ditto.
3425 (-gen-insn-table): Ditto.
3426 (-gen-cpu-open): Nothing to do for the mach table.
3428 2000-07-13 Ben Elliston <bje@redhat.com>
3430 * doc/version.texi (UPDATED): Update.
3432 2000-07-05 Ben Elliston <bje@redhat.com>
3434 * configure.in (AC_PATH_PROG): Remove.
3435 * configure: Regenerate.
3436 * Makefile.am (GUILE): Locate guile dynamically.
3437 * Makefile.in: Regenerate.
3438 * doc/Makefile.in: Likewise.
3440 2000-07-03 Ben Elliston <bje@redhat.com>
3442 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3443 * opc-itab.scm (cgen-opc.c): Likewise.
3445 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3447 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3448 guile 1.4 compatibility.
3449 (rtx-env-dump): Comment out buggy display calls.
3451 2000-06-15 matthew green <mrg@redhat.com>
3453 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3455 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3457 * Makefile.in: Regenerated.
3459 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3460 (gen-ifld-defns): Ditto.
3461 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3462 * rtl.c (rtl-finish!): Ditto.
3463 * opc-itab.scm (-gen-ifield-decls): Ditto.
3464 * opcodes.scm (gen-switch): Exclude derived operands.
3465 * operand.scm (op-iflds-used): Expand derived operands.
3466 (hw-index-derived): New dummy function to create dummy object.
3467 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3468 constructor. Set object's hw-name and index fields.
3469 (-anyof-merge-subchoices): Set instance object's index also.
3470 (-anyof-name): New helper function.
3471 (anyof-merge-semantics): Correct replacement of operand names in
3473 (op-ifield): Tolerate derived-operands and their funny indices better.
3474 * ifield.scm (ifld-known-values): Expand derived ifields.
3475 (non-multi-ifields, non-derived-ifields): New utility functions.
3476 (ifld-decode-mode): Tolerate objects with unbound decode field.
3477 * iformat.scm (compute-insn-length): Expand derived ifields.
3478 (compute-insn-base-mask): Ditto.
3479 * insn.scm (insn-base-ifields): Remove.
3480 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3481 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3482 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3483 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3484 (-frag-test-data): Ditto.
3485 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3486 (-gen-sem-switch-engine); Ditto.
3487 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3488 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3489 (-gen-record-args): Tolerate unbound op-ifield.
3490 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3491 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3492 Exclude multi-insns.
3493 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3494 * utils-sim.scm (op-extract?): Handle derived operands.
3496 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3497 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3498 * hardware.scm (hardware-for-mode): New function.
3500 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3501 cleaning up decode tables.
3502 (mask-superset?): Little helper function for above.
3503 * decode.scm (-build-decode-table-entry): Call it.
3504 (-opcode-slots): Add some more tracing.
3505 * arm.cpu: Disable decode-splits construct due to implementation
3506 conflict with `filter-harmlessly-ambiguous-insns'
3508 * decode.scm (-population-top-few): New function for better decode
3509 bit generation. Includes minor helper functions.
3510 (decode-get-best-bits): Call it instead.
3511 (OLDdecode-get-best-bits): Renamed previous version of above.
3514 2000-06-13 Ben Elliston <bje@redhat.com>
3516 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3517 for the Guile library directory.
3518 * configure: Regenerate.
3519 * Makefile.in, doc/Makefile.in: Regenerate.
3521 * Makefile.in, doc/Makefile.in: Regenerate.
3522 * configure.in: Remove unnecessary tests. Move to version 1.0.
3523 * acconfig.h, config.in: Remove.
3524 * configure, aclocal.m4: Regenerate.
3525 * doc/stamp-vti, doc/version.texi: Likewise.
3526 * AUTHORS: New file.
3528 2000-06-07 Ben Elliston <bje@redhat.com>
3530 * fixup.scm (symbol-bound?): Reduce debugging output.
3532 2000-06-02 matthew green <mrg@redhat.com>
3534 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3535 a given instruction, replacing derived fields with their subfields.
3536 (insn-value): Use `insn-base-ifields' to find all constant values.
3537 (multi-insn-instantiate!): Comment some debug messages.
3539 2000-06-01 Ben Elliston <bje@redhat.com>
3541 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3542 symbol names used in a (c-call ..) rtx.
3544 * sim-test.scm (build-test-set): Return (()) for an instruction
3545 with no operands, so it too is included in the generated test set.
3547 2000-05-31 Ben Elliston <bje@redhat.com>
3549 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3550 (sim-test): Likewise.
3551 * Makefile.in: Regenerate.
3553 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3555 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3556 stack traceback, in an order that resembles gdb's `bt'.
3558 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3560 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3561 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3562 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3564 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3566 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3567 * iformat.scm (ifmt-expanded-ifields): Gone.
3568 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3570 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3573 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3576 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3578 * sid.scm (with-any-profile?): New function clone.
3580 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3582 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3584 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3586 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3587 (-multi-ifield-read): Parse them.
3588 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3589 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3590 (multi-ifield gen-extract): Add decode hook.
3591 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3593 * insn.scm (syntax-break-out): More correctly handle \-escaped
3595 (syntax-make-elements): Ditto.
3596 * opc-itab.scm (compute-syntax): Ditto.
3598 2000-05-17 Ben Elliston <bje@redhat.com>
3600 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3602 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3604 * gas-test.scm (build-test-set): Return (()) for an instruction
3605 with no operands, so it too is included in the generated test set.
3607 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3609 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3610 IFMT_OPERANDS and SYNTAX_BYTES.
3612 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3614 * sim.scm (with-any-profile?): New function.
3615 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3616 to decide whether or not to include profiling counters.
3618 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3620 Fuller derived-operand support for opcodes.
3621 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3622 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3623 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3624 (gen-operand-table): Omit derived- and anyof- operands from table.
3625 (gen-insn-table): Omit multi-insns from table.
3626 * iformat.scm (ifmt-expanded-fields): New function to expand
3627 subfields of derived-ifields.
3628 (ifmt-compute!): Ignore remaining multi-insns.
3629 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3631 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3632 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3633 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3634 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3635 (gen-switch): Omit anyof-operands.
3636 * operand.scm (-anyof-syntax): New function.
3637 (-anyof-merge-syntax): Call it.
3638 * utils.scm (collect): New idiomatic function.
3640 2000-05-10 Ben Elliston <bje@redhat.com>
3642 * m68k.cpu: New file (work in progress).
3644 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3646 * Makefile.am (all-local): New target. Create stamp-cgen.
3647 * Makefile.in: Regenerated.
3648 * doc/Makefile.in: Regenerated.
3650 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3652 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3653 (-operand-parse-setter): Ditto.
3654 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3655 for CACHE-ADDR operands.
3656 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3657 trace entries. Widen byte-wide values for printing.
3658 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3659 Widen byte-wide values for printing. Hexify memory addresses.
3661 2000-04-23 matthew green <mrg@redhat.com>
3663 * m32r.cpu: Fix a typo.
3665 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3667 * ia64.cpu (define-model): Change merced to Itanium.
3668 (f-qp): Change quilifying to qualifying.
3669 (movbr_ph, movbr_pvec): Delete.
3670 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3672 2000-04-07 Ben Elliston <bje@redhat.com>
3674 * doc/porting.texi (Building a simulator test suite): Clarify
3675 where generated test cases are placed.
3677 2000-04-07 Ben Elliston <bje@redhat.com>
3679 * Makefile.am (gas-test): Remove dependency on `cgen'.
3681 * Makefile.in: Regenerate.
3683 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3685 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3686 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3687 type reconfiguration.
3688 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3691 2000-03-30 Ben Elliston <bje@redhat.com>
3693 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3695 2000-03-24 Ben Elliston <bje@redhat.com>
3697 * Makefile.am (stamp-cgen): Reinstate target.
3698 * Makefile.in: Regenerate.
3700 2000-03-22 Ben Elliston <bje@redhat.com>
3702 * slib/ppfile.scm: Remove; unused.
3703 * slib/defmacex.scm: Likewise.
3705 2000-03-21 Ben Elliston <bje@redhat.com>
3707 * doc/internals.texi (Source file overview): Document.
3709 * Makefile.am (GUILEDIR): Remove.
3710 (CGEN): Ditto. Callers use $(GUILE) instead.
3711 (GUILEFLAGS): Ditto.
3713 (APPDESCFILES): Ditto.
3714 (OPCODESFILES): Ditto.
3716 (pkgdata_SCRIPTS): Ditto.
3717 (stamp-cgen): Remove target.
3718 * Makefile.in: Regenerate.
3720 * configure.in: Remove header and library tests.
3721 * configure: Regenerate.
3722 * config.in: Likewise.
3724 2000-03-20 Ben Elliston <bje@redhat.com>
3726 * read.scm: Cease loading "hob-sup.scm".
3727 * utils.scm: Inherit the fastcall family of procedures (for now).
3728 * hob-sup.scm: Remove.
3730 2000-03-20 Ben Elliston <bje@redhat.com>
3732 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3733 * configure: Regenerate.
3734 * gdbinit.in: Remove.
3736 2000-03-17 Ben Elliston <bje@redhat.com>
3738 * Makefile.am (CGEN): Use guile, not cgen.
3739 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3740 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3741 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3742 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3743 (HOB_OBJS): Likewise.
3744 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3745 (CGENOBJS): Likewise.
3746 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3747 (hobbit, hobbit.o, hobbit.c): Remove targets.
3748 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3749 (CLEANFILES): Update.
3750 * acconfig.h (WITH_HOBBIT): Remove.
3751 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3752 option --with-cgen-hobbit.
3753 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3754 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3755 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3756 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3757 * Makefile.in: Regenerate.
3758 * config.in: Likewise.
3759 * aclocal.m4: Likewise.
3760 * configure: Likewise.
3761 * README (Hobbit support): Remove.
3762 * doc/internals.texi (Conventions): Do not mention Hobbit.
3763 * doc/porting.texi (Supported Guile versions): Likewise.
3765 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
3767 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3768 callback convention to new sid sidutil::basic_cpu code.
3769 (-gen-sfrag-engine-fn): Ditto.
3770 * sid.scm (-create-virtual-insns!): Ditto.
3771 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3773 (cxmake-skip): Implement properly for pbb mode.
3775 2000-03-03 Ben Elliston <bje@redhat.com>
3777 * doc/internals.texi: New file.
3779 2000-02-29 Ben Elliston <bje@redhat.com>
3781 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3782 * doc/porting.texi: Formatting tweaks.
3784 2000-02-25 Nick Clifton <nickc@cygnus.com>
3786 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3789 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
3791 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3794 2000-02-23 Andrew Haley <aph@cygnus.com>
3796 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3799 2000-02-24 Ben Elliston <bje@redhat.com>
3801 * doc/rtl.texi (Derived operands): Add some cindex entries.
3803 2000-02-23 Ben Elliston <bje@redhat.com>
3805 * ia32.cpu (dndo): Move general purpose macro from here ..
3806 * simplify.inc (dndo): .. to here.
3808 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
3810 * arm.cpu (h-tbit): Add c-call setter function.
3813 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
3815 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3816 (-frag-cost-compute!): Ditto.
3817 * utils.scm (copyright-cygnus): Add Y2K.
3818 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3820 2000-01-25 Nick Clifton <nickc@cygnus.com>
3822 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3823 flags field of the CGEN_CPU_TABLE structure.
3825 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
3827 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3828 All references updated.
3830 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
3832 * ia32.cpu: Rewrite addressing mode support.
3834 * ifield.scm (<ifield>): New member `follows'.
3835 (ifld-known-values): New proc.
3836 (<ifield>): New method set-word-offset!.
3837 (ifld-set-word-offset!): New proc.
3838 (ifld-new-word-offset): New proc.
3839 (<ifield>): New method next-word.
3840 (<multi-ifield>): New method next-word.
3841 (ifld-next-word): New proc.
3842 (ifld-precedes?): New proc.
3843 (-ifield-parse): New args word-offset,word-length,follows.
3844 All callers updated. Handle CISC-style vs RISC-style ifields.
3845 (-ifield-read): Recognize word-offset,word-length,follows specs.
3846 (-ifld-parse-follows): New proc.
3847 (-multi-ifield-make-default-insert): New proc.
3848 (-multi-ifield-make-default-extract): New proc.
3849 (-multi-ifield-parse): Provide default values for insert,extract
3850 handlers if not specified.
3851 (<derived-ifield>): New class.
3852 (derived-ifield?): New predicate.
3853 (ifld-derived-operand?): New predicate.
3854 (f-anyof): New global.
3855 (ifld-anyof?,ifld-anyof-operand?): New predicates.
3856 (f-derived,ifld-derived?): Delete.
3857 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
3858 * insn.scm (-sub-insn-ifields): New proc.
3859 (-sub-insn-make!): New proc.
3860 (multi-insn-instantiate!): Provide initial implementation.
3861 (-insn-parse): If insn contains "anyof" operands, create a
3862 <multi-insn> object instead of a plain <insn>.
3863 (-parse-insn-format-symbol): Rewrite derived operand handling.
3864 Add anyof operand handling.
3865 (-parse-insn-format-ifield-spec): Rewrite.
3866 (-parse-insn-format-operand-spec): Delete.
3867 (-parse-insn-format-list): Delete support for `(operand value)'.
3868 (anyof-operand-format?): Replaces derived-operand-format?.
3869 * operand.scm (-operand-parse-getter): Improve error messages.
3870 (-operand-parse-setter): Ditto.
3871 (<derived-operand>): New members args,syntax,base-ifield,encoding,
3873 (<anyof-operand>): Change baseclass from <derived-operand> to
3874 <operand>. Delete member values. New members base-ifield,choices.
3875 (anyof-operand?): New predicate.
3876 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3877 (-derived-operand-parse): Rewrite.
3878 (-derived-operand-read): Rewrite.
3879 (-anyof-parse-choice): New proc.
3880 (-anyof-operand-parse): Rewrite.
3881 (-anyof-operand-read,define-anyof-operand): New procs.
3882 (<anyof-value>): Rewrite.
3883 (-anyof-initial-known): New proc.
3884 (anyof-satisfies-assertions?): New proc.
3885 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3886 (-anyof-merge-getter,-anyof-merge-setter): New procs.
3887 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3888 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3889 (-anyof-value-from-derived): New proc.
3890 (-anyof-all-choices-1,anyof-all-choices): New procs.
3891 (operand-init!): Create define-anyof-operand reader command.
3893 * insn (syntax-break-out): Take syntax as argument instead of insn.
3894 All callers updated.
3895 (syntax-make): Move here, from ???.
3897 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3898 bitrange-foo. All uses updated.
3899 (bitrange-next-word): New proc.
3901 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3903 * rtl.scm (rtx-canonicalize): Provide initial implementation.
3904 (rtx-make-const,rtx-make-enum): New procs.
3905 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
3906 (rtx-mem-addr,rtx-mem-sel): New procs.
3907 (rtx-change-address): New proc.
3908 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3909 (rtx-make-set,rtx-single-set?): New procs.
3910 (rtx-combine): New proc.
3912 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
3913 (rtx-traverse-with-locals): Ditto.
3914 (-rtx-traverse,-rtx-traverse-*): Ditto.
3916 * rtl.scm (define-subr): New proc.
3917 (rtl-init!): Create reader command `define-subr'.
3919 * cos.c (_object_mi_p): Ensure argument is an object.
3920 (indent): New function.
3921 (_object_print_elms): Add pretty-printing support.
3922 (_object_print): Ditto.
3924 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3925 (*floats-s->c-fun-table*): Ditto.
3926 * hobbit.c,hobbit.h: Rebuild.
3927 * hob-sup.c (fastcall7): New proc.
3928 * hob-sup.h (fastcall7): Declare.
3929 * hob-sup.scm (fastcall7): New macro.
3931 * mach.scm (<arch>): New member subr-list.
3932 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3933 (arch-finish!): Reverse recorded subr list.
3935 * read.scm (debug-env): New global.
3936 (debug-var-names,debug-var,debug-repl-env): New procs.
3937 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
3938 (debug-quit): Renamed from `continue'.
3940 * simplify.inc (dsmf): New pmacro.
3942 * utils.scm (plus-scan): New proc.
3943 (split-bits): Rewrite.
3944 (split-value): New proc.
3946 1999-10-13 Doug Evans <devans@casey.cygnus.com>
3948 * doc/Makefile.am (DOCFILES): Add notes.texi.
3949 * doc/Makefile.in: Rebuild.
3951 1999-10-11 Doug Evans <devans@casey.cygnus.com>
3953 * ifield.scm (ifld-derived?): New proc.
3954 (f-derived): New global.
3955 (ifield-builtin!): Create ifield f-derived.
3956 (<multi-insn>): New class.
3957 (multi-insn?): New predicate.
3958 (multi-insn-instantiate!): New proc.
3959 (-insn-parse): Create <multi-insn> objects for insns with derived
3961 (-parse-insn-format-symbol): Handle derived ifields.
3962 (-parse-insn-format-ifield-spec): New proc.
3963 (-parse-insn-format-operand-spec): New proc.
3964 (-parse-insn-format-list): Simplify.
3965 (-parse-insn-format): No longer allow (ifield-object value) spec.
3966 (derived-operand-format?): New proc.
3967 (insn-alias?): New proc.
3968 (non-alias-insns): Rewrite.
3969 (insn-real?): Renamed from real-insn?, all callers updated.
3970 (virutal-insns): Rewrite.
3971 (multi-insns): New proc.
3972 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3973 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3974 Return #f if operand doesn't have an index or if index is not an
3976 (hw-index-anyof): New proc.
3977 (-operand-parse): Allow integer indices.
3978 (<derived-operand>): New class.
3979 (derived-operand?): New predicate.
3980 (<anyof-operand>): New class.
3981 (<anyof-value>): New class.
3982 (-anyof-parse-value,-anyof-operand-parse): New procs.
3983 (-derived-operand-parse,-derived-operand-read): New procs.
3984 (define-derived-operand,define-full-derived-operand): New procs.
3985 (operand-init!): New reader command define-derived-operand.
3987 * utils.scm (list-take): Handle negative amount.
3988 (element?): Rewrite.
3990 1999-10-10 Doug Evans <devans@casey.cygnus.com>
3992 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3994 1999-10-04 Richard Henderson <rth@cygnus.com>
3996 * ia64.cpu: Checkpoint.
3998 1999-09-29 Doug Evans <devans@casey.cygnus.com>
4000 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
4002 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
4003 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
4005 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
4007 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
4008 PC returned by sim_engine_invalid_insn.
4010 1999-09-28 Doug Evans <devans@casey.cygnus.com>
4012 * ia32.cpu: New file.
4014 1999-09-25 Doug Evans <devans@casey.cygnus.com>
4016 * utils.scm (bit-set?): Fix off by one error.
4018 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
4020 * rtl.scm (hw): Check for valid hardware element before trying to
4023 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
4024 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
4025 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
4026 * thumb.cpu (*): arm_compute_operand2_foo renamed to
4027 compute_operand2_foo.
4029 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
4030 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
4031 Call delayed_branch/branch methods instead of assigning to `vpc'.
4032 (<hw-pc>,cxmake-skip): Call skip method.
4033 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
4034 (<pc>,cxmake-skip): Ditto.
4035 (-create-virtual-insns!): Ditto.
4036 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
4038 (op:record-profile): Specify #:output-language "c++".
4039 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
4041 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
4043 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
4044 (gen-semantic-code): Ditto.
4045 (-gen-sem-case,-gen-sfrag-code): Ditto.
4046 (-gen-hardware-types): Delete class @cpu@_cpu_base.
4047 (cgen-cpu.h): File is now #included by main cpu class, rather than
4049 (cgen-defs.h): New proc.
4050 (-gen-scache-semantic-fn): Change result type to sem_status.
4051 New local `status'. Call done_cti_insn/done_insn method at end.
4052 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
4054 (cgen-sem-switch.cxx): Ditto.
4055 * sid-decode.scm (-gen-idesc-decls): Update return type of
4057 (cgen-decode.h): Add using namespace @arch@.
4058 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
4060 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
4061 (estate-output-language-c?,estate-output-language-c++?): New procs.
4062 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
4063 (estate-make-for-normal-rtl-c++): New proc.
4064 (rtl-c++-parsed,rtl-c++): New proc.
4065 (s-c-call): Invoke cpu class method if c++.
4066 (join): Use s-c-raw-call.
4068 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
4071 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
4072 * rtl.scm (<eval-state>): New member `modifiers'.
4073 (<eval-state>,vmake!): Handle #:modifiers.
4074 (estate-with-modifiers): New proc.
4076 * rtl.scm (rtx-side-effects?): New proc.
4077 (rtx-canonical-bool): Don't change expr if it has side effects.
4078 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
4081 1999-09-23 Doug Evans <devans@casey.cygnus.com>
4083 * sim.scm (gen-scache-type): Fix typo in last patch.
4085 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
4087 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
4089 1999-09-05 Doug Evans <devans@casey.cygnus.com>
4091 * sid.scm (<hw-pc>,cxmake-skip): New method.
4092 (<pc>,cxmake-skip): New method.
4094 * decode.scm (decode-build-table): Delete args startbit,index-list.
4095 All callers updated.
4096 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
4097 All callers updated.
4098 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
4099 to decode-get-best-bits.
4100 * sid-decode.scm (-gen-decode-fn): Ditto.
4102 * hardware.scm (hw-bits): New proc.
4103 (-hw-parse): New arg layout. All callers updated.
4104 (define-full-hardware): New arg layout. All callers updated.
4105 (-hw-validate-layout): New proc.
4106 (-hw-create-[gs]etter-from-layout): New procs.
4107 (<hw-register>,parse!): Handle layout spec.
4108 * types.scm (type-bits): New proc.
4110 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
4111 UNARY, BINARY, TRINARY rtxs.
4113 * attr.scm (<enum-attribute>,parse-value): Allow strings.
4114 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
4115 Support '- as "unused spot" indicator.
4117 1999-09-03 Doug Evans <devans@casey.cygnus.com>
4119 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
4121 1999-09-02 Doug Evans <devans@casey.cygnus.com>
4123 * rtx-funcs.scm (subword): Fix mode spec of `value'.
4125 * rtl.scm (-rtx-traverse-operands): Fix debugging message
4127 (tstate-make): New arg `depth'. All callers updated.
4128 (tstate-depth,tstate-set-depth!): New procs.
4129 (tstate-incr-depth!,tstate-decr-depth!): New procs.
4130 (-rtx-traverse-operands): Indent debugging output by traversal depth.
4131 (-rtx-traverse): Ditto. Keep track of traversal depth.
4133 1999-09-01 Doug Evans <devans@casey.cygnus.com>
4135 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
4136 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
4137 * utils-sim.scm: Decoder generator support moved here.
4138 (-decode-equiv-entries?,-decode-sort-entries): New procs.
4139 (-gen-decoder-switch): Sort entries for more fall-throughs.
4141 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
4142 * Makefile.in: Rebuild.
4143 * sim-test.scm (build-sim-testcase): Add logging message.
4144 * dev.scm (cload): Recognize SIM-TEST application.
4145 (load-stest): Set APPLICATION to SIM-TEST.
4147 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
4149 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
4150 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
4151 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
4153 * insn.scm (syntax-break-out): Handle ${foo}.
4155 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
4157 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
4158 (bin_PROGRAMS): Define.
4159 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
4160 (cgen-hob.c): Prepend $(srcdir)/ here.
4161 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
4162 (libcpu_a_SOURCES): Delete.
4163 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
4164 (CGEN_HOB_OBJ,CGENOBJS): New variables.
4165 * configure.in (LIBS): Replace -Wl,-rpath with -R.
4166 Add AC_CHECK_LIB(guile,main).
4167 * Makefile.in: Rebuild.
4168 * doc/Makefile.in: Rebuild.
4169 * aclocal.m4: Rebuild.
4170 * config.in: Rebuild.
4171 * configure: Rebuild.
4173 1999-08-28 Doug Evans <devans@casey.cygnus.com>
4175 Rename rtx functions from name: to name, accept optional leading
4177 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
4178 * attr.scm (-attr-eval): Update.
4179 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
4180 (<hw-register>,mode-ok?): Disallow VOID.
4181 (<hw-immediate>,mode-ok?): Disallow VOID.
4182 (<hw-address>,mode-ok?): Disallow VOID.
4183 * mode.scm (mode-name?): New proc.
4184 (VOID): Renamed from VM.
4185 (DFLT): Renamed from DM.
4186 (mode-builtin!): Update.
4187 * opcodes.scm (<ifield>,gen-insert): Update.
4188 (<ifield>,gen-extract): Update.
4189 (<multi-ifield>,gen-insert,gen-extract): Update.
4190 * operand.scm (op:mode): Update.
4191 (<pc>,make!): Update.
4192 (op:new-mode): Update.
4193 (-operand-read): Update.
4194 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
4195 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
4196 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
4197 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
4198 (rtx-make): Call -rtx-munge-mode&options.
4199 (rtx accessors): Rewrite.
4200 (rtx-pretty-name): Update.
4201 (-rtx-traverse-*): Update.
4202 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
4203 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
4204 (-rtx-make-traverse-table): Update.
4205 (-rtx-traverse-operands): Update.
4206 (-rtx-option?,-rtx-option-list?): New procs.
4207 (-rtx-munge-mode&options): New proc.
4208 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
4209 (-rtx-traverse): Update.
4210 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
4211 (rtx-compile-time-constant?): Update.
4212 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
4213 (rtx-value): Update.
4214 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
4215 * rtx-funcs.scm (*): Update.
4216 * rtl-c.scm (rtl-c-get): Update.
4217 (rtl-c-set-quiet,rtl-c-set-trace): Update.
4218 (s-c-call,s-c-raw-call): Update.
4219 (s-boolifop,s-convop,s-if,s-cond): Update.
4220 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
4221 (-par-replace-set-dests,-par-replace-set-srcs): Update.
4222 (s-parallel,s-sequence): Update.
4223 (rtl-c-build-table): Update.
4224 * sem-frags.scm (-frag-hash-compute!): Update.
4225 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
4226 for temporary bug compatibility with previous version.
4227 (-frag-expr-locals,-frag-expr-stmts): Update.
4228 (-frag-compute-desired-frags,-frag-pick-best): Update.
4229 * semantics.scm (-simplify-expr-fn): Update.
4230 (rtx-simplify): Update.
4231 (-rtx-ref-type): Update. Account for modifiers.
4232 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
4233 (-build-ifield-operand!): Update.
4234 (-build-known-values): Update.
4235 (semantic-compile): Update.
4236 (-gen-reg-access-defns): Update.
4237 (gen-semantic-code,-gen-sem-case): Update.
4238 (-gen-sfrag-code,-gen-sfrag-case): Update.
4239 * sim-cpu (gen-semantic-code): Update.
4240 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
4241 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
4242 (-hw-cxmake-get): Update.
4243 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4244 (<hw-index>,cxmake-get): Update.
4245 (<operand>,gen-type,gen-read,cxmake-get): Update.
4246 (<operand>,gen-set-quiet,gen-set-trace): Update.
4247 (<pc>,cxmake-get): Update.
4248 (sim-finish!): Update.
4249 * utils-gen.scm (-gen-ifld-extract-base): Update.
4250 (-gen-ifld-extract-beyond): Update.
4251 (gen-multi-ifld-extract): Update.
4252 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
4253 * sid.scm (<hw-pc>,gen-write): Update.
4254 (-gen-decode-insn-globals): Update.
4255 (-hw-cxmake-get): Update.
4256 (<hw-register>,cxmake-get-raw): Update.
4257 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
4258 (<hw-index>,cxmake-get): Update.
4259 (<operand>,gen-type,gen-read,cxmake-get): Update.
4260 (<operand>,gen-set-quiet,gen-set-trace): Update.
4261 (<pc>,cxmake-get): Update.
4262 (-create-virtual-insns!): Update.
4263 (-decode-split-build-assertion): Update.
4265 * simplify.inc: Update.
4267 1999-08-20 Doug Evans <devans@casey.cygnus.com>
4269 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
4270 Prefix queue function name with sim_ instead of @cpu@_.
4272 * sim.scm (-with-parallel-only?): New global.
4273 (option-init!): Initialize it.
4274 (option-set!): Set it.
4275 (with-parallel-only?): New proc.
4276 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
4277 and writeback markers if with-parallel-only.
4278 (-gen-idesc-init-fn): Update.
4279 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
4282 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
4284 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
4285 with the invalid insn handler.
4287 * utils.scm (list-maybe-ref): New proc.
4289 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
4291 (-mach-parse): Signal error if mach wasn't specified in define-arch.
4293 * i960.cpu (test*-*): Delete `expr' arg.
4294 (test-op,branch-op): Update.
4296 1999-08-09 Doug Evans <devans@casey.cygnus.com>
4298 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
4299 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
4301 (gen-reg-access-defn): Ditto.
4302 (-gen-hw-addr): Rewrite.
4303 (-op-gen-queued-write): Rewrite.
4304 * sim-cpu.scm (-gen-cpu-reg-access-decls):
4305 (-gen-scache-semantic-fn): Handle with-generic-write.
4306 (-gen-no-scache-semantic-fn): Ditto.
4308 1999-08-08 Doug Evans <devans@casey.cygnus.com>
4310 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
4312 * sim.scm (-with-generic-write?): New global.
4313 (option-init!): Initialize it.
4314 (option-set!): Set it.
4315 (with-generic-write?): New proc.
4316 (-gen-hw-addr): New proc.
4317 (-op-gen-queued-write): New proc.
4318 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
4320 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
4322 (-gen-sem-switch): Preserve existing with-parallel? value.
4323 (-gen-sem-parallel-switch): Ditto.
4324 (-gen-write-case): Add /indent support.
4325 (cgen-write.c): Rewrite.
4327 * utils.scm (-current-print-state): New global.
4328 (make-print-state): New proc.
4329 (pstate-indent,pstate-set-indent!): New procs.
4330 (pstate-cmd?,pstate-cmd-do): New procs.
4331 (/indent): New global.
4332 (/indent-set,/indent-add): New procs.
4333 (string-write): Set -current-print-state.
4334 (-string-write): New arg pstate, all callers updated.
4335 Handle print-state commands.
4336 (-string-list-flatten): New proc.
4337 (string-list->string): Use it.
4339 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
4340 (-gen-sem-fn-table-entry): New proc.
4341 (-gen-semantic-fn-table): New proc.
4342 (-gen-scache-semantic-fn): Make fn static.
4343 (-gen-no-scache-semantic-fn): Ditto.
4344 (cgen-semantics.c): Define macro SEM_FN_NAME.
4345 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
4346 FAST,FULL. Update @cpu@_insn_sem contents.
4347 (-gen-semf-fn-name): Delete.
4348 (-gen-sem-fn-decls): Delete.
4349 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
4350 @cpu@_semf_init_idesc_table.
4351 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
4353 (cgen-decode.h): Print sfmt enum.
4354 * sid-decode.scm (-gen-semf-fn-name): Delete.
4355 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
4357 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
4358 (ifmt-compute!): Ditto.
4359 * sim-decode.scm (-gen-decoder-switch): Ditto.
4360 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
4361 (-gen-decoder-switch): Ditto.
4363 * insn.scm (insn-virtual?): New proc.
4365 * enum.scm (gen-enum-decl): Speed up, build string as list and then
4367 * mach.scm (<arch>): attr-list is now a pair of lists.
4368 (current-attr-list): Rewrite.
4369 (current-attr-add!,current-attr-lookup): Rewrite.
4370 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
4372 1999-08-06 Richard Henderson <rth@cygnus.com>
4374 * ia64.cpu: Initial checkpoint.
4376 1999-08-06 Doug Evans <devans@casey.cygnus.com>
4378 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
4379 (pmacros-init!): Update .apply help string.
4381 1999-08-03 Doug Evans <devans@casey.cygnus.com>
4383 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
4384 (<hw-pc>,cxmake-skip): New method.
4385 (<pc>,cxmake-skip): New method.
4386 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
4387 (gen-argbuf-type): New member `skip_count'.
4388 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
4389 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
4391 * utils-sim.scm: New file.
4392 * dev.scm (load-sim): Load it.
4393 (load-sid): Load it.
4394 * cgen-sid.scm: Load it.
4395 * cgen-sim.scm: Load it.
4396 * iformat.scm (<sformat>): New member sbuf, not initialized by
4398 * rtx-funcs.scm (skip): Rewrite.
4399 * rtl-c.scm (skip): Rewrite.
4400 * m32r.cpu (sc,snc): Update `skip' usage.
4401 * mode.scm (mode-real-mode): New proc.
4402 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4403 Distinguish fragments by the <sformat-abuf> they use.
4404 * sim.scm (gen-profile-index-type): Delete.
4405 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4406 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4407 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4408 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4409 (-gen-argbuf-elm): Rewrite.
4410 (-gen-argbuf-hw-elm): Delete.
4411 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4413 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4414 (sim-init!): Initialize them.
4415 (sim-analyze-insns!): Set them.
4416 (current-sbuf-list): New proc.
4417 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4418 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4419 * sim-model.scm (-gen-model-insn-fn): Ditto.
4420 * sim-decode.scm (-gen-extract-decls): Delete.
4421 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4422 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4424 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4425 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4426 (-gen-op-extract,-gen-op-trace-extract): New procs.
4427 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4428 gen-sfmt-argvars-foo and rewrite.
4429 (-gen-record-args): Rewrite.
4430 (-gen-extract-case): Tweak.
4431 * sid.scm (gen-profile-index-type): Delete.
4432 (ifield argbuf support): Move to utils-sim.scm.
4433 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4434 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4435 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4436 (-sim-sformat-argbuf-list): New global.
4437 (sim-init!): Initialize it.
4438 (sim-analyze-insns!): Set it.
4439 (current-sbuf-list): New proc.
4440 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4441 (-gen-argbuf-hw-elm): Delete.
4442 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4444 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4445 (-gen-extract-decls): Delete.
4446 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4448 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4449 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4450 (-gen-op-extract,-gen-op-trace-extract): New procs.
4451 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4452 gen-sfmt-argvars-foo and rewrite.
4453 (-gen-record-args): Rewrite.
4454 (-gen-extract-case): Tweak.
4456 * cgen-gh.c (gh_putc,gh_puts): New functions.
4457 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4458 * cos.c (_object_print_elms,_object_print): Use them.
4459 * hob-sup.c (fastcall_print): Use them.
4460 * configure.in: Check for scm_gen_puts, scm_puts.
4461 * config.in: Rebuild.
4462 * configure: Rebuild.
4463 * aclocal.m4: Rebuild.
4464 * Makefile.in: Rebuild.
4466 * dev.scm (load-opc): Use load instead of maybe-load.
4467 (load-gtest,load-sim,load-stest): Ditto.
4470 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4472 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4473 up to avoid g++ 'goto crosses initialization' warning.
4474 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4475 (-gen-sfrag-case): Update use of NEXT_FRAG.
4477 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4479 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4481 * read.scm: Load sem-frags.scm.
4482 * sem-frags.scm (*): Lots rewritten.
4483 * sid.scm (-with-sem-frags?): New global
4484 (with-sem-frags?): New proc.
4485 (option-init!): Initialize -with-sem-frags?.
4486 (option-set!): Recognize with-sem-frags.
4487 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4488 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4490 (-gen-sfrag-engine-decls): New proc.
4491 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4492 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4493 (-gen-sfrag-engine): New proc.
4494 (-gen-sem-case): Emit setup-semantics if specified.
4495 (-gen-sem-switch-engine): Update init/use of computed goto label.
4496 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4498 (-gen-idesc-decls): Replace sem_address with cgoto.
4499 (-gen-scache-decls): Rewrite definition of `execute' member.
4500 * arm.cpu (arm isa): Enable decode-splits.
4501 * arm7.cpu (multiply insns): Rename result to mul-result.
4503 Rename decode-specialize to decode-split.
4504 * decode.scm (*): Update.
4505 * insn.scm (*): Update.
4506 * mach.scm (*): Update.
4507 * sid.scm (*): Update.
4509 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4511 Record objects as a smob.
4512 * cos.c (scm_tc16_object): New static global.
4513 (cos_init): Initialize it.
4514 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4515 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4516 (_object_tag): Delete.
4517 (_object_make_smob): New function.
4518 (_object_make_x,_object_make_with_values_x): Rewrite.
4519 (_object_elements,_object_class_desc): Rewrite.
4520 (_object_copy,object_p): Rewrite.
4521 (_object_specialize): Rewrite.
4522 (_object_print_elms,_object_print): New functions.
4523 (object_smob): New static global.
4524 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4526 * cos.c (_make_x_symbol): New static global.
4527 (object_make): Use it.
4528 (cos_init): Initialize it.
4530 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4532 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4533 instead to determine whether to use FLD macro.
4534 (<rtl-c-eval-state>): New member ifield-var?.
4535 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4536 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4537 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4539 * rtl.scm (rtx-sequence-assq-locals): New proc.
4541 * cos.scm (-object-error): Don't crash on non-objects.
4543 * Makefile.am (CLEANFILES): Add hobbit.
4544 * Makefile.in: Rebuild.
4546 * rtl-c.scm (s-c-call): Delete unnecessary code.
4548 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4550 * rtl-c.scm (ifield): Always reference value via `FLD'.
4552 * cos.c (elm_bound_p): Return problem SCM boolean values.
4554 * utils-cgen.scm (display-argv): New proc.
4555 * cgen-opc.scm (cgen): Call it.
4556 * cgen-sim.scm (cgen): Ditto.
4557 * cgen-gas.scm (cgen): Ditto.
4558 * cgen-stest.scm (cgen): Ditto.
4559 * cgen-sid.scm (cgen): Ditto.
4561 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4563 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4564 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4565 (-gen-extract-switch): Initialize result to 1.
4566 * opcodes.scm (gen-ifield-default-type): New proc.
4567 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4569 (<hw-index>,gen-insert): Handle non-ifield indices.
4570 (<hw-index>,gen-extract): Ditto.
4571 (<hw-asm>,gen-parse): Ditto.
4572 (<hw-asm>,gen-print): Ditto.
4573 (<keyword>,gen-parse): Ditto.
4574 (<keyword>,gen-print): Ditto.
4575 (<operand>,gen-fget): Ditto.
4576 (<operand>,gen-fset): Ditto.
4578 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4579 (-gen-hw-index): Ditto.
4580 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4581 (-gen-hw-index): Ditto.
4583 * sem-frags.scm: New file.
4585 * attr.scm (attr-parse): Add better checking of input.
4587 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4589 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4591 * ifield.scm (ifld-nil?): New proc.
4593 * operand.scm (<operand>): New members getter,setter.
4594 (<operand>,make!): New args getter,setter. All uses updated.
4595 (op:getter,op:setter): New procs.
4596 (<hw-index>,field-start): Return 0 for non-ifield indices.
4597 (<hw-index>,field-length): Return 0 for non-ifield indices.
4598 (-operand-parse-getter,-operand-parse-setter): New procs.
4599 (-operand-parse): New args getter,setter. All callers updated.
4600 Always use hw-index-scalar for scalar operands.
4601 (-operand-read): Handle getter,setter.
4602 (define-full-operand): New args getter,setter. All uses updated.
4603 * semantics.scm (-build-ifield-operand!): Update.
4604 (-build-index-of-operand!): Update.
4605 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4606 * simplify.inc (define-normal-operand): Update.
4608 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4609 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4610 (s-binop,s-cmpop,s-convop): Ditto.
4611 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4612 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4613 (fcc-tests): New insn-enum.
4614 (fcc-value): Rename from fcc-type.
4615 * sparcfpu.cpu: New file. All fp support moved here.
4617 * rtl.scm (<rtx-func>): New member class.
4618 (rtx-class-*?): New procs.
4619 (def-rtx-node): New arg class. All callers updated.
4620 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4621 * rtx-funcs.scm (*): Specify class.
4623 * utils-cgen.scm (context-make-reader): New proc.
4625 * utils.scm (assert-fail-msg): New variable.
4627 (list-drop,list-tail-drop): New procs.
4629 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4631 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4632 CGEN_MIN_INSN_SIZE deleted on March 22.
4634 * ifield.scm (<ifield>,needed-iflds): New method.
4635 (<multi-ifield>,needed-iflds): New method.
4636 (ifld-needed-iflds): New proc.
4637 (multi-ifield?): New proc.
4638 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4639 (-sfmt-search-key): Include insn length in key.
4640 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4641 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4642 (-ifmt-lookup-ifmt!): Compute key here.
4643 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4644 All callers updated.
4645 (ifmt-build): Delete arg desc. New args search-key,iflds.
4646 All callers updated.
4647 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4648 in-ops,out-ops,sorted-used-iflds. All callers updated.
4649 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4651 * operand.scm (op-iflds-used): New proc.
4652 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4654 And from sid.scm,sid-cpu.scm as well.
4655 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4656 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4657 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4658 (gen-extracted-ifld-value): Ditto.
4659 (-extract-chunk-specs): Ditto.
4660 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4661 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4662 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4663 (-extract-insert-subfields): New function.
4664 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4665 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4666 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4667 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4669 (-gen-no-scache-semantic-fn): Ditto.
4670 (-gen-sem-case): Ditto.
4671 (-gen-read-case): Update calls to gen-define-ifields,
4672 gen-extract-ifields.
4673 * sim-decode.scm (-gen-record-args): Update.
4674 (-gen-sfmt-argvars-assigns): Update.
4675 (-gen-extract-case): Update.
4676 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4677 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4679 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4680 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4681 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4682 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4683 gen-define-ifields, gen-extract-ifields.
4684 (-gen-record-args): Update.
4685 (gen-sfmt-argvars-assigns): Update.
4686 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4687 with gen-define-ifields. Ditto for gen-extract-foo.
4688 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4689 procs rather than method calls.
4691 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4693 * sid.scm (-create-virtual-insns!): New local `context', pass it
4696 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4697 (operand name) not (operand object), (local name) not (local object).
4698 (rtx-traverse-with-locals): New proc.
4699 (-compile-expr-fn): New proc.
4700 (rtx-compile): Rewrite.
4701 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4702 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4703 (rtl-c-set-trace): Ditto.
4704 (operand define-fn): Recognize operand name argument.
4705 (local define-fn): Recognize sequence temp name argument.
4706 * rtx-funcs.scm (operand): Argument is operand name, not object,
4707 so call current-op-lookup.
4708 (local): Similarily, so call rtx-temp-lookup.
4710 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4711 (rtx-operand?): Ditto.
4712 (rtx-pretty-name): Ditto.
4713 (rtx-local-obj): Flag symbol argument as an error.
4714 (rtx-local-name): New proc.
4715 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4717 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4719 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4722 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4725 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4726 (*floats-s->c-fun-table*): Ditto.
4727 * hobbit.c,hobbit.h: Rebuild.
4728 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4729 * semantics.scm (rtx-simplify): Use /fastcall-make.
4731 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4733 * insn.scm (<insn>): Delete members condition, compiled-condition.
4734 (<insn>,make!): Update
4735 (<insn> getters,setters): Update.
4736 (-insn-parse,insn-read,define-full-insn): Update.
4737 * minsn.scm (minsn-make-alias): Update.
4738 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4739 (ifmt-compute!): Ditto.
4740 * sim.scm (sim-finish!): Update.
4741 * simplify.inc: (define-normal-insn): Update.
4742 * sid-cpu.scm (gen-semantic-code): Update.
4744 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4745 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4746 (ifmt-compute!): Ditto.
4748 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4750 * minsn.scm (minsn-compute-iflds): Print better error message for
4753 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4755 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4757 * Makefile.am (HOBFLAGS): New variable.
4758 (cgen-hob.c): Use it.
4760 (libcpu_a_SOURCES): Add hob-sup.c.
4761 (hob-sup.o): New rule.
4762 * Makefile.in: Rebuild.
4763 * cgen.c: #include hob-sup.h.
4764 (cgen_init_c): Call hobbit_init_support.
4765 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4766 (*special-scm->c-functions*): Add them.
4767 (display-c-expression): Handle *c-symbol*.
4768 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4769 (*floats-s->c-fun-table*): Ditto.
4770 (normalize): Recognize /fastcall-make.
4771 (normalize-fastcall-make): New proc.
4772 * hobbit.c,hobbit.h: Rebuild.
4773 * hob-sup.scm: New file.
4774 * hob-sup.c: New file.
4775 * hob-sup.h: New file.
4776 * read.scm: Load hob-sup.scm.
4777 * rtl.scm (-rtx-name-list): New variable.
4778 (rtx-name-list): New proc.
4779 (rtx-lookup): Try symbol first.
4780 (def-rtx-node): Add name to -rtx-name-list.
4781 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4782 (-rtx-traverse-anymode): New proc.
4783 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4784 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4785 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4786 (-rtx-traverse-{symornum,object}): New procs.
4787 (-rtx-make-traverse-table): Rewrite.
4788 (-rtx-traverse-operands): Rewrite arg-types handling.
4789 Handle #f result of traverser.
4790 (-rtx-traverse): Renamed from -rtx-traverse-normal.
4791 Move debug handling here.
4792 (-rtx-traverse-debug): Delete.
4793 (rtl-finish!): Change -rtx-traverse-table into list of handlers
4795 * semantics.scm (semantic-compile:process-expr!): Fix call to
4797 * utils.scm (map1-improper): New proc.
4799 1999-06-08 Doug Evans <devans@casey.cygnus.com>
4801 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4803 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4804 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4805 (<operand>,cxmake-get): Tweak.
4806 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
4808 1999-06-07 Doug Evans <devans@casey.cygnus.com>
4810 * thumb.cpu (dnti): Delete timing spec.
4813 * arm.cpu (arm isa): New fields condition, setup-semantics.
4814 (thumb isa): New field setup-semantics.
4815 (h-gr): Add attribute CACHE-ADDR.
4816 * arm7.cpu (dnai): Delete condition.
4817 (eval-cond): Delete.
4819 * mach.scm (<isa>): New member setup-semantics.
4820 (-isa-parse-setup-semantics): New proc.
4821 (-isa-parse): New arg setup-semantics.
4822 (-isa-read): Recognize setup-semantics.
4824 * sid-cpu.scm (gen-extract-fields): Split into two:
4825 gen-extract-ifields, gen-extract-ifmt-ifields.
4826 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
4827 tracing begin/end messages (done by caller now).
4828 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
4829 tracing begin/end messages (done by x-before,x-after virtual insns).
4830 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
4831 end so don't have to look it up again next time.
4832 * sid-decode.scm (-decode-expr-ifield-values): New proc.
4833 (-decode-expr-ifield-tracking-key): New proc.
4834 (-decode-expr-ifield-tracking): New proc.
4835 (-decode-expr-ifield-values-used): New proc.
4836 (-decode-expr-ifield-mark-used!): New proc.
4837 (-gen-decode-expr-set-itype): New proc.
4838 (-gen-decode-expr-entry): Rewrite.
4839 (-gen-decode-table-entry): New proc.
4840 (-gen-decoder-switch): Use it.
4841 (-gen-virtual-insn-finder): New proc.
4842 (-gen-argbuf-elm): Move here from sid.scm.
4843 (-gen-argbuf-hw-elm): Ditto.
4844 (-gen-argbuf-fields-union): Add entries for chain,before insns.
4845 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4846 conditional-execution isas.
4847 (-gen-decode-fn): Record conditional-exec ifield.
4848 * sid.scm (-current-pbb-engine?): New global.
4849 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4850 (<ifield>,gen-ifld-extract): New arg `indent'.
4851 (<multi-ifield>,gen-ifld-extract): Ditto.
4852 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
4853 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4854 (-gen-arch-model-decls): Only scan real insns.
4855 (scache-engine-insns,pbb-engine-insns): New procs.
4856 (-create-virtual-insns!): New proc.
4857 (sim-finish!): Call it.
4858 (-decode-specialize-insn?): New proc.
4859 (-decode-specialize-build-assertion): New proc.
4860 (-decode-specialize-insn-1): New proc.
4861 (-decode-specialize-insn): New proc.
4862 (-fill-sim-insn-list!): New proc.
4863 (sim-analyze!): Create copies of insns to be specialized.
4864 * utils-cgen.scm (obj-set-name!): New proc.
4866 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4867 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4869 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
4871 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4872 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4873 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4874 (attr): Rewrite test for insn owner.
4875 (member): New rtx function.
4876 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4877 as separate function.
4878 (rtx-ifield?,rtx-ifield-name): New procs.
4879 (rtx-operand-obj): Rewrite.
4880 (rtx-operand-name): New proc.
4881 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4882 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4883 (tstate-make): New args owner, known. All callers updated.
4884 (tstate-known-lookup): New proc.
4885 (rtx-traverse): New arg owner. All callers updated.
4886 (rtx-make-bool): New proc.
4887 (rtl-find-ifields): Rewrite.
4888 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4889 * semantics.scm: ... here.
4890 (rtx-const-equal,rtx-const-list-equal): New procs.
4891 (-build-known-values): New proc.
4892 (semantic-compile): New arg `insn'. Call rtx-simplify.
4893 (semantic-attrs): Ditto.
4894 * rtx-funcs.scm (member,number-list): New rtx functions.
4896 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4897 Rewrite. Delete arg `all-attrs'. All callers updated.
4898 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
4900 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4902 * decode.scm (subdtable-add): Handle `expr' entries.
4903 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
4904 (exprtable-entry-*): Update.
4905 (exprtable-entry-iflds): New proc.
4906 (exprentry-cost): New proc.
4907 (exprtable-sort,-gen-exprtable-name): New procs.
4908 (exprtable-make): New arg `name'. All callers updated. use vector.
4909 (exprtable-*): Update.
4910 (-build-decode-table-entry): Don't issue collision warning if all are
4911 specialized insns. Sort exprtable entries before building table.
4913 * read.scm (-reader-process-expanded-1): Move pretty printing of
4914 input to logging level 4.
4916 * utils.scm (string-list->string): New proc.
4918 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4920 (insn-read): Delete leading '-' in name. All callers updated.
4921 (real-insn?): New proc.
4922 (real-insns): Rewrite.
4923 (insn-has-ifield?): New proc.
4924 (insn-builtin!): Create insn attribute SPECIALIZED.
4926 * mach.scm (<arch>): Delete member app-data.
4927 (current-raw-insn-list): New proc.
4928 (insn-list-car,insn-list-splice!): New procs.
4929 (<decode-specialize>): New class.
4930 (-isa-parse-decode-specialize): New proc.
4931 (-isa-parse-decode-specializes): New proc.
4932 (<isa>): New members `condition', `decode-specializes'.
4933 (-isa-parse-condition): New proc.
4934 (-isa-parse): New args condition, decode-specializes.
4935 (-isa-read): Recognize condition, decode-specializes.
4936 (-isa-add-decode-specialize!): New proc.
4937 (modify-isa): New proc.
4938 (isa-conditional-exec?,state-conditional-exec?): New procs.
4939 (arch-init!): New reader command `modify-isa'.
4941 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4942 (mode-signed,mode-unsigned?): New procs.
4944 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
4946 * types.scm (<array>): New method get-shape.
4947 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4949 (hw-shape,hw-num-elms): New procs.
4950 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4951 if there's more than 255 registers.
4952 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4954 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4957 1999-05-21 Doug Evans <devans@casey.cygnus.com>
4959 * cgen-sid.scm (sim-arguments): Add -X.
4960 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4961 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4962 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
4963 Simplify by supporting pbb engine only.
4964 (-gen-sem-switch-init): New proc.
4965 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4966 (cgen-sem-switch.cxx): New proc.
4967 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4968 with with-pbb?. Support dual scache/pbb engines.
4969 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4970 Support dual scache/pbb engines.
4971 (cgen-decode.h): Generate semantic fn decls if with-scache?.
4972 * sid.scm (*) with-pbb? replaces with-sem-switch?.
4973 (sim-finish!): Create pbb support virtual insns if with-pbb?.
4975 1999-05-10 Ben Elliston <bje@cygnus.com>
4977 * arm7.cpu: Remove coprocessor related fields, operands and insn
4978 definitions for now. Take the undefined instruction trap instead.
4979 (ldmda-wb): New instruction.
4980 (ldmib-wb): Likewise.
4981 (ldmdb-wb): Likewise.
4982 (stmdb-wb): Likewise.
4983 (stmib-wb): Likewise.
4984 (stmda-wb): Likewise.
4986 1999-05-08 Doug Evans <devans@casey.cygnus.com>
4988 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4989 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4991 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4992 hobbit can't handle optional third arg.
4994 1999-05-07 Doug Evans <devans@casey.cygnus.com>
4996 * arm.cpu (h-tbit): Delete set spec.
4997 (h-mbits): Don't call arm_mbits_set in set spec.
4998 * arm.sim: New file.
4999 * hardware.scm (modify-hardware): New proc.
5000 (hardware-init!): Add modify-hardware command.
5001 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
5002 (-hw-gen-set-quiet): Ditto.
5003 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
5004 hardware attribute. Load $arch.sim file if present.
5005 * utils-cgen.scm (keyword-list?): New proc.
5006 (keyword-list->arg-list,arg-list-validate-name): New procs.
5007 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
5009 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
5011 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
5014 * attr.scm (obj-prepend-atlist!): New proc.
5016 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
5018 * sid.scm (<operand>,profilable?): Use op:type.
5019 * sim.scm (<operand>,profilable?): Use op:type.
5021 1999-05-04 Doug Evans <devans@casey.cygnus.com>
5023 * utils.scm (find-index,find): Be more stack friendly.
5025 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
5028 1999-05-01 Doug Evans <devans@casey.cygnus.com>
5030 * arm.cpu (h-gr-usr): New hardware element.
5031 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
5032 (arm-mode): New keyword.
5033 (h-mbits): Add set spec.
5034 (h-spsr): Implement get/set specs.
5036 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
5037 (-reader-process-expanded-1): Pretty print logging output.
5039 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
5040 (cgen-cpu.h): Print enums before hardware elements.
5041 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
5042 * sid-decode.scm (cgen-decode.cxx): Ditto.
5043 * sid-model.scm (cgen-model.cxx): Ditto.
5045 * utils-cgen.scm (context-error): Accept variable number of
5048 * rtx-funcs.scm (error:): New rtx function.
5049 * rtl-c.scm (s-case-vm): New proc.
5050 (-gen-non-vm-case-get,s-case-non-vm): New procs.
5051 (s-case): Simplify, handle non-VM result.
5052 (error:): New rtx function.
5054 1999-04-30 Doug Evans <devans@casey.cygnus.com>
5056 * arm.cpu (h-pc): Add set spec to zero bottom bits.
5057 (test-hi,test-ls): Fix cbit handling.
5058 (shift-type,h-operand2-shifttype): Move here ...
5059 * arm7.cpu: ... from here.
5060 (set-cond,set-cond-maybe,dnix): Delete, unused.
5061 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
5062 * arm.cpu: ... to here.
5063 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
5064 (alu-cmn): Use set-add-flags.
5065 (alu-tst): Use set-zn-flags.
5066 (alu-cmp): Use set-sub-flags.
5067 (lsl,lsr,asr): Set condition codes.
5068 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
5069 (alu-op): Split into three: alu-logical-op,alu-arith-op,
5071 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
5072 All callers updated.
5073 (sub-sp): Rename from add-sp-neg.
5074 (f-lbwl-offset): Delete.
5075 (f-lbwl-hi,f-lbwl-lo): New ifields.
5076 (lbwl-hi,lbwl-lo): Update.
5077 (bl-hi): Add 4 to pc.
5078 (push-reg,pop-reg): Simplify.
5079 (push,push-lr): Push registers in correct order.
5080 (pop,pop-pc): Pop registers in correct order.
5081 (save-reg-inc,load-reg-inc): Simplify.
5082 (ldmia): Save registers in correct order.
5084 1999-04-30 Ben Elliston <bje@cygnus.com>
5086 * arm7.cpu (f-op-hdt): Remove; unused.
5087 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
5088 (f-ror-imm8): New multi-ifield.
5089 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
5091 (f-uimm12): New field.
5092 (ror-imm8): New operand.
5094 (hdt-offset8): Reinstate operand.
5095 (offset4-hi,offset4-lo): Remove.
5096 (set-cond): Remove macro; unused.
5097 (set-cond-maybe): Likewise.
5098 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
5099 (store-word/byte): Likewise.
5100 (load-halfword): Use hdt-offset8 multifield operand instead of two
5101 4-bit operands that are explicitly combined by semantic code.
5102 (do-halfword-store): Bug fix. Set address when not preindexing.
5103 (store-halfword): Also use hdt-offset8 operand.
5104 (arith-op): Avoid clobbering source registers when one of them is
5105 the destination register.
5106 (arith-imm-op): Likewise.
5107 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
5108 (teq-imm): Likewise.
5109 (ldm-p): Rename to ldmdb.
5110 (stm-pw): Rename to stmdb-wb.
5111 (multi-action): New macro; test reg-list bits and execute a
5112 semantic fn if the bit is set.
5113 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
5114 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
5115 (all insns): Use dnai entries for simplicity rather than dni.
5116 (*): Use short-form of (const ..).
5118 1999-04-29 Doug Evans <devans@casey.cygnus.com>
5120 * rtl.scm (<rtx-func>): Rename member type to style. Rename
5121 member eval to evaluator.
5122 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
5123 (tstate-make): Delete arg op-fn. All callers updated.
5124 (tstate-op-fn,tstate-set-op-fn!): Delete.
5125 (rtx-traverse): Delete op-fn arg. All callers updated.
5126 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
5127 split out of -simplify-for-compilation.
5129 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
5130 (cgen_DEPENDENCIES): Add stamp-cgen.
5131 (stamp-cgen): New rule.
5132 * Makefile.in: Rebuild.
5134 * rtl-c.scm (enum:): Define emitter for.
5135 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
5137 (rtx-constant-value,rtx-enum-value): New procs.
5138 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
5139 (rtx-compile-time-constant?): Return #t for enums.
5140 (rtx-true?,rtx-false?): Handle enums.
5141 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
5142 building result by hand.
5143 (rtx-simplify-eq-attr-insn): Ditto.
5144 * rtx-funcs.scm (enum:,enum): New rtx functions.
5146 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
5148 (arch-analyze-insns!): New proc.
5149 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
5150 of calling ifmt-compute! directly.
5151 * sid.scm (-sim-insns-analyzed?): Delete.
5152 (sim-analyze!): Call arch-analyze-insns! instead of calling
5153 ifmt-compute! directly.
5154 * sim.scm (-sim-insns-analyzed?): Delete.
5155 (sim-analyze!): Call arch-analyze-insns! instead of calling
5156 ifmt-compute! directly.
5158 * utils.scm (string-take-with-filler): New proc.
5159 (string-take): Use it.
5161 * pgmr-tools.scm: New file.
5162 * read.scm: Load it.
5163 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
5165 * insn.scm (insn-base-mask): Renamed from insn:mask.
5166 All callers updated.
5167 (insn-base-mask-length): Renamed from insn:mask-length.
5168 All callers updated.
5169 (insn-foo): Renamed from insn:foo. All callers updated.
5170 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
5171 * iformat.scm (compute-insn-base-mask-length): Renamed from
5172 compute-insn-mask-length. All callers updated.
5173 (compute-insn-base-mask): Renamed from compute-insn-mask.
5174 All callers updated.
5176 * enum.scm (-enum-parse-prefix): New proc.
5177 (<enum>,make!): Don't parse enum values here.
5178 (-enum-parse): Do it here. Call -enum-parse-prefix.
5179 (define-full-insn-enum): Ditto.
5180 (enum-vals-upcase): New proc.
5181 * hardware.scm (define-keyword): Make enum prefix uppercase.
5182 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
5184 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
5185 (<ifield>,field-extract): New method.
5186 (<multi-ifield>,field-extract): New method.
5187 (ifld-extract): New proc.
5188 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
5189 (ifld-extract-fn-name): Renamed from ifld-extract.
5191 * ifield.scm (ifld-new-value): Renamed from ifield-make.
5192 All callers updated.
5194 * ifield.scm (ifld-lsb0?): New proc.
5195 (sort-ifield-list): New arg up?. All callers updated.
5196 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
5197 rather than global state.
5199 1999-04-27 Doug Evans <devans@casey.cygnus.com>
5201 * insn.scm (pretty-print-insn-format): New proc.
5203 * Makefile.in: Rebuild.
5204 * aclocal.m4: Rebuild
5205 * configure: Rebuild.
5207 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
5209 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
5210 * configure: Rebuild.
5211 * aclocal.m4: Rebuild.
5212 * Makefile.in: Rebuild.
5213 * doc/Makefile.in: Rebuild.
5214 * doc/version.texi: Rebuild.
5216 1999-04-25 Doug Evans <devans@casey.cygnus.com>
5218 * utils.scm (bits->bools): New proc.
5220 1999-04-23 Doug Evans <devans@casey.cygnus.com>
5222 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
5223 subfield's gen-ifld-extract-decl method.
5225 1999-04-23 Ben Elliston <bje@cygnus.com>
5227 * arm7.cpu (ldrsh-pu): Remove.
5228 (do-halfword-load): New pmacro.
5229 (load-halfword): Likewise.
5230 (do-halfword-store): Likewise.
5231 (store-halfword): Likewise.
5232 (strh-*): New instructions.
5233 (ldrsb-*): Likewise.
5235 (ldrsh-*): Likewise.
5237 1999-04-22 Doug Evans <devans@casey.cygnus.com>
5239 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
5242 * arm7.cpu (do-word/byte-store): Fix typo.
5244 1999-04-22 Ben Elliston <bje@cygnus.com>
5246 * arm7.cpu (do-word/byte-load): Handle cases where the destination
5247 register is the program counter (R15).
5249 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
5250 (str-*): Implement using store-word-byte. Remove older versions.
5251 (bic): Use the `inv' rtx for obtaining bitwise complements.
5252 (bic-imm): Likewise.
5254 (mvn-imm): Likewise.
5255 (store-indev-reg): Remove crufty pmacro.
5256 (load-indiv-reg): Likewise.
5257 (ldm-p): Reverse the order of register processing for decrement.
5259 (stbi): Remove; handled by the str-* insns.
5261 1999-04-21 Doug Evans <devans@casey.cygnus.com>
5263 * thumb.cpu (cmp): Fix carry bit computation.
5266 1999-04-20 Doug Evans <devans@casey.cygnus.com>
5268 * arm.cpu (h-tbit): Specify set spec.
5270 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
5271 (set-sub-flags): Interpret "carry bit" as a borrow.
5272 (all sub/cmp insns): Carry bit is actually a borrow bit.
5273 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
5274 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
5276 (hireg-add,hireg-cmp,hireg-move): Ditto.
5278 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
5279 (-CGEN-LANG-VERSION): Ditto.
5281 1999-04-18 Doug Evans <devans@casey.cygnus.com>
5283 * pmacros.scm (-pmacro-make): New arg `default-values',
5284 all callers updated.
5285 (-pmacro-default-values): New proc.
5286 (-pmacro-process-keyworded-args): New proc.
5287 (-pmacro-process-args): New proc.
5288 (-pmacro-invoke): Process arguments before expanding macro.
5289 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
5290 (define-pmacro): Handle default values specified in arg list.
5291 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
5292 (rtx-boolif-op-arg[01]): New procs.
5293 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
5294 (rtx-simplify): Handle not,orif,andif.
5295 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
5296 * utils.scm (alist-copy): New proc.
5297 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
5299 (swi): Explicitly set pc.
5301 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
5303 1999-04-17 Ben Elliston <bje@cygnus.com>
5305 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
5306 correctly adjusts the program counter now.
5308 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
5309 (f-signed?): Rename from `f-hdt-signed?'.
5310 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
5311 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
5312 (f-hdt-offset8): Use new field names.
5313 (ldr): Use `imm12' field, not `offset12', since we do our own
5315 (str, str-*): Likewise.
5316 (ldu-*): Remove most; better not implemented than broken.
5318 (ldrsh-pu): New insn.
5322 (ldm-p): Likewise; replace (load-indiv-reg) version.
5324 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5326 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
5327 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
5328 (*): Explicitly specify mode in c-call.
5329 (logical-op): Recognize sets of h-gr[15] as sets of pc.
5331 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
5332 (arith-imm-op): New pmacro.
5333 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
5334 * thumb.cpu (bx-rs,bx-hs): Rewrite.
5336 1999-04-14 Doug Evans <devans@casey.cygnus.com>
5338 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
5340 * rtl.scm (rtl-find-ifields): Implement.
5342 * utils-gen.scm: New file.
5343 * read.scm: Load it.
5344 * desc.scm: Move generic attribute code to utils-gen.scm.
5345 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
5346 * Makefile.in: Rebuild.
5348 * arm7.cpu (R15-OFFSET): New attribute.
5350 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
5351 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
5352 for reg-shift version.
5354 (data processing insns): Reorganize. Use dnai.
5356 * attr.scm (attr-kind): New proc.
5357 (attr-list-enum-list): Rewrite.
5358 (-attr-sort): Split result into two lists, bools and non-bools.
5359 (current-attr-list-for): Update.
5361 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
5362 * sid-cpu.scm (-gen-attr-decls): New proc.
5363 (-gen-insn-attr-decls): New proc.
5364 (cgen-desc.h): New proc.
5365 (cgen-cpu.h): Put everything in @cpu@ namespace.
5366 (gen-parallel-exec-type): Change prefix of parexec struct from
5368 (-gen-trace-record-type): Ditto for trace_record struct.
5369 (-gen-write-case): Update.
5370 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
5371 @prefix@. Update scache struct references.
5372 (-gen-sem-case): Update scache struct references.
5373 (-gen-sem-switch-fn): Update idesc struct reference.
5374 Update insn_type enum reference.
5375 (cgen-write.cxx): Update scache,argbuf references.
5376 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
5377 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
5378 from @cpu@ to @prefix@.
5379 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
5380 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
5381 from @CPU@ to @PREFIX@.
5382 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
5383 from @CPU@ to @PREFIX@.
5384 (-gen-decode-insn-globals): Generate insn attributes.
5385 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
5386 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
5387 semantic fn typedef.
5388 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
5389 Change prefix of scache struct from @cpu@ to @prefix@.
5390 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
5391 Change prefix of idesc struct from @cpu@ to @prefix@.
5392 Change prefix of insn_type enum from @cpu@ to @prefix@.
5393 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5394 from @cpu@ to @prefix@.
5395 (-gen-scache-decls): Change prefix of scache struct from
5396 @cpu@ to @prefix@. Update idesc struct name.
5397 Update decode,execute methods.
5398 (-gen-extract-case): Update to type name changes.
5399 (-gen-decode-fn): Ditto.
5400 (cgen-decode.h): Put everything in @cpu@ namespace (except
5401 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5402 (cgen-decode.cxx): Add using namespace @cpu@.
5403 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5404 model_mark_get/set from @cpu@ to @prefix@.
5405 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5407 (gen-model-fn-decls): Update idesc struct name. Change prefix
5408 of model_insn_before/after from @cpu@ to @prefix@.
5409 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5410 Update insn_word type name.
5411 (-gen-model-timing-table): Update INSN_TIMING struct name.
5412 (-gen-model-init-fn): Update MODEL_DATA struct name.
5413 (-gen-mach-defns): Update name of init_idesc_table fn.
5414 (cgen-model.cxx): Add using namespace @cpu@.
5415 * sid.scm (gen-cpu-class): Delete.
5416 (gen-attr-type): New proc.
5417 (gen-obj-attr-sid-defn): New proc.
5418 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5419 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5421 (gen-cpu-insn-enum): Update name of insn enum.
5422 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5424 (swi): Rename @cpu@_swi to @prefix@_swi.
5426 * decode.scm (-build-decode-table-entry): Remove heuristic for
5427 distinguishing insns, and use insn ifield-assertion specs.
5429 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5430 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5431 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5432 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5433 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5434 all callers updated.
5435 (gen-attr-name): New proc
5436 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5437 (gen-obj-attr-defn): Delete num_nonbools count.
5439 * iformat.scm (ifmt-analyze): Handle insn-condition.
5440 (ifmt-compute!): Ditto.
5441 * insn.scm (<insn>): Specify default value for condition,
5442 post-cond-trap,compiled-condition,compiled-semantics.
5443 (<insn>,make!): New arg condition.
5444 (<insn>): Add getters for condition,compiled-condition.
5445 (-insn-parse): New arg condition, all callers updated.
5446 (-insn-read): Recognize condition spec.
5447 (define-full-insn): New arg condition.
5448 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5449 * semantics.scm (semantic-compile): Change arg sem-code to
5451 (semantic-attrs): Ditto.
5452 * sim.scm (sim-finish!): Update calls to define-full-insn.
5453 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5454 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5455 * sid.scm (sim-finish!): Update call to define-full-insn.
5457 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5459 * Makefile.am (sim-cpu): Allow specification of ISA.
5460 * Makefile.in: Rebuild.
5462 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5464 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5466 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5468 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5470 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5472 * attr.scm (atlist?): New proc.
5473 (-attr-eval): Rewrite.
5474 (attr-parse): New proc.
5475 (atlist-parse): Use it.
5477 * decode.scm (exprtable-entry-make): New proc.
5478 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5479 (exprtable-make,exprtable-insns): New procs.
5481 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5483 (hardware-builtin!): Make h-memory a vector.
5485 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5486 All callers updated.
5487 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5489 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5491 (-insn-parse): Set semantics to #f if not specified.
5492 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5494 (-parse-insn-format): Recognize `=' iformat spec.
5496 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5497 (isa-max-insn-bitsize): Ditto.
5499 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5501 (<ifield>,gen-extract): Ditto.
5502 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5503 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5504 (gen-define-ifmt-ifields): New proc.
5505 (gen-semantic-code): Rewrite.
5506 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5507 (-gen-decoder-switch): Handle expression tables.
5508 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5510 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5511 instead of gen-define-fields.
5512 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5514 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5515 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5516 (-gen-ifld-extract-beyond): Ditto.
5517 (<multi-ifield>,gen-ifld-extract): Ditto.
5518 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5519 rtl evaluation code.
5520 (op:read): Build an <eval-state> to pass to gen-read.
5521 (op:write): Build an <eval-state> to pass to gen-write.
5522 (op:record-profile): Build an <eval-state> to pass to
5524 * sim-cpu.scm (gen-semantic-code): Rewrite.
5525 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5527 (-gen-ifld-extract-beyond): Ditto.
5528 (<multi-ifield>,gen-ifld-extract): Ditto.
5529 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5530 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5531 rtl evaluation code.
5532 (op:read): Build an <eval-state> to pass to gen-read.
5533 (op:write): Build an <eval-state> to pass to gen-write.
5534 (op:record-profile): Build an <eval-state> to pass to
5537 * operand.scm (<operand>): Give `selector' default value of #f.
5538 Give `num' default value of -1. Give `cond?' default value of #f.
5539 (op:new-mode): Delete arg `set?', all uses updated.
5541 * read.scm (reader-error): Handle #f return from port-filename.
5542 (-init-parse-cpu!): Call rtl-c-init!.
5543 (reader-install-builtin!): Call rtl-builtin!.
5545 * rtl-c.scm: New file.
5546 * semantics.scm: New file.
5547 * read.scm: Load them.
5548 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5550 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5552 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5553 (-rtx-num-text,-rtx-max-num): New globals.
5554 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5555 (-rtx-macro-lookup): New proc.
5556 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5557 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5558 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5559 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5560 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5561 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5562 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5563 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5564 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5565 (rtx-pretty-name): New proc.
5566 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5567 (rtx-traverse-*): Rewrite rtx traversing.
5568 (rtx-eval-*): Rewrite rtx evaluation.
5569 (rtx-compile): New proc.
5570 (rtx-simplify): New proc.
5571 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5572 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5573 (ifield,index-of): Rewrite.
5574 (name): Renamed from `operand:'.
5575 (operand,xop,local): New rtx's.
5576 (current-insn): Rewrite.
5577 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5578 (cgen-hob.h): Remove rule for.
5579 (cgen-hob.o): Depend on cgen-hob.c only.
5580 * Makefile.in: Rebuild.
5582 * utils-cgen.scm (vmake): New proc.
5583 (<context>): New class.
5584 (context-make-prefix,context-error): New procs.
5586 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5588 * i960.cpu: Add some ??? comments.
5589 (xnor, ornot): New instructions.
5590 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5592 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5594 * cos.scm (-object-error): Print better error message.
5596 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5597 (-pmacro-env-ref): Renamed from -env-ref.
5599 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5601 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5603 (hardware-builtin!): Delete h-pc builtin.
5604 * arm.cpu (h-pc): Define.
5605 (h-gr): Delete get,set specs. Make array of 16 regs again.
5606 * arm7.cpu (set-logical-cc-maybe): Delete.
5607 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5608 (data processing insns): Rewrite.
5609 * m32r.cpu (h-pc): Define.
5610 * fr30.cpu (h-pc): Define.
5611 * i960.cpu (h-pc): Define.
5612 * sparc.cpu (h-pc): Define.
5614 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5615 (s-parallel): Replace do {...} while (0) with {...}.
5616 (s-sequence): Ditto.
5618 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5620 (-gen-write-case,-gen-sem-case): Ditto.
5621 (-gen-sem-case): Only specify `written' if profiling or
5622 parallel-write-back.
5623 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5624 (-gen-sem-switch-fn): New proc.
5625 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5626 based on with-sem-switch option.
5627 * sid-decode.scm (-gen-decode-insn-globals): Only define
5628 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5629 addresses in idesc_table if !with-sem-switch.
5630 (-gen-sem-fn-decls): Rewrite.
5631 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5632 member based on with-sem-switch. Only define
5633 `idesc_table_initialized_p' member if with-sem-switch.
5634 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5635 * sid.scm (-with-sem-switch?): New variable.
5636 (option-init!): Initialize it.
5637 (option-set!): Set it.
5638 (with-sem-switch?): New proc.
5639 (-op-gen-set-trace): Only emit `written' reference if profiling.
5640 (sim-finish!): Use h_pc_set to set pc.
5642 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5644 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5645 All callers updated.
5646 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5648 * sid.scm (gen-argbuf-type): Delete.
5649 (-gen-argbuf-fields-union): Move to ...
5650 * sid-decode.scm: ... here.
5652 * read.scm (-reader-process-expanded-1): New proc.
5653 (-reader-process-expanded): Call it to catch nested begin's.
5654 (reader-process): Move `begin' handling to -reader-process-expanded.
5656 * insn.scm (-insn-read): Fix name of `format' spec.
5658 * pmacros.scm (.pmacro): New builtin.
5659 (scan-symbol): If procedure macro, return macro rather than its symbol.
5660 (check-macro): Don't do lookup, instead check if (car expr) is
5662 (scan-list): Handle .pmacro.
5663 (scan): No longer re-examine text for another macro invocation.
5664 (-pmacro-build-lambda): New proc.
5665 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5666 another, fetch the other's value (rather than doing it during
5669 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5671 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5672 * Makefile.in: Rebuild.
5674 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5675 (-fill-slot!): Simplify.
5676 (-build-slots): Simplify.
5678 * dev.scm (load-sid): Don't load sid-arch.scm.
5680 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5682 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5685 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5687 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5688 * decode.scm: ... here. New file.
5689 * sid-decode.scm: Use decoder computation code in decode.scm.
5690 * read.scm: Load decode.scm.
5692 * arm.cpu (arm710 model): Add u-exec function unit.
5693 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5694 Add get/set specs to redirect reg 15 to h-pc.
5695 (h-*): Indicate for both ARM and THUMB isas.
5696 (cbit,nbit,vbit,zbit): Ditto.
5697 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5698 (h-cpsr): Make virtual. Add get/set specs.
5699 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5700 (h-spsr): New virtual reg.
5701 * arm7.cpu (shift-type): New explicitly defined keyword.
5702 (h-operand2-shifttype): Use it.
5703 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5704 All callers updated. Don't set cbit.
5705 (logical-op): Add rm to ifield list. Change case to case:. Use
5706 shift-type enum as case choices. Set cbit.
5707 (and,orr,eor,add-imm): Uncomment out.
5708 (undefined): Temporarily comment out.
5709 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5710 (lda-pc,lda-sp): Ditto.
5711 (ldr-pc): Rename from ldr.
5712 (cbranch): Mark insns as being thumb insns.
5714 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5716 * cgen-sid.scm: Don't load sid-arch.scm.
5717 (sim-arguments): Delete unused entries.
5718 * sid-arch.scm: Delete.
5720 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5721 (<insn>,ifld-assertions): New member.
5722 (<insn>,make!): New arg ifld-assertions, all callers updated.
5723 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5724 (insn:fields): Delete.
5725 (-insn-parse): New arg ifld-assertions. All callers updated.
5726 (-insn-read,define-insn): New procs.
5727 (define-full-insn): New arg ifld-assertions. All callers updated.
5728 (insn-init!): New comment define-insn.
5730 * model.scm (-model-parse): Ensure at least one unit specified.
5732 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5733 (<c-expr-temp>,get-name): New method.
5734 (-rtx-make-current-closure,s-closure): New proc.
5735 (hw:): Wrap rtx indices in a closure.
5736 (-gen-case-prefix): New proc.
5738 * rtx-funcs.scm (case:): Fix call to s-case.
5739 (closure): New rtx func.
5741 * hardware.scm (<hardware-base>): New member isas-cache.
5742 (<hardware-base>,get-isas): New method.
5743 (hardware-builtin): Indicate for all isas.
5744 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5745 * mach.scm (current-arch-mach-name-list): Return list of names.
5746 (current-isa-mach-name-list): Ditto.
5747 (define-arch): Install builtin objects here.
5748 * read.scm (keep-atlist?): Only keep if both mach and isa are
5750 (keep-mach-atlist?): New proc.
5751 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5752 (reader-install-builtin!): Renamed from -install-builtin!.
5753 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5754 -gen-cpu-reg-access-defns. Rewrite.
5755 (gen-reg-access-defn): Delete.
5756 (-gen-hardware-struct): New proc.
5757 (-gen-hardware-types): Simplify. Add multiple-isa support.
5758 (gen-semantic-fn,-gen-all-semantics): Delete.
5759 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5760 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5761 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5762 Call sem-analyze-insns!.
5763 (cgen-semantics.cxx): Add multiple-isa support.
5764 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5765 (-gen-scache-decls,-gen-decode-fn): Ditto.
5766 (cgen-decode.h): Call sem-analyze-insns!.
5767 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5768 * sid.scm (-with-multiple-isa?): New variable.
5769 (option-init!): Initialize it.
5770 (option-set!): Set it.
5771 (with-multiple-isa?): New proc.
5772 (gen-cpu-ref): New arg isas. All callers updated.
5773 (gen-cpu-class): New proc.
5774 (*-get-macro,*-set-macro): Delete.
5775 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5776 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5777 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5778 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5779 (-sim-insns-analyzed): New global variable.
5780 (sim-init!): Reset it.
5781 (sim-analyze-insns!): New proc.
5782 (sim-analyze!): Don't do instruction analysis here.
5783 (sim-finish!): Specify isa of x-invalid insn.
5784 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5786 1999-03-22 Doug Evans <devans@casey.cygnus.com>
5788 * thumb.cpu (cpu,mach,model): Delete.
5789 (dntf): New pmacro. Use it for all field definitions.
5790 (dntop): New pmacro. Use it for all operand definitions.
5791 (asr): Correct field list.
5792 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5794 * utils-cgen.scm (define-getters): New macro to simplify
5795 writing class accessors.
5796 (define-setters): Ditto.
5797 (sanitize): Recognize isa elements.
5799 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5800 state-parallel-exec?.
5801 * sid-model.scm (*): Ditto.
5802 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
5803 state-decode-assist.
5805 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5806 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5807 * sim-decode.scm (-gen-decode-switch): Ditto.
5809 * sim-arch.scm (-regs-for-access-fns): Delete.
5810 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5811 (-gen-arch-reg-access-defns): Delete.
5813 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5814 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5815 with state-parallel=exec?.
5816 (cgen-*): Call sim-analyze-insns! here.
5817 * sim-decode.scm (cgen-*): Ditto.
5818 * sim-model.scm (cgen-*): Ditto.
5819 * sim.scm (-sim-insns-analyzed): New global variable.
5820 (sim-init!): Reset it.
5821 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
5822 already done the analysis.
5824 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5827 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5828 (arm arch): Update isa spec.
5829 (arm,thumb isas): Define.
5830 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5831 (arm7tdmi mach): Add isa spec.
5832 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
5833 `const' on word number.
5834 * fr30.cpu (fr30 arch): Update isa spec.
5836 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5838 * i960.cpu (i960 arch): Update isa spec.
5840 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5841 liw-insns,parallel-insns moved to isas spec.
5842 * m32r.cpu (m32r arch): Update isas spec.
5844 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5845 liw-insns,parallel-insns moved to isa spec.
5846 * sparc.cpu (sparc arch): Update isas spec.
5847 (sparc isa): Define.
5848 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5849 decode-assist moved to isa spec.
5850 * sparc64.cpu (sparc64 cpu): Ditto.
5851 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5852 * desc-cpu.scm (-gen-isa-table-defns): New proc.
5853 (-gen-mach-table-defns): Output mach table.
5854 (-gen-hash-defines): Delete insn size macros, except for
5856 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
5857 (cgen-desc.h): Define MAX_ISAS.
5858 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
5859 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
5860 (arch-* accessors): Renamed from arch:*. All callers updated.
5861 (current-arch-isa-name-list): New proc.
5862 (-arch-parse-isas): Renamed from -arch-parse-isa.
5863 (def-isa-attr!): Rewrite.
5864 (<iframe>): New class.
5865 (<itype>): New class.
5867 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5868 (isa-integral-insn?,isa-parallel-exec?): New procs.
5869 (-isa-parse,-isa-read,define-isa): New proc.
5870 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5871 liw-insns moved to <isa>.
5872 (cpu-* accessors): Renamed from cpu:*. All callers updated.
5873 (-cpu-parse,-cpu-read): Update.
5874 (state-*): Renamed from state:*. All callers updated.
5875 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5877 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5878 (state-decode-assist): New proc.
5879 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5880 (-adata-set-derived!): Rewrite.
5881 (adata-integral-insn?): Renamed from adata:integral-insn?. All
5883 (arch-init!): Add define-isa command.
5884 * read.scm (<reader>): Default keep-isa member to (all).
5885 (reader-* accessors): Renamed from reader:*. All callers updated.
5886 (-keep-isa-set!): Call string->symbol on isa name list.
5887 (keep-isa-validate!): Rewrite.
5888 (current-isa): New proc.
5889 (keep-isa?): Recognize "all".
5890 (-init-parse-cpu!): New arg keep-isa. All callers updated.
5891 Call -keep-isa-set!.
5892 (cmd-if): Recognize keep-isa?.
5893 (cpu-load): New arg keep-isa. All callers updated.
5894 (-opt-spec-update): New proc.
5895 (common-arguments): First arg is string, not symbol.
5896 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
5898 * rtl.scm (rtx-get): Default mode of string arg is INT.
5900 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
5902 * rtx-funcs.scm (join:): Pass cpu to handler.
5904 * configure.in (guile_include_dir): Delete.
5905 * configure: Rebuild.
5906 * Makefile.in: Rebuild.
5907 * doc/Makefile.in: Rebuild.
5909 * sid-cpu.scm (-extract-chunk-specs): New proc.
5910 (gen-define-fields): Use it.
5911 (-extract-chunk): New proc.
5912 (-gen-extract-beyond-var-list): Use it.
5913 (gen-extract-fields): Simplify.
5915 1999-03-22 Ben Elliston <bje@cygnus.com>
5917 * arm7.cpu (ldri-p): New instruction.
5918 (swi): Do not vector through 0x8 yet--there is nothing there.
5921 (all): Use (const x) in subreg expressions.
5923 1999-03-19 Ben Elliston <bje@cygnus.com>
5925 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5928 1999-03-17 Doug Evans <devans@casey.cygnus.com>
5930 * fr30.cpu (define-arch): Specify "forced" default-alignment.
5931 * mach.scm (-parse-alignment): Recognize "forced" alignment.
5932 * sim-cpu.scm (-extract-chunk-specs): New proc.
5933 (gen-define-fields): Use it.
5934 (-extract-chunk): New proc.
5935 (-gen-extract-beyond-var-list): Use it.
5936 (gen-extract-fields): Simplify.
5938 Port to guile 1.3.1.
5939 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5940 (LIBIBERTY): New var.
5941 (HOB_OBJS): Add cgen-gh.o.
5942 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5943 * Makefile.in: Rebuild.
5944 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5945 * config.in: Rebuild.
5946 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5947 libncurses, libtermcap.
5948 Add checks for needed functions in guile 1.2 not in guile 1.3,
5949 and vice versa. Add test for 3 argument scm_make_vector.
5950 * configure: Rebuild.
5951 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5952 definitions if guile doesn't have them.
5953 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5954 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
5955 with gh_vector_set_x.
5956 (cgh_qsort): Replace gh_list_length with gh_length.
5957 * cgen-gh.h: Add decls for added functions.
5958 (cgh_qsort): Don't declare if IN_HOBBIT.
5959 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
5960 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5961 scm_make_vector with gh_make_vector.
5962 * cos.scm: Use vector-length instead of length on vectors.
5963 * dev.scm (cload): Make varargs proc with keyword/value args.
5964 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
5965 provide version that works with guile 1.2 or 1.3.
5966 Include private copy of scmhob.h.
5967 * scmhob.h: New file. Keep our own copy for now.
5969 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
5971 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5973 (-rtx-traverse-operands): Dump cx temp stack if debugging.
5974 (-cx-temp-dump-stack): Pretty up output.
5976 * arm.cpu: comment out thumb.cpu until isa support ready.
5977 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5978 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5979 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5981 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5983 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5985 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5986 (<hw-address>,mode-ok?): unsigned/signed are compatible.
5988 * operand (op:new-mode): Improve error message.
5990 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
5991 * arm7.cpu: New file.
5993 1999-03-12 Ben Elliston <bje@cygnus.com>
5995 * arm.cpu: Lots of minor fixes after desk checking.
5997 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5999 * thumb.cpu: snapshot of current work
6001 * rtl.scm (rtx-get): Tweak error message.
6003 1999-03-10 Doug Evans <devans@casey.cygnus.com>
6005 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
6006 * Makefile.in: Rebuild.
6008 * cos.c (cos_vector_copy): New function.
6009 (_object_copy): Use it.
6011 * mode.scm (mode:eq?): Clean up.
6012 * rtl.scm (cx-new-mode): Copy attributes.
6013 (rtx-get): Don't make copy if <c-expr> with identical mode.
6015 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
6017 (gr-names): h-gr register names moved here.
6019 (cr-names): h-cr register names moved here.
6021 (dr-names): h-dr register names moved here.
6023 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
6024 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
6025 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
6027 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
6029 (gr-names): h-gr register names moved here.
6031 (cr-names): h-cr register names moved here.
6033 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
6034 (h-accums,h-psw): Ditto.
6035 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
6037 (gr-names): h-gr register names moved here.
6038 (h-gr-indices): Delete.
6039 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
6040 (sparc64 h-gr): Ditto.
6041 (h-y): Add get/set specs.
6043 (fp operands): Rewrite.
6044 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
6045 (h-tbr,h-cwp,h-wim): Ditto.
6046 * sparc64.cpu (h-fpsr): Add get/set specs.
6047 * sparccom.cpu (ldd-reg+reg): Load value all at once.
6048 (fp-ld-op): New arg `dest', all callers updated.
6049 (*): Replace `make-di' with `join'.
6051 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
6053 (gen-semantic-code): Save/restore rtl generator state.
6054 (cgen-cpu.h): Call rtl-gen-init!.
6055 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6056 (-gen-ifld-extract-beyond): Ditto.
6057 (<multi-ifield>,gen-ifld-extract): Ditto.
6058 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6060 (-hw-gen-set-quiet-pc): Ditto.
6061 (<hw-pc>,gen-write): Ditto.
6062 (-hw-cxmake-get): Ditto. Call getter function if present.
6063 (<hw-register>,cxmake-get-raw): New method.
6064 (<hw-register>,gen-set-quiet-raw): New method.
6065 (-hw-gen-set-quiet): New arg `gstate'.
6066 (hw-fun-access?): Delete.
6067 (gen-reg-access-defn): Output function contents.
6068 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6070 (-gen-hw-index): Ditto.
6071 (op:read): Update gen-read invocation.
6072 (op:write): Update gen-write invocation.
6073 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
6075 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6076 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6077 (<unit>,gen-profile-code): Update to sim.scm version.
6079 * sim-arch.scm (-regs-for-access-fns): New proc.
6080 (-biggest-reg-mode): New proc.
6081 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
6082 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
6083 virtual regs separately.
6084 (-gen-cpu-reg-access-defns): Replace fun-access? with new
6086 (gen-semantic-code): Save/restore rtl generator state.
6087 (cgen-cpu.h): Call rtl-gen-init!.
6088 (cgen-cpu.c): Ditto. #include cgen-ops.h.
6089 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
6090 renamed to mach-bfd-name.
6091 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
6092 (-gen-ifld-extract-beyond): Ditto.
6093 (<multi-ifield>,gen-ifld-extract): Ditto.
6094 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
6095 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
6096 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
6098 (hw-fun-access?): Delete.
6099 (-hw-gen-set-quiet-pc): New arg `gstate'.
6100 (<hw-register>,gen-get-macro): Rewrite.
6101 (<hw-register>,gen-set-macro): Rewrite.
6102 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
6103 (-hw-cxmake-get): New arg `gstate'. Rewrite.
6104 (<hw-register>,cxmake-get-raw): New method.
6105 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
6106 (<hw-register>,gen-set-quiet-raw): New method.
6107 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
6109 (-gen-hw-index): Ditto.
6110 (<hw-index>): New arg `gstate'.
6111 (-gen-hw-selector): Update call to rtx-c.
6112 (<pc>): New arg `gstate'.
6113 (op:read): Update gen-read invocation.
6114 (op:write): Update gen-write invocation.
6115 (<operand>,cxmake-get): Handle raw-reg.
6116 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
6117 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6118 (<operand>,gen-set-quiet): Handle raw-reg.
6119 (<operand>,gen-set-trace): Handle raw-reg.
6120 (-gen-mach-data): mach:cpu renamed to mach-cpu.
6122 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
6123 cgen_operand_type enum.
6124 (gen-operand-table): Add operand type enum. Replace pointer to
6125 hardware element with its enum. Null terminate table.
6126 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
6127 Build operand table.
6128 * ifield.scm (-ifield-parse): Recognize ISA attribute.
6129 * mach.scm (<arch-data>): New member `isas'.
6130 (adata-isas): New accessor.
6132 (isa-default-insn-word-bitsize): New accessor.
6133 (isa-enum): New proc.
6134 (current-arch-default-insn-word-bitsize): Delete.
6135 (current-isa-list,current-isa-lookup): New procs.
6136 (-arch-parse-isa): New proc.
6137 (-arch-parse): Rewrite.
6138 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
6139 (define-arch): Define ISA attribute.
6140 (def-isa-attr!,isa-supports?): New procs.
6141 (<mach>): New member `isas'.
6142 (mach-isas): New accessor.
6143 (-mach-parse): New arg `isas', all callers updated.
6144 (-mach-read): Recognize `isas'.
6145 (arch-finish!): Rewrite.
6146 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
6147 @arch@_cgen_get_{int,vma}_operand.
6148 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
6149 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
6150 of pointer to table entry.
6151 * opcodes.scm (gen-switch): Handle multiply defined operands.
6152 * operand.scm (op-sort): New proc.
6154 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
6155 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
6156 (hw-enum): Accept symbol argument.
6157 (hardware-builtin!): Delete attribute FUN-ACCESS.
6158 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
6160 * attr.scm (atlist-source-form): New proc.
6161 (attr-builtin!): New attr `PRIVATE'.
6162 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
6163 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
6164 if they have `PRIVATE' attribute.
6165 (gen-hw-table-defns): Output definitions of explicitly defined
6167 * hardware.scm (<keyword>): New member print-name. Rename member
6168 `value' to `values', all uses updated.
6169 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
6170 (keyword-parse): Rewrite.
6171 (-keyword-read): New proc.
6172 (define-keyword): New proc.
6173 (-hw-parse-keyword): New proc.
6174 (-hw-parse-indices): Rewrite keyword handling, support new index spec
6176 (-hw-parse-values): Ditto.
6177 (-hw-parse-get,-hw-parse-set): Rewrite.
6178 (hardware-init!): Add new comment define-keyword.
6179 * mach.scm (<arch>): New member `kw-list'.
6180 (arch:kw-list,arch_set-kw-list!): New accessors.
6181 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
6183 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
6184 * mode.scm (mode-class-integral?): New proc.
6185 (mode-class-float?,mode-class-numeric?): New procs.
6186 (mode-integral?,mode-float?,mode-numeric?): New procs.
6187 (mode-compatible?): New proc.
6188 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
6190 (<ifield>,gen-extract): Ditto.
6191 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
6192 (<gstate>): New class.
6193 (gstate-simulator?,gstate-set-simulator?!): New accessors.
6194 (gstate-context,gstate-set-context!): New accessors.
6195 (gstate-macro?,gstate-set-macro?!): New accessors.
6196 (gstate-make,gstate-copy): New procs.
6197 (-rtl-current-gstate): New global.
6198 (current-gstate-simulator?): New proc.
6199 (current-gstate-context,current-gstate-macro?): New procs.
6200 (current-gstate,current-gstate-set!): New procs.
6201 (rtl-gen-init!): Rewrite.
6202 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
6203 (tstate-make): New arg `gstate', all callers updated.
6204 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
6205 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
6206 (tstate-gstate,tstate-set-gstate!): New accessors.
6207 (tstate-copy): New proc.
6208 (tstate-new-cond?,tstate-new-set?): Rewrite.
6209 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
6210 (rtx-traverse): New arg `gstate', all callers updated.
6211 (rtx-strdump): New proc.
6212 (-simplify-for-compilation): New arg `gstate', all callers updated.
6213 (semantic-in-out-operands): Ditto.
6214 (semantic-attrs): Ditto.
6215 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
6216 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
6217 (rtx-value): Rewrite.
6218 (<c-expr>,gen-name): New method.
6219 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
6220 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
6221 (cx-new-mode): New proc.
6222 (-rtx-c-with-tstate): New proc.
6223 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
6225 (-rtx-mode): Rewrite.
6226 (-rtx-mode-compatible?): New proc.
6227 (<c-expr-temp>): New member `value'.
6228 (cx-temp:value): New accessor.
6229 (<c-expr-temp>,make!): Override default method.
6230 (<c-expr-temp>,cxmake-get): Rewrite.
6231 (<c-expr-temp>,gen-set-quiet): Rewrite.
6232 (<c-expr-temp>,gen-set-trace): Rewrite.
6233 (gen-temp-defs): Use cx-temp:value.
6234 (record-temp!): New arg value, all callers updated.
6235 (cx-temp:cx:make): Delete.
6236 (-cx-temp-dump-stack): New proc.
6237 (rtx-get): New arg `gstate', all callers updated. Do mode
6238 compatibility checks. Ensure result has specified mode.
6239 (rtx-set-quiet): New arg `gstate', all callers updated.
6240 (rtx-set-trace): Ditto.
6241 (s-c-call): New arg `tstate', all callers updated.
6242 (s-c-raw-call): Ditto.
6243 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
6244 (s-cmpop,s-if,e-if): Ditto.
6245 (s-subreg): New proc.
6246 (-par-new-temp!): New proc.
6247 (-par-next-temp!): Rewrite.
6248 (-par-replace-set-dests): Use -par-new-temp!.
6249 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
6250 (s-sequence): Use -rtx-c-with-state.
6251 * rtx-funcs.scm (*): Update.
6252 (raw-reg:): New rtx function.
6254 (join:,subreg:): New rtx functions.
6256 * insn.scm (<insn>): New members pre-cond-trap, condition,
6257 post-cond-trap, compiled-condition.
6259 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
6261 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
6263 * utils-cgen.scm (parse-symbol): New proc.
6264 (parse-string): New proc.
6265 (gen-get-macro,gen-set-macro): New arg `index-args'.
6266 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
6267 Prepend \ to newlines.
6269 * utils.scm (alist-remove-duplicates): Delete.
6271 * sid.scm (sim-init!): Delete private debugging code.
6273 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
6275 * cgen-sid.scm: New file for C++ simulator application.
6276 * sid-arch.scm: Ditto.
6277 * sid-cpu.scm: Ditto.
6278 * sid-decode.scm: Ditto.
6279 * sid-model.scm: Ditto.
6281 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
6283 1999-03-05 Ben Elliston <bje@cygnus.com>
6285 * arm.cpu: New file.
6287 1999-03-03 Doug Evans <devans@casey.cygnus.com>
6289 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
6290 * Makefile.in: Rebuild.
6292 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
6293 (-attr-parse): Validate default value.
6295 * read.scm (-CGEN-VERSION): Change to 0.7.1.
6296 (-CGEN-LANG-VERSION): Ditto.
6297 (-keep-all-machs): Renamed from -keep-all, all uses updated.
6298 (<reader>): New member keep-isa plus accessors.
6299 (-keep-isa-set!,keep-isa-validate!): New procs.
6300 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
6301 (common-arguments): New variable.
6302 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
6303 (-debug-repl,continue): New procs.
6304 (-cgen,cgen): New procs.
6305 * cgen-gas.scm: Rewrite.
6306 * cgen-opc.scm: Rewrite.
6307 * cgen-sim.scm: Rewrite.
6308 * cgen-stest.scm: Rewrite.
6310 * gas-test.scm (gas-test-init!): Call opcodes-init!.
6311 (gas-test-finish!): Call opcodes-finish!.
6312 (gas-test-analyze!): Call opcodes-analyze!.
6313 (<hw-asm>): New method test-data.
6314 (<operand>,testdata): Rewrite.
6315 * sim-test.scm (sim-test-init!): Call opcodes-init!.
6316 (sim-test-finish!): Call opcodes-finish!.
6317 (sim-test-analyze!): Call opcodes-analyze!.
6318 (<hw-asm>): New method test-data.
6319 (<operand>,testdata): Rewrite.
6321 1999-03-01 Doug Evans <devans@casey.cygnus.com>
6323 * fixup.scm (reverse!): Define if missing.
6324 * *.scm: Use reverse! instead of list-reverse!.
6326 * utils.scm (leading-id-char?): New proc.
6327 (id-char?): Rewrite.
6328 (chars-until-delimiter): New proc.
6329 * opc-itab.scm (extract-syntax-operands): Rewrite.
6330 (strip-mnemonic): Rewrite.
6331 (compute-syntax): Rewrite.
6333 * pmacros.scm (-pmacro-substr): New proc.
6334 (pmacros-init!): Add builtin .substr.
6336 1999-02-26 Doug Evans <devans@casey.cygnus.com>
6338 * thumb.cpu: New file.
6340 1999-02-24 Doug Evans <devans@casey.cygnus.com>
6342 * Makefile.am (CGENCFLAGS): New variable.
6343 (WITH_HOBBIT): Use automake conditional.
6344 (CGEN_HOB_SRC): New variable.
6345 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
6346 (*.o): Compile with CGENCFLAGS.
6347 (cgen-hob.c): Simplify.
6348 (cgen-nohob.c): New rule.
6349 (hobbit): Renamed from hob.x.
6350 (CLEANFILES): Add cgen-nohob.c.
6351 * Makefile.in: Rebuild.
6352 * doc/Makefile.in: Rebuild.
6353 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
6354 (WITH_HOBBIT): Use AM_CONDITIONAL.
6355 * configure: Rebuild.
6356 * aclocal.m4: Rebuild.
6358 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
6359 with string-write-map.
6361 * sim-cpu.scm (hw-need-storage?): New proc.
6362 (-gen-hardware-types): Use it.
6363 (gen-parallel-exec-elm): Call op-save-index?.
6365 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
6367 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
6369 (-gen-ifld-extract-beyond): Ditto.
6370 (<integer>): Delete all references.
6371 (<sim-hardware>): Delete.
6372 (hw-profilable?): New proc.
6373 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
6374 (<hw-register>): Rename method get-index-mode to save-index?.
6375 (<hw-register>): New methods gen-get-macro,gen-set-macro.
6376 (<hw-register>,gen-sym-decl): Make virtual.
6377 (<hw-memory>,gen-sym-decl): Make virtual.
6378 (<hw-memory>): Rename method get-index-mode to save-index?.
6379 (<hw-address>,gen-sym-decl): Make virtual.
6380 (<operand>): New method save-index?.
6381 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
6383 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
6384 prefix added. All uses updated.
6386 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
6387 rather than pointer to table entry.
6389 * opcodes.scm: Remove all attribute support, lives in desc.scm.
6390 Remove all hw-asm,op-asm support.
6391 (-gen-parse-number,-gen-parse-address): New procs.
6392 (<keyword>,gen-parse): Redo function name computation.
6393 (<keyword>,gen-print): Ditto.
6394 (<operand>,gen-function-name): Rewrite.
6395 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6396 (opcodes-init!): Delete call to add-parser!.
6398 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6399 Define enum using hardware semantic name.
6400 (-gen-hw-decl,-gen-hw-defn): New procs.
6401 (gen-hw-table-decls): Use -gen-hw-decl.
6402 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6403 CGEN_HW_ENTRY structs.
6404 (gen-operand-table): Output hw's enum, not pointer to table entry.
6405 (-gen-cpu-open): Build table of selected hardware elements.
6407 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6408 (<hardware> support): Delete.
6409 (<hw-asm>): Delete, moved to hardware.scm.
6410 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6411 (<hw-asm>,gen-table-entry): New method.
6412 (<hw-asm>,parse!): Delete.
6413 (<keyword>,gen-table-entry): New method.
6414 (<keyword>,parse!): Delete.
6415 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6416 for gen-decl,gen-defn,gen-ref,gen-init.
6417 (desc-init!): Don't create parser for operand asm specs.
6419 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6420 * ifield.scm (<ifield>): New member `mode'.
6421 (<ifield>,make!): New arg `mode'.
6422 (ifld-mode): Rewrite.
6423 (ifld-hw-type): Rewrite.
6424 (<ifield>,min-value): Rewrite.
6425 (<ifield>,max-value): Rewrite.
6426 (-ifield-parse): New arg `mode'.
6427 (-ifield-read): Update.
6428 (define-full-ifield): New arg `mode'.
6429 (define-full-multi-ifield): Ditto.
6430 (-multi-ifield-parse): Ditto.
6431 (-multi-ifield-read): Update.
6432 (define-full-multi-ifield): New arg `mode'.
6433 (ifield-builtin!): Update definition of f-nil.
6434 * simplify.inc (define-normal-ifield): Update call to
6436 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6437 (define-normal-hardware): Delete arg asm. New args indices, values,
6438 handlers. Update call to define-full-hardware.
6439 (define-simple-hardware,dsh): New pmacros.
6440 (define-normal-operand): Update call to define-full-operand.
6441 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6442 Specify INT/UINT mode instead.
6443 (h-gr,h-cr): Use "indices" instead of "asm".
6444 (h-dr,h-ps): Update keyword syntax.
6445 (h-r13,h-r14,h-r15): Ditto.
6446 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6447 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6448 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6449 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6450 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6451 Specify INT/UINT mode instead.
6452 (h-gr): Use "indices" instead of "asm".
6453 (h-cc): Update keyword syntax.
6454 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6455 Specify INT/UINT mode instead.
6456 (h-hi16,h-slo16,h-ulo16): Update.
6457 (h-gr,h-cr): Use "indices" instead of "asm".
6458 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6459 (h-accums): Update keyword syntax.
6460 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6461 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6462 Specify INT/UINT mode instead.
6463 (h-gr-indices): New pmacro.
6464 (h-gr32,h-gr64): Split up from h-gr.
6465 (h-a): Update type spec. Use values instead of asm spec.
6466 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6467 (h-y,h-annul-p): Ditto.
6468 (h-asr): Update keyword spec.
6469 (h-lo10,h-lo13,h-hi22): Update.
6470 (get-freg-spec,set-freg-spec): New pmacros.
6471 (h-fr32,h-fr64): Split up from h-fr.
6472 (rdd): Comment out get/set specs.
6473 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6474 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6475 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6476 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6477 UNSIGNED. Specify INT/UINT mode instead.
6478 (h-*): Use dsh instead of dnh where appropriate.
6479 (h-ixcc): Update type spec. Use "values" instead of "asm".
6480 (h-p,h-membarmask): Ditto.
6481 (membarmask): Use "handlers" instead of "asm".
6483 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6484 values,handlers,getters,setters plus accessors.
6485 (hw-mode-ok?,hw-default-mode): New procs.
6486 (<hardware-base>): Rename method new-mode to mode-ok?
6487 (<hardware-base>): New method get-index-mode.
6488 (hw-index-mode): New proc.
6489 (pc?): Delete, moved to operand.scm.
6490 (address?): New proc.
6491 (<hardware>): Delete.
6492 (<hw-asm>): Definition moved here from desc.scm.
6493 (keyword-parse): New proc.
6494 (hardware-parsers): Delete.
6495 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6496 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6497 (-hw-parse-get,-hw-parse-set): New procs.
6498 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6499 indices,values,handlers,get,set. Rewrite.
6500 (-hw-read-extra): Delete.
6502 (define-hardware): Don't add object if not selected.
6503 (define-full-hardware): Ditto.
6504 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6505 (<hw-register>): Member `type' moved to baseclass. Delete member
6507 (<hw-register>,parse!): Rewrite.
6508 (<hw-register>): Delete methods get-rank,get-mode.
6509 (<hw-register>): Method new-mode renamed to mode-ok?
6510 (<hw-register>): New method get-index-mode.
6511 (<hw-pc>,parse!): Rewrite.
6512 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6513 (<hw-memory>,parse!): Rewrite.
6514 (<hw-memory>): Delete methods get-rank,get-mode.
6515 (<hw-memory>): Method new-mode renamed to mode-ok?
6516 (<hw-memory>): New method get-index-mode.
6517 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6519 (<hw-immediate>,parse!): Rewrite.
6520 (<hw-immediate>): Delete methods get-rank,get-mode.
6521 (<hw-immediate>): Method new-mode renamed to mode-ok?
6522 (<hw-address>): Delete member hw-asm.
6523 (<hw-address>,parse!): Rewrite.
6524 (<hw-address>): Delete methods get-rank,get-mode.
6525 (<hw-address>): Method new-mode renamed to mode-ok?
6526 (hw-profilable?): Delete.
6527 (hardware-init!): Delete hardware-parsers reference.
6528 Update argument specs of command define-full-hardware.
6529 (hardware-builtin!): Update definitions of hardware builtins.
6530 * operand.scm (<operand>): New members hw-name,mode-name.
6531 Delete member op-asm. New member handlers.
6532 (<operand>,make!): Update.
6533 (op:hw-name,op:mode-name,op:handlers): New procs.
6536 (<operand>): New method get-index-mode.
6537 (<pc>,make!): Update.
6538 (op:new-mode): Rewrite.
6539 (operand-parsers): Delete.
6540 (-operand-parse): Rewrite. Return #f if insn not selected.
6541 (-op-read-extra): Delete.
6542 (-operand-read): Update.
6543 (define-operand,define-full-operand): Update.
6544 (operand-init!): Delete operand-parsers reference.
6545 Update syntax of define-full-operand command.
6547 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6548 (define-full-insn): Update.
6549 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6550 (define-full-minsn): Update.
6552 * mode.scm (<mode>): New member class.
6553 (mode:class): New proc.
6555 (-mode-parse): New arg class.
6556 (define-full-mode): Update.
6557 (mode-find): Rewrite.
6558 (mode-make-int,mode-make-uint): New procs.
6559 (mode-init!): Update syntax of define-full-mode command.
6560 (mode-builtin!): Update definitions of builtin modes.
6562 * model.scm (<profile>): Delete.
6564 * read.scm (keep-atlist?): New proc.
6565 (keep-multiple?): New proc.
6566 (<parser-list>): Delete.
6567 (add-parser!,parse-spec!): Delete.
6569 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6570 (def-rtx-syntax-node): Ditto.
6571 (-rtx-traverse-debug?): New variable.
6572 (tstate-make): New proc.
6573 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6574 (tstate-new-cond?,tstate-new-set?): New procs.
6575 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6576 tstate. All callers updated.
6577 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6578 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6579 (-build-operand!): Replace arg cond? with tstate.
6580 (-build-reg-operand!,-build-mem-operand!): Ditto.
6581 (-build-index-of-operand!): Update making of <operand> object.
6582 (s-ifield): New arg tstate. All callers updated.
6583 (hw:): New arg tstate. All callers updated. Replace call to
6584 current-hw-lookup with current-hw-sem-lookup-1.
6585 (s-index-of): New arg tstate. All callers updated.
6587 (-rtx-use-sem-fn?): New proc.
6588 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6590 (s-convop): Only use semantic mode when using semantic cover fns.
6591 (s-cmpop): Call -rtx-use-sem-fn?.
6592 (s-cond,s-case): New arg tstate. All callers updated.
6593 (s-parallel,s-sequence): Ditto.
6595 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6597 * types.scm (<scalar>): Rewrite implementation.
6598 (<integer>): Delete.
6599 (parse-type): Rewrite.
6601 * utils-cgen.scm (parse-handlers): New proc.
6603 * utils.scm (!=): New proc.
6605 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6607 * pmacros.scm (-pmacro-expand): Fix typo.
6609 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6611 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6612 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6613 * i960.cpu (build-hex2): New pmacro.
6614 (insn-opcode): Simplify.
6615 (insn-opcode2): Ditto.
6617 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6618 * cgen-stest.scm (catch-with-backtrace): Ditto.
6620 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6622 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6623 All callers updated.
6624 (-pmacro-invoke): New proc.
6625 (-pmacro-sym,-pmacro-str): New procs.
6626 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6627 (pmacros-init!): Install builtins .iota, .map, .apply.
6628 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6629 (h-fr): Simplify register name spec.
6630 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6631 * utils.scm (num-args-ok?): New proc.
6633 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6635 * pmacros.scm (-pmacro-error): New proc.
6636 (-pmacro-expand): Use it.
6637 (-pmacro-splice): New proc.
6638 (pmacros-init!): Install new builtin .splice.
6640 * sparc.cpu: Include sparc64.cpu when appropriate.
6641 (f-mmask,f-simm11): Moved to sparc64.cpu.
6642 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6643 (ANNUL attribute): Delete.
6644 (test-* pmacros): New arg cc, all callers updated.
6645 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6646 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6648 (ldstub,swap): Moved to sparccom.cpu.
6649 * sparc64.cpu: Add more insns.
6651 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6653 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6655 (cgen-sem-switch.c): Ditto.
6656 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6657 moved to cgen-engine.h.
6658 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6659 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6660 global. Cache attributes and insn length in IDESC.
6661 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6662 @cpu@_opcode renamed to @cpu@_get_idata.
6663 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6664 done later underneath sim_resume.
6665 (@mach@_mach): Record @cpu@_prepare_run.
6666 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6668 (-hw-gen-set-quiet-pc): Ditto.
6669 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6670 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6671 (<hw-addr>,cxmake-get): Ditto.
6672 (<hw-iaddr>,cxmake-get): Ditto.
6673 (<pc>,cxmake-get): Ditto.
6674 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6675 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6676 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6677 (<hw-pc>,gen-write): Use hw-selector-default.
6678 (<hw-register>,gen-write): Ditto.
6679 (<hw-memory>,gen-write): Ditto.
6680 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6681 (-gen-hw-selector): New proc.
6683 * desc.scm: New file.
6684 * desc-cpu.scm: New file.
6685 * opcodes.scm: Split up into several smaller files.
6686 * opc-asmdis.scm: New file.
6687 * opc-ibld.scm: New file.
6688 * opc-itab.scm: New file.
6689 * opc-opinst.scm: New file.
6690 * Makefile.am (desc): New target.
6691 (opcodes): Update args to cgen-opc.scm.
6692 * Makefile.in: Rebuild.
6693 * aclocal.m4: Rebuild.
6694 * config.in: Rebuild.
6695 * configure.in: Update arg to AC_INIT.
6696 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6697 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6699 * configure: Rebuild.
6700 * cgen-gas.scm: Update files to load.
6701 * cgen-opc.scm: Ditto. Reorganize option letters.
6702 * cgen-sim.scm: Update files to load.
6703 * cgen-stest.scm: Ditto.
6704 * dev.scm (cload): New app "DESC".
6705 (load-opc): Update files to load.
6706 (load-gtest,load-sim,load-stest): Ditto.
6708 * attr.scm (bool-attr?): New proc.
6709 (attr-list-enum-list): New proc.
6710 (-attr-sort): Rewrite.
6711 (attr-builtin!): Give ALIAS attribute a fixed index.
6712 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6713 calculate attribute enum list.
6714 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6716 * insn.scm (-insn-parse): Renamed from parse-insn.
6718 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6721 * mode.scm (-mode-parse): Renamed from parse-mode.
6723 * operand.scm (<operand>): New member `selector'.
6724 (<operand>,make!): Use default selector.
6725 (hw-selector-default): New variable.
6726 (hw-selector-default?): New proc.
6728 * pmacros.scm (pmacros-init!): New proc.
6729 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6730 (-env-set!): Delete.
6731 (-pmacro-expand): New proc apply-macro.
6732 Use it in scan-list,scan. Scan list first, then see if macro
6734 (define-pmacro): Rewrite.
6735 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6737 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6738 selected if (current-mach) seen.
6739 (rtx?): Renamed from rtx-uneval?, all callers updated.
6740 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6742 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6743 selector, all callers updated.
6744 (hw:): New arg selector, all callers updated. Delete old comments
6746 (reg:,mem:): Handle selectors
6747 * rtx-funcs.scm (reg:): Handle selectors.
6749 * read.scm: Renamed from cpu.scm.
6750 (<command>): New class.
6751 (<reader>): New member commands.
6752 (reader-add-command!): New proc.
6753 (reader-lookup-command): New proc.
6754 (reader-error,-reader-process-expanded,reader-process): New procs.
6755 (reader-read-file!): New proc.
6756 (include): Call reader-read-file!.
6758 (cpu-load): Call reader-read-file!.
6759 * utils.scm (num-args): New proc.
6760 * simplify.inc: New file.
6761 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
6762 procs. Move define-normal-foo procs (and abbreviated forms) to
6763 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
6765 * fr30.cpu: Include simplify.inc.
6766 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6767 * i960.cpu: Include simplify.inc.
6768 * m32r.cpu: Include simplify.inc.
6769 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6770 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6771 * sparc.cpu: Include simplify.inc.
6772 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6773 * utils-cgen.scm (parse-error): Moved to read.scm.
6774 (sanitize): Rewrite.
6775 (utils-init!): New proc.
6777 1999-02-02 Doug Evans <devans@casey.cygnus.com>
6779 * sparc.cpu: New file.
6780 * sparc32.cpu: New file.
6781 * sparc64.cpu: New file.
6782 * sparccom.cpu: New file.
6783 * sparc.opc: New file.
6785 1999-01-27 Frank Eigler <fche@cygnus.com>
6787 * utils.scm (gen-copyright): New proc.
6789 1999-01-27 Doug Evans <devans@casey.cygnus.com>
6791 Parameterize rtl parsing, rather than having lots of little handlers.
6792 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6793 Delete member traverse.
6794 (rtx:set-traverse!): Delete.
6795 (-rtx-valid-types,-rtx-valid-matches): New variables.
6796 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6797 instead of expression. All callers updated.
6798 (def-rtx-node): New args arg-types,arg-modes.
6799 (def-rtx-syntax-node): Ditto.
6800 (def-rtx-dual-mode): Ditto.
6801 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6802 All callers updated.
6803 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6804 All callers updated.
6805 (rtx-macro-expand): New proc.
6806 (-rtx-traverse-check-args): Delete.
6807 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6808 an rtx specific traverser.
6809 (-rtx-any-mode?,-rtx-symornum?): New procs.
6810 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6811 (-rtx-traverse-no-mode): Delete.
6812 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6813 (-rtx-traverse-operands): Rewrite.
6814 (-rtx-traverse-expr): Rewrite.
6815 (rtx-traverse): Don't expand macros here, leave for caller to do.
6816 (rtx-simplify): Delete.
6817 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
6819 (rtx-true?,rtx-false?): Ditto.
6820 (-rtx-ref-type): Set dest is operand 1 now.
6821 (-simplify-for-compilation): New proc.
6822 (semantic-in-out-operands): Recognize regno as an alias for index-of.
6823 Expand macros before calling rtx-traverse. Sort operands by name
6824 to avoid unnecessary semantic formats.
6825 (semantic-attrs): New proc.
6826 (rtx-uneval?): Handle (<rtx-func> ...).
6827 (s-boolifop): Delete arg mode. All callers updated.
6828 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6829 (eq-attr): New arg obj.
6831 * m32r.cpu (rach): Update calls to andif.
6833 * minsn.scm (-minsn-parse-expansion): Renamed from
6834 parse-minsn-expansion.
6835 (-minsn-parse): Renamed from parse-minsn.
6836 (-minsn-read): Renamed from read-minsn.
6837 (def-minsn): Don't check APPLICATION here.
6838 (def-full-minsn): New proc.
6839 (define-macro-insn): Check APPLICATION here. Expand macros.
6840 (define-normal-macro-insn): Ditto.
6842 * utils.scm (word-value): New arg start-lsb?.
6843 (word-mask,word-extract): Ditto.
6844 (split-bits,powers-of-2): Use integer-expt instead of expt.
6845 (bit-set?): Handle 32 bit values (which are bignums).
6846 (cg-logand,cg-logxor): New functions.
6847 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6848 (<ifield>,field-value): Update call to word-value.
6849 (<ifield>,min-value): Use integer-expt instead of expt.
6850 (<ifield>,max-value): Ditto.
6852 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6854 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6856 Compute raw instruction format in addition to semantic based format.
6857 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6858 (<iformat> accessors): Rename accessors to ifmt-*.
6859 (<sformat>): New class.
6860 (fmt-enum): Renamed from fmt:enum.
6861 (-ifmt-search-key): Rewrite.
6862 (-sfmt-search-key): New proc.
6863 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6864 Compute iformat and sformat search keys.
6865 (ifmt-build): Update.
6866 (sfmt-build): New proc.
6867 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6868 (ifmt-compute!): Compute instruction format <iformat> based on
6869 instruction fields alone. Compute new semantic format <sformat>
6870 based on instruction fields and semantic information.
6871 (ifmt:lookup): Delete.
6872 * mach.scm (<arch>): New member sfmt-list, plus accessors.
6873 (current-sfmt-list): New proc.
6874 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6875 Rename member fmt to ifmt. New members fmt-desc, sfmt.
6876 (insn-length,insn-length-bytes): Update.
6877 (insn:mask-length,insn:mask): Update.
6878 (insn-lookup-op): Update.
6879 * gas-test.scm (gas-test-analyze!): Update.
6880 (gen-gas-test): Ditto.
6881 * sim-test.scm (sim-test-analyze!): Update.
6882 (gen-sim-test): Ditto.
6883 * opcodes.scm (gen-operand-instance-table): Update.
6884 (gen-operand-instance-ref): Ditto.
6885 (max-operand-instances): Use heuristic if semantics not parsed.
6886 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6887 (opcodes-analyze!): Only scan semantics of building operand instance
6889 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6890 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6891 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6892 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6893 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6894 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6895 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6897 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6898 New arg lsb0? All callers updated.
6899 (decode-bits): New arg lsb0?. All callers updated.
6900 (opcode-slots): Update call to bit-set?. Call integer-expt instead
6902 (-gen-decode-bits): New arg lsb0?. All callers updated.
6903 (build-slots): Call integer-expt instead of expt.
6904 (build-decode-table-entry): Handle crossing word boundaries better.
6905 (-gen-decode-switch): New arg lsb0?. All callers updated.
6906 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6908 * enum.scm (define-enum): Rewrite.
6909 (define-normal-enum): Ditto.
6910 (def-full-insn-enum): New proc.
6911 (define-normal-insn-enum): Rewrite.
6913 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6915 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6917 * dev.scm: Add sid support.
6919 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6920 (CLEANFILES): Add tmp-*.
6921 * Makefile.in: Rebuild.
6923 * doc/Makefile.am: New file.
6924 * doc/Makefile.in: New file.
6925 * doc/cgen.texi: New file.
6926 * Makefile.am (SUBDIRS): Define.
6927 * Makefile.in: Rebuild.
6928 * configure.in: Create doc/Makefile.
6929 * configure: Rebuild.
6931 1999-01-18 Doug Evans <devans@casey.cygnus.com>
6933 * insn.scm (insn:syn): Delete.
6935 1999-01-15 Doug Evans <devans@casey.cygnus.com>
6937 * fr30.cpu (model fr30-1): Add state variables load-regs,
6938 load-regs-pending. Delete h-gr. Clean up operand names of all units.
6939 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6940 (model m32rx): Ditto.
6941 (addi): Simplify function unit usage spec.
6942 (ld-plus): Rewrite operand names in function unit usage spec.
6943 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6944 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6945 overridden. Allow operand to appear in input and output spec.
6946 (<insn>,gen-profile-code): string-append -> string-list.
6948 * ifield.scm (define-ifield): Call pmacro-expand.
6949 (define-full-ifield,define-normal-ifield): Ditto.
6950 (define-multi-ifield,define-normal-multi-ifield): Ditto.
6952 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6953 with-scache and without-scache cases.
6955 1999-01-14 Doug Evans <devans@casey.cygnus.com>
6957 * fr30.cpu (fr30-1): Add state variable h-gr.
6958 Add units u-cti, u-load, u-store, u-ldm, u-stm.
6959 (all insns): First pass at providing cycle counts.
6960 * sim.scm (<unit>,gen-profile-code): Only check for output operands
6961 when initializing unit output operands, ditto for input operands.
6963 * insn.scm (insn-length,insn-length-bytes): New procs.
6964 * mach.scm (-adata-set-derived!): Use them.
6965 * sim-cpu.scm (-gen-sem-case): Ditto.
6967 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6968 (-gen-write-case): Ditto.
6969 (gen-semantic-fn): Ditto. Split into two:
6970 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
6972 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
6973 scache/no-scache appropriately. All callers updated.
6974 (-gen-sem-case): PCADDR->IADDR.
6975 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6977 * sim-decode.scm (*): Replace string-append,string-map with
6978 string-list,string-list-map where the result is sufficiently large.
6979 (-gen-decode-insn-table): Go back to simple version for non-scache
6980 case: just record IDESC in decoder tables and leave field extraction
6982 (-gen-decode-switch): Ditto.
6983 (-gen-decode-fn): Ditto.
6984 (-gen-extract-decls): Only emit format enum if with-scache?.
6985 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6987 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6988 (-gen-insn-timing): Ditto.
6989 * sim.scm (gen-argbuf-type): Only output sem_fields union in
6992 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6993 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6995 1999-01-12 Doug Evans <devans@casey.cygnus.com>
6997 * cpu.scm (keep-mach-validate!): New proc.
6998 (include): New proc.
7000 * mach.scm (current-arch-mach-name-list): New proc.
7001 (-parse-arch-machs): Always return canonical form.
7002 (def-arch): Validate user specified machs to be kept.
7003 (def-mach-attr!): Simplify.
7005 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
7006 (option-init!): Initialize it.
7007 (option-set!): Set it.
7008 (gen-insn-table-entry): Emit 0 for operand instance ref if not
7009 output operand instance tables.
7010 (cgen-opc.in): Only output operand instance tables if asked to.
7012 * sim.scm (option-init!,option-set!): Clarify returned value.
7014 * sim.scm (gen-mach-bfd-name): Move from here.
7015 * utils-cgen.scm: To here.
7017 1999-01-11 Doug Evans <devans@casey.cygnus.com>
7019 * fr30.cpu (ilm): Fix comment field.
7020 (cond-branch): Remove explicit setting of COND-CTI, let cgen
7023 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
7024 (rtx-true?, rtx-false?): New procs.
7025 * rtx-funcs.scm (annul): Rename vpc to pc.
7026 (-rtx-traverse-if): Improve determination of whether then/else parts
7027 are conditionally executed.
7029 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
7031 (gen-argbuf-type): Simplify generated definition (big sem_fields
7032 union moved outside).
7034 1999-01-11 Ben Elliston <bje@cygnus.com>
7036 * doc/porting.texi: New file.
7038 * doc/intro.texi: New file.
7039 (Layout): Use @example to insert preformatted ASCII text (such as
7040 diagrams). @code is inappropriate here.
7042 1999-01-06 Doug Evans <devans@casey.cygnus.com>
7044 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
7046 * m32r.opc (print_hash): Cast dis_info.
7048 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
7049 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
7052 1999-01-05 Doug Evans <devans@casey.cygnus.com>
7054 * i960.cpu (f-br-disp): Remove RELOC attribute.
7055 (f-ctrl-disp): Ditto.
7056 (callx-disp): set-quiet -> set for (reg h-gr 2).
7057 (callx-indirect,callx-indirect-offset): Ditto.
7059 * Makefile.am (gas-test): Fix dependencies.
7060 * Makefile.in: Rebuild.
7061 * cgen-gas.asm: File creation args are -<uppercase-letter>.
7062 * gas-test.scm (break-out-syntax,make-file-name): Delete.
7063 (gas-test-analyze!): Use syntax-break-out.
7064 * sim-test.scm (break-out-syntax,make-file-name): Delete.
7065 (sim-test-analyze!): Use syntax-break-out.
7066 (cgen-build.sh): Use gen-file-name.
7067 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
7068 * insn.scm (syntax-break-out): New proc.
7069 * utils.scm (gen-file-name): New proc.
7071 * fixup.scm (nil,<?,<=?,>?): Delete.
7073 * utils.scm (count-true): Rewrite.
7075 * slib/sort.scm: Move sort.scm to slib directory.
7078 * iformat.scm (ifmt-compute!): Record empty format.
7080 * rtl.scm (semantic-in-out-operands): Simplify by moving several
7081 internal procs outside. Handle expression register numbers.
7084 * rtx-funcs.scm (annul): Rename new_pc to vpc.
7086 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
7088 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
7089 (gen-semantic-fn,-gen-sem-case): Ditto.
7090 (cgen-cpu.c): Define WANT_CPU to @cpu@.
7091 (cgen-semantics.c): Ditto.
7092 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
7093 (gen-ifmt-argvars-defns): New proc.
7094 (gen-ifmt-argvars-assigns): New proc.
7095 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
7096 (-gen-decode-fn): Handle non-with-scache case.
7097 (cgen-decode.c): Define WANT_CPU to @cpu@.
7098 * sim-models.scm (-gen-mach-defns): Emit bfd name.
7099 (cgen-model.c): Define WANT_CPU to @cpu@.
7100 * sim.scm (gen-ifld-extract-argvar): New proc.
7101 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
7102 with FUN-ACCESS specified.
7103 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
7104 (<hw-register>,gen-extract): New arg local?.
7105 (<hw-address>,gen-extract): Ditto.
7106 (-hw-cxmake-get): Handle non-with-scache case.
7107 (-hw-gen-set-quiet): Ditto.
7108 (<hw-address>,cxmake-get): Handle non-with-scache case.
7109 (gen-op-extract-argvar): New proc.
7110 (<operand>,gen-record-profile): Rewrite.
7111 (<operand>,gen-profile-code): Rewrite.
7112 (<unit>,gen-profile-code): Use -gen-argfld-ref.
7113 (gen-argbuf-fields-union): New proc.
7114 (gen-argbuf-type): Use it. Handle non-scache case.
7116 * *.scm: class:foo procs renamed to class-foo.
7117 * attr.scm (<attribute>): New member `for'.
7118 (-attr-parse): New first value in list for default if
7120 (non-bool-attr-list,attr:add!): Delete.
7121 (def-attr): Use current-attr-add!.
7122 (atlist-attr-value-no-default): New proc.
7123 (attr-lookup-default): Handle boolean attributes.
7124 (gen-attr-enum): New proc.
7125 (-attr-remove-meta-attrs-alist): New proc.
7126 (attr-nub): New proc.
7127 (current-attr-list-for): New proc.
7128 (current-{ifld,hw,op,insn}-attr-list): New procs.
7129 (attr-builtin!): New proc.
7130 * cpu.scm (keep-obj?): Rewrite.
7131 (-init-parse-cpu!): Call arch-init!.
7132 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
7133 (-finish-parse-cpu!): Call arch-finish!.
7134 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
7135 (def-enum,def-full-enum): Use current-enum-add!.
7136 (gen-obj-list-enums): New proc.
7137 * hardware.scm (hw:add!,hw:lookup): Delete.
7138 (def-hardware,def-hardware-ext): Use current-hw-add!.
7139 (hw:std-attrs,hw:attr-list): Delete.
7140 (hardware-builtin!): Define builtin hardware attributes.
7141 * ifield.scm (ifld:add!,ifld:lookup): Delete.
7142 (def-ifield,def-full-ifield): Use current-ifld-add!.
7143 (ifld:std-attrs,ifld:attr-list): Delete.
7144 (ifield-builtin!): New proc.
7145 * insn.scm (insn:add!,insn:lookup): Delete.
7146 (def-full-insn): Use current-insn-add!.
7147 (insn:std-attrs): Delete.
7148 (insn-builtin!): New proc.
7149 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
7151 (<arch-data>): New member machs.
7152 (current-attr-list,current-enum-list): New procs.
7153 (current-op-list,current-minsn-list): New procs.
7154 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
7155 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
7157 (-parse-arch-machs): New proc.
7158 (-arch-parse): New arg machs, all callers updated.
7159 (-arch-read): Handle machs spec.
7160 (def-arch): Define MACH attribute here.
7161 (mach-init!,mach-finish!): Not here.
7162 (cpu:add!,cpu:lookup): Delete.
7163 (def-cpu): Use current-cpu-add!.
7164 (<mach>): New member bfd-name.
7165 (-mach-parse): New arg bfd-name, all callers updated.
7166 (-mach-read): Handle bfd-name spec.
7167 (mach:add!,mach:lookup): Delete.
7168 (def-mach): Use current-mach-add!.
7169 (def-mach-attr!): New proc.
7170 (arch-init!): New proc.
7171 (arch-finish!): New proc. Reverse all object lists here.
7172 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
7173 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
7174 (define-normal-macro-insn): Ignore minsn if mach not kept.
7175 * mode.scm (mode-builtin!): New proc.
7176 * model.scm (model:add!,model:lookup): Delete.
7177 (def-model): Use current-model-add!.
7178 * opcodes.scm (insn:attr-list): Delete.
7179 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
7180 (gen-attr-table-defn): Emit value for default.
7181 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
7182 (op:attr-list): Delete.
7183 (gen-operand-decls,gen-insn-decls): New proc.
7184 (compute-insn-attr-list): Delete.
7185 (cgen-opc.h): Reorganize and simplify.
7186 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
7187 (def-operand,def-full-operand): Use current-op-add!.
7188 (op:std-attrs): Delete.
7189 (operand-enum): Delete.
7190 (operand-builtin!): Define builtin operand attrs.
7191 * utils-cgen.scm (sanitize): Update calls to lookup procs.
7192 (gen-attr-enum-decl): Use gen-obj-list-enums.
7193 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
7195 * fr30.cpu (define-arch): Add machs spec.
7196 (f-i4): SIGNED attribute -> !UNSIGNED.
7197 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
7198 (HASH-PREFIX): Define operand attribute.
7199 (NOT-IN-DELAY-SLOT): Define insn attribute.
7200 * i960.cpu (define-arch): Add machs spec.
7201 * m32r.cpu (define-arch): Add machs spec.
7202 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
7203 (HASH-PREFIX): Define operand attribute.
7204 (FILL-SLOT): Define insn attribute.
7206 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
7208 * fr30.cpu (stilm): Correct mask for and operation.
7210 1998-12-17 Doug Evans <devans@casey.cygnus.com>
7212 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
7213 Replace START/EXIT with start/pass.
7214 (gen-sim-test): Delete ".text".
7216 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
7218 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
7220 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
7222 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
7223 (h-sbit): Make it FUN-ACCESS.
7224 (h-gr): Reorder so that general regs are always printed by number.
7226 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
7228 * i960.cpu (flushreg): Use nop.
7230 1998-12-14 Doug Evans <devans@casey.cygnus.com>
7232 * m32r.cpu (default-alignment): Specify.
7233 * mach.scm (<arch-data>): New member default-alignment.
7234 (adata:default-alignment): New proc.
7235 (current-arch-default-alignment): New proc.
7236 (-arch-parse): New arg default-alignment.
7237 (parse-alignment): New proc.
7238 (-arch-read): Handle default-alignment spec.
7240 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
7242 * insn.scm (f-%): Delete.
7243 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
7244 be readded if proved useful.
7245 (gen-extract-fields): Ditto. Use gen-ifetch.
7246 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
7247 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
7249 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
7251 * fr30.cpu (div2): Set zbit properly when remainder not zero.
7253 1998-12-14 Dave Brolley <brolley@cygnus.com>
7255 * fr30.cpu: Remove stub macros.
7256 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
7257 (div2): Don't use addc/subc.
7259 1998-12-11 Doug Evans <devans@casey.cygnus.com>
7261 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
7264 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
7266 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
7268 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
7270 * cpu.scm (keep-all?): New proc.
7271 (assert-keep-all): Use it.
7272 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
7273 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
7274 Check for spelling errors.
7276 1998-12-09 Doug Evans <devans@casey.cygnus.com>
7278 * rtl.scm (s-convop): Call -rtx-sem-mode.
7280 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
7282 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
7283 (-parse-hw-profile): Ditto.
7284 (<hw-register>, parse!): Return `void' result.
7285 (<hw-pc>, parse!): Ditto.
7286 (<hw-memory>, parse!): Ditto.
7287 (<hw-immediate>, parse!): Ditto.
7288 (<hw-address>, parse!): Ditto.
7290 * ifield.scm (-ifield-parse): Validate encode/decode fields.
7291 (-ifld-parse-encode-decode): New proc.
7292 (-ifld-parse-encode,-ifld-parse-decode): New proc.
7293 (-multi-ifield-parse): Set encode/decode to #f.
7294 (ifld:decode-mode): New proc.
7295 * utils.scm (nub): Rewrite.
7296 * operand.scm (op-nub): Rewrite.
7297 * sim.scm (<ifield>, gen-type): Rewrite.
7298 (-gen-ifld-argbuf-defn): New proc.
7299 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
7300 (<sim-hardware>): Forward gen-trace-extract onto `type'.
7301 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
7302 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
7303 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
7304 New method gen-trace-extract.
7305 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
7306 from gen-argbuf-elm, return "" if not caching register address.
7307 Rewrite gen-extract. New method gen-trace-extract.
7308 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
7309 gen-extract, gen-trace-extract, cxmake-get.
7310 (<hw-iaddress>): New method cxmake-get.
7311 (op-needed-iflds): New proc.
7312 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
7313 (-gen-op-argbuf-defn): New proc.
7314 (gen-op-extract): Renamed from op:extract.
7315 (gen-op-trace-extract): Renamed from op:trace-extract.
7316 (fmt-extractable-operands): Renamed from fmt-semantic-operands
7318 (gen-argbuf-elm): Rewrite.
7319 * sim-decode.scm (-gen-record-args): Update.
7321 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
7323 * pmacros.scm (-pmacro-expand): Handle procedural macros in
7324 argument position. Flag symbolic macros in function position as
7326 (define-pmacro): Handle quoting in definition of symbolic macros.
7327 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
7329 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
7331 * fr30.opc (parse_register_list): Account for reverse masks
7333 (print_register_list): Ditto.
7334 (parse_low_register_list_ld): New function.
7335 (parse_hi_register_list_ld): New function.
7336 (parse_low_register_list_st): New function.
7337 (parse_hi_register_list_st): New function.
7338 (print_hi_register_list_ld): New function.
7339 (print_hi_register_list_st): New function.
7340 (print_low_register_list_ld): New function.
7341 (print_low_register_list_st): New function.
7342 * fr30.cpu (ldr15dr): Implement workaround.
7343 (ldm0,ldm1,stm0,stm1): Implemented.
7345 1998-12-08 Doug Evans <devans@casey.cygnus.com>
7347 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
7348 * configure: Regenerate.
7349 * Makefile.am (WITH_HOBBIT): Update.
7350 (cgen-hob.c): Remove Makefile dependency.
7351 (cgen.o): Depend on cgen-gh.h, config.h.
7352 * Makefile.in: Regenerate.
7353 * aclocal.m4: Regenerate.
7355 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
7357 * i960.cpu, i960.opc: New files.
7359 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
7361 * fr30.opc (parse_register_number): New function.
7362 (parse_register_list): New function.
7363 (parse_low_register_list): Use parse_register_list.
7364 (parse_hi_register_list): Use parse_register_list.
7365 * fr30.cpu (sth): Fix assembler syntax. Implement more
7368 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
7370 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
7371 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
7372 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
7373 (-op-gen-set-trace-parallel): Ditto.
7374 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
7376 * fr30.cpu (call,calld): Fix setting of pc.
7377 (f-op5): Fix start bit number.
7379 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
7381 * fr30.cpu (st): Fix operand ordering. Implement more
7384 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
7386 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
7387 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
7388 (fmt-semantic-operands): Move to sim.scm.
7389 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
7390 * operand.scm (<hw-index>): New member `name'. All builders updated.
7391 (<hw-index>): New method get-name.
7392 (op-profilable?): Moved to sim.scm.
7394 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7395 (op-profilable?): Moved here from operand.scm.
7396 (gen-extract-type): Delete.
7397 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7398 (-gen-argfld-ref): New proc.
7399 (-gen-ifld-argfld-name): New proc.
7400 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7401 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7402 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7403 (<hardware-base>): Delete method gen-extract-type. New method
7405 (<hw-register): Ditto. Update method gen-extract.
7406 (<operand>, method gen-argbuf-elm): Rewrite.
7407 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7408 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7409 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7411 * sim-decode.scm (-gen-record-args): Tweak.
7413 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7415 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7417 * doc/porting: Fix typo: gas->sim.
7418 * fr30.opc (print_m4): New function.
7419 * fr30.cpu: Implemented many insns.
7421 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7423 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7425 * fr30.cpu (f-rel9): Delete RELOC attribute.
7426 (f-rel12): Add PCREL-ADDR attribute.
7427 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7428 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7429 * fr30.opc (print_label9): Delete.
7431 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7432 code for CTI indicators.
7433 * insn.scm (insn-cti?): Simplify.
7434 * utils-cgen.scm (atlist:cti?): New proc.
7436 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7438 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7439 (f-i20-4,f-i20-16,f-i20): New fields.
7445 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7446 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7447 * mach.scm (arch-data): Ditto.
7448 (current-arch-default-insn-word-bitsize): Renamed from
7449 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7450 (-arch-read): Update.
7452 * hardware.scm (hw:attr-list): Move here ...
7453 * opcodes.scm: ... from here.
7455 * ifield.scm (fld:bitrange): Delete.
7456 (fld:word-offset,fld:word-length): New procs.
7457 (ifield?): Use class-instance.
7458 (<ifield>, method field-start): Rewrite.
7459 (ifld:enum): New proc.
7460 (<ifield>, methods field-mask,field-value): Rewrite.
7461 (-ifield-parse): Rewrite.
7462 (<multi-ifield> support): Rewrite.
7463 (ifld-beyond-base?): Rewrite.
7464 (ifld:std-attrs): New variable.
7465 (ifld:attr-list): New proc.
7466 * iformat.scm (-compute-insn-mask): Rewrite.
7467 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7469 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7470 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7472 (<operand>): Ditto. Forward onto index instead.
7473 (gen-ifld-decls,gen-ifld-defns): New procs.
7474 (ifld:insert,ifld:extract): New procs.
7475 (<ifield>): New methods gen-insert, gen-extract.
7476 (<multi-ifield>): Ditto.
7477 (<hw-index>): Forward gen-insert,gen-extract onto value.
7478 (<hw-asm>): Delete insert/extract support.
7479 (<hw-register,hw-memory,hw-immediate>): Ditto.
7480 (gen-hash-defines): Use string-list.
7481 Define CGEN_MAX_IFMT_OPERANDS.
7482 (gen-switch): Use string-list,string-list-map.
7483 (gen-fget-switch,gen-fset-switch): Use string-list.
7484 (gen-parse-switch,gen-insert-switch): Ditto.
7485 (gen-extract-switch,gen-print-switch): Ditto.
7486 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7487 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7488 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7489 (gen-ivalue-entry): New proc.
7490 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7491 computation. Use 0 for operand ref table if ALIAS insn.
7492 (gen-minsn-table-entry): Use string-list.
7493 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7494 (gen-opcode-open): Record address of ifield table.
7495 (cgen-opc.h): Call gen-ifld-decls.
7496 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7497 * types.scm (<bitrange>): New members word-offset,word-length.
7498 Delete member total-length. Delete methods start,mask,value.
7499 (bitrange:word-offset,bitrange:word-length): New procs.
7500 * sim-cpu.scm (gen-define-fields): Simplify.
7501 (gen-extract-fields): Simplify.
7502 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7503 (<ifield>): New methods gen-ifld-extract-decl.
7504 Delete method gen-ifld-extract-beyond.
7505 (<multi-ifield>): New methods gen-ifld-extract-decl.
7506 (<multi-ifield>, method gen-ifld-extract): Implement.
7507 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7508 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7510 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7511 (-rtx-traverse-syntax-no-mode): New proc.
7512 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7513 (s-ifield): New proc.
7514 (s-shop): Don't prepend `unsigned' for unsigned modes.
7515 * rtx-funcs.scm (ifield): New rtx function.
7516 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7517 (delay): New rtx function.
7518 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7520 * cos.scm (-elm-make-method-getter): Fix typo.
7522 * utils.scm (backslash): Handle lists of strings.
7524 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7526 * fr30.cpu (f-rel9): Correct for pc+2.
7527 (label9): Use print_label9.
7528 * fr30.opc (print_label9): New function.
7530 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7532 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7533 * fr30.opc (parse_low_register_list): Renamed.
7534 (parse_hi_register_list): Renamed.
7535 (print_hi_register_list): Renamed.
7536 (print_low_register_list): Renamed.
7538 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7540 * fr30.cpu (f-rel9): Now a pc relative offset.
7542 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7544 * opcodes.scm (op-asm): Move to here, from operands.scm.
7545 (<op-asm>, method parse!): Validate arguments.
7546 (<operand>, method gen-function-name): Fix thinko.
7547 * operand.scm (<operand>, method make!): Don't set op-asm here.
7548 * utils.scm (list-elements-ok?): New proc.
7550 * opcodes.scm: Clean up pass.
7552 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7554 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7555 the fr30_int function.
7556 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7557 (h-dr): Add FUN-ACCESS attribute.
7559 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7561 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7562 for C symbol for models array.
7564 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7566 * fr30.opc (parse_reglist_low): New function.
7567 (parse_reglist_hi): New function.
7568 (print_reglist_low): New function.
7569 (print_reglist_hi): New function.
7570 * fr30.cpu: Finish remaining insn stubs.
7572 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7574 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7576 * fr30.cpu (ldi32m): Don't use for disassembly.
7578 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7580 * fr30.cpu (int): Implement it.
7582 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7584 * rtx-funcs.scm (nop): Fix C code.
7586 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7588 * fr30.cpu (f-i32): New ifield.
7591 (ldi32m): New macro insn.
7592 (inte): Provide simple version for now.
7594 * sim-arch.scm: New file.
7595 * sim.scm: Move architecture support generation to sim-arch.scm.
7596 * cgen-sim.scm: Load sim-arch.scm.
7599 * hardware.scm (pc?) New proc.
7600 (class <hardware-base>): Rewrite method 'pc?.
7601 (class <hardware>): Forward 'pc? to the hardware type.
7602 (class <hw-pc>): New method 'pc?.
7604 Add support for variable length ISAs.
7605 * ifield.scm (ifld-beyond-base?): New proc.
7606 * m32r.cpu: Remove integral-insn? spec.
7607 * mach.scm (arch:derived,arch:set-derived!): New procs.
7608 (arch:app-data,arch:set-app-data!): New procs.
7609 (class <arch>): New members derived, app-data.
7610 (class <cpu>): Delete member integral-insn?.
7611 (cpu:integral-insn?): Delete.
7612 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7613 (-cpu-read): Delete integral-insn? support.
7614 (state:decode-assist): Delete.
7615 (state:int-insn?): Delete.
7616 (<derived-arch-data>): New class.
7617 (-adata-set-derived!): New proc.
7618 (mach-finish!): Call it.
7619 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7620 (gen-operand-instance): Add COND_REF support.
7621 (gen-operand-instance-table): Ditto.
7622 (gen-hash-defines): Update.
7623 (gen-extract-switch): Update type of `insn_value' arg.
7624 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7625 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7627 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7628 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7629 beyond the base insn (for large insns).
7630 (-gen-extract-beyond-var-list): New proc.
7631 (gen-extract-fields): Handle large insns.
7632 (-gen-write-case): Update sem_arg computation.
7633 Update initial vpc computation.
7634 (gen-semantic-fn): Ditto. Update type of `insn'.
7635 (-gen-sem-case): Update sem_arg computation.
7636 Update initial vpc computation.
7637 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7638 (-gen-extract-word): New proc.
7639 (<ifield>): New method gen-ifld-extract-beyond.
7640 (gen-ifld-extract-beyond): New proc.
7641 * types.scm (bitrange-overlap?): New proc.
7643 * utils.scm (bits->bytes): New proc.
7644 (bytes->bits): New proc.
7646 Move extraction support into decoder.
7647 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7648 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7649 support to sim-decode.scm.
7650 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7651 be array of IDESC,FMT entries. Make the array const.
7652 (-gen-gcc-label-table): Make array const.
7653 (-gen-decode-switch): Branch to extraction code after insn has been
7655 (-gen-decode-insn-globals): Delete extract handler from
7657 (gen-decode-fn): Add extraction support.
7658 (-gen-sem-fn-decls): Delete extraction fn decls.
7659 (-gen-idesc-decls): Update @cpu@_decode decl.
7660 (-gen-idesc-init-fn): Delete extraction support.
7661 (-gen-extract-decls): New proc.
7663 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7664 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7666 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7667 All callers updated.
7668 (table-entry:make): Record insn value as insn object, not name.
7671 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7672 collision with C function.
7673 (path_dirname): Similarily.
7674 * hobbit.c,hobbit.h: Rebuild.
7676 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7678 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7680 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7682 * fr30.cpu: Implement more instruction stubs.
7684 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7686 * fr30.cpu: Implement more instruction stubs.
7688 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7690 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7692 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7694 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7695 (op:std-attrs): Ditto.
7696 * opcodes.scm (gen-operand-instance): Ditto.
7697 (gen-switch): Ditto.
7698 * m32r.cpu (condbit,accum): Update.
7699 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7701 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7703 * enum.scm (-enum-read): Fix typo.
7705 * iformat.scm (-ifmt-search-key): Simplify a little.
7707 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7709 * doc/porting: semantics.c -> sem.c.
7710 * Makefile.in: Regenerate.
7711 * fr30.cpu (add): Change ADD to add. Add more registers and set
7712 status bits on 'add' instruction.
7714 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7716 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7719 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7721 * minsn.scm (minsn:enum): Update, call current-arch-name.
7723 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7725 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7726 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7727 (ARCH,CGEN,CGENFLAGS): New variables.
7728 (gas-test,sim-test): New rules.
7729 * Makefile.in: Rebuild.
7730 * configure.in (arch): Define.
7731 * configure: Rebuild.
7733 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7734 * All .scm files: Ditto.
7736 * dev.scm: Fix gas-test call to cpu-load.
7737 * gas-test.scm: Clean up pass to remove bit-rot.
7738 * sim-test.scm: Ditto.
7740 * enum.scm (read-enum): Fix typo in `vals' handling.
7742 * hardware.scm (-parse-hw-type): Fix typo.
7743 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7744 (def-hardware,define-normal-hardware): Ditto.
7746 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7747 (display-var): Use it.
7748 * hobbit.c: Rebuild.
7749 * hobbit.h: Rebuild.
7751 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7752 avoid hobbit problem.
7753 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7754 `parallel-insns-' to avoid hobbit problem.
7756 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7758 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7759 (parse_slo16,parse_ulo16): Ditto.
7760 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7762 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
7764 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7765 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7766 * Makefile.in: Rebuild.
7767 * insn.scm (define-normal-insn): Expand pmacros.
7768 * mode.scm (<mode>): New member `host?'. All uses updated.
7769 (mode:host?): New proc.
7770 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7771 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7772 (define-rtx-dual-mode): Ditto.
7773 (s-index-of): New proc.
7774 (s-unop): Use plain C for host mode operations.
7775 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7776 * rtx-funcs.scm (index-of): New rtx function.
7777 * sim.scm (<hw-index>): New method cxmake-get.
7779 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
7781 * sim-cpu.scm (-gen-engine-decls): Delete.
7783 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
7785 * doc/rtl (Example): Correct Typo.
7786 * doc/porting: Add 'make dep' step to opcodes port instructions.
7787 * fr30.opc: New file.
7788 * fr30.cpu: New file.
7790 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
7792 * configure.in: Handle guile $exec_prefix = $prefix/foo.
7793 * Makefile.am (GUILEINCDIR): New variable.
7795 * configure: Regenerate.
7796 * Makefile.in: Ditto.
7797 * aclocal.m4: Ditto.
7799 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
7801 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7802 (cgen-semantics.c): Ditto.
7803 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7804 * sim-model.scm (cgen-model.c): Ditto.
7805 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7806 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7808 * opcodes.scm (read-cpu.opc): Handle empty file.
7810 * cos.scm (-elm-make-method-setter): Fix typo.
7812 * cpu.scm (-init-parse-cpu!): Call types-init!.
7813 (-finish-parse-cpu!): Call types-finish!.
7814 * ifield.scm (<ifield>): Delete members start,length.
7815 New member bitrange.
7816 (<ifield>, methods field-start,field-length): Update.
7817 (fld:start): New arg insn-len. All callers updated.
7818 (<ifield>, methods field-mask,field-value): Update.
7819 (-ifield-parse): Update.
7820 (ifield-init!): Update.
7821 * iformat.scm (compute-insn-length): Simplify.
7822 (compute-insn-mask): Update.
7823 * insn.scm (insn:value): Update.
7824 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7825 (current-arch-default-insn-bitsize): New proc.
7826 (current-arch-insn-lsb0?): New proc.
7827 (-arch-parse,-arch-read): Update.
7828 (<cpu>): New member file-transform.
7829 (-cpu-parse,-cpu-read): Update.
7830 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7831 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7832 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7833 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7834 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7835 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7836 * operand.scm (op:start): Update call to field-start method.
7837 * sim-decode.scm (opcode-slots): New arg lsb0?.
7838 (fill-slot!,build-slots): Ditto.
7839 (build-decode-table-entry,build-decode-table-guts): Ditto.
7840 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7841 (gen-decode-fn): Ditto.
7842 (cgen-decode.c): Update call to gen-decode-fn.
7843 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7844 (-gen-cpu-header,-gen-cpuall-includes): New procs.
7845 (cgen-cpuall.h): Call -gen-cpuall-includes.
7846 * types.scm (<bitrange>): New class.
7847 (types-init!,types-finish!): New procs.
7848 * utils-cgen.scm (parse-number): New proc.
7849 (parse-boolean): New proc.
7850 * utils.scm (word-value): Renamed from shift-bits, rewrite.
7851 (word-mask): Rewrite.
7852 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7853 (m32rxf): New field `file-transform'.
7854 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7856 * hobbit.h: Fix include file name.
7858 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
7860 * slib: New directory of slib files used by cgen/hobbit.
7861 * hobbit.scm: New file.
7862 * hobbit.c: New file.
7863 * hobbit.h: New file.
7864 * hobscmif.h: New file.
7865 * hob-main.c: New file.
7866 * hobslib.scm: New file.
7868 * Makefile.am: Add support for compiling hobbit, and using compiled
7869 version of hobbit to compile cgen.
7870 * Makefile.in: Regenerate.
7871 * configure.in: Support --with-hobbit.
7872 * configure: Regenerate.
7873 * acconfig.h (WITH_HOBBIT): Add.
7874 * config.in: Regenerate.
7876 * rtl.scm: New file, was cdl-c.scm.
7877 Definition of rtx funcs moved to rtx-funcs.scm.
7878 (semantic-in-out-operands): Rewrite to compute object form of
7880 * rtx-funcs.scm: New file.
7882 * cgen-gh.c: #include "config.h".
7883 (gh_cadddr,gh_cddddr): New fns.
7884 (cgh_vector_to_list): New fn.
7885 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7886 (cgh_init): Prefix qsort procs with "cgh-".
7887 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7888 * cgen.c: #include "config.h".
7890 * attr.scm (bitset-attr?): New proc.
7891 (<bitset-attribute>, method parse-value): Value syntax changed from
7892 (val1 val2 ...) to val1,val2,....
7893 (<bitset-attribute>): New method gen-value.
7894 (<integer-attribute>): New method gen-value.
7895 (<enum-attribute>): New method gen-value.
7896 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7897 (<reader>): New class.
7898 (CURRENT-ARCH,CURRENT-READER): New globals.
7899 (keep-mach?): Move here from mach.scm.
7900 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7901 (<arch>): New class.
7902 (<arch-data>): New class.
7903 (<cpu>): Make subclass of <ident>.
7904 (*ENDIAN* variables): Delete.
7905 (process-state-vars): Delete.
7906 (mach-finish!): Add `base' value to MACH attribute.
7907 * hardware.scm (<hardware>): Make subclass of <ident>.
7908 (hw:std-attrs): New global.
7909 (hw-profilable?): New proc.
7910 * ifield.scm (<ifield>): Make subclass of <ident>.
7911 (sort-ifield-list): Move here from iformat.scm.
7912 * iformat.scm (<iformat>): Renamed from <insn-format>.
7913 Make subclass of <ident>.
7914 (-ifmt-search-key): Include cti? in categorization of formats.
7915 (ifmt-analyze): Compile semantics (turn to object form).
7916 * insn.scm (<insn>): Make subclass of <ident>.
7917 New member compiled-semantics.
7918 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7919 * mode.scm (<mode>): Make subclass of <ident>.
7921 * model.scm (<unit>): Make subclass of <ident>.
7922 New members inputs,outputs.
7923 (<model>): Make subclass of <ident>. New member state.
7924 (-unit-parse): Parse inputs,outputs.
7925 (<iunit>): New class.
7926 (-insn-timing-parse-model): New proc.
7927 (parse-insn-timing): Function unit spec rewritten.
7928 * operand.scm (<operand>): Make subclass of <ident>.
7929 New members sem-name,num,cond? New method gen-pretty-name.
7930 (hw-index-scalar): New global.
7931 (op-nub-hw): Move here from rtl.scm.
7932 (op:lookup-sem-name,op-profilable?): New procs.
7933 * pmacros.scm: Rewrite to pass through hobbit.
7934 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7935 * utils.scm (logit): Make a macro.
7936 (bit-set?): Rewrite.
7937 (high-part): Rewrite.
7939 * m32r.cpu (define-arch): Move to top of file.
7940 (cpu family m32rbf): Renamed from m32rb.
7941 (model m32r/d): Function unit spec rewritten.
7942 (all insns): Ditto. Replace UBI with BI.
7944 * opcodes.scm (gen-attr-table-decls): Declare
7945 @arch@_cgen_hw_attr_table.
7946 (gen-attr-table-defns): Generate hw attribute table.
7948 * sim-cpu.scm (-gen-engine-decls): New proc.
7949 (-gen-model-decls): New proc.
7950 (gen-parallel-exec-type): Add new member `written' to struct parexec.
7951 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7952 (-gen-record-profile-args): Simplify.
7953 (-gen-parallel-sem-case): Delete.
7954 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7955 New local `written'. Delete profiling code.
7956 (-gen-sem-case): Ditto.
7957 (-uncond-written-mask,-any-cond-written?): New procs.
7958 (cgen-sem-switch.c): Include duplicates of insns that can be executed
7959 parallelly or serially, and write-back handlers for all parallel insns.
7960 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7961 support to initialization of struct insn_sem.
7962 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7963 (-gen-insn-sem-type): Add parallel write-back support to struct
7965 (-gen-idesc-init-fn): Add support for virtual insns.
7966 Add parallel write-back support.
7967 * sim-model.scm (gen-model-profile-fn): Delete
7968 (-gen-model-fn-decls): New proc.
7969 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7970 (-gen-model-init-fn): New proc.
7971 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7972 members in @mach@_init_cpu.
7973 (cgen-model.c): Generate model handlers for each insn.
7974 * sim.scm (gen-define-field-macro): Cti insns handled differently.
7975 (<hw-pc>): New method gen-write.
7976 (<hw-register>, method gen-write): New arg `mode'.
7977 (<hw-register>): Delete method gen-record-profile!.
7978 New method gen-profile-index-type.
7979 (<hw-memory>, method gen-write): New arg `mode'.
7980 (<hw-address>, method gen-extract): Delete.
7981 (<hw-address>, method gen-write): New arg `mode'.
7982 (<hw-index>, method get-write-index): Rewrite.
7983 (<pc>, method cxmake-get-direct): Delete.
7984 (<pc>): New method cxmake-get. Comment out methods
7985 gen-set-quiet,gen-set-trace.
7986 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7987 gen-profile-index-type,gen-profile-code.
7988 Delete method gen-pretty-name. Rewrite method gen-write.
7989 Delete method cxmake-get-direct.
7990 (-op-gen-set-trace): Update `written'.
7991 (-op-gen-set-trace-parallel): Ditto.
7992 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7993 (gen-cpu-insn-enum-decl): Add extra entries for parallel
7994 insns and their write-back handlers.
7995 (insn-op-lookup): New proc.
7996 (<unit>): New method gen-profile-code.
7997 (<iunit>): New method gen-profile-code.
7998 (gen-argbuf-elm): Add profiling elements.
7999 (gen-argbuf-type): Define cti insns separately in their own struct.
8000 Add member `addr_cache' to this struct. Add entries for pbb virtual
8001 insns. Move semantic entries here from struct scache.
8002 Delete everything from struct scache except argbuf.
8003 (<insn>, method gen-profile-locals): Rewrite.
8004 (<insn>, method gen-profile-code): Rewrite.
8005 (sim-finish!): Create virtual pbb insns.
8007 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
8009 * m32r.cpu (h-cr): Add bbpc,bbpsw.
8010 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
8011 (h-psw,h-bpsw,h-bbpsw): Define.
8012 (rte,trap): Handle bbpc,bbpsw.
8013 * opcodes.scm (max-operand-instances): Fix typo.
8014 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
8015 hardware elements to be fun-access.
8016 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
8018 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
8020 * m32r.cpu (trap): Pass `pc' to m32r_trap.
8022 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
8024 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
8026 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
8028 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
8030 (mach m32r): Update.
8032 * mach.scm (mach:supports?): New proc.
8033 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
8034 gen-reg-access-{decls,defns}.
8035 * sim.scm (gen-reg-access-{decl,defn}): New procs.
8036 (gen-mach-bfd-name): New proc.
8037 (gen-arch-reg-access-{decls,defns}): New procs.
8038 (cgen-arch.[ch]): Output register access cover fns.
8040 * hardware.scm (hardware-builtin!): Set print handlers for
8042 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
8044 (CGEN_PRINT_NORMAL,print_hash): Ditto.
8045 (my_print_insn): Ditto. Delete args buf, buflen.
8046 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
8047 (-hw-asm-specs): Add `handlers' spec.
8048 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
8050 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
8052 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
8053 (<hw-asm>, parse!): New method.
8054 (gen-insn-table-entry): Print semantics.
8055 (gen-opcode-open): Renamed from gen-opcode-table.
8057 * utils.scm (string-write): No longer a macro.
8058 (-string-write): Handle procedure args.
8059 * opcodes.scm: Update all calls to string-write.
8060 * sim-cpu.scm: Ditto.
8061 * sim-decode.scm: Ditto.
8062 * sim-model.scm: Ditto.
8065 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
8067 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
8068 (-gen-insn-builders,-gen-insn-builder): New procs.
8070 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
8072 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
8073 (gen-opcode-table): Properly terminate comment.
8075 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
8078 Clean up pass over everything, so starting fresh.