1 2009-09-12 Doug Evans <dje@sebabeach.org>
3 * sim-test.scm (*): Symbols no longer can be passed to string-append.
5 2009-09-10 Doug Evans <dje@sebabeach.org>
7 * insn.scm (/parse-insn-format): New arg `verify?', all callers updated.
8 Improve error message for missing or too many bits.
9 (/insn-parse): Don't verify iformat for virtual insns.
11 * sid-decode.scm (cgen-decode.cxx): Remove redundant call to
13 * sid-model.scm (/gen-model-insn-fn-decls): Ditto.
14 (/gen-model-insn-fns, /gen-model-class-decls): Ditto.
15 * sid.scm (pbb-engine-insns): Ditto.
16 * sim-decode.scm (cgen-decode.c): Ditto.
18 2009-09-09 Doug Evans <dje@sebabeach.org>
20 * rtl-traverse.scm: Comment tweaks.
21 * rtl-xform.scm: Comment and reformatting tweaks.
22 * doc/rtl.texi: Add text to docs on ifield-assertions.
24 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
27 Add support for controlling warnings/errors.
28 Add tests for iformat description errors.
29 * dev.scm (cload): New option #:diag.
30 * read.scm (<reader>): New member verify-iformat?.
31 (/parse-diagnostic, parse-warning): New functions.
32 (parse-error): Guts moved to /parse-diagnostic.
33 (/set-diagnostic-options!): New function.
34 (cpu-load): New arg diagnostic-options, all callers updated.
35 Recognize -w diagnostic-option-list.
36 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
37 (ifld-simple-ifields, ifields-simple-ifields): New function.
38 * insn.scm (/parse-insn-format-iflds): New function.
39 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
40 New arg isa, all callers updated. Do some basic validation of the
41 ifield list if requested.
42 * mach.scm (/sanity-check-insns): Improve error message text.
43 * doc/running.texi: Document -w option.
44 * doc/porting.texi: Document #:trace, #:diag options to cload.
46 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
48 * dev.scm (*): Change default verbosity level to 2.
50 * ifield.scm (<ifield> pretty-print): New method.
51 (ifld-pretty-print): New function.
52 (<multi-ifield> pretty-print): New method.
54 * ifield.scm (<ifield> field-start): Delete word-len arg.
57 (<multi-ifield> field-start): Ditto.
58 * operand.scm (<hw-index> field-start): Ditto.
60 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
61 total-bitsize. All callers updated.
62 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
63 New member /insn-base-value.
64 (insn-base-value): New function.
65 * mach.scm (/sanity-check-insns): New function.
66 (arch-analyze-insns!): Call it.
68 2009-09-08 Doug Evans <dje@sebabeach.org>
70 * iformat.scm (ifields-base-ifields): Simplify.
71 (compute-insn-length): Simplify, call ifields-base-ifields.
72 (compute-insn-base-mask): Ditto.
73 * ifield.scm (ifld-known-values): Ditto.
74 (ifld-base-ifields): Ditto.
75 * insn.scm (insn-value): Ditto.
76 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
78 2009-09-08 DJ Delorie <dj@redhat.com>
80 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
81 preprocessor macro, not an enum.
83 2009-09-08 Doug Evans <dje@sebabeach.org>
85 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
87 (*): Remove trailing ":" from error messages passed to estate-error.
89 2009-09-07 Doug Evans <dje@sebabeach.org>
91 * types.scm (<struct>): Delete.
93 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
95 (/pmacro-loc-error): New function.
97 * mach.scm (/isa-parse-decode-assist): New function.
98 (/isa-parse): Call it.
100 * decode.scm (/get-subopcode-value): New function.
101 (/opcode-slots): Call it.
102 (/fill-slot!): Add logging message.
104 * cos.scm (/object-error): Convert symbols to strings before passing
107 * read.scm (rtl-version-equal?): New function.
108 (rtl-version-at-least?, rtl-version-older?): New functions.
110 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
111 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
113 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
115 2009-09-03 Doug Evans <dje@sebabeach.org>
117 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
120 2009-09-01 DJ Delorie <dj@redhat.com>
122 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
123 (parse_unsigned16_range): Likewise.
124 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
127 2009-09-01 Doug Evans <dje@sebabeach.org>
129 Pmacro .equals -> .equal?
130 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
131 -pmacro-builtin-equals. All callers updated.
132 (pmacros-init!): Rename .equals to .equal?.
133 * doc/pmacros.texi: Update.
134 * testsuite/pmacros-1.test: Update.
136 * doc/porting.texi: Work around texi2html bug where it doesn't
137 properly escape <> inside double-quotes inside @code.
139 * doc/porting.texi (Doing an opcodes port): Add step to specify
142 2009-08-29 Doug Evans <dje@sebabeach.org>
144 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
146 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
148 2009-08-27 Doug Evans <dje@sebabeach.org>
150 Add do-count rtl function.
151 * rtl-c.scm (s-do-count): New function.
152 (do-count): New rtl handler.
153 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
154 (-rtx-make-traverser-table): Add ITERATION.
155 * rtl.scm (rtx-make-iteration-limit-var): New function.
156 (rtx-env-make-iteration-locals): New function.
157 * rtx-funcs.scm (do-count): New rtl function.
158 * cpu/play.cpu: Add do-count-test insn.
159 * doc/rtl.texi: Add docs on do-count.
161 2009-08-26 Doug Evans <dje@sebabeach.org>
163 * read.scm (parse-error): Change error message output format
164 to match context-owner-error.
165 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
166 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
167 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
168 (operand): Call estate-error instead of context-error.
169 (local, delay): Ditto.
170 (ref, attr): Call estate-error instead of error.
171 * rtl-traverse.scm (tstate-error): New function.
172 (-rtx-traverse-error): Call tstate-error instead of context-error.
173 (-rtx-traverse-operands, -rtx-traverse): Ditto.
174 (estate-error): New function.
175 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
177 (e-if): Call estate-error instead of error.
178 * rtx-funcs.scm (error): Call estate-error instead of context-error.
180 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
181 Rewrite to call context-owner-error.
182 (context-owner-error): New function.
184 * ifield.scm (<ifield> constructor): New arg `location',
186 * insn.scm (<insn> constructor): Ditto.
187 (<multi-insn> constructor): Ditto.
188 * minsn.scm (<macro-insn> constructor): Ditto.
189 * operand.scm (<operand> constructor): Ditto.
190 * utils-cgen.scm (builtin-location): New function.
191 (<source-ident>): Fix default value of member `location'.
192 (source-ident?): New function.
194 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
195 (estate-push-env, estate-with-modifiers): Ditto.
196 (estate-deepen): New function.
198 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
200 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
201 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
204 2009-08-25 Doug Evans <dje@sebabeach.org>
206 * doc/pmacros.texi (pmacro default argument values): Add text.
208 2009-08-23 Doug Evans <dje@sebabeach.org>
210 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
211 Rename member prefix -> name-prefix.
212 (<keyword> getters): Update.
213 (-keyword-parse): Update. Default enum-prefix to NAME-.
214 (-keyword-read): Update. Don't compute default value for
216 (define-keyword): Update.
217 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
218 * read.scm (cgen-rtl-version): New function.
219 (-supported-rtl-versions): Add (0 8).
220 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
221 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
222 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
223 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
224 Update, print-name -> enum-prefix, make uppercase.
225 Remove unnecessary name-prefix spec.
226 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
227 * cpu/ip2k.cpu (register-names): Ditto.
228 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
229 * cpu/sparc.cpu (gr-names): Ditto.
230 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
231 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
232 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
233 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
234 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
235 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
236 prefix -> name-prefix.
237 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
238 Update, print-name -> enum-prefix, make uppercase.
239 (drc-names, xf-names): Ditto.
240 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
241 * doc/rtl.texi (Keywords): New section.
242 (hardware indices): Update text.
243 (rtl versions): Add 0.8.
245 Add define-rtl-version.
246 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
247 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
248 (cgen-lang-fixlevel): Delete.
249 (-supported-rtl-versions): New variable.
250 (-cmd-define-rtl-version): New function.
251 (init-reader!): New command define-rtl-version.
252 (-cgen): Add rtl version to --version output.
253 * doc/rtl.texi: Document rtl version support.
254 * cpu/play.cpu: Add define-rtl-version.
256 2009-08-22 Doug Evans <dje@sebabeach.org>
258 * Makefile.am (OPTIONS): Define.
259 (desc): Just generate <arch>-desc.[ch] files.
260 * Makefile.in: Regenerate.
261 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
263 (cgen-desc.c): Similarly.
264 * gen-all-desc: New file.
265 * opcodes.scm (opc-file-provided?): New function.
267 * mach.scm (current-*-add!): Update calls to parse-error.
268 * operand.scm (op:new-mode): Update call to parse-error.
269 * utils-cgen.scm (make-obj-context): New function.
271 * NEWS: Copy over entries from 1.1 branch.
273 2009-08-20 Doug Evans <dje@sebabeach.org>
275 * gas-test.scm (<keyword> test-data): Catch invalid requests,
276 flag a warning and compensate.
277 (<hw-address test-data): Tweak for readability.
278 (<hw-iaddress test-data): Ditto.
279 (cgen-build.sh): Convert symbols to strings before passing to
281 (cgen-allinsn.exp): Ditto.
283 * doc/pmacros.texi (.splice): Add more text.
285 2009-08-19 Doug Evans <dje@sebabeach.org>
287 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
288 distinguish from 1.1.
289 * configure: Regenerate.
290 * read.scm (-CGEN-VERSION): Update.
291 * doc/version.texi: Update.
293 New builtin .pmacro?.
294 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
295 (pmacros-init!): Add .pmacro?.
296 * doc/pmacros.text: Document .pmacro?.
297 * testsuite/pmacros-1.test: Test .pmacro?.
299 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
300 of a pmacro begins before its arguments are evaluated, improves
303 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
304 * testsuite/pmacros-1.test: Ditto. Add better tests.
306 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
308 (Operands): Similarly.
310 2009-08-18 Doug Evans <dje@sebabeach.org>
312 * ifield.scm (ifld-encode-mode): Add FIXME.
313 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
315 (<ifield> gen-extract): Similarly.
317 * read.scm (parse-error): Handle #f for context-location.
318 * utils-cgen.scm (unspecified-location): Fix building of
321 * doc/rtl.texi: Document how to write hex and boolean values.
323 * gas-test.scm (<hw-asm> test-data): Handle () values.
324 (<keyword> test-data): Convert symbols to strings before passing
326 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
329 * operand.scm (hw-index-scalar): Set `name'.
330 (hw-index-anyof, hw-index-derived): Ditto.
332 2009-08-17 Doug Evans <dje@sebabeach.org>
334 * pmacros.scm (-pmacro-builtin-internal-test): New function.
335 (pmacros-init!): Add .internal-test.
336 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
337 * testsuite/testsuite.cpu (internal-verify): New pmacro.
338 * doc/pmacros.text: Document .internal-test.
340 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
341 (parse-comment): Allow numbers.
342 * doc/porting.texi: Document that names and comments may be lists.
344 * insn.scm (-insn-parse): Fix typo.
346 Rename .eval -> .exec. Add new .eval.
347 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
348 (-pmacro-builtin-eval): New function.
349 (pmacros-init!): Add .exec.
350 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
351 * testsuite/location-1.test: Update.
352 * testsuite/pmacros-1.test: Add test for .eval.
354 2009-08-16 Doug Evans <dje@sebabeach.org>
356 * doc/porting.texi: Remove support for Guile 1.4.
358 * read.scm (current-reader-location): Return unspecified location
359 if reader hasn't been initialized yet.
361 2009-08-13 Doug Evans <dje@sebabeach.org>
363 * dev.scm: Document tracing options.
365 * pmacros.scm (pmacro-dump): New function.
366 (check-pmacro): Tweak debugging output.
367 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
368 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
370 Add .let* pmacro builtin.
371 * pmacros.scm (-pmacro-builtin-let*): New function.
372 (pmacros-init!): Add .let*.
373 * doc/pmacros.texi: Document .let*.
374 * testsuite/pmacros-1.test: Test .let*.
376 2009-08-12 Doug Evans <dje@sebabeach.org>
378 Clean up cpu file parsing, pass context consistently instead of the
379 old "errtxt" argument.
380 NOTE: ACU == "All Callers Updated".
381 * attr.scm (-parse-simple-attribute): Renamed from
382 parse-simple-attribute, ACU.
383 (-attr-parse): Change errtxt argument to context, ACU.
385 (atlist-parse): Ditto. Put context arg first.
386 (attr-parse): Use parse-error instead of context-error.
387 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
388 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
389 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
390 `context' arg is now a <context> object. ACU.
391 (-keyword-read): `context' arg is now a <context> object. ACU.
392 (-hw-parse-indices): Change errtxt argument to context, ACU.
393 (-hw-parse-values, -hw-parse-handlers): Ditto.
394 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
395 (-hw-validate-layout, -hw-create-getter-from-layout,
396 -hw-create-setter-from-layout): Ditto.
397 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
398 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
399 (<hw-address>:parse!): Ditto.
400 * ifield.scm (-ifield-parse, ifield-read): Ditto.
401 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
402 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
403 (-multi-ifield-parse, -multi-ifield-read): Ditto.
404 * insn.scm (-insn-parse, -insn-read): Ditto.
405 (parse-syntax): Ditto. Put context arg first.
406 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
407 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
408 (-parse-insn-format): Ditto.
409 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
410 (-arch-parse-isas): Ditto.
411 (-isa-read): Add context arg, ACU.
412 (-cpu-parse, -cpu-read, -mach-read): Ditto.
413 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
415 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
416 (minsn-make-alias): Ditto.
417 * mode.scm (-mode-parse): Ditto.
418 (parse-mode-name): Ditto. Put context arg first.
419 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
420 errtxt argument to context, ACU.
421 (-unit-parse, -model-parse, -model-read): Ditto.
422 * operand.scm (-operand-parse-getter): Use parse-error instead of
424 (-operand-parse-setter): Ditto.
425 (-operand-parse): Change errtxt argument to context, ACU.
426 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
427 (-anyof-operand-parse, -anyof-operand-read): Ditto.
428 * read.scm (reader-error): Delete. Use parse-error instead.
429 (parse-error): Change errtxt argument to context, ACU. Split args
430 argument into expr and maybe-help-text.
431 (-reader-process-expanded-1!): Reorganize.
432 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
433 * types.scm (parse-type): Ditto.
434 * utils-cgen.scm (single-location->simple-string): New function.
435 (<context>): Replace members file,lineno with location.
436 (make-prefix-context): Renamed from context-make-prefix, ACU.
437 (make-current-context): New function.
438 (context-append, context-append-name): New functions.
439 (context-make-reader): Delete.
440 (parse-name): Change errtxt argument to context, ACU.
441 Put context arg first.
442 (parse-comment): Ditto.
443 (parse-number): Change errtxt argument to context, ACU.
444 (arg-list-validate-name, arg-list-check-no-args,
445 arg-list-symbol-arg): Ditto.
447 * read.scm (-cmd-if): Don't assume test is a list.
449 * html.scm (get-insn-properties): Delete errtxt, unused.
451 2009-08-11 Doug Evans <dje@sebabeach.org>
453 * doc/rtl.texi (hardware types): Add pc.
455 2009-08-07 Doug Evans <dje@sebabeach.org>
457 Add -t option for tracing things like commands, pmacro expansion.
458 * dev.scm (cload): New arg #:trace.
459 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
460 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
461 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
462 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
463 (-reader-process-expanded-1!): Trace commands if requested.
464 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
465 (-set-trace-options!): New function.
466 (-init-reader!): New function.
467 (cpu-load): New arg trace-options, all callers updated.
468 Call -init-reader! and -set-trace-options!.
469 (cgen-usage): Improve output formatting.
470 (common-arguments): New option -t.
472 * utils-cgen.scm (single-location->string): Renamed from
473 pretty-print-single-location. All callers updated.
474 (location->string): Renamed from pretty-print-location.
476 (source-properties-location->string): New function.
477 * doc/running.texi: Document -t.
479 2009-08-06 Doug Evans <dje@sebabeach.org>
481 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
482 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
483 * utils.scm: ... here.
485 2009-08-05 Doug Evans <dje@sebabeach.org>
487 Track source location better, for better error messages.
488 * pmacros.scm (-pmacro-eval): Delete, unused.
489 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
490 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
491 (scan-list, scan): Ditto.
492 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
493 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
494 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
495 (scan-list1): New function.
496 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
497 * read.scm (<reader>): New member `location'.
498 (-reader-lookup-command): Renamed from reader-lookup-command,
500 (reader-error): Rewrite to produce better source location info.
501 (current-reader-location): New function.
502 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
503 All callers updated. Record source location of expression.
504 (reader-process-expanded!): Renamed from reader-process-expanded.
506 (-reader-process!): Renamed from reader-process. New arg `loc'.
507 All callers updated. Record source location of define-pmacro.
508 * utils-cgen.scm (<location>): New class.
509 (single-location): New (pseudo) class.
510 (pretty-print-single-location, pretty-print-location): New functions.
511 (location-top, location-push-single, location-push): New functions.
512 (unspecified-location, current-input-location): New functions.
513 (location-property): New object property.
514 (location-property-set!): New function.
515 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
517 * testsuite/location-1.test: New testcase.
518 * testsuite/run-tests.sh: Fix fail count handling.
519 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
520 to expect cgen to fail.
522 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
524 * read.scm (-cmd-include): Renamed from include. All callers updated.
525 (-cmd-if): Renamed from cmd-if. All callers updated.
526 Use reader-process-expanded! on then/else clauses instead of eval1.
528 2009-07-22 Doug Evans <dje@sebabeach.org>
530 * modes.scm (TI,OI): New modes.
531 * types.scm (parse-type): Improve error checking. Don't hardwire
533 * utils.scm (non-negative-integer?): New function.
535 * pmacros.scm (-pmacro-builtin-find): New predicate.
536 (pmacros-init!): Add .find.
537 * doc/pmacros.tex: Document .find.
538 * testsuite/pmacros-1.test: Test .find.
540 2009-07-20 Doug Evans <dje@sebabeach.org>
542 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
543 commented out printfs.
544 * rtl.scm (rtl-finish!): Whitespace tweaks.
545 * model.scm (parse-insn-timing): Tweak logging message.
546 * operand.scm: Comment and whitespace tweaks.
547 (op:type): Tweak error message.
548 (op-ifield): Tweak logging message.
549 (-derived-operand-parse, anyof-merge-semantics): Ditto.
550 * read.scm: Whitespace cleanup.
551 * utils.scm: Whitespace cleanup.
553 2009-07-19 Doug Evans <dje@sebabeach.org>
555 Fix binding of nested pmacro parameters.
556 * pmacros.scm (-pmacro-env-make): New arg prev-env.
558 (-pmacro-bulid-lambda): Ditto.
559 * doc/pmacros.texi: Update.
560 * testsuite/pmacros-1.test: Add testcase.
562 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
564 (-multi-ifield-make-default-extract): Ditto.
566 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
567 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
568 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
570 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
571 * doc/rtl.texi: Update.
573 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
575 Rename builtin boolean pmacros, for consistency with rtl.
576 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
577 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
578 * doc/pmacros.texi: Update.
579 * testsuite/pmacros-1.test: Update.
581 2009-07-17 Doug Evans <dje@sebabeach.org>
583 Use hash tables to record ifields, operands, insns, macro-insns.
584 * attr.scm (attr-builtin!): Tweak some comments.
585 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
586 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
588 (<multi-ifield>): New constructor.
589 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
590 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
592 (-sub-insn-make!): Add hack to avoid differences in generated code.
593 (multi-insn-instantiate!): Add total number of multi-insns to
595 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
596 minsn-list to foo-table. New member next-ordinal.
597 Update getters/setters.
598 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
600 (-get-next-ordinal!, -get-lowest-ordinal): New function.
601 (-make-ident-object-table, -ident-object-table->list,
602 -ident-object-table-add!, -ident-object-table-lookup): New functions.
603 (current-ifld-list, current-ifld-add! current-ifld-lookup,
604 -ifld-already-defined?): Rewrite.
605 (current-op-list, current-op-add! current-op-lookup,
606 -op-already-defined?): Rewrite.
607 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
608 (current-insn-list, current-insn-add! current-insn-lookup,
609 -insn-already-defined?): Rewrite.
610 (current-minsn-list, current-minsn-add! current-minsn-lookup,
611 -minsn-already-defined?): Rewrite.
612 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
613 (MAX-VIRTUAL-INSNS): Define.
614 (arch-analyze-insns!): Add hack to avoid differences in generated code.
615 Update use of arch-insn-list.
616 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
617 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
619 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
620 <ident>. New constructor.
621 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
623 * sid.scm (-virtual-insn-add!): New function.
624 (-create-virtual-insns!): Call it.
625 (-fill-sim-insn-list!): Rewrite.
626 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
627 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
628 * utils-cgen.scm (<ordered-ident>): New class.
629 (obj-ordinal, obj-set-ordinal!): New functions.
630 (add-ident-methods!): Delete.
632 * model.scm (parse-insn-timing): Change logging message to level 3.
634 2009-07-16 Doug Evans <dje@sebabeach.org>
636 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
637 add a link to define-normal-insn-enum.
639 * doc/porting.texi (Conventions): Add docs on writing integers.
641 * cpu/simplify.inc (*): One line doc strings don't need \n.
642 (df): Invoke define-full-ifield instead of claiming it's an alias.
644 (dnop): Mark as deprecated.
646 * cpu/play.cpu: Add example of hardware `layout'.
647 * doc/porting.tex: Add docs on simplify.inc.
648 * doc/rtl.texi: Cleanup pass over "Simplification macros",
651 * ifield.scm: Whitespace/formatting cleanup.
653 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
655 * read.scm (parse-error): Don't print single entry args as a list.
656 (-reader-process-expanded-1): Convert symbol to string for
659 * insn.scm (multi-insn-instantiate!): Tweak logging message.
661 2009-07-15 Doug Evans <dje@sebabeach.org>
663 * cpu/simplify.inc (dno): New pmacro.
664 * doc/porting.texi: Add section on simplify.inc.
665 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
667 2009-07-15 Doug Evans <devans@sourceware.org>
669 * gen-all-doc: Generate index.html.
671 2009-07-13 Doug Evans <dje@sebabeach.org>
673 Extend pmacro language, add testsuite.
674 * Makefile.am (SUBDIRS): Add testsuite.
675 * Makefile.in: Regenerate.
676 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
677 testsuite/test-utils.sh.
678 * configure: Regenerate.
679 * dev.scm (cload): Handle testsuite app.
680 (load-testsuite): New function.
681 * pmacros.scm: (-pmacro-debug?): New global.
682 (-smacro-table): New global.
683 (-smacro-lookup, -smacro-set!): New functions.
684 (-pmacro-make): New argument `syntactic-form?', all callers updated.
685 (-pmacro-syntactic-form?): New function.
686 (-pmacro-expected-number, -pmacro-verify-number): New functions.
687 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
688 (-pmacro-expected-non-negative-integer): New function.
689 (-pmacro-verify-non-negative-integer): New function.
690 (-pmacro-expand-expr-list): New function.
691 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
692 (-pmacro-process-args): Renamed from -pmacro-invoke.
693 (-pmacro-apply, -smacro-apply): New functions.
694 (-pmacro-expand): Rewrite syntactic form processing.
695 (-pmacro-build-lambda): Reformat.
696 (define-pmacro): Watch for more errors in definition.
697 (pmacro-debug): New function.
698 (pmacro-trace): Set/reset -pmacro-debug?.
699 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
700 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
701 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
702 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
703 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
704 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
705 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
706 (pmacros-init!): Initialize -smacro-table.
707 Rewrite pmacro initialization.
708 * read.scm (reader-process-expanded): Renamed from
709 -reader-process-expanded. All callers updated.
710 Recognize () as a no-op.
711 (cpu-load): Tweak logging messages.
712 * utils.scm (message): Add comment.
713 * cpu/play.cpu: Add some instructions to play with .let.
714 * doc/cgenint.texi: Move some debugging related docs to here from
716 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
717 * testsuite/Makefile.am: New file.
718 * testsuite/Makefile.in: New file.
719 * testsuite/test-utils.sh.in: New file.
720 * testsuite/run-tests.sh: New file.
721 * testsuite/testsuite.cpu: New file.
722 * testsuite/pmacros-1.test: New file.
724 * decode.scm: Comment and formatting tweaks.
725 (-build-decode-table-guts): Add more data to logging message.
727 2009-07-12 Doug Evans <dje@sebabeach.org>
729 Delete files that now live in ../cpu.
730 * cpu/iq10.cpu: Delete.
731 * cpu/iq2000.cpu: Delete.
732 * cpu/iq2000.opc: Delete.
733 * cpu/iq2000m.cpu: Delete.
734 * cpu/m32r.cpu: Delete.
735 * cpu/m32r.opc: Delete.
737 2009-07-09 Doug Evans <dje@sebabeach.org>
739 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
740 All callers updated. Work around -ve shifts by referencing the
743 * utils.scm (message): Handle pairs.
745 2009-07-08 DJ Delorie <dj@redhat.com>
747 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
748 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
749 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
752 2009-07-07 Doug Evans <dje@sebabeach.org>
754 * cpu/play.cpu (add): Use (ifield enum) for one format element.
755 * cpu/play.opc: New file.
757 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
758 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
759 * doc/rtl.texi (Instructions): Update.
761 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
762 (opc-arguments, -OPC): Call set-opc-file-path!.
763 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
764 (set-opc-file-path!): New function.
765 * dev.scm: Mention set-opc-file-path!. Mention doc options.
767 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
768 before passing to gen-c-args.
770 2009-07-06 DJ Delorie <dj@redhat.com>
772 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
773 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
774 unspecified accesses to control registers.
776 2009-07-01 DJ Delorie <dj@redhat.com>
778 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
779 unspecified accesses to control registers.
781 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
782 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
784 2009-06-27 Doug Evans <dje@sebabeach.org>
786 * gen-all-intrinsics: New file.
788 2009-06-24 Doug Evans <dje@sebabeach.org>
790 * All *.scm files: Update copyright year.
791 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
793 2009-06-23 DJ Delorie <dj@redhat.com>
795 * intrinsics.scm: Updates to support IVC2.
796 (belongs-to-group?): Check IVC2 slots.
797 (-slots-attribute): New.
798 (targets::attributes): Add SLOTS.
799 (target:add-well-known-intrinsics): Add CPMOV.
800 (md-insn): Add CPTYPE and CRET?.
801 (add-md-insn): Likewise.
802 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
803 duplicate insns with different bit patterns.
804 (write-cgen-insn?): Add cret? support.
805 (intrinsics.h): Add vector types.
806 (runtime-op): Add vector support.
807 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
809 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
810 * cpu/mep-ivc2.cpu: Update all insns to include type information.
811 (h-cr-ivc2): Default to typeless.
812 (h-ccr-ivc2): Fix register width.
813 (SLOTS): Fix values and default.
814 (ivc2_*): Add control register names.
815 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
817 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
818 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
820 2009-06-22 Doug Evans <dje@sebabeach.org>
822 * semantics.scm (insn-build-known-values): Fix typo in comment.
824 2009-06-21 Doug Evans <dje@sebabeach.org>
826 * rtl-xform.scm (rtx-simplify-insn): New function.
827 * html.scm (gen-insn-docs): Call it.
828 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
829 * iformat.scm (ifmt-analyze): Minor simplification.
831 * semantics.scm (semantic-compile): Change arg sem-code-list to
833 (semantic-attrs): Ditto.
834 * iformat.scm (ifmt-analyze): Update.
835 (ifmt-compute!): Update.
836 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
838 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
839 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
840 * semantics.scm (rtx-simplify): Ditto.
841 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
842 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
843 (-simplify-expr-fn): Move to rtl-xform.scm.
844 (-solve-expr-fn, rtx-solve): Ditto.
845 * rtl-xform.c: New file.
848 * rtl-c.scm (delay): Add FIXME, tweak formatting.
849 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
850 (-rtx-traverse, rtx-traverse): Ditto.
852 2009-06-20 Doug Evans <dje@sebabeach.org>
854 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
856 * configure.in: Update version to 1.1.
857 * configure: Regenerate.
858 * read.scm (-CGEN-VERSION): Update to 1.1.0.
860 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
861 Doug Evans <dje@sebabeach.org>
863 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
864 (cgen-desc.c): Ditto.
865 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
866 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
867 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
868 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
869 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
870 (cgen-cpuall.h, cgen-ops.c): Ditto.
871 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
872 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
873 (cgen-sem-switch.c): Ditto.
874 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
875 * sim-model.c (cgen-model.c): Ditto.
877 2009-06-18 Doug Evans <dje@sebabeach.org>
879 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
881 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
883 * dev.scm (cload): Change #:arch argument to take the path to the
884 .cpu file instead of just the name of the architecture.
885 * read.scm (arch-path): Remove trailing '/'.
886 (cpu-load): Set `arch-path' to directory of .cpu file.
887 (-cgen): Don't set `arch-path' here.
889 * doc/porting.texi: Update.
891 2009-06-14 Doug Evans <dje@sebabeach.org>
893 * gen-all-doc: Use files in ../cpu where possible.
895 * Makefile.am (ARCHFILE): Fix path.
896 * Makefile.in: Regenerate.
897 * html.scm: Use "pre" instead of "plaintext".
899 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
900 * doc/app.texi: Cleanup pass.
901 * doc/cgen.texi: Cleanup pass.
902 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
903 * doc/intro.texi: Cleanup pass.
904 * doc/mdate-sh: New file.
905 * doc/opcodes.texi: Cleanup pass.
906 * doc/pmacros.texi: Cleanup pass.
907 * doc/porting.texi: Cleanup pass.
908 * doc/rtl.texi: Cleanup pass.
909 * doc/running.texi: Cleanup pass. Document more runtime options.
910 * doc/stamp-vti: Update.
911 * doc/version.texi: Update.
913 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
914 (GUILE): Fix definition.
915 * Makefile.in: Regenerate with automake 1.9.6.
916 * aclocal.m4: Regenerate with aclocal 1.9.6.
917 * configure.in (AC_PREREQ): Set to 2.59.
918 (GENINSRC_NEVER): Define.
919 * configure: Regenerate with autoconf 2.59.
920 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
921 (cgen.info,cgen.dvi): Delete.
922 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
923 (noinst_TEXINFOS): Add cgenint.texi.
924 (DOCFILES): Add missing files.
925 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
926 * doc/Makefile.in: Regenerate with automake 1.9.6.
928 * guile.scm: Add "." to %load-path if >= guile version 1.8.
930 * attr.scm: Removing trailing whitespace.
931 * cgen-intrinsics.scm: Ditto.
932 * cgen-sim.scm: Ditto.
938 2009-05-28 DJ Delorie <dj@redhat.com>
940 * cpu/mep.opc (parse_signed16_range): New.
941 (parse_unsigned16_range): New.
942 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
944 2009-05-26 DJ Delorie <dj@redhat.com>
946 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
948 (f-ivc2-ccrn-c3hi): New.
949 (f-ivc2-ccrn-c3lo): New.
950 (f-ivc2-ccrn-c3): New.
951 (ivc2c3ccrn): Use it.
953 2009-05-22 DJ Delorie <dj@redhat.com>
955 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
956 (mep_config_map): Regenerate.
958 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
961 (cmovc): move to after field definitions, use ivc2-specific
963 (cpmovi_b_P0S_P1): New.
965 2009-05-19 DJ Delorie <dj@redhat.com>
967 * cpu/mep.opc: Regenerate configuration.
968 (parse_cdisp10): Only check CPU flags, not COP flags.
969 (check_configured_mach): Likewise.
971 2009-05-13 DJ Delorie <dj@redhat.com>
973 * intrinsics.scm (insns.md): Add RTL predicates.
974 (intrinsics.h): Remove old C intrinsics.
976 2009-04-29 DJ Delorie <dj@redhat.com>
979 * mep-core.cpu: Regenerated. Add support for deferred register
981 (SLOT): Add IVC2 slot types.
982 (sim-syscall): Rename to something more appropriate.
983 * mep-ext-cop.cpu: Regenerate.
984 * mep.opc: Regenerate. Add "coprocessor supported" define area.
985 (print_slot_insn): New.
986 (mep_examine_ivc2_insns): New.
987 (mep_print_insn_set_ivc2_mode): New.
988 (mep_print_insn): Support IVC2 slotting.
990 2009-04-20 DJ Delorie <dj@redhat.com>
992 * intrinsics.scm (intrinsics-analyze!): Include aliases.
993 (guess-mode): Drop COP* syntax.
994 (need-insn): Add "--syscall--" to the list.
995 (enum-type): Drop COP* syntax.
996 (intrinsics.h): Likewise.
997 (intrinsic-protos.h): Change file header to allow it to be
1000 2009-04-17 DJ Delorie <dj@redhat.com>
1002 * cpu/mep-c5.cpu (f-12s20): Change to signed.
1003 (lhucpm1): Limit to C5 mach.
1004 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
1005 * cpu/mep-core.cpu (extend-cdisp10): New.
1006 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
1008 2009-04-08 DJ Delorie <dj@redhat.com>
1010 * cpu/mep-c5.cpu: New.
1011 * cpu/mep-core.cpu: Add C5 support.
1012 * cpu/mep.opc: Likewise.
1014 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
1016 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1017 about calling memset with a zero length.
1019 2009-02-03 DJ Delorie <dj@redhat.com>
1021 * cpu/mep-core.cpu: Update to new MeP configuration.
1022 * cpu/mep-ext-cop.cpu: Likewise.
1023 * cpu/mep.opc: Likewise.
1025 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1027 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1029 2008-06-17 Dave Brolley <brolley@redhat.com>
1031 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1034 2007-11-13 Dave Brolley <brolley@redhat.com>
1036 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1038 2007-11-05 Dave Brolley <brolley@redhat.com>
1040 * intrinsics.scm,cgen-intrinsics.scm: New application which
1041 generates code to support intrinsic functions for insns in the
1042 mep architecture in gcc.
1044 2007-09-21 Dave Brolley <brolley@redhat.com>
1046 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1047 (rn3us): CDATA attribute now LONG.
1049 2007-08-21 Dave Brolley <brolley@redhat.com>
1051 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1054 2007-07-05 Nick Clifton <nickc@redhat.com>
1056 * utils.scm (copyright-fsf): Update copyright notice to refer to
1059 2007-05-22 Nick Clifton <nickc@redhat.com>
1061 * doc/cgen.texi: Use @copying around the copyright notice.
1062 * doc/internals.texi: Likewise.
1064 2007-02-05 Dave Brolley <brolley@redhat.com>
1066 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1068 2007-02-05 Dave Brolley <brolley@redhat.com>
1070 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1071 in the generated code for @arch@_cgen_init_asm if it is defined.
1073 * Contribute the following changes:
1074 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1076 * attr.scm (<string-attribute>): New attribute class.
1077 (attr-kind): Handle <string-attribute>.
1078 (parse-simple-attribute): New function.
1079 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1080 (<bitset-attribute> 'parse-value): Likewise.
1081 (<boolean-attribute> 'parse-value): Likewise.
1082 (<enum-attribute> 'parse-value): Likewise.
1083 (<string-attribute> 'parse-value): New function.
1084 (-attr-parse): Handle <string-attribute>.
1085 (-attr-read): Likewise.
1086 (<string-attribute> 'gen-value-for-defn-raw): New function.
1087 (<string-attribute> 'gen-value-for-defn): New function.
1089 2006-11-07 Dave Brolley <brolley@redhat.com>
1091 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1094 2006-10-18 Dave Brolley <brolley@redhat.com>
1096 * Contribute the following changes:
1098 2006-07-11 Dave Brolley <brolley@redhat.com>
1100 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1102 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1103 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1104 hardware or memory mode which was used.
1105 * sid-cpu.scm (hw-need-write-stack?): New function.
1106 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1107 identify hardware which uses write stacks.
1108 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1109 Initialized to an empty list.
1110 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1111 hw-need-write-stack?.
1112 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1113 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1114 (used-in-delay-rtl?): New method of <hardware-base>.
1115 (hw-used-in-delay-rtl?): New function.
1117 2006-06-20 Dave Brolley <brolley@redhat.com>
1119 * sid.scm (gen-attr-type): Removed.
1120 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1121 (SH2a-MACH): Add sh5.
1122 (sh2a-nofpu-models): Add units for sh5.
1123 (sh2a-fpu-models): Likewise.
1125 2006-06-15 Dave Brolley <brolley@redhat.com>
1127 * cpu/sh-sim.cpu: New file.
1128 * cpu/sh-sid.cpu: New file.
1129 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1130 (All fields): Remap for (insn-lsb0? #f)
1131 (All insns): Add timing specs.
1132 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1133 'xattrs' and .splice it in.
1134 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1135 (h-frc,h-drc): Add PROFILE attribute.
1137 (h-vbr): New hardware.
1138 (All fields): Remap for (insn-lsb0? #f)
1139 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1140 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1141 (fpscr): Use h-fpscr.
1142 (fsdm,fsdn): Use h-fsd.
1143 (dshci): Add xtiming argument and splice it in.
1144 (dr,xd): pmacros removed.
1145 (All insns): Add timing specs, *-MACH attribibutes,
1146 SH4{A}-GROUP attributes.
1147 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1148 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1149 we're being processed for sim or sid.
1150 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1151 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1152 (define-isa compact): Add (isa-parallel-insns 2).
1153 (define-isa media): Add (isa-parallel-insns 2). Add
1154 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1155 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1157 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1158 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1159 (SH4al-MACH, SH5-MACH): New pmacros.
1160 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1161 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1162 (sh5-media-fp-units, common-model, common-model-with-fp)
1163 (sh3-model, sh3e-model): New pmacros.
1164 (define-model sh2): New model.
1165 (define-model sh2e): New model.
1166 (define-model sh3): New model.
1167 (define-model sh3e): New model.
1168 (define-model sh2a-nofpu): New model.
1169 (define-model sh2a-fpu): New model.
1170 (define-model sh4-nofpu): New model.
1171 (define-model sh4): New model.
1172 (define-model sh4a-nofpu): New model.
1173 (define-model sh4a): New model.
1174 (define-model sh4al): New model.
1175 (define-model sh5-media): New model.
1176 (define-model sh5): Add all units.
1177 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1178 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1179 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1180 (h-pc): Add PROFILE attribute.
1183 (h-gr,h-grc): Likewise.
1184 (h-cr): Set h-sr in setter.
1185 (h-frbit): Get/Set h-fpscr.
1186 (h-szbit,h-prbit): Likewise.
1187 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1188 Add getter and setter.
1189 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1190 Adjust getter and setter.
1191 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1192 Adjust getter and setter.
1193 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1194 (h-fsd,h-fmov): New hardware.
1196 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1198 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1199 doc/notes.texi, doc/porting.texi, doc/running.texi,
1200 doc/sim.texi: Fix some typos.
1202 2006-07-14 Dave Brolley <brolley@redhat.com>
1204 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1205 hardware or memory mode which was used.
1206 * sid-cpu.scm (hw-need-write-stack?): New function.
1207 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1208 identify hardware which uses write stacks.
1209 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1210 Initialized to an empty list.
1211 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1212 hw-need-write-stack?.
1213 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1214 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1215 (used-in-delay-rtl?): New method of <hardware-base>.
1216 (hw-used-in-delay-rtl?): New function.
1218 2006-06-20 Dave Brolley <brolley@redhat.com>
1220 * sid.scm (gen-attr-type): Removed.
1222 2006-05-10 Dave Brolley <brolley@redhat.com>
1224 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1225 support for (if (application-is? <appname>) (...) (...)).
1226 (-cgen): Add trailing "/" to arch-path.
1227 * utils.scm (dirname): Removed. dirname is a primitive function.
1229 2006-05-09 Dave Brolley <brolley@redhat.com>
1231 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1232 'entire_insn' not 'base_insn'.
1233 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1235 * sim.scm (-gen-arch-model-decls): Likewise.
1236 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1237 abuf->written if profiling.
1238 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1239 object->string om the mode.
1240 (-hw-gen-write-stack-decl): Likewise.
1241 * read.scm (include): Use arch-path as file location.
1242 (arch-path): Define it with a default setting.
1243 (-cgen): Update arch-path when "-a" option is specified.
1244 * utils.scm (dirname): New function.
1246 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1248 * configure.in: Remove AC_ARG_PROGRAM.
1249 * configure: Regenerate with autoconf 2.59.
1251 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1253 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1256 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1258 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1259 or an error message otherwise.
1260 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1261 Fix up comments to correctly describe the functions.
1263 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1264 Anil Paranjape <anilp1@kpitcummins.com>
1265 Shilin Shakti <shilins@kpitcummins.com>
1267 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1269 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1271 2006-02-10 Nick Clifton <nickc@redhat.com>
1273 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1275 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1277 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1279 (-hw-gen-write-stack-decl): Likewise.
1281 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1283 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1284 non-(adata-integral-insn? CURRENT-ARCH) case.
1286 2005-10-28 Dave Brolley <brolley@redhat.com>
1288 Contribute the following changes:
1289 2005-09-19 Dave Brolley <brolley@redhat.com>
1291 * attr.scm (gen-value-for-defn-raw): New methods.
1292 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1293 gen-value-for-defn-raw.
1294 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1296 2002-12-13 Dave Brolley <brolley@redhat.com>
1298 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1299 (-gen-attr-accessors): New function.
1300 (gen-obj-attr-defn): Update terminating initializer.
1301 (gen-obj-attr-end-defn): New function.
1302 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1303 * sid-cpu.scm (cgen-desc.h): Generate code to include
1304 "opcode/cgen-bitset.h"
1305 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1307 * desc.scm ('gen-defn): Update terminating initializer.
1308 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1309 terminatinig initializer.
1310 (gen-hw-decls): Ditto.
1311 (gen-operand-decls): Ditto.
1312 (gen-insn-decls): Ditto.
1313 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1314 (gen-insn-table): Update terminating initializer.
1315 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1316 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1317 * attr.scm (charmask-bytes): New function.
1318 (bitset-attr->charmask): New function.
1319 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1320 differences for SID-SIMULATOR.
1321 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1322 (<enum-attribute>): Ditto.
1324 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1326 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1328 2005-10-24 DJ Delorie <dj@redhat.com>
1330 * operand.scm (-anyof-merge-syntax): Print a more useful error
1333 2005-10-19 Nick Clifton <nickc@redhat.com>
1335 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1338 2005-10-18 Andreas Schwab <schwab@suse.de>
1340 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1342 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1344 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1347 2005-08-02 Dave Brolley <brolley@redhat.com>
1349 * rtl-c.scm (s-unop): Don't dereference
1350 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1351 (s-binop, s-convop, s-cmpop): Likewise.
1353 2005-07-29 Dave Brolley <brolley@redhat.com>
1355 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1356 if with-profile or with-parallel-write.
1357 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1358 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1361 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1363 * cpu/fr30.opc (print_register_list): Correct format strings.
1364 * cpu/ip2k.opc: Likewise.
1366 2005-07-05 Nick Clifton <nickc@redhat.com>
1368 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1369 unsigned in order to avoid compile time warnings about sign
1372 2005-07-01 Nick Clifton <nickc@redhat.com>
1374 * desc-cpu.scm: Update to ISO C90 function declaration style.
1375 * opc-asmdis.scm: Likewise.
1376 * opc-ibld.scm: Likewise.
1377 * opc-itab.scm: Likewise.
1378 * cpu/fr30.opc: Likewise.
1379 * cpu/i960.opc: Likewise.
1380 * cpu/ip2k.opc: Likewise.
1381 * cpu/iq2000.opc: Likewise.
1382 * cpu/m32r.opc: Likewise.
1383 * cpu/openrisc.opc: Likewise.
1384 * cpu/sh.opc: Likewise.
1385 * cpu/sparc.opc: Likewise.
1386 * cpu/xstormy16.opc: Likewise.
1388 2005-06-15 Dave Brolley <brolley@redhat.com>
1390 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1391 (cgen-cpu.h): Call it.
1393 Contributed on behalf of Graydon Hoare
1394 2001-06-05 graydon hoare <graydon@redhat.com>
1396 * utils.scm (foldl): Define.
1400 (intersection): Simplify.
1401 * sid.scm : Set APPLICATION to SID-SIMULATOR.
1402 (-op-gen-delayed-set-maybe-trace): Define.
1403 (<operand> 'gen-set-{quiet,trace}): Delegate to
1404 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1405 up and needs cleaning.
1406 (-with-parallel?): Hardwire with-parallel to #t.
1407 (<operand> 'cxmake-get): Replace with lookahead-aware code
1408 * sid-decode.scm: Remove per-insn writeback fns.
1409 (-gen-idesc-decls): Redefine sem_fn type.
1410 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1411 with write stack stuff.
1412 (cgen-write.cxx): Replace per-insn writebacks with single write
1413 stack writeback. Add write stack reset function.
1414 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1416 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1417 estate attribute set.
1418 (delay): Set #:delayed attribute to calculated delay, update
1419 maximum delay of cpu, check (delay ...) usage.
1420 * operand.scm (<operand>): Add delayed slot to <operand>.
1421 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1422 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1423 * doc/rtl.texi (Expressions): Add section on (delay ...).
1425 2005-06-13 Jim Blandy <jimb@redhat.com>
1427 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1430 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1432 * doc/porting.texi: Change all mention of md_apply_fix3 and
1433 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1436 2005-05-18 Dave Brolley <brolley@redhat.com>
1438 * utils-sim.scm (-gen-decode-default-entry): New function.
1439 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1440 code to check that all opcodes bits match.
1441 (-gen-decoder-switch): Use -gen-decode-default-entry.
1443 2005-05-16 Jim Blandy <jimb@redhat.com>
1445 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1446 fetched by one of our GETIMEM* methods.
1447 * utils-gen.scm (-extract-chunk-specs): Always fetch full
1448 base-insn-sized chunks.
1450 2005-05-10 Nick Clifton <nickc@redhat.com>
1452 * Update the address and phone number of the FSF organization in
1453 the GPL notices in the following files:
1454 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1455 cpu/powerpc.cpu, slib/random.scm
1457 2005-05-06 Jim Blandy <jimb@redhat.com>
1459 * pprint.scm, cos-pprint.scm: Add documentation.
1461 * pprint.scm (pprint): Don't wipe out elide-table after each call.
1463 * pprint.scm, cos-pprint.scm: New files.
1465 2005-04-04 Nick Clifton <nickc@redhat.com>
1467 * opcodes.scm (-gen-parse-address): Initialise value to zero to
1468 avoid a compile time warning.
1470 2005-03-18 Nick Clifton <nickc@redhat.com>
1472 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1473 "percent-operand" from "%operand" as the latter confuses xgettext
1474 into thinking that it is a C printf formating directive, which
1475 prevents proper translation.
1477 2005-02-23 Nick Clifton <nickc@redhat.com>
1479 * opcodes.scm (gen-parse-number): Add a cast to the desired
1480 pointer signed'ness in order to prevent compile time warnings.
1481 * cpu/ip2k.opc: Fixed compile time warnings about differing
1482 signed'ness of pointers passed to functions.
1483 * cpu/iq2000.opc: Likewise.
1484 * cpu/m32r.opc: Likewise.
1485 * cpu/openrisc.opc: Likewise.
1486 * cpu/xstormy16.opc: Likewise.
1488 2005-02-22 Alan Modra <amodra@bigpond.net.au>
1490 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1491 (cgen-desc.h): ..to here, after opcode/cgen.h include.
1493 2005-02-16 Dave Brolley <brolley@redhat.com>
1495 * utils.scm: Update copyright years.
1496 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1497 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1498 * operand.scm (-derived-operand-parse): Move logit message from level 1
1501 2005-02-15 Nick Clifton <nickc@redhat.com>
1503 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1504 prevent compile time warning messages.
1505 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1506 * utils-gen.scm (attr-int-gen-defn): Likewise.
1507 (attr-gen-defn): Likewise.
1508 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1509 (print_dollarhex16): Remove unused function.
1511 2005-02-15 Jim Blandy <jimb@redhat.com>
1513 * guile.scm (cgen-call-with-debugging): Doc fix.
1515 Make backtraces work more reliably.
1516 * guile.scm: Set up debugging parameters, and enable debugging and
1517 source positions while loading.
1518 (cgen-call-with-debugging, cgen-debugging-stack-start): New
1520 * read.scm: Don't set debugging parameters here.
1521 (catch-with-backtrace): Function deleted.
1522 (-cgen): Simply note the presence or absence of the -b option.
1523 Pass the flag to cgen-call-with-debugging, so debugging is turned
1524 off here if the user didn't request it, for faster computation.
1525 (cgen): Call cgen-debugging-stack-start here, instead of
1526 catch-with-backtrace.
1528 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1530 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1531 Don't write out the trailing -s here.
1532 * Makefile.in: Regenerated.
1533 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1534 fixup.scm here; let the caller decide which Scheme's customization
1536 * dev.scm: Load guile.scm, not fixup.scm.
1537 * fixup.scm: Deleted; contents have all moved to guile.scm.
1540 * guile.scm (debug-write): New function.
1542 2005-02-14 Jim Blandy <jimb@redhat.com>
1544 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1545 transformer procedure, not eval. Transformer procedures take one
1548 2005-02-11 Nick Clifton <nickc@redhat.com>
1550 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1551 to 'bfd_vma *' in order avoid compile time warning message.
1553 2005-02-09 Jim Blandy <jimb@redhat.com>
1555 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
1556 corresponding change in the sim/common directory.)
1558 2005-02-07 Jim Blandy <jimb@redhat.com>
1560 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
1561 changes in the opcodes directory.)
1563 * guile.scm: New file, containing Guile-specific definitions and
1564 adaptations. This is loaded by the app-specific shell scripts.
1565 Initially identical to fixup.scm.
1566 * cgen-sid.scm: Don't load fixup.scm here.
1568 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1571 2005-01-27 Jim Blandy <jimb@redhat.com>
1573 * utils.scm (string/symbol->append): Renamed from 'concat'.
1574 * opcodes.scm (gen-switch): Use new name.
1575 * insn.scm (-sub-insn-make!): Same.
1576 * rtl.scm (rtx-dump): Same.
1577 * semantics.scm (semantic-compile): Same.
1579 2005-01-20 Jim Blandy <jimb@redhat.com>
1581 * opcodes.scm (gen-switch): Use concat instead of string-map.
1583 * utils.scm (concat): New function.
1584 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1585 * rtl.scm (rtx-dump): Same.
1586 * semantics.scm (semantic-compile): Same.
1588 2004-12-16 Jim Blandy <jimb@redhat.com>
1590 * utils-cgen.scm (parse-name): Don't assume that string-map can be
1591 applied to symbols. Process everything as strings, and then
1592 convert to a symbol at the end.
1594 * read.scm (debug-repl): Temporarily redirect input and output to
1595 /dev/tty while we debug, so we don't interfere with whatever CGEN
1596 is reading or writing.
1597 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1600 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
1602 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1603 will work with newer versions of guile.
1605 2004-10-27 Nick Clifton <nickc@redhat.com>
1607 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1608 * cpu/iq2000.cpu: Likewise.
1610 2004-07-21 DJ Delorie <dj@redhat.com>
1612 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1614 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
1616 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1617 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1619 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1621 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1623 2004-03-22 Dave Brolley <brolley@redhat.com>
1625 * utils.scm (copyright-fsf): Update copyright years.
1626 (copyright-red-hat): Ditto.
1627 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1629 (-op-gen-set-trace-parallel): Ditto.
1631 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
1633 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1634 disassembling codes for 0x*2 addresses.
1636 2004-01-29 Dave Brolley <brolley@redhat.com>
1638 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1639 zeroes in the extra bit positions and generate 'opcode-mask' with ones
1640 in the extra bit positions.
1642 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1644 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1646 2003-12-04 Alan Modra <amodra@bigpond.net.au>
1648 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1649 "short" being 16 bit.
1650 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
1651 internationalize error message.
1652 (parse_lo16): Likewise. Remove useless code.
1654 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1656 * cpu/m32r.cpu : Add new model m32r2.
1657 Add new instructions.
1658 Replace occurrances of 'Mitsubishi' with 'Renesas'.
1659 Changed PIPE attr of push from O to OS.
1660 Care for Little-endian of M32R.
1661 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1662 Care for Little-endian of M32R.
1663 (parse_slo16): signed extension for value.
1665 2003-10-26 Dave Brolley <brolley@redhat.com>
1667 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1668 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1669 (-gen-extract-fn): Call -gen-record-profile-args.
1671 2003-10-21 Dave Brolley <brolley@redhat.com>
1673 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1675 * decode.scm (-opcode-slots): Correct typo in logit call.
1677 2003-10-09 Jim Blandy <jimb@redhat.com>
1679 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1680 for @arch@_cgen_hw_table. GDB needs to be able to find this.
1682 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1684 2003-10-06 Dave Brolley <brolley@redhat.com>
1686 * gen-all-doc: Add fr550.
1688 2003-09-11 Doug Evans <dje@sebabeach.org>
1690 * Makefile.am (ARCHFILE): New var.
1691 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1692 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1693 * Makefile.in: Regenerate.
1695 2003-09-08 Dave Brolley <brolley@redhat.com>
1697 On behalf of Doug Evans <dje@sebabeach.org>
1698 Pass in paths to input files, instead of assuming they live in
1699 $srcdir/cpu. Plus misc. option processing cleanup.
1700 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1701 Add pre-process pass to all options.
1702 * cgen-gas.scm (gas-arguments): Ditto.
1703 * cgen-sid.scm (sim-arguments): Ditto.
1704 * cgen-sim.scm (sim-arguments): Ditto.
1705 * cgen-stest.scm (stest-arguments): Ditto.
1706 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
1707 (-opc-file-path): New global.
1708 (opc-file-path): New fn.
1709 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1710 All callers updated.
1711 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1712 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1713 Replace srcdir arg with opc-file. All callers updated.
1714 * read.scm (-opt-spec-update): Delete.
1715 (opt-get-first-pass,opt-get-second-pass): New fns.
1716 (-cgen): Process application-specific arguments in two passes.
1718 2003-08-29 Dave Brolley <brolley@redhat.com>
1720 * cpu/frv.cpu: Removed.
1721 * cpu/frv.opc: Removed.
1723 2003-08-21 Nick Clifton <nickc@redhat.com>
1725 * cpu/frv.cpu (mbtoh): Replace input parameter to
1726 u-media-dual-expand and u-media-dual-btoh with output parameter.
1727 (cmbtoh): Add profiling hack.
1729 2003-08-19 Michael Snyder <msnyder@redhat.com>
1731 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1733 2003-08-07 Michael Meissner <gnu@the-meissners.org>
1735 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1736 the elements for the END record of CGEN_OPINST, silencing warnings.
1738 2003-07-15 Doug Evans <dje@sebabeach.org>
1740 Add guile 1.6.4 support.
1741 - empty list must be quoted
1742 - string functions have stricter type checking
1743 - eval now takes a second argument
1744 - symbol-bound? is deprecated
1745 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1746 (bitset-attr->list): Ensure arg to string-cut is a string.
1747 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1748 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1749 * cos.scm (-class-list): Must quote empty list.
1750 (-class-parent-classes,-class-compute-class-desc): Ditto.
1751 (class-make,make,object-reset!): Ditto.
1752 (method-make-make!): Call eval1 instead of eval.
1753 (method-make-forward!,method-make-virtual-forward!): Ditto.
1754 * decode.scm (subdtable-add): Use stringsym-append instead of
1756 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1757 (-build-decode-table-entry): Fetch string name of insn.
1758 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1759 (-gen-mach-table-defns): Ditto for mach.
1760 (gen-ifld-defns): Ditto for ifld.
1761 (gen-hw-table-defns): Ditto for hw.
1762 (gen-operand-table): Ditto for op.
1763 (gen-insn-table-entry): Ditto for insn.
1764 * desc.scm (gen-attr-table-defn): Ditto for attr.
1765 (<keyword>,gen-defn): Don't pass symbols to string-append.
1766 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1768 (enum-vals-upcase): Use symbol-upcase to build result.
1769 (-enum-parse): Use stringsym-append to build errtxt.
1770 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1771 (eval1): New function.
1772 (symbol-bound?): Provide own version if >= guile 1.6.
1773 * hardware.scm (define-keyword): Use string-append instead of
1775 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
1776 cgen.html,cgen-insn.html): Convert current-arch-name to a string
1778 (gen-list-entry): Handle either symbol or string `name' arg.
1779 (gen-obj-doc-header): Fetch string name of `o' arg.
1780 (define-cpu-intro): Ditto for cpu.
1781 (gen-mach-intro): Ditto for mach.
1782 (gen-model-intro): Ditto for model.
1783 (gen-isa-intro): Ditto for isa.
1784 (gen-machine-doc-1): Ditto for isa.
1785 (gen-reg-doc-1): Convert mach to string first.
1786 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
1787 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
1789 (gen-insn-categories): Fetch string name of mach. Convert
1790 enum-val-name to string first.
1791 (gen-insn-docs): Fetch string name of mach.
1792 * ifield.scm (ifld-ilk): Result is a string.
1793 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
1794 Fetch string name of ifld.
1795 (-sfmt-search-key): Similarily for ifld and op.
1796 * insn.scm (syntax-make): Fetch string name of syntax element.
1797 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
1798 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
1799 * mode.scm (mode:c-type): Result is a string.
1800 (mode:enum): Fetch string name of mode.
1801 (-mode-parse): Use stringsym-append to build errtxt.
1802 * model.scm (model:enum): Fetch string name of model.
1803 (-model-parse): Use stringsym-append to build errtxt.
1804 (parse-insn-timing): Must quote empty list.
1805 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
1806 (-gen-minsn-opcode-entry): Ditto.
1807 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
1809 (read-cpu.opc): Convert current-arch-name to a string before using.
1810 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
1811 (<derived-operand>): Must quote empty list.
1812 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
1813 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
1815 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
1816 (-pmacro-sym): Must convert symbols to strings before passing to
1818 (-pmacro-str): Ditto.
1819 (pmacros-init!): Use eval1 instead of eval.
1820 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
1821 (keep-isa-atlist?): Ditto.
1822 (cmd-if): Use eval1 instead of eval.
1823 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
1824 (-rtl-c-get): Fetch string name of src.
1825 (s-unop): Ditto for mode.
1826 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
1827 (-gen-par-temp-defns,subword): Ditto.
1828 (join): Use stringsym-append instead of string-append.
1829 * rtl-traverse.scm (rtx-option?): Convert option to string first.
1830 (rtx-traverse-debug): Fetch string name of rtx-obj.
1831 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
1832 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1833 (rtx-pretty-name): Result is a string.
1834 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
1835 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
1836 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
1838 (-gen-sfrag-case): Fetch string name of user.
1839 * sid-model.scm (unit:enum): Fetch string name of unit.
1840 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
1841 (<hw-memory>,gen-set-quiet): Ditto.
1842 (gen-mode-defs): Ditto.
1843 (sim-finish!): Convert current-arch-name to a string before using.
1844 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
1845 (-gen-no-scache-semantic-fn): Ditto.
1846 (cgen-defs.h): Fetch string name of isa.
1847 (cgen-read.c): Convert current-arch-name to a string before using.
1848 (cgen-write.c): Ditto.
1849 * sim-model.scm (unit:enum): Fetch string name of unit.
1850 (gen-model-fn-decls): Use stringsym-append instead of string-append.
1851 (-gen-model-timing-table): Fetch string name of model.
1852 (-gen-mach-model-table): Ditto.
1853 (-gen-mach-defns): Fetch string name of mach.
1854 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
1855 (<hw-memory>,cxmake-get): Fetch string name of mode.
1856 (<hw-memory>,gen-set-quiet): Ditto.
1857 (gen-mode-defs): Ditto.
1858 (sim-finish!): Must quote empty list.
1859 * utils-cgen.scm (<ident>): Must quote empty list.
1860 (obj:str-name): New fn.
1861 (parse-comment): Result is a string.
1862 (parse-symbol): Result is a symbol.
1863 (parse-string): Result is a string.
1864 (keyword-list?): Convert arg to string before calling string-ref.
1865 (keyword-list->arg-list): Ditto.
1866 (gen-attr-name): Convert attr-name to string first.
1867 (alpha-sort-obj-list): Use symbol<? instead of string<?.
1868 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
1869 (gen-define-ifmt-ifields): Ditto for fld.
1870 * utils.scm (gen-c-symbol): Ensure str is a string before calling
1872 (gen-file-name): Ditto.
1873 (symbol-downcase,symbol-upcase,symbol<?): New fns.
1874 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
1875 (reduce): Call eval1 instead of eval.
1876 * cpu/m32r.cpu (addi): Don't use `#.'.
1878 * gen-all-sim: Fix some typos.
1880 2003-07-08 Doug Evans <dje@sebabeach.org>
1882 * gen-all-doc: Ensure run from cgen src dir.
1883 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
1884 * gen-all-sid: Similarily, in ./tmp-sid.
1885 * gen-all-sim: Similarily, in ./tmp-sim.
1887 2003-06-20 Doug Evans <dje@sebabeach.org>
1889 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
1891 2003-06-19 Doug Evans <dje@sebabeach.org>
1893 * mach.scm (-ifld-already-defined?): New proc.
1894 (current-ifld-add!): Use it.
1895 (-op-already-defined?): New proc.
1896 (current-op-add!): Use it.
1897 (-insn-already-defined?): New proc.
1898 (current-insn-add!): Use it.
1899 (-minsn-already-defined?): New proc.
1900 (current-minsn-add!): Use it.
1901 (obj-isa-list): New proc.
1902 (isa-supports?): Use it.
1904 2003-06-10 Doug Evans <dje@sebabeach.org>
1906 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
1907 * cpu/m32r.cpu (all insns): Ditto.
1909 * mach.scm (current-*-add!): Disallow redefinition. Make result
1912 * gen-all-doc: Split arm and frv docs up a bit.
1914 * cpu/arm.cpu: Add IDOC attribute.
1915 * cpu/frv.cpu: Ditto.
1916 * cpu/i960.cpu: Ditto.
1917 * cpu/openrisc.cpu: Ditto.
1918 * cpu/xstormy16.cpu: Ditto.
1919 * cpu/m32r.cpu: Ditto.
1920 (all insns): Explicitly specify IDOC attribute.
1922 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
1923 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
1924 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
1925 * Makefile.in: Regenerate.
1926 * attr.scm (<integer-attribute>:parse-value-def): Implement.
1927 (-attr-read): Defer computing default value until we know the type.
1928 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
1929 (<attr-list>:attr-present?): New method.
1930 (atlist-attr-present?,obj-attr-present?): New fns.
1931 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
1932 (attr-builtin!): New insn attr IDOC.
1933 * cgen-doc.scm (doc-arguments): New args -I,-N.
1934 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
1935 Support comment as fourth element of enum value.
1936 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
1937 * html.scm (gen-html-header): New arg kind, all callers updated.
1938 (gen-table-of-contents): New arg insn-file, all callers updated.
1939 (gen-list-entry,gen-doc-header): New fn.
1940 (get-operands): Delete.
1941 (gen-iformat-table): Rewrite.
1942 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
1943 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
1944 (get-insn-properties,guess-insn-idoc-attr!): New fn.
1945 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
1946 (get-insns-for-category,gen-categories-insn-lists): New fns.
1947 (gen-insn-docs): Simplify each insn's semantics first.
1948 Print insn tables sorted by IDOC categories.
1949 (*insn-html-file-name*): New global.
1950 (cgen-insn.html): New fn.
1952 * insn.scm (<insn>): Create a setter for the `tmp' member.
1953 * semantics.scm (insn-build-known-values): Renamed from
1954 -build-known-values. All callers updated.
1956 * rtl.scm: Move traveral/evaluation support to ...
1957 * rtl-traverse.scm: New file.
1958 * read.scm: Maybe-load rtl-traverse.scm.
1960 * rtl.scm (-rtx-valid-types): Add SETRTX.
1962 * rtx-funcs.scm (nop,parallel): Fix mode.
1964 * utils.scm (eqv-lookup-index): New fn.
1965 (assq-lookup-index): Renamed from lookup-index. All callers updated.
1967 * dev.scm (load-doc): Set APPLICATION.
1969 2003-06-10 Dave Brolley <brolley@redhat.com>
1971 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
1972 * sid-decode.scm: Generate #include of config.h into
1973 @prefix@-decode.cxx.
1974 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
1976 2003-06-07 Doug Evans <dje@sebabeach.org>
1978 * gen-all-sid: New file.
1979 * gen-all-opcodes: New file.
1981 2003-06-05 Nick Clifton <nickc@redhat.com>
1983 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
1984 version of the FRinti operand.
1985 (FRintjeven): Likewise for FRintj.
1986 (FRintkeven): Likewise for FRintk.
1987 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
1988 media-quad-arith-sat-semantics, media-quad-arith-sat,
1989 conditional-media-quad-arith-sat, mdunpackh,
1990 media-quad-multiply-semantics, media-quad-multiply,
1991 conditional-media-quad-multiply, media-quad-complex-i,
1992 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
1993 conditional-media-quad-multiply-acc, munpackh,
1994 media-quad-multiply-cross-acc-semantics, mdpackh,
1995 media-quad-multiply-cross-acc, mbtoh-semantics,
1996 media-quad-cross-multiply-cross-acc-semantics,
1997 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
1998 media-quad-cross-multiply-acc-semantics, cmbtoh,
1999 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
2000 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
2001 cmhtob): Use new operands.
2002 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
2003 (parse_even_register): New function.
2005 2003-06-04 Doug Evans <dje@sebabeach.org>
2007 Better handling of 64 bit and mixed 32/64 bit architectures.
2008 * hardware.scm (hw-update-word-modes!): New fn.
2009 * mach.scm (define-cpu)): Call mode-set-word-modes!,
2010 hw-update-word-modes!.
2011 (state-word-bitsize): Replace FIXME with requested check.
2012 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
2013 * mode.scm (mode-find): Ignore INT,UINT.
2014 (-mode-word-sizes-kind): New global.
2015 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
2016 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2017 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2019 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2020 unusable, correct values set later.
2021 (mode-finish!): Remove cruft.
2022 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2023 * opcodes.scm (opcodes-init!): Ditto.
2024 * rtx-funcs.scm (annul): Fix mode of pc.
2025 * cpu/ia64.cpu: Remove cruft that sets word modes.
2026 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2028 2003-06-03 Nick Clifton <nickc@redhat.com>
2030 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2031 immediate value not unsigned.
2033 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2035 * cpu/sh.cpu: Amend comments to refer to SuperH.
2036 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2037 * cpu/sh64-media.cpu: Likewise.
2038 (Saturation): Update manual reference.
2040 2003-05-15 Doug Evans <dje@sebabeach.org>
2042 * Makefile.am (srcroot): New var.
2044 * Makefile.in: Regenerate.
2045 * cgen-doc.scm: New file.
2046 * html.scm: New file.
2047 * gen-all-doc: New file.
2048 * dev.scm (cload): Handle DOC application.
2050 * machs.scm (machs-for-cpu): New fn.
2051 * model.scm (models-for-cpu): New fn.
2052 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2054 (iota): Rewrite to be identical to pmacro version. All uses updated.
2055 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2057 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2058 (-gen-decode-bits): Instead put in better fix here.
2060 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2062 2003-05-01 DJ Delorie <dj@redhat.com>
2064 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2066 (set-alignfix-mem): Likewise.
2068 2003-04-16 Dave Brolley <brolley@redhat.com>
2070 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2071 * utils.scm (copyright-fsf): Update generate copyright years.
2072 (copyright-cygnus): Ditto.
2073 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2075 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2077 (<operand>'gen-profile-code): New parameter 'when'.
2078 (<iunit>'gen-profile-code): Ditto.
2079 (<insn>'gen-profile-code): Ditto.
2080 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2081 'insn_reference' for the 'after' function.
2082 * model.scm (unit:enum): Moved to sim-model.scm.
2083 * sim-model.scm (unit:enum): Moved from model.scm.
2084 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2085 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2086 * sid-model.scm (unit:enum): New version for sid.
2087 (gen-model-class-name): New function.
2088 (gen-model-unit-fn-decl): New function.
2089 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2090 (gen-model-unit-fn-name): New parameter 'when'.
2091 (-gen-model-insn-fn-name): Ditto.
2092 (-gen-model-insn-qualified-fn-name): New function.
2093 (-gen-model-insn-fn-decl): New function.
2094 (-gen-model-insn-fn-decls): New function.
2095 (-gen-model-insn-fn): New parameter 'when'. Call
2096 -gen-model-insn-qualified-fn-name.
2097 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2098 functions for modelling insn before and after execution.
2099 (-gen-model-class-decls): New function.
2100 (" (gen-model-class-name model) "): New function.
2101 (gen-model-classes): New function.
2102 (-gen-insn-timing): Generate functions for modelling insn before and after
2104 (-gen-insn-unit-timing): Generate class-qualified names.
2105 (-gen-model-timing-table): Ditto.
2106 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2107 not needed (yet) by sid.
2108 (cgen-model.h): New function.
2110 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2112 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2113 * cpu/sh64-compact.cpu: Likewise.
2114 * cpu/sh64-media.cpu: Likewise.
2116 2003-03-21 DJ Delorie <dj@redhat.com>
2118 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2119 which indicates if the sign flag is set from bit 15 or 7.
2121 (set-psw): New argument ws, propogate it.
2122 (set-psw-nowrite): Likewise.
2123 (set-mem-psw): Likewise.
2124 (set-psw-carry): Likewise. Use temporaries to prevent
2125 prematurely overwriting needed inputs.
2126 (set-psw-rrotate17): Fix logic.
2127 (shrgrgr): Preserve carry for zero-bit shifts.
2128 (shrgrimm): Likewise.
2129 (shlgrgr): Likewise.
2130 (shlgrimm): Likewise.
2131 (asrgrgr): Likewise.
2132 (asrgrimm): Likewise.
2135 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2137 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2139 2002-03-05 DJ Delorie <dj@redhat.com>
2141 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2142 prematurely overwriting needed inputs.
2143 (set-psw-sub): Likewise.
2145 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2147 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2149 2003-02-18 DJ Delorie <dj@redhat.com>
2151 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2152 (movlmemimm): Just mask the address.
2153 (movhmemimm): Likewise.
2154 (movlmemgr): Likewise.
2155 (movhmemgr): Likewise.
2156 (set-psw): Always set the psw last.
2157 (set-psw-carry): Likewise.
2158 (set-psw-add): Likewise.
2159 (set-psw-sub): Likewise.
2161 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2162 of 16 patterns from the set-psw-rotate17 function.
2163 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2164 movgriipostincgr, movgriipredecgr): Set psw correctly.
2165 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2166 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2167 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2169 2003-02-11 Dave Brolley <brolley@redhat.com>
2171 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2172 @arch@_cgen-ifld_table.
2173 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2174 @arch@_cgen-ifld_table.
2176 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2178 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2180 2003-01-09 Graydon Hoare <graydon@redhat.com>
2182 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2185 2003-01-07 Graydon Hoare <graydon@redhat.com>
2187 * utils-gen.scm (attr-int-gen-defn): Define.
2189 2002-12-21 Doug Evans <dje@sebabeach.org>
2191 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2192 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2194 * dev.scm (cload): Update location of .cpu files.
2196 2002-12-19 Doug Evans <dje@sebabeach.org>
2198 * utils-sim.scm (gen-profile-sym): New fn.
2199 (<operand>,sbuf-profile-sym): New method.
2200 (<operand>,sbuf-profile-elm): Use it.
2201 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2202 of hardcoding symbol name.
2203 (<operand>,gen-profile-code): Ditto.
2204 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2207 * mode.scm (mode-sem-mode): New fn.
2208 * operand.scm (op:new-mode): Update. mode-name.
2209 (op-natural-mode?) New fn.
2210 * rtl.scm (hw): Set hw-name,mode-name.
2212 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2214 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2215 as size of IDESC-TABLE-VAR.
2216 (@prefix@_init_idesc_table): Ditto.
2217 * sim-model.scm (-gen-mach-defns): Ditto.
2218 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2220 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2222 * insn.scm (-parse-insn-format-symbol): Improve error message.
2223 (-parse-insn-format): Ditto.
2225 * gen-all-sim: New script.
2227 2002-12-16 DJ Delorie <dj@delorie.com>
2229 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2231 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2233 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2234 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2235 (parse_immediate16): Handle immediate16 values, which now include
2236 @hi(label) and @lo(label)
2238 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2240 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2241 Add braces and cast for union field.
2242 (gen-multi-ifield-nodes): Add braces and cast for union field.
2243 (cgen_operand_table): Similarly fix sentinel.
2244 (cgen_cpu_close): Constify "insns". Formatting.
2245 (cgen-desc.c): Include xregex.h.
2246 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2248 <opc.c>: Include safe-ctype.h.
2249 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2250 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2251 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2252 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2253 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2254 (parse_addr16): Correct type of "value". Formatting.
2255 (parse_addr16_p): Likewise.
2256 (parse_addr16_cjp): Likewise.
2257 (parse_lit8): Likewise.
2258 (parse_bit3): Formatting.
2259 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2260 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2261 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2263 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2264 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2265 (print_dollarhex8): Likewise.
2266 (print_dollarhex16): Likewise.
2267 (print_dollarhex_addr16h): Likewise.
2268 (print_dollarhex_addr16l): Likewise.
2269 (print_dollarhex_p): Likewise.
2270 (print_dollarhex_cj): Likewise.
2271 (print_decimal): Likewise.
2272 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2274 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2276 * doc/rtl.texi (Model variants): Mention current limitations for
2277 unit inputs and outputs.
2278 (Hardware elements) <attribute PROFILE>: Be slightly more
2280 (Instructions) <timing>: input/output overrides have a direction
2283 2002-11-25 DJ Delorie <dj@redhat.com>
2285 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2287 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2289 * cpu/iq10.cpu: New file.
2290 * cpu/iq2000.cpu: Likewise.
2291 * cpu/iq2000.opc: Likewise.
2292 * cpu/iq2000m.cpu: Likewise.
2294 2002-11-19 DJ Delorie <dj@redhat.com>
2296 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2298 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2300 * dev.scm: Call getenv with a string, not a symbol.
2302 2002-10-08 Doug Evans <dje@transmeta.com>
2303 Hans-Peter Nilsson <hp@axis.com>
2305 * types.scm (bitrange-overlap?): Handle lsb0?.
2307 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2309 From Robert Cragie <rcc@jennic.com>:
2310 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2312 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2313 Ben Elliston <bje@redhat.com>
2314 John Healy <jhealy@redhat.com>
2315 Jeff Johnston <jjohnstn@redhat.com>
2316 Alan Lehotsky <alehotsky@redhat.com>
2317 Ubicom Inc. <SupportDesk@ubicom.com>
2319 * cpu/ip2k.cpu: New file.
2320 * cpu/ip2k.opc: Likewise.
2322 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2324 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2326 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2328 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2329 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2330 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2331 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2332 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2333 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2334 (-sthi-byte): If there is a single byte to store, store it at
2336 (sthil, sthiq): Fix big-endian behaviour.
2337 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2338 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2339 (saturate): Use Dimode to check if saturation operation is required.
2340 (usaturate): Likewise.
2342 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2343 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2344 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2345 (msadubq): Fix subword index in second operand of first subtraction.
2347 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2349 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2352 2002-06-18 Dave Brolley <brolley@redhat.com>
2354 * cpu/frv.cpu: New cpu description.
2355 * cpu/frv.opc: New cpu support code.
2357 2002-05-21 Dave Brolley <brolley@redhat.com>
2359 * decode.scm (-opcode-slots): Don't consider bits beyond the
2362 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2364 * cpu/powerpc.cpu: New file.
2366 2002-05-01 Graydon Hoare <graydon@redhat.com>
2368 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2370 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
2372 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2373 results are expanded recursively.
2375 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
2377 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2378 call scan-symbol on it, to enable recursive macro-expansion.
2380 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
2382 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2383 for multiple-isa configurations.
2384 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2386 2002-02-04 Ben Elliston <bje@redhat.com>
2388 * cpu/sh.cpu, cpu/sh.opc: New files.
2389 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2391 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
2393 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2394 (Enumerated constants): Mention that an ifield must not specify a
2396 (Instruction operands): Ditto for index.
2397 (Expressions) <parallel>: Remove misplaced mention of local
2399 <if>: Mention that mode must be specified and non-VOID when the
2402 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
2404 * doc/porting.texi: When referring to *.opc, mention they are in
2405 the cpu subdir. Call top-level directory toplevel, not devo.
2406 Close string in define-normal-insn example.
2408 * doc/pmacros.texi: Fix .substr typo to .substring.
2409 Mention that .sym expansions are not further expanded.
2411 2002-01-22 Graydon Hoare <graydon@redhat.com>
2413 * desc-cpu.scm (ifld-number-cache): Add.
2415 (gen-maybe-multi-ifld-of-op): Add.
2416 (gen-maybe-multi-ifld): Add.
2417 (gen-multi-ifield-nodes): Add.
2418 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2420 2002-01-10 matthew green <mrg@redhat.com>
2422 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2423 (gr-Rb-names): ... to this.
2424 (h-Rb): New hardware piece.
2425 (h-Rbj): Use gr-Rb-names.
2427 (holdx): New instruction.
2429 2002-01-07 Ben Elliston <bje@redhat.com>
2431 * utils.scm (package-cygnus-simulators): Rename from this ..
2432 (package-red-hat-simulators): .. to this.
2433 * opcodes.scm (option-set!): Use package-red-hat-simulators.
2434 * sid-cpu.scm (cgen-desc.h): Likewise.
2435 (cgen-cpu.h): Likewise.
2436 (cgen-defs.h): Likewise.
2437 (cgen-write.cxx): Likewise.
2438 (cgen-semantics.cxx): Likewise.
2439 (cgen-sem-switch.cxx): Likewise.
2440 * sid-decode.scm (cgen-decode.h): Likewise.
2441 (cgen-decode.cxx): Likewise.
2442 * sid-model.scm (cgen-model.cxx): Likewise.
2443 * sid.scm (option-set!): Likewise.
2444 * sim.scm (option-set!): Likewise.
2446 2002-01-07 Ben Elliston <bje@redhat.com>
2448 * utils.scm (copyright-fsf): Add 2002.
2449 (copyright-cygnus): Rename to copyright-red-hat.
2450 (copyright-red-hat): Add 2002.
2451 (CURRENT-COPYRIGHT): Update comment.
2452 * opcodes.scm (option-set!): Update callers.
2453 * sid-model.scm (cgen-model.cxx): Likewise.
2454 * sid-cpu.scm: Likewise.
2455 * sid-decode.scm: Likewise.
2456 * sid.scm (option-set!): Handle "redhat" as an option for
2457 "copyright"; use copyright-red-hat.
2458 * sim.scm (option-set!): Likewise.
2460 2002-01-03 Dave Brolley <brolley@redhat.com>
2462 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2463 number of insns in the list. Update the population count function to
2464 identify and prioritize 3 catgories of useful bits.
2465 (-population-top-few): Don't consider bits with a population count of
2467 (-build-decode-table-entry): Don't call
2468 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
2469 identical insns at the next tree level.
2470 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2471 this function is no longer used.
2472 (filter-non-specialized-ambiguous-insns): New function.
2473 (filter-identical-ambiguous-insns): New function.
2474 (find-identical-insn): New function.
2475 (filter-harmlessly-ambiguous-insns): Removed.
2477 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
2478 matthew green <mrg@redhat.com>
2479 Frank Ch. Eigler <fche@redhat.com>
2480 Nick Clifton <nickc@cambridge.redhat.com>
2482 * cpu/xstormy16.cpu: New file.
2483 * cpu/xstormy16.opc: New file.
2485 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
2487 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2489 2001-11-14 Dave Brolley <brolley@redhat.com>
2491 * utils-gen.scm (-gen-extract-word): Correct computation of the length
2492 of the field being extracted.
2494 2001-10-29 Johan Rydberg <johan@rydberg.com>
2496 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2497 (cos ...) and (sin ..) rtx.
2499 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
2501 * desc-cpu.scm: Do not include ctype.h in generated desc
2502 files. They will inherit safe-ctype.h instead.
2504 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
2506 * desc-cpu.scm: Add missing function prototypes (for generated
2507 C files). Fix compile time warning messages about unused
2508 parameters (for generated C files).
2509 * opc-asmdis.scm: The same.
2510 * opc-ibld.c: The same.
2511 * opc-itab.scm: The same.
2512 * cpu/fr30.opc: The same.
2513 * cpu/m32r.opc: The same.
2514 * cpu/openrisc.opc: The same.
2516 2001-09-17 graydon hoare <graydon@redhat.com>
2518 * insn.scm (syntax-break-out): Correct logic in handling escaped
2521 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
2523 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2524 call @arch@_cgen_build_insn_regex now that regex support is in
2527 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
2529 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2530 (mask-superset?): Look for strict supersets to allow rejection of
2533 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2535 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2536 (cgen-desc.h): Call it.
2537 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2539 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2540 entire_insn for extraction, if it's shorter than base-insn-bitsize.
2542 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2544 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2545 mach->cpu insn-chunk-bitsize.
2546 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2547 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2548 * mach.scm (<cpu>): New field insn-chunk-bitsize.
2549 (-cpu-parse, -cpu-read): Parse/initialize it.
2550 * doc/rtl.texi (define-cpu): Document it.
2552 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
2554 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2556 2001-07-06 Ben Elliston <bje@redhat.com>
2558 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2560 2001-07-05 Ben Elliston <bje@redhat.com>
2564 * read.scm (include): Include files from srcdir/cpu.
2565 (-cgen): Likewise for loading .cpu files.
2566 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2567 * *.cpu: Move all cpu descriptions into cpu subdirectory.
2569 * simplify.inc: Likewise.
2571 2001-07-04 Ben Elliston <bje@redhat.com>
2573 * read.scm (include): Log "Including file" message at level 1,
2574 rather than outputting it with (display).
2575 (cpu-load): Log "Loading cpu description" and "Processing cpu
2576 description" messages at levels 1 and 2, respectively, rather than
2579 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
2581 * desc.scm (<keyword> 'gen-defn): Add extra zero into
2582 CGEN_KEYWORD_ENTRY initializers.
2584 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2585 (<operand> 'test-data): Involve both the index and the hardware
2586 in testcase generation.
2587 (<hw-indx> 'test-data): Generate test data from the underlying
2589 (<ifield> 'test-data): Generate test data by computing bit
2590 patterns for the field, then decoding them.
2591 (<hw-address> 'test-data): Allow for new calling convention.
2592 (<hw-iaddress> 'test-data): Likewise.
2593 (<keyword> 'test-data): Convert index values into keywords.
2594 (<hw-asm> 'test-data): Convert index values into integer strings.
2596 * gas-test.scm (cgen-build.sh): Escape '.' as well.
2598 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
2600 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2601 is required for multi-mode hw types (memory).
2603 2001-05-11 Ben Elliston <bje@redhat.com>
2605 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2606 when generating allinsn.d from objdump output. Without it, the
2607 testsuite will treat $ as the regular expression for end of line.
2609 2001-05-09 Ben Elliston <bje@redhat.com>
2611 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2612 with `cgen_cpu_open'; documentation had become out of date.
2613 * doc/rtl.texi (Instruction operands): Likewise.
2615 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
2617 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2618 various-base-length instruction sets.
2620 2001-04-02 Ben Elliston <bje@redhat.com>
2622 * sid-cpu.scm (-last-insn): New function.
2623 (-gen-sem-switch-engine): Loop through idesc while less than or
2624 equal to the last instruction enum, not less than the MAX enum.
2625 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2626 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2627 table's size to be the last instruction enum plus one, not
2629 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2630 instruction onto the instruction list.
2632 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2633 using the size of the table and its elements.
2634 (-gen-decode-insn-globals): Define the idesc table's size to be
2635 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2636 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2637 last instruction enum plus one, not @CPU@_INSN_MAX.
2639 2001-03-28 Ben Elliston <bje@redhat.com>
2641 * doc/version.texi (UPDATED, EDITION): Update.
2642 * doc/stamp-vti: Likewise.
2644 2001-03-26 Ben Elliston <bje@redhat.com>
2646 * doc/credits.texi (Credits): Update.
2648 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2649 specified prefix and, if necessary, escape `$' in gas-build.sh to
2650 prevent unwanted shell variable expansion.
2652 2001-03-24 Ben Elliston <bje@redhat.com>
2654 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2655 (<keyword>,test-data): Likewise.
2656 (<hw-address>,test-data): Likewise.
2657 (<hw-iaddress>,test-data): Likewise.
2658 (-collate-test-set): New function.
2659 (build-test-set): Use it.
2660 (gen-gas-test): Generate five test cases per instruction.
2661 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2663 * read.scm: Load "slib/random" if random is not defined.
2664 * slib/random.scm: New file.
2666 * utils.scm: Remove comments about the Hobbit compiler.
2667 (copyright-cygnus): Add 2001.
2668 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2669 (package-gnu-simulators): Tidy.
2671 2001-03-23 Ben Elliston <bje@redhat.com>
2673 * cgen-gas.scm: Inline documentation improvements.
2675 2001-03-21 Ben Elliston <bje@redhat.com>
2677 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2678 given in a syntax string is undefined.
2680 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2681 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2683 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
2685 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2686 for arg_type CGEN_CPU_OPEN_BFDMACH.
2688 2001-03-20 Ben Elliston <bje@redhat.com>
2690 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2691 instruction onto the instruction list. Define MAX_INSNS to be the
2692 value of the last instruction enum plus one.
2694 2001-03-14 Nick Clifton <nickc@redhat.com>
2696 * utils.scm (copyright-fsf): Add 2001. Remove (C).
2698 2001-03-05 Dave Brolley <brolley@redhat.com>
2700 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2701 if the number of ifields is greater than zero.
2703 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
2705 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2706 Emit LIKELY/UNLIKELY branch probability hints.
2707 * sid-decode.cpu (-gen-record-args): Ditto.
2709 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
2711 * desc-cpu.scm (-gen-hash-defines): Rename
2712 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2714 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
2716 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2718 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2719 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2721 * sid.scm (<operand> gen-write): Use unsigned long long expression
2723 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2724 (<unit> gen-profile-code): Ditto.
2726 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
2728 * doc/rtl.texi (Expressions): Document the (index-of ...) and
2731 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2733 * operand.scm (<operand> pretty-sem-name): New field.
2734 (<operand> make): Initialize it from hw-name.
2735 (op:set-pretty-sem-name!): New function.
2736 (<operand> gen-pretty-name): Default to fetching new field.
2737 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
2738 sem-name setting from -rtx-hw-name.
2740 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2742 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2743 its subsequent gen-pretty-name.
2745 * read.scm: Increase thread working stack limit and backtrace
2748 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2750 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2752 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
2754 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2755 current insn plus 4.
2756 (h-delay-insn): New hardware register.
2757 (l-jal): Uses h-delay-insn instead of pc when setting link register.
2761 * openrisc.opc (parse_hi16): Sign extend value.
2762 (parse_lo16): Likewise.
2764 2001-01-06 Ben Elliston <bje@redhat.com>
2766 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2767 instead of @cpu@ and @CPU@ to generically prefix symbol names.
2768 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2769 (-gen-semantic-fn-table): Likewise.
2770 (-gen-scache-semantic-fn): Likewise.
2771 (-gen-no-scache-semantic-fn): Likewise.
2772 (cgen-read.c): Likewise.
2773 (cgen-sem-switch.c): Likewise.
2774 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2775 is a filename prefix.
2776 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
2777 (-gen-decode-insn-globals): Likewise.
2778 (-gen-idesc-decls): Likewise.
2779 (cgen-decode.h): Likewise.
2780 (cgen-decode.c): Likewise.
2781 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
2782 (gen-cpu-insn-enum): Likewise.
2783 (sim-finish!): Likewise.
2785 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
2787 * openrisc.cpu: New file.
2788 * openrisc.opc: Likewise.
2790 2000-12-12 Ben Elliston <bje@redhat.com>
2792 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
2794 2000-12-07 Ben Elliston <bje@redhat.com>
2796 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
2797 "insn" when there are zero ifields to extract.
2799 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
2801 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
2802 used by simple/non-scache simulators.
2803 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
2804 regardless of with-scache?.
2805 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
2807 2000-12-03 Ben Elliston <bje@redhat.com>
2809 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
2810 (cgen-desc.c): Likewise.
2812 2000-12-01 Greg McGary <greg@mcgary.org>
2814 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
2816 2000-12-01 Ben Elliston <bje@redhat.com>
2818 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
2819 definitions if run without with-multipla-isa?.
2820 (cgen-defs.h): New function. Emit an ISA-specific defs file.
2821 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
2823 2000-11-24 Ben Elliston <bje@redhat.com>
2825 * sim-cpu.scm (-gen-hardware-struct): New function.
2826 (-gen-hardware-types): If with-multiple-isa is specified, emit all
2827 hardware elements wich have share one or more ISAs with the ISAs
2830 * sim.scm (-with-multiple-isa?): New symbol.
2831 (with-multiple-isa?): New function.
2832 (option-init!): Initialise -with-multiple-isa?.
2833 (option-set!): Handle with-multiple-isa option.
2835 2000-11-21 Ben Elliston <bje@redhat.com>
2837 * utils.scm (copyright-fsf): Add the year 2000.
2839 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
2841 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
2842 unneeded "\n\n" from F() macro definition.
2844 2000-11-15 Greg McGary <greg@mcgary.org>
2846 * utils-cgen.scm (gen-define-with-symcat): New function.
2847 * desc-cpu.scm (gen-ifld-defns): Use it.
2848 (gen-hw-table-defns): Use it.
2849 (-gen-hash-defines): Use it.
2850 (gen-operand-table): Use it.
2851 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
2852 * opc-itab.scm (-gen-ifmt-table): Use it.
2853 (-gen-insn-opcode-table): Use it.
2854 (-gen-macro-insn-table): Use it.
2855 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
2856 * sim-cpu.scm (cgen-semantics.c): Use it.
2857 (cgen-sem-switch.c): Use it.
2859 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2861 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
2862 request to emit calls to insn extractors as functions rather than
2863 branches to inline blocks.
2864 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
2865 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
2867 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
2868 to extractor clauses.
2870 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2872 * decode.scm (-distinguishing-bit-population): Significantly
2873 improve popularity heuristic. Renamed from
2874 (-mask-bit-population): Gone.
2875 (-population-above-threshold): Sort new bit numbers in order of
2877 (-population-top-few): Allow up to three more bits to be selected
2878 than requested. Correct selection order to prefer better bits.
2879 Correct bug in fewer-than-requested case. Keep threshold as
2881 (decode-best-get-bits): Pass also the insn-values.
2883 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
2884 future optimization.
2886 * utils.scm (message): Format nested lists better.
2888 2000-11-09 Doug Evans <dje@casey.transmeta.com>
2890 * dev.scm: Add srcdir to %load-path.
2892 * rtx-funcs.scm (subword): Mode of argument can be different
2893 than mode of result, so don't use OP0 to specify argument's mode.
2895 2000-11-02 Ben Elliston <bje@redhat.com>
2897 * doc/porting.texi (Building a GAS test suite): Document my change
2900 2000-11-01 Ben Elliston <bje@redhat.com>
2902 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
2904 2000-10-31 Ben Elliston <bje@redhat.com>
2906 * gas-test.scm (cgen-build.sh): Allow the generated script to run
2907 with no command line arguments if the gas build directory can be
2910 2000-10-26 Doug Evans <dje@casey.transmeta.com>
2912 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
2913 op-ifld -> op-ifield.
2915 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
2917 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
2919 2000-10-13 matthew green <mrg@cygnus.com>
2921 * utils-cgen.scm (get-ifetch): Move from here ...
2922 * sim.scm (get-ifetch): ... to here.
2923 * sid.scm (get-ifetch): Copy and port to c++.
2925 2000-10-06 Dave Brolley <brolley@redhat.com>
2927 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
2928 ifld-start + ifld-word-offset.
2929 (gen-ifld-extract): Check adata-integral-insn? before checking whether
2930 the field is beyond the base number of bits.
2931 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
2932 (gen-extract-ifields): Ditto.
2933 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
2934 characters in the regular expression.
2936 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
2938 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
2939 preprocessor constant.
2941 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
2943 * slib/logical.scm: New file from slib. Provides robust bitwise
2944 logical operations for large integers.
2945 * read.scm: maybe-load it.
2947 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
2949 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
2950 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
2951 single-isa predicate, but support keep-isa filtering.
2953 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2955 * rtl-c.scm (s-sequence): Handle nested c-calls in both
2956 statement-expression and comma-expression contexts.
2957 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
2959 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2961 * decode.scm (-population-top-few): Signal error gracefully if
2962 decoding is about to become ambiguous.
2964 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2966 * doc/rtl.texi (decode-assist): Describe this field as optional.
2968 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2970 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
2973 2000-09-05 Dave Brolley <brolley@redhat.com>
2975 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
2976 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
2978 2000-08-29 Dave Brolley <brolley@redhat.com>
2980 * utils-gen.scm (gen-ifld-extract): Pass total-len if
2981 adata-integral-insn is true for this architecture.
2983 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
2985 * hardware.scm (<hw-immediate> get-index-mode): Define method.
2986 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
2987 * rtl-c.scm (-c-rtl-get): Improve an error message.
2988 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
2990 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
2992 * Makefile.in (DIST_COMMON): Regenerated.
2993 * ifield.scm (<derived-ifield> needed-iflds): New method.
2994 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
2995 sfmts built from <derived-ifield>s.
2996 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
2997 type symbol 'derived-ifield, not an unparseable string.
2998 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
2999 (-sfmt-contents): Add tracing.
3001 From Doug Evans <dje@transmeta.com>:
3002 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
3005 2000-08-20 Doug Evans <dje@casey.transmeta.com>
3007 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
3008 (rtl-c-expr-parsed,rtl-c-expr): New fns.
3009 (-rtl-c-get): Rename from rtl-c-get.
3010 (rtl-c-get): New fn for getter logging.
3012 2000-07-28 Ben Elliston <bje@redhat.com>
3016 2000-07-25 Ben Elliston <bje@redhat.com>
3018 * doc/credits.texi (Credits): Add Frank Eigler.
3020 2000-07-24 Dave Brolley <brolley@redhat.com>
3022 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3024 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3025 (<keyword>): Initialize all elements fully.
3026 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3028 (-gen-mach-table-defns): Ditto.
3029 (-gen-ifld-defns): Ditto.
3030 (-gen-operand-table): Ditto.
3031 (-gen-insn-table): Ditto.
3032 (-gen-cpu-open): Nothing to do for the mach table.
3034 2000-07-13 Ben Elliston <bje@redhat.com>
3036 * doc/version.texi (UPDATED): Update.
3038 2000-07-05 Ben Elliston <bje@redhat.com>
3040 * configure.in (AC_PATH_PROG): Remove.
3041 * configure: Regenerate.
3042 * Makefile.am (GUILE): Locate guile dynamically.
3043 * Makefile.in: Regenerate.
3044 * doc/Makefile.in: Likewise.
3046 2000-07-03 Ben Elliston <bje@redhat.com>
3048 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3049 * opc-itab.scm (cgen-opc.c): Likewise.
3051 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3053 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3054 guile 1.4 compatibility.
3055 (rtx-env-dump): Comment out buggy display calls.
3057 2000-06-15 matthew green <mrg@redhat.com>
3059 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3061 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3063 * Makefile.in: Regenerated.
3065 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3066 (gen-ifld-defns): Ditto.
3067 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3068 * rtl.c (rtl-finish!): Ditto.
3069 * opc-itab.scm (-gen-ifield-decls): Ditto.
3070 * opcodes.scm (gen-switch): Exclude derived operands.
3071 * operand.scm (op-iflds-used): Expand derived operands.
3072 (hw-index-derived): New dummy function to create dummy object.
3073 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3074 constructor. Set object's hw-name and index fields.
3075 (-anyof-merge-subchoices): Set instance object's index also.
3076 (-anyof-name): New helper function.
3077 (anyof-merge-semantics): Correct replacement of operand names in
3079 (op-ifield): Tolerate derived-operands and their funny indices better.
3080 * ifield.scm (ifld-known-values): Expand derived ifields.
3081 (non-multi-ifields, non-derived-ifields): New utility functions.
3082 (ifld-decode-mode): Tolerate objects with unbound decode field.
3083 * iformat.scm (compute-insn-length): Expand derived ifields.
3084 (compute-insn-base-mask): Ditto.
3085 * insn.scm (insn-base-ifields): Remove.
3086 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3087 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3088 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3089 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3090 (-frag-test-data): Ditto.
3091 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3092 (-gen-sem-switch-engine); Ditto.
3093 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3094 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3095 (-gen-record-args): Tolerate unbound op-ifield.
3096 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3097 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3098 Exclude multi-insns.
3099 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3100 * utils-sim.scm (op-extract?): Handle derived operands.
3102 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3103 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3104 * hardware.scm (hardware-for-mode): New function.
3106 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3107 cleaning up decode tables.
3108 (mask-superset?): Little helper function for above.
3109 * decode.scm (-build-decode-table-entry): Call it.
3110 (-opcode-slots): Add some more tracing.
3111 * arm.cpu: Disable decode-splits construct due to implementation
3112 conflict with `filter-harmlessly-ambiguous-insns'
3114 * decode.scm (-population-top-few): New function for better decode
3115 bit generation. Includes minor helper functions.
3116 (decode-get-best-bits): Call it instead.
3117 (OLDdecode-get-best-bits): Renamed previous version of above.
3120 2000-06-13 Ben Elliston <bje@redhat.com>
3122 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3123 for the Guile library directory.
3124 * configure: Regenerate.
3125 * Makefile.in, doc/Makefile.in: Regenerate.
3127 * Makefile.in, doc/Makefile.in: Regenerate.
3128 * configure.in: Remove unnecessary tests. Move to version 1.0.
3129 * acconfig.h, config.in: Remove.
3130 * configure, aclocal.m4: Regenerate.
3131 * doc/stamp-vti, doc/version.texi: Likewise.
3132 * AUTHORS: New file.
3134 2000-06-07 Ben Elliston <bje@redhat.com>
3136 * fixup.scm (symbol-bound?): Reduce debugging output.
3138 2000-06-02 matthew green <mrg@redhat.com>
3140 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3141 a given instruction, replacing derived fields with their subfields.
3142 (insn-value): Use `insn-base-ifields' to find all constant values.
3143 (multi-insn-instantiate!): Comment some debug messages.
3145 2000-06-01 Ben Elliston <bje@redhat.com>
3147 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3148 symbol names used in a (c-call ..) rtx.
3150 * sim-test.scm (build-test-set): Return (()) for an instruction
3151 with no operands, so it too is included in the generated test set.
3153 2000-05-31 Ben Elliston <bje@redhat.com>
3155 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3156 (sim-test): Likewise.
3157 * Makefile.in: Regenerate.
3159 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3161 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3162 stack traceback, in an order that resembles gdb's `bt'.
3164 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3166 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3167 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3168 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3170 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3172 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3173 * iformat.scm (ifmt-expanded-ifields): Gone.
3174 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3176 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3179 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3182 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3184 * sid.scm (with-any-profile?): New function clone.
3186 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3188 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3190 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3192 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3193 (-multi-ifield-read): Parse them.
3194 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3195 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3196 (multi-ifield gen-extract): Add decode hook.
3197 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3199 * insn.scm (syntax-break-out): More correctly handle \-escaped
3201 (syntax-make-elements): Ditto.
3202 * opc-itab.scm (compute-syntax): Ditto.
3204 2000-05-17 Ben Elliston <bje@redhat.com>
3206 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3208 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3210 * gas-test.scm (build-test-set): Return (()) for an instruction
3211 with no operands, so it too is included in the generated test set.
3213 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3215 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3216 IFMT_OPERANDS and SYNTAX_BYTES.
3218 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3220 * sim.scm (with-any-profile?): New function.
3221 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3222 to decide whether or not to include profiling counters.
3224 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3226 Fuller derived-operand support for opcodes.
3227 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3228 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3229 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3230 (gen-operand-table): Omit derived- and anyof- operands from table.
3231 (gen-insn-table): Omit multi-insns from table.
3232 * iformat.scm (ifmt-expanded-fields): New function to expand
3233 subfields of derived-ifields.
3234 (ifmt-compute!): Ignore remaining multi-insns.
3235 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3237 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3238 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3239 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3240 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3241 (gen-switch): Omit anyof-operands.
3242 * operand.scm (-anyof-syntax): New function.
3243 (-anyof-merge-syntax): Call it.
3244 * utils.scm (collect): New idiomatic function.
3246 2000-05-10 Ben Elliston <bje@redhat.com>
3248 * m68k.cpu: New file (work in progress).
3250 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3252 * Makefile.am (all-local): New target. Create stamp-cgen.
3253 * Makefile.in: Regenerated.
3254 * doc/Makefile.in: Regenerated.
3256 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3258 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3259 (-operand-parse-setter): Ditto.
3260 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3261 for CACHE-ADDR operands.
3262 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3263 trace entries. Widen byte-wide values for printing.
3264 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3265 Widen byte-wide values for printing. Hexify memory addresses.
3267 2000-04-23 matthew green <mrg@redhat.com>
3269 * m32r.cpu: Fix a typo.
3271 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3273 * ia64.cpu (define-model): Change merced to Itanium.
3274 (f-qp): Change quilifying to qualifying.
3275 (movbr_ph, movbr_pvec): Delete.
3276 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3278 2000-04-07 Ben Elliston <bje@redhat.com>
3280 * doc/porting.texi (Building a simulator test suite): Clarify
3281 where generated test cases are placed.
3283 2000-04-07 Ben Elliston <bje@redhat.com>
3285 * Makefile.am (gas-test): Remove dependency on `cgen'.
3287 * Makefile.in: Regenerate.
3289 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3291 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3292 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3293 type reconfiguration.
3294 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3297 2000-03-30 Ben Elliston <bje@redhat.com>
3299 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3301 2000-03-24 Ben Elliston <bje@redhat.com>
3303 * Makefile.am (stamp-cgen): Reinstate target.
3304 * Makefile.in: Regenerate.
3306 2000-03-22 Ben Elliston <bje@redhat.com>
3308 * slib/ppfile.scm: Remove; unused.
3309 * slib/defmacex.scm: Likewise.
3311 2000-03-21 Ben Elliston <bje@redhat.com>
3313 * doc/internals.texi (Source file overview): Document.
3315 * Makefile.am (GUILEDIR): Remove.
3316 (CGEN): Ditto. Callers use $(GUILE) instead.
3317 (GUILEFLAGS): Ditto.
3319 (APPDESCFILES): Ditto.
3320 (OPCODESFILES): Ditto.
3322 (pkgdata_SCRIPTS): Ditto.
3323 (stamp-cgen): Remove target.
3324 * Makefile.in: Regenerate.
3326 * configure.in: Remove header and library tests.
3327 * configure: Regenerate.
3328 * config.in: Likewise.
3330 2000-03-20 Ben Elliston <bje@redhat.com>
3332 * read.scm: Cease loading "hob-sup.scm".
3333 * utils.scm: Inherit the fastcall family of procedures (for now).
3334 * hob-sup.scm: Remove.
3336 2000-03-20 Ben Elliston <bje@redhat.com>
3338 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3339 * configure: Regenerate.
3340 * gdbinit.in: Remove.
3342 2000-03-17 Ben Elliston <bje@redhat.com>
3344 * Makefile.am (CGEN): Use guile, not cgen.
3345 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3346 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3347 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3348 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3349 (HOB_OBJS): Likewise.
3350 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3351 (CGENOBJS): Likewise.
3352 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3353 (hobbit, hobbit.o, hobbit.c): Remove targets.
3354 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3355 (CLEANFILES): Update.
3356 * acconfig.h (WITH_HOBBIT): Remove.
3357 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3358 option --with-cgen-hobbit.
3359 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3360 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3361 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3362 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3363 * Makefile.in: Regenerate.
3364 * config.in: Likewise.
3365 * aclocal.m4: Likewise.
3366 * configure: Likewise.
3367 * README (Hobbit support): Remove.
3368 * doc/internals.texi (Conventions): Do not mention Hobbit.
3369 * doc/porting.texi (Supported Guile versions): Likewise.
3371 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
3373 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3374 callback convention to new sid sidutil::basic_cpu code.
3375 (-gen-sfrag-engine-fn): Ditto.
3376 * sid.scm (-create-virtual-insns!): Ditto.
3377 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3379 (cxmake-skip): Implement properly for pbb mode.
3381 2000-03-03 Ben Elliston <bje@redhat.com>
3383 * doc/internals.texi: New file.
3385 2000-02-29 Ben Elliston <bje@redhat.com>
3387 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3388 * doc/porting.texi: Formatting tweaks.
3390 2000-02-25 Nick Clifton <nickc@cygnus.com>
3392 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3395 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
3397 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3400 2000-02-23 Andrew Haley <aph@cygnus.com>
3402 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3405 2000-02-24 Ben Elliston <bje@redhat.com>
3407 * doc/rtl.texi (Derived operands): Add some cindex entries.
3409 2000-02-23 Ben Elliston <bje@redhat.com>
3411 * ia32.cpu (dndo): Move general purpose macro from here ..
3412 * simplify.inc (dndo): .. to here.
3414 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
3416 * arm.cpu (h-tbit): Add c-call setter function.
3419 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
3421 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3422 (-frag-cost-compute!): Ditto.
3423 * utils.scm (copyright-cygnus): Add Y2K.
3424 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3426 2000-01-25 Nick Clifton <nickc@cygnus.com>
3428 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3429 flags field of the CGEN_CPU_TABLE structure.
3431 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
3433 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3434 All references updated.
3436 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
3438 * ia32.cpu: Rewrite addressing mode support.
3440 * ifield.scm (<ifield>): New member `follows'.
3441 (ifld-known-values): New proc.
3442 (<ifield>): New method set-word-offset!.
3443 (ifld-set-word-offset!): New proc.
3444 (ifld-new-word-offset): New proc.
3445 (<ifield>): New method next-word.
3446 (<multi-ifield>): New method next-word.
3447 (ifld-next-word): New proc.
3448 (ifld-precedes?): New proc.
3449 (-ifield-parse): New args word-offset,word-length,follows.
3450 All callers updated. Handle CISC-style vs RISC-style ifields.
3451 (-ifield-read): Recognize word-offset,word-length,follows specs.
3452 (-ifld-parse-follows): New proc.
3453 (-multi-ifield-make-default-insert): New proc.
3454 (-multi-ifield-make-default-extract): New proc.
3455 (-multi-ifield-parse): Provide default values for insert,extract
3456 handlers if not specified.
3457 (<derived-ifield>): New class.
3458 (derived-ifield?): New predicate.
3459 (ifld-derived-operand?): New predicate.
3460 (f-anyof): New global.
3461 (ifld-anyof?,ifld-anyof-operand?): New predicates.
3462 (f-derived,ifld-derived?): Delete.
3463 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
3464 * insn.scm (-sub-insn-ifields): New proc.
3465 (-sub-insn-make!): New proc.
3466 (multi-insn-instantiate!): Provide initial implementation.
3467 (-insn-parse): If insn contains "anyof" operands, create a
3468 <multi-insn> object instead of a plain <insn>.
3469 (-parse-insn-format-symbol): Rewrite derived operand handling.
3470 Add anyof operand handling.
3471 (-parse-insn-format-ifield-spec): Rewrite.
3472 (-parse-insn-format-operand-spec): Delete.
3473 (-parse-insn-format-list): Delete support for `(operand value)'.
3474 (anyof-operand-format?): Replaces derived-operand-format?.
3475 * operand.scm (-operand-parse-getter): Improve error messages.
3476 (-operand-parse-setter): Ditto.
3477 (<derived-operand>): New members args,syntax,base-ifield,encoding,
3479 (<anyof-operand>): Change baseclass from <derived-operand> to
3480 <operand>. Delete member values. New members base-ifield,choices.
3481 (anyof-operand?): New predicate.
3482 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3483 (-derived-operand-parse): Rewrite.
3484 (-derived-operand-read): Rewrite.
3485 (-anyof-parse-choice): New proc.
3486 (-anyof-operand-parse): Rewrite.
3487 (-anyof-operand-read,define-anyof-operand): New procs.
3488 (<anyof-value>): Rewrite.
3489 (-anyof-initial-known): New proc.
3490 (anyof-satisfies-assertions?): New proc.
3491 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3492 (-anyof-merge-getter,-anyof-merge-setter): New procs.
3493 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3494 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3495 (-anyof-value-from-derived): New proc.
3496 (-anyof-all-choices-1,anyof-all-choices): New procs.
3497 (operand-init!): Create define-anyof-operand reader command.
3499 * insn (syntax-break-out): Take syntax as argument instead of insn.
3500 All callers updated.
3501 (syntax-make): Move here, from ???.
3503 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3504 bitrange-foo. All uses updated.
3505 (bitrange-next-word): New proc.
3507 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3509 * rtl.scm (rtx-canonicalize): Provide initial implementation.
3510 (rtx-make-const,rtx-make-enum): New procs.
3511 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
3512 (rtx-mem-addr,rtx-mem-sel): New procs.
3513 (rtx-change-address): New proc.
3514 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3515 (rtx-make-set,rtx-single-set?): New procs.
3516 (rtx-combine): New proc.
3518 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
3519 (rtx-traverse-with-locals): Ditto.
3520 (-rtx-traverse,-rtx-traverse-*): Ditto.
3522 * rtl.scm (define-subr): New proc.
3523 (rtl-init!): Create reader command `define-subr'.
3525 * cos.c (_object_mi_p): Ensure argument is an object.
3526 (indent): New function.
3527 (_object_print_elms): Add pretty-printing support.
3528 (_object_print): Ditto.
3530 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3531 (*floats-s->c-fun-table*): Ditto.
3532 * hobbit.c,hobbit.h: Rebuild.
3533 * hob-sup.c (fastcall7): New proc.
3534 * hob-sup.h (fastcall7): Declare.
3535 * hob-sup.scm (fastcall7): New macro.
3537 * mach.scm (<arch>): New member subr-list.
3538 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3539 (arch-finish!): Reverse recorded subr list.
3541 * read.scm (debug-env): New global.
3542 (debug-var-names,debug-var,debug-repl-env): New procs.
3543 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
3544 (debug-quit): Renamed from `continue'.
3546 * simplify.inc (dsmf): New pmacro.
3548 * utils.scm (plus-scan): New proc.
3549 (split-bits): Rewrite.
3550 (split-value): New proc.
3552 1999-10-13 Doug Evans <devans@casey.cygnus.com>
3554 * doc/Makefile.am (DOCFILES): Add notes.texi.
3555 * doc/Makefile.in: Rebuild.
3557 1999-10-11 Doug Evans <devans@casey.cygnus.com>
3559 * ifield.scm (ifld-derived?): New proc.
3560 (f-derived): New global.
3561 (ifield-builtin!): Create ifield f-derived.
3562 (<multi-insn>): New class.
3563 (multi-insn?): New predicate.
3564 (multi-insn-instantiate!): New proc.
3565 (-insn-parse): Create <multi-insn> objects for insns with derived
3567 (-parse-insn-format-symbol): Handle derived ifields.
3568 (-parse-insn-format-ifield-spec): New proc.
3569 (-parse-insn-format-operand-spec): New proc.
3570 (-parse-insn-format-list): Simplify.
3571 (-parse-insn-format): No longer allow (ifield-object value) spec.
3572 (derived-operand-format?): New proc.
3573 (insn-alias?): New proc.
3574 (non-alias-insns): Rewrite.
3575 (insn-real?): Renamed from real-insn?, all callers updated.
3576 (virutal-insns): Rewrite.
3577 (multi-insns): New proc.
3578 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3579 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3580 Return #f if operand doesn't have an index or if index is not an
3582 (hw-index-anyof): New proc.
3583 (-operand-parse): Allow integer indices.
3584 (<derived-operand>): New class.
3585 (derived-operand?): New predicate.
3586 (<anyof-operand>): New class.
3587 (<anyof-value>): New class.
3588 (-anyof-parse-value,-anyof-operand-parse): New procs.
3589 (-derived-operand-parse,-derived-operand-read): New procs.
3590 (define-derived-operand,define-full-derived-operand): New procs.
3591 (operand-init!): New reader command define-derived-operand.
3593 * utils.scm (list-take): Handle negative amount.
3594 (element?): Rewrite.
3596 1999-10-10 Doug Evans <devans@casey.cygnus.com>
3598 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3600 1999-10-04 Richard Henderson <rth@cygnus.com>
3602 * ia64.cpu: Checkpoint.
3604 1999-09-29 Doug Evans <devans@casey.cygnus.com>
3606 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3608 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
3609 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
3611 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
3613 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3614 PC returned by sim_engine_invalid_insn.
3616 1999-09-28 Doug Evans <devans@casey.cygnus.com>
3618 * ia32.cpu: New file.
3620 1999-09-25 Doug Evans <devans@casey.cygnus.com>
3622 * utils.scm (bit-set?): Fix off by one error.
3624 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3626 * rtl.scm (hw): Check for valid hardware element before trying to
3629 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
3630 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3631 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3632 * thumb.cpu (*): arm_compute_operand2_foo renamed to
3633 compute_operand2_foo.
3635 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3636 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3637 Call delayed_branch/branch methods instead of assigning to `vpc'.
3638 (<hw-pc>,cxmake-skip): Call skip method.
3639 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3640 (<pc>,cxmake-skip): Ditto.
3641 (-create-virtual-insns!): Ditto.
3642 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3644 (op:record-profile): Specify #:output-language "c++".
3645 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3647 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3649 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3650 (gen-semantic-code): Ditto.
3651 (-gen-sem-case,-gen-sfrag-code): Ditto.
3652 (-gen-hardware-types): Delete class @cpu@_cpu_base.
3653 (cgen-cpu.h): File is now #included by main cpu class, rather than
3655 (cgen-defs.h): New proc.
3656 (-gen-scache-semantic-fn): Change result type to sem_status.
3657 New local `status'. Call done_cti_insn/done_insn method at end.
3658 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3660 (cgen-sem-switch.cxx): Ditto.
3661 * sid-decode.scm (-gen-idesc-decls): Update return type of
3663 (cgen-decode.h): Add using namespace @arch@.
3664 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3666 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3667 (estate-output-language-c?,estate-output-language-c++?): New procs.
3668 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3669 (estate-make-for-normal-rtl-c++): New proc.
3670 (rtl-c++-parsed,rtl-c++): New proc.
3671 (s-c-call): Invoke cpu class method if c++.
3672 (join): Use s-c-raw-call.
3674 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3677 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3678 * rtl.scm (<eval-state>): New member `modifiers'.
3679 (<eval-state>,vmake!): Handle #:modifiers.
3680 (estate-with-modifiers): New proc.
3682 * rtl.scm (rtx-side-effects?): New proc.
3683 (rtx-canonical-bool): Don't change expr if it has side effects.
3684 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3687 1999-09-23 Doug Evans <devans@casey.cygnus.com>
3689 * sim.scm (gen-scache-type): Fix typo in last patch.
3691 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
3693 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3695 1999-09-05 Doug Evans <devans@casey.cygnus.com>
3697 * sid.scm (<hw-pc>,cxmake-skip): New method.
3698 (<pc>,cxmake-skip): New method.
3700 * decode.scm (decode-build-table): Delete args startbit,index-list.
3701 All callers updated.
3702 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3703 All callers updated.
3704 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3705 to decode-get-best-bits.
3706 * sid-decode.scm (-gen-decode-fn): Ditto.
3708 * hardware.scm (hw-bits): New proc.
3709 (-hw-parse): New arg layout. All callers updated.
3710 (define-full-hardware): New arg layout. All callers updated.
3711 (-hw-validate-layout): New proc.
3712 (-hw-create-[gs]etter-from-layout): New procs.
3713 (<hw-register>,parse!): Handle layout spec.
3714 * types.scm (type-bits): New proc.
3716 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3717 UNARY, BINARY, TRINARY rtxs.
3719 * attr.scm (<enum-attribute>,parse-value): Allow strings.
3720 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3721 Support '- as "unused spot" indicator.
3723 1999-09-03 Doug Evans <devans@casey.cygnus.com>
3725 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3727 1999-09-02 Doug Evans <devans@casey.cygnus.com>
3729 * rtx-funcs.scm (subword): Fix mode spec of `value'.
3731 * rtl.scm (-rtx-traverse-operands): Fix debugging message
3733 (tstate-make): New arg `depth'. All callers updated.
3734 (tstate-depth,tstate-set-depth!): New procs.
3735 (tstate-incr-depth!,tstate-decr-depth!): New procs.
3736 (-rtx-traverse-operands): Indent debugging output by traversal depth.
3737 (-rtx-traverse): Ditto. Keep track of traversal depth.
3739 1999-09-01 Doug Evans <devans@casey.cygnus.com>
3741 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3742 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3743 * utils-sim.scm: Decoder generator support moved here.
3744 (-decode-equiv-entries?,-decode-sort-entries): New procs.
3745 (-gen-decoder-switch): Sort entries for more fall-throughs.
3747 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3748 * Makefile.in: Rebuild.
3749 * sim-test.scm (build-sim-testcase): Add logging message.
3750 * dev.scm (cload): Recognize SIM-TEST application.
3751 (load-stest): Set APPLICATION to SIM-TEST.
3753 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3755 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3756 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3757 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3759 * insn.scm (syntax-break-out): Handle ${foo}.
3761 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
3763 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3764 (bin_PROGRAMS): Define.
3765 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3766 (cgen-hob.c): Prepend $(srcdir)/ here.
3767 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3768 (libcpu_a_SOURCES): Delete.
3769 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3770 (CGEN_HOB_OBJ,CGENOBJS): New variables.
3771 * configure.in (LIBS): Replace -Wl,-rpath with -R.
3772 Add AC_CHECK_LIB(guile,main).
3773 * Makefile.in: Rebuild.
3774 * doc/Makefile.in: Rebuild.
3775 * aclocal.m4: Rebuild.
3776 * config.in: Rebuild.
3777 * configure: Rebuild.
3779 1999-08-28 Doug Evans <devans@casey.cygnus.com>
3781 Rename rtx functions from name: to name, accept optional leading
3783 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
3784 * attr.scm (-attr-eval): Update.
3785 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
3786 (<hw-register>,mode-ok?): Disallow VOID.
3787 (<hw-immediate>,mode-ok?): Disallow VOID.
3788 (<hw-address>,mode-ok?): Disallow VOID.
3789 * mode.scm (mode-name?): New proc.
3790 (VOID): Renamed from VM.
3791 (DFLT): Renamed from DM.
3792 (mode-builtin!): Update.
3793 * opcodes.scm (<ifield>,gen-insert): Update.
3794 (<ifield>,gen-extract): Update.
3795 (<multi-ifield>,gen-insert,gen-extract): Update.
3796 * operand.scm (op:mode): Update.
3797 (<pc>,make!): Update.
3798 (op:new-mode): Update.
3799 (-operand-read): Update.
3800 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
3801 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
3802 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
3803 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
3804 (rtx-make): Call -rtx-munge-mode&options.
3805 (rtx accessors): Rewrite.
3806 (rtx-pretty-name): Update.
3807 (-rtx-traverse-*): Update.
3808 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
3809 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
3810 (-rtx-make-traverse-table): Update.
3811 (-rtx-traverse-operands): Update.
3812 (-rtx-option?,-rtx-option-list?): New procs.
3813 (-rtx-munge-mode&options): New proc.
3814 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
3815 (-rtx-traverse): Update.
3816 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
3817 (rtx-compile-time-constant?): Update.
3818 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
3819 (rtx-value): Update.
3820 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
3821 * rtx-funcs.scm (*): Update.
3822 * rtl-c.scm (rtl-c-get): Update.
3823 (rtl-c-set-quiet,rtl-c-set-trace): Update.
3824 (s-c-call,s-c-raw-call): Update.
3825 (s-boolifop,s-convop,s-if,s-cond): Update.
3826 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
3827 (-par-replace-set-dests,-par-replace-set-srcs): Update.
3828 (s-parallel,s-sequence): Update.
3829 (rtl-c-build-table): Update.
3830 * sem-frags.scm (-frag-hash-compute!): Update.
3831 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
3832 for temporary bug compatibility with previous version.
3833 (-frag-expr-locals,-frag-expr-stmts): Update.
3834 (-frag-compute-desired-frags,-frag-pick-best): Update.
3835 * semantics.scm (-simplify-expr-fn): Update.
3836 (rtx-simplify): Update.
3837 (-rtx-ref-type): Update. Account for modifiers.
3838 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
3839 (-build-ifield-operand!): Update.
3840 (-build-known-values): Update.
3841 (semantic-compile): Update.
3842 (-gen-reg-access-defns): Update.
3843 (gen-semantic-code,-gen-sem-case): Update.
3844 (-gen-sfrag-code,-gen-sfrag-case): Update.
3845 * sim-cpu (gen-semantic-code): Update.
3846 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
3847 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
3848 (-hw-cxmake-get): Update.
3849 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3850 (<hw-index>,cxmake-get): Update.
3851 (<operand>,gen-type,gen-read,cxmake-get): Update.
3852 (<operand>,gen-set-quiet,gen-set-trace): Update.
3853 (<pc>,cxmake-get): Update.
3854 (sim-finish!): Update.
3855 * utils-gen.scm (-gen-ifld-extract-base): Update.
3856 (-gen-ifld-extract-beyond): Update.
3857 (gen-multi-ifld-extract): Update.
3858 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
3859 * sid.scm (<hw-pc>,gen-write): Update.
3860 (-gen-decode-insn-globals): Update.
3861 (-hw-cxmake-get): Update.
3862 (<hw-register>,cxmake-get-raw): Update.
3863 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3864 (<hw-index>,cxmake-get): Update.
3865 (<operand>,gen-type,gen-read,cxmake-get): Update.
3866 (<operand>,gen-set-quiet,gen-set-trace): Update.
3867 (<pc>,cxmake-get): Update.
3868 (-create-virtual-insns!): Update.
3869 (-decode-split-build-assertion): Update.
3871 * simplify.inc: Update.
3873 1999-08-20 Doug Evans <devans@casey.cygnus.com>
3875 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
3876 Prefix queue function name with sim_ instead of @cpu@_.
3878 * sim.scm (-with-parallel-only?): New global.
3879 (option-init!): Initialize it.
3880 (option-set!): Set it.
3881 (with-parallel-only?): New proc.
3882 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
3883 and writeback markers if with-parallel-only.
3884 (-gen-idesc-init-fn): Update.
3885 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
3888 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
3890 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
3891 with the invalid insn handler.
3893 * utils.scm (list-maybe-ref): New proc.
3895 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
3897 (-mach-parse): Signal error if mach wasn't specified in define-arch.
3899 * i960.cpu (test*-*): Delete `expr' arg.
3900 (test-op,branch-op): Update.
3902 1999-08-09 Doug Evans <devans@casey.cygnus.com>
3904 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
3905 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
3907 (gen-reg-access-defn): Ditto.
3908 (-gen-hw-addr): Rewrite.
3909 (-op-gen-queued-write): Rewrite.
3910 * sim-cpu.scm (-gen-cpu-reg-access-decls):
3911 (-gen-scache-semantic-fn): Handle with-generic-write.
3912 (-gen-no-scache-semantic-fn): Ditto.
3914 1999-08-08 Doug Evans <devans@casey.cygnus.com>
3916 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
3918 * sim.scm (-with-generic-write?): New global.
3919 (option-init!): Initialize it.
3920 (option-set!): Set it.
3921 (with-generic-write?): New proc.
3922 (-gen-hw-addr): New proc.
3923 (-op-gen-queued-write): New proc.
3924 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
3926 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
3928 (-gen-sem-switch): Preserve existing with-parallel? value.
3929 (-gen-sem-parallel-switch): Ditto.
3930 (-gen-write-case): Add /indent support.
3931 (cgen-write.c): Rewrite.
3933 * utils.scm (-current-print-state): New global.
3934 (make-print-state): New proc.
3935 (pstate-indent,pstate-set-indent!): New procs.
3936 (pstate-cmd?,pstate-cmd-do): New procs.
3937 (/indent): New global.
3938 (/indent-set,/indent-add): New procs.
3939 (string-write): Set -current-print-state.
3940 (-string-write): New arg pstate, all callers updated.
3941 Handle print-state commands.
3942 (-string-list-flatten): New proc.
3943 (string-list->string): Use it.
3945 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
3946 (-gen-sem-fn-table-entry): New proc.
3947 (-gen-semantic-fn-table): New proc.
3948 (-gen-scache-semantic-fn): Make fn static.
3949 (-gen-no-scache-semantic-fn): Ditto.
3950 (cgen-semantics.c): Define macro SEM_FN_NAME.
3951 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
3952 FAST,FULL. Update @cpu@_insn_sem contents.
3953 (-gen-semf-fn-name): Delete.
3954 (-gen-sem-fn-decls): Delete.
3955 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
3956 @cpu@_semf_init_idesc_table.
3957 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
3959 (cgen-decode.h): Print sfmt enum.
3960 * sid-decode.scm (-gen-semf-fn-name): Delete.
3961 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
3963 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
3964 (ifmt-compute!): Ditto.
3965 * sim-decode.scm (-gen-decoder-switch): Ditto.
3966 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
3967 (-gen-decoder-switch): Ditto.
3969 * insn.scm (insn-virtual?): New proc.
3971 * enum.scm (gen-enum-decl): Speed up, build string as list and then
3973 * mach.scm (<arch>): attr-list is now a pair of lists.
3974 (current-attr-list): Rewrite.
3975 (current-attr-add!,current-attr-lookup): Rewrite.
3976 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
3978 1999-08-06 Richard Henderson <rth@cygnus.com>
3980 * ia64.cpu: Initial checkpoint.
3982 1999-08-06 Doug Evans <devans@casey.cygnus.com>
3984 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
3985 (pmacros-init!): Update .apply help string.
3987 1999-08-03 Doug Evans <devans@casey.cygnus.com>
3989 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
3990 (<hw-pc>,cxmake-skip): New method.
3991 (<pc>,cxmake-skip): New method.
3992 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
3993 (gen-argbuf-type): New member `skip_count'.
3994 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
3995 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
3997 * utils-sim.scm: New file.
3998 * dev.scm (load-sim): Load it.
3999 (load-sid): Load it.
4000 * cgen-sid.scm: Load it.
4001 * cgen-sim.scm: Load it.
4002 * iformat.scm (<sformat>): New member sbuf, not initialized by
4004 * rtx-funcs.scm (skip): Rewrite.
4005 * rtl-c.scm (skip): Rewrite.
4006 * m32r.cpu (sc,snc): Update `skip' usage.
4007 * mode.scm (mode-real-mode): New proc.
4008 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
4009 Distinguish fragments by the <sformat-abuf> they use.
4010 * sim.scm (gen-profile-index-type): Delete.
4011 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
4012 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4013 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
4014 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
4015 (-gen-argbuf-elm): Rewrite.
4016 (-gen-argbuf-hw-elm): Delete.
4017 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4019 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4020 (sim-init!): Initialize them.
4021 (sim-analyze-insns!): Set them.
4022 (current-sbuf-list): New proc.
4023 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4024 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4025 * sim-model.scm (-gen-model-insn-fn): Ditto.
4026 * sim-decode.scm (-gen-extract-decls): Delete.
4027 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4028 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4030 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4031 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4032 (-gen-op-extract,-gen-op-trace-extract): New procs.
4033 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4034 gen-sfmt-argvars-foo and rewrite.
4035 (-gen-record-args): Rewrite.
4036 (-gen-extract-case): Tweak.
4037 * sid.scm (gen-profile-index-type): Delete.
4038 (ifield argbuf support): Move to utils-sim.scm.
4039 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4040 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4041 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4042 (-sim-sformat-argbuf-list): New global.
4043 (sim-init!): Initialize it.
4044 (sim-analyze-insns!): Set it.
4045 (current-sbuf-list): New proc.
4046 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4047 (-gen-argbuf-hw-elm): Delete.
4048 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4050 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4051 (-gen-extract-decls): Delete.
4052 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4054 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4055 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4056 (-gen-op-extract,-gen-op-trace-extract): New procs.
4057 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4058 gen-sfmt-argvars-foo and rewrite.
4059 (-gen-record-args): Rewrite.
4060 (-gen-extract-case): Tweak.
4062 * cgen-gh.c (gh_putc,gh_puts): New functions.
4063 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4064 * cos.c (_object_print_elms,_object_print): Use them.
4065 * hob-sup.c (fastcall_print): Use them.
4066 * configure.in: Check for scm_gen_puts, scm_puts.
4067 * config.in: Rebuild.
4068 * configure: Rebuild.
4069 * aclocal.m4: Rebuild.
4070 * Makefile.in: Rebuild.
4072 * dev.scm (load-opc): Use load instead of maybe-load.
4073 (load-gtest,load-sim,load-stest): Ditto.
4076 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4078 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4079 up to avoid g++ 'goto crosses initialization' warning.
4080 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4081 (-gen-sfrag-case): Update use of NEXT_FRAG.
4083 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4085 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4087 * read.scm: Load sem-frags.scm.
4088 * sem-frags.scm (*): Lots rewritten.
4089 * sid.scm (-with-sem-frags?): New global
4090 (with-sem-frags?): New proc.
4091 (option-init!): Initialize -with-sem-frags?.
4092 (option-set!): Recognize with-sem-frags.
4093 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4094 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4096 (-gen-sfrag-engine-decls): New proc.
4097 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4098 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4099 (-gen-sfrag-engine): New proc.
4100 (-gen-sem-case): Emit setup-semantics if specified.
4101 (-gen-sem-switch-engine): Update init/use of computed goto label.
4102 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4104 (-gen-idesc-decls): Replace sem_address with cgoto.
4105 (-gen-scache-decls): Rewrite definition of `execute' member.
4106 * arm.cpu (arm isa): Enable decode-splits.
4107 * arm7.cpu (multiply insns): Rename result to mul-result.
4109 Rename decode-specialize to decode-split.
4110 * decode.scm (*): Update.
4111 * insn.scm (*): Update.
4112 * mach.scm (*): Update.
4113 * sid.scm (*): Update.
4115 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4117 Record objects as a smob.
4118 * cos.c (scm_tc16_object): New static global.
4119 (cos_init): Initialize it.
4120 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4121 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4122 (_object_tag): Delete.
4123 (_object_make_smob): New function.
4124 (_object_make_x,_object_make_with_values_x): Rewrite.
4125 (_object_elements,_object_class_desc): Rewrite.
4126 (_object_copy,object_p): Rewrite.
4127 (_object_specialize): Rewrite.
4128 (_object_print_elms,_object_print): New functions.
4129 (object_smob): New static global.
4130 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4132 * cos.c (_make_x_symbol): New static global.
4133 (object_make): Use it.
4134 (cos_init): Initialize it.
4136 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4138 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4139 instead to determine whether to use FLD macro.
4140 (<rtl-c-eval-state>): New member ifield-var?.
4141 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4142 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4143 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4145 * rtl.scm (rtx-sequence-assq-locals): New proc.
4147 * cos.scm (-object-error): Don't crash on non-objects.
4149 * Makefile.am (CLEANFILES): Add hobbit.
4150 * Makefile.in: Rebuild.
4152 * rtl-c.scm (s-c-call): Delete unnecessary code.
4154 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4156 * rtl-c.scm (ifield): Always reference value via `FLD'.
4158 * cos.c (elm_bound_p): Return problem SCM boolean values.
4160 * utils-cgen.scm (display-argv): New proc.
4161 * cgen-opc.scm (cgen): Call it.
4162 * cgen-sim.scm (cgen): Ditto.
4163 * cgen-gas.scm (cgen): Ditto.
4164 * cgen-stest.scm (cgen): Ditto.
4165 * cgen-sid.scm (cgen): Ditto.
4167 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4169 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4170 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4171 (-gen-extract-switch): Initialize result to 1.
4172 * opcodes.scm (gen-ifield-default-type): New proc.
4173 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4175 (<hw-index>,gen-insert): Handle non-ifield indices.
4176 (<hw-index>,gen-extract): Ditto.
4177 (<hw-asm>,gen-parse): Ditto.
4178 (<hw-asm>,gen-print): Ditto.
4179 (<keyword>,gen-parse): Ditto.
4180 (<keyword>,gen-print): Ditto.
4181 (<operand>,gen-fget): Ditto.
4182 (<operand>,gen-fset): Ditto.
4184 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4185 (-gen-hw-index): Ditto.
4186 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4187 (-gen-hw-index): Ditto.
4189 * sem-frags.scm: New file.
4191 * attr.scm (attr-parse): Add better checking of input.
4193 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4195 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4197 * ifield.scm (ifld-nil?): New proc.
4199 * operand.scm (<operand>): New members getter,setter.
4200 (<operand>,make!): New args getter,setter. All uses updated.
4201 (op:getter,op:setter): New procs.
4202 (<hw-index>,field-start): Return 0 for non-ifield indices.
4203 (<hw-index>,field-length): Return 0 for non-ifield indices.
4204 (-operand-parse-getter,-operand-parse-setter): New procs.
4205 (-operand-parse): New args getter,setter. All callers updated.
4206 Always use hw-index-scalar for scalar operands.
4207 (-operand-read): Handle getter,setter.
4208 (define-full-operand): New args getter,setter. All uses updated.
4209 * semantics.scm (-build-ifield-operand!): Update.
4210 (-build-index-of-operand!): Update.
4211 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4212 * simplify.inc (define-normal-operand): Update.
4214 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4215 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4216 (s-binop,s-cmpop,s-convop): Ditto.
4217 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4218 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4219 (fcc-tests): New insn-enum.
4220 (fcc-value): Rename from fcc-type.
4221 * sparcfpu.cpu: New file. All fp support moved here.
4223 * rtl.scm (<rtx-func>): New member class.
4224 (rtx-class-*?): New procs.
4225 (def-rtx-node): New arg class. All callers updated.
4226 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4227 * rtx-funcs.scm (*): Specify class.
4229 * utils-cgen.scm (context-make-reader): New proc.
4231 * utils.scm (assert-fail-msg): New variable.
4233 (list-drop,list-tail-drop): New procs.
4235 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4237 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4238 CGEN_MIN_INSN_SIZE deleted on March 22.
4240 * ifield.scm (<ifield>,needed-iflds): New method.
4241 (<multi-ifield>,needed-iflds): New method.
4242 (ifld-needed-iflds): New proc.
4243 (multi-ifield?): New proc.
4244 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4245 (-sfmt-search-key): Include insn length in key.
4246 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4247 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4248 (-ifmt-lookup-ifmt!): Compute key here.
4249 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4250 All callers updated.
4251 (ifmt-build): Delete arg desc. New args search-key,iflds.
4252 All callers updated.
4253 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4254 in-ops,out-ops,sorted-used-iflds. All callers updated.
4255 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4257 * operand.scm (op-iflds-used): New proc.
4258 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4260 And from sid.scm,sid-cpu.scm as well.
4261 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4262 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4263 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4264 (gen-extracted-ifld-value): Ditto.
4265 (-extract-chunk-specs): Ditto.
4266 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4267 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4268 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4269 (-extract-insert-subfields): New function.
4270 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4271 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4272 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4273 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4275 (-gen-no-scache-semantic-fn): Ditto.
4276 (-gen-sem-case): Ditto.
4277 (-gen-read-case): Update calls to gen-define-ifields,
4278 gen-extract-ifields.
4279 * sim-decode.scm (-gen-record-args): Update.
4280 (-gen-sfmt-argvars-assigns): Update.
4281 (-gen-extract-case): Update.
4282 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4283 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4285 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4286 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4287 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4288 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4289 gen-define-ifields, gen-extract-ifields.
4290 (-gen-record-args): Update.
4291 (gen-sfmt-argvars-assigns): Update.
4292 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4293 with gen-define-ifields. Ditto for gen-extract-foo.
4294 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4295 procs rather than method calls.
4297 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4299 * sid.scm (-create-virtual-insns!): New local `context', pass it
4302 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4303 (operand name) not (operand object), (local name) not (local object).
4304 (rtx-traverse-with-locals): New proc.
4305 (-compile-expr-fn): New proc.
4306 (rtx-compile): Rewrite.
4307 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4308 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4309 (rtl-c-set-trace): Ditto.
4310 (operand define-fn): Recognize operand name argument.
4311 (local define-fn): Recognize sequence temp name argument.
4312 * rtx-funcs.scm (operand): Argument is operand name, not object,
4313 so call current-op-lookup.
4314 (local): Similarily, so call rtx-temp-lookup.
4316 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4317 (rtx-operand?): Ditto.
4318 (rtx-pretty-name): Ditto.
4319 (rtx-local-obj): Flag symbol argument as an error.
4320 (rtx-local-name): New proc.
4321 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4323 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4325 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4328 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4331 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4332 (*floats-s->c-fun-table*): Ditto.
4333 * hobbit.c,hobbit.h: Rebuild.
4334 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4335 * semantics.scm (rtx-simplify): Use /fastcall-make.
4337 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4339 * insn.scm (<insn>): Delete members condition, compiled-condition.
4340 (<insn>,make!): Update
4341 (<insn> getters,setters): Update.
4342 (-insn-parse,insn-read,define-full-insn): Update.
4343 * minsn.scm (minsn-make-alias): Update.
4344 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4345 (ifmt-compute!): Ditto.
4346 * sim.scm (sim-finish!): Update.
4347 * simplify.inc: (define-normal-insn): Update.
4348 * sid-cpu.scm (gen-semantic-code): Update.
4350 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4351 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4352 (ifmt-compute!): Ditto.
4354 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4356 * minsn.scm (minsn-compute-iflds): Print better error message for
4359 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4361 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4363 * Makefile.am (HOBFLAGS): New variable.
4364 (cgen-hob.c): Use it.
4366 (libcpu_a_SOURCES): Add hob-sup.c.
4367 (hob-sup.o): New rule.
4368 * Makefile.in: Rebuild.
4369 * cgen.c: #include hob-sup.h.
4370 (cgen_init_c): Call hobbit_init_support.
4371 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4372 (*special-scm->c-functions*): Add them.
4373 (display-c-expression): Handle *c-symbol*.
4374 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4375 (*floats-s->c-fun-table*): Ditto.
4376 (normalize): Recognize /fastcall-make.
4377 (normalize-fastcall-make): New proc.
4378 * hobbit.c,hobbit.h: Rebuild.
4379 * hob-sup.scm: New file.
4380 * hob-sup.c: New file.
4381 * hob-sup.h: New file.
4382 * read.scm: Load hob-sup.scm.
4383 * rtl.scm (-rtx-name-list): New variable.
4384 (rtx-name-list): New proc.
4385 (rtx-lookup): Try symbol first.
4386 (def-rtx-node): Add name to -rtx-name-list.
4387 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4388 (-rtx-traverse-anymode): New proc.
4389 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4390 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4391 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4392 (-rtx-traverse-{symornum,object}): New procs.
4393 (-rtx-make-traverse-table): Rewrite.
4394 (-rtx-traverse-operands): Rewrite arg-types handling.
4395 Handle #f result of traverser.
4396 (-rtx-traverse): Renamed from -rtx-traverse-normal.
4397 Move debug handling here.
4398 (-rtx-traverse-debug): Delete.
4399 (rtl-finish!): Change -rtx-traverse-table into list of handlers
4401 * semantics.scm (semantic-compile:process-expr!): Fix call to
4403 * utils.scm (map1-improper): New proc.
4405 1999-06-08 Doug Evans <devans@casey.cygnus.com>
4407 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4409 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4410 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4411 (<operand>,cxmake-get): Tweak.
4412 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
4414 1999-06-07 Doug Evans <devans@casey.cygnus.com>
4416 * thumb.cpu (dnti): Delete timing spec.
4419 * arm.cpu (arm isa): New fields condition, setup-semantics.
4420 (thumb isa): New field setup-semantics.
4421 (h-gr): Add attribute CACHE-ADDR.
4422 * arm7.cpu (dnai): Delete condition.
4423 (eval-cond): Delete.
4425 * mach.scm (<isa>): New member setup-semantics.
4426 (-isa-parse-setup-semantics): New proc.
4427 (-isa-parse): New arg setup-semantics.
4428 (-isa-read): Recognize setup-semantics.
4430 * sid-cpu.scm (gen-extract-fields): Split into two:
4431 gen-extract-ifields, gen-extract-ifmt-ifields.
4432 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
4433 tracing begin/end messages (done by caller now).
4434 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
4435 tracing begin/end messages (done by x-before,x-after virtual insns).
4436 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
4437 end so don't have to look it up again next time.
4438 * sid-decode.scm (-decode-expr-ifield-values): New proc.
4439 (-decode-expr-ifield-tracking-key): New proc.
4440 (-decode-expr-ifield-tracking): New proc.
4441 (-decode-expr-ifield-values-used): New proc.
4442 (-decode-expr-ifield-mark-used!): New proc.
4443 (-gen-decode-expr-set-itype): New proc.
4444 (-gen-decode-expr-entry): Rewrite.
4445 (-gen-decode-table-entry): New proc.
4446 (-gen-decoder-switch): Use it.
4447 (-gen-virtual-insn-finder): New proc.
4448 (-gen-argbuf-elm): Move here from sid.scm.
4449 (-gen-argbuf-hw-elm): Ditto.
4450 (-gen-argbuf-fields-union): Add entries for chain,before insns.
4451 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4452 conditional-execution isas.
4453 (-gen-decode-fn): Record conditional-exec ifield.
4454 * sid.scm (-current-pbb-engine?): New global.
4455 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4456 (<ifield>,gen-ifld-extract): New arg `indent'.
4457 (<multi-ifield>,gen-ifld-extract): Ditto.
4458 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
4459 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4460 (-gen-arch-model-decls): Only scan real insns.
4461 (scache-engine-insns,pbb-engine-insns): New procs.
4462 (-create-virtual-insns!): New proc.
4463 (sim-finish!): Call it.
4464 (-decode-specialize-insn?): New proc.
4465 (-decode-specialize-build-assertion): New proc.
4466 (-decode-specialize-insn-1): New proc.
4467 (-decode-specialize-insn): New proc.
4468 (-fill-sim-insn-list!): New proc.
4469 (sim-analyze!): Create copies of insns to be specialized.
4470 * utils-cgen.scm (obj-set-name!): New proc.
4472 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4473 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4475 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
4477 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4478 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4479 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4480 (attr): Rewrite test for insn owner.
4481 (member): New rtx function.
4482 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4483 as separate function.
4484 (rtx-ifield?,rtx-ifield-name): New procs.
4485 (rtx-operand-obj): Rewrite.
4486 (rtx-operand-name): New proc.
4487 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4488 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4489 (tstate-make): New args owner, known. All callers updated.
4490 (tstate-known-lookup): New proc.
4491 (rtx-traverse): New arg owner. All callers updated.
4492 (rtx-make-bool): New proc.
4493 (rtl-find-ifields): Rewrite.
4494 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4495 * semantics.scm: ... here.
4496 (rtx-const-equal,rtx-const-list-equal): New procs.
4497 (-build-known-values): New proc.
4498 (semantic-compile): New arg `insn'. Call rtx-simplify.
4499 (semantic-attrs): Ditto.
4500 * rtx-funcs.scm (member,number-list): New rtx functions.
4502 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4503 Rewrite. Delete arg `all-attrs'. All callers updated.
4504 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
4506 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4508 * decode.scm (subdtable-add): Handle `expr' entries.
4509 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
4510 (exprtable-entry-*): Update.
4511 (exprtable-entry-iflds): New proc.
4512 (exprentry-cost): New proc.
4513 (exprtable-sort,-gen-exprtable-name): New procs.
4514 (exprtable-make): New arg `name'. All callers updated. use vector.
4515 (exprtable-*): Update.
4516 (-build-decode-table-entry): Don't issue collision warning if all are
4517 specialized insns. Sort exprtable entries before building table.
4519 * read.scm (-reader-process-expanded-1): Move pretty printing of
4520 input to logging level 4.
4522 * utils.scm (string-list->string): New proc.
4524 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4526 (insn-read): Delete leading '-' in name. All callers updated.
4527 (real-insn?): New proc.
4528 (real-insns): Rewrite.
4529 (insn-has-ifield?): New proc.
4530 (insn-builtin!): Create insn attribute SPECIALIZED.
4532 * mach.scm (<arch>): Delete member app-data.
4533 (current-raw-insn-list): New proc.
4534 (insn-list-car,insn-list-splice!): New procs.
4535 (<decode-specialize>): New class.
4536 (-isa-parse-decode-specialize): New proc.
4537 (-isa-parse-decode-specializes): New proc.
4538 (<isa>): New members `condition', `decode-specializes'.
4539 (-isa-parse-condition): New proc.
4540 (-isa-parse): New args condition, decode-specializes.
4541 (-isa-read): Recognize condition, decode-specializes.
4542 (-isa-add-decode-specialize!): New proc.
4543 (modify-isa): New proc.
4544 (isa-conditional-exec?,state-conditional-exec?): New procs.
4545 (arch-init!): New reader command `modify-isa'.
4547 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4548 (mode-signed,mode-unsigned?): New procs.
4550 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
4552 * types.scm (<array>): New method get-shape.
4553 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4555 (hw-shape,hw-num-elms): New procs.
4556 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4557 if there's more than 255 registers.
4558 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4560 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4563 1999-05-21 Doug Evans <devans@casey.cygnus.com>
4565 * cgen-sid.scm (sim-arguments): Add -X.
4566 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4567 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4568 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
4569 Simplify by supporting pbb engine only.
4570 (-gen-sem-switch-init): New proc.
4571 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4572 (cgen-sem-switch.cxx): New proc.
4573 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4574 with with-pbb?. Support dual scache/pbb engines.
4575 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4576 Support dual scache/pbb engines.
4577 (cgen-decode.h): Generate semantic fn decls if with-scache?.
4578 * sid.scm (*) with-pbb? replaces with-sem-switch?.
4579 (sim-finish!): Create pbb support virtual insns if with-pbb?.
4581 1999-05-10 Ben Elliston <bje@cygnus.com>
4583 * arm7.cpu: Remove coprocessor related fields, operands and insn
4584 definitions for now. Take the undefined instruction trap instead.
4585 (ldmda-wb): New instruction.
4586 (ldmib-wb): Likewise.
4587 (ldmdb-wb): Likewise.
4588 (stmdb-wb): Likewise.
4589 (stmib-wb): Likewise.
4590 (stmda-wb): Likewise.
4592 1999-05-08 Doug Evans <devans@casey.cygnus.com>
4594 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4595 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4597 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4598 hobbit can't handle optional third arg.
4600 1999-05-07 Doug Evans <devans@casey.cygnus.com>
4602 * arm.cpu (h-tbit): Delete set spec.
4603 (h-mbits): Don't call arm_mbits_set in set spec.
4604 * arm.sim: New file.
4605 * hardware.scm (modify-hardware): New proc.
4606 (hardware-init!): Add modify-hardware command.
4607 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4608 (-hw-gen-set-quiet): Ditto.
4609 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
4610 hardware attribute. Load $arch.sim file if present.
4611 * utils-cgen.scm (keyword-list?): New proc.
4612 (keyword-list->arg-list,arg-list-validate-name): New procs.
4613 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4615 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4617 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4620 * attr.scm (obj-prepend-atlist!): New proc.
4622 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4624 * sid.scm (<operand>,profilable?): Use op:type.
4625 * sim.scm (<operand>,profilable?): Use op:type.
4627 1999-05-04 Doug Evans <devans@casey.cygnus.com>
4629 * utils.scm (find-index,find): Be more stack friendly.
4631 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4634 1999-05-01 Doug Evans <devans@casey.cygnus.com>
4636 * arm.cpu (h-gr-usr): New hardware element.
4637 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4638 (arm-mode): New keyword.
4639 (h-mbits): Add set spec.
4640 (h-spsr): Implement get/set specs.
4642 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4643 (-reader-process-expanded-1): Pretty print logging output.
4645 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4646 (cgen-cpu.h): Print enums before hardware elements.
4647 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4648 * sid-decode.scm (cgen-decode.cxx): Ditto.
4649 * sid-model.scm (cgen-model.cxx): Ditto.
4651 * utils-cgen.scm (context-error): Accept variable number of
4654 * rtx-funcs.scm (error:): New rtx function.
4655 * rtl-c.scm (s-case-vm): New proc.
4656 (-gen-non-vm-case-get,s-case-non-vm): New procs.
4657 (s-case): Simplify, handle non-VM result.
4658 (error:): New rtx function.
4660 1999-04-30 Doug Evans <devans@casey.cygnus.com>
4662 * arm.cpu (h-pc): Add set spec to zero bottom bits.
4663 (test-hi,test-ls): Fix cbit handling.
4664 (shift-type,h-operand2-shifttype): Move here ...
4665 * arm7.cpu: ... from here.
4666 (set-cond,set-cond-maybe,dnix): Delete, unused.
4667 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4668 * arm.cpu: ... to here.
4669 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4670 (alu-cmn): Use set-add-flags.
4671 (alu-tst): Use set-zn-flags.
4672 (alu-cmp): Use set-sub-flags.
4673 (lsl,lsr,asr): Set condition codes.
4674 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4675 (alu-op): Split into three: alu-logical-op,alu-arith-op,
4677 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4678 All callers updated.
4679 (sub-sp): Rename from add-sp-neg.
4680 (f-lbwl-offset): Delete.
4681 (f-lbwl-hi,f-lbwl-lo): New ifields.
4682 (lbwl-hi,lbwl-lo): Update.
4683 (bl-hi): Add 4 to pc.
4684 (push-reg,pop-reg): Simplify.
4685 (push,push-lr): Push registers in correct order.
4686 (pop,pop-pc): Pop registers in correct order.
4687 (save-reg-inc,load-reg-inc): Simplify.
4688 (ldmia): Save registers in correct order.
4690 1999-04-30 Ben Elliston <bje@cygnus.com>
4692 * arm7.cpu (f-op-hdt): Remove; unused.
4693 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4694 (f-ror-imm8): New multi-ifield.
4695 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4697 (f-uimm12): New field.
4698 (ror-imm8): New operand.
4700 (hdt-offset8): Reinstate operand.
4701 (offset4-hi,offset4-lo): Remove.
4702 (set-cond): Remove macro; unused.
4703 (set-cond-maybe): Likewise.
4704 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4705 (store-word/byte): Likewise.
4706 (load-halfword): Use hdt-offset8 multifield operand instead of two
4707 4-bit operands that are explicitly combined by semantic code.
4708 (do-halfword-store): Bug fix. Set address when not preindexing.
4709 (store-halfword): Also use hdt-offset8 operand.
4710 (arith-op): Avoid clobbering source registers when one of them is
4711 the destination register.
4712 (arith-imm-op): Likewise.
4713 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4714 (teq-imm): Likewise.
4715 (ldm-p): Rename to ldmdb.
4716 (stm-pw): Rename to stmdb-wb.
4717 (multi-action): New macro; test reg-list bits and execute a
4718 semantic fn if the bit is set.
4719 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4720 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4721 (all insns): Use dnai entries for simplicity rather than dni.
4722 (*): Use short-form of (const ..).
4724 1999-04-29 Doug Evans <devans@casey.cygnus.com>
4726 * rtl.scm (<rtx-func>): Rename member type to style. Rename
4727 member eval to evaluator.
4728 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
4729 (tstate-make): Delete arg op-fn. All callers updated.
4730 (tstate-op-fn,tstate-set-op-fn!): Delete.
4731 (rtx-traverse): Delete op-fn arg. All callers updated.
4732 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4733 split out of -simplify-for-compilation.
4735 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4736 (cgen_DEPENDENCIES): Add stamp-cgen.
4737 (stamp-cgen): New rule.
4738 * Makefile.in: Rebuild.
4740 * rtl-c.scm (enum:): Define emitter for.
4741 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4743 (rtx-constant-value,rtx-enum-value): New procs.
4744 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4745 (rtx-compile-time-constant?): Return #t for enums.
4746 (rtx-true?,rtx-false?): Handle enums.
4747 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4748 building result by hand.
4749 (rtx-simplify-eq-attr-insn): Ditto.
4750 * rtx-funcs.scm (enum:,enum): New rtx functions.
4752 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4754 (arch-analyze-insns!): New proc.
4755 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4756 of calling ifmt-compute! directly.
4757 * sid.scm (-sim-insns-analyzed?): Delete.
4758 (sim-analyze!): Call arch-analyze-insns! instead of calling
4759 ifmt-compute! directly.
4760 * sim.scm (-sim-insns-analyzed?): Delete.
4761 (sim-analyze!): Call arch-analyze-insns! instead of calling
4762 ifmt-compute! directly.
4764 * utils.scm (string-take-with-filler): New proc.
4765 (string-take): Use it.
4767 * pgmr-tools.scm: New file.
4768 * read.scm: Load it.
4769 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4771 * insn.scm (insn-base-mask): Renamed from insn:mask.
4772 All callers updated.
4773 (insn-base-mask-length): Renamed from insn:mask-length.
4774 All callers updated.
4775 (insn-foo): Renamed from insn:foo. All callers updated.
4776 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
4777 * iformat.scm (compute-insn-base-mask-length): Renamed from
4778 compute-insn-mask-length. All callers updated.
4779 (compute-insn-base-mask): Renamed from compute-insn-mask.
4780 All callers updated.
4782 * enum.scm (-enum-parse-prefix): New proc.
4783 (<enum>,make!): Don't parse enum values here.
4784 (-enum-parse): Do it here. Call -enum-parse-prefix.
4785 (define-full-insn-enum): Ditto.
4786 (enum-vals-upcase): New proc.
4787 * hardware.scm (define-keyword): Make enum prefix uppercase.
4788 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
4790 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
4791 (<ifield>,field-extract): New method.
4792 (<multi-ifield>,field-extract): New method.
4793 (ifld-extract): New proc.
4794 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
4795 (ifld-extract-fn-name): Renamed from ifld-extract.
4797 * ifield.scm (ifld-new-value): Renamed from ifield-make.
4798 All callers updated.
4800 * ifield.scm (ifld-lsb0?): New proc.
4801 (sort-ifield-list): New arg up?. All callers updated.
4802 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
4803 rather than global state.
4805 1999-04-27 Doug Evans <devans@casey.cygnus.com>
4807 * insn.scm (pretty-print-insn-format): New proc.
4809 * Makefile.in: Rebuild.
4810 * aclocal.m4: Rebuild
4811 * configure: Rebuild.
4813 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
4815 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
4816 * configure: Rebuild.
4817 * aclocal.m4: Rebuild.
4818 * Makefile.in: Rebuild.
4819 * doc/Makefile.in: Rebuild.
4820 * doc/version.texi: Rebuild.
4822 1999-04-25 Doug Evans <devans@casey.cygnus.com>
4824 * utils.scm (bits->bools): New proc.
4826 1999-04-23 Doug Evans <devans@casey.cygnus.com>
4828 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
4829 subfield's gen-ifld-extract-decl method.
4831 1999-04-23 Ben Elliston <bje@cygnus.com>
4833 * arm7.cpu (ldrsh-pu): Remove.
4834 (do-halfword-load): New pmacro.
4835 (load-halfword): Likewise.
4836 (do-halfword-store): Likewise.
4837 (store-halfword): Likewise.
4838 (strh-*): New instructions.
4839 (ldrsb-*): Likewise.
4841 (ldrsh-*): Likewise.
4843 1999-04-22 Doug Evans <devans@casey.cygnus.com>
4845 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
4848 * arm7.cpu (do-word/byte-store): Fix typo.
4850 1999-04-22 Ben Elliston <bje@cygnus.com>
4852 * arm7.cpu (do-word/byte-load): Handle cases where the destination
4853 register is the program counter (R15).
4855 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
4856 (str-*): Implement using store-word-byte. Remove older versions.
4857 (bic): Use the `inv' rtx for obtaining bitwise complements.
4858 (bic-imm): Likewise.
4860 (mvn-imm): Likewise.
4861 (store-indev-reg): Remove crufty pmacro.
4862 (load-indiv-reg): Likewise.
4863 (ldm-p): Reverse the order of register processing for decrement.
4865 (stbi): Remove; handled by the str-* insns.
4867 1999-04-21 Doug Evans <devans@casey.cygnus.com>
4869 * thumb.cpu (cmp): Fix carry bit computation.
4872 1999-04-20 Doug Evans <devans@casey.cygnus.com>
4874 * arm.cpu (h-tbit): Specify set spec.
4876 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
4877 (set-sub-flags): Interpret "carry bit" as a borrow.
4878 (all sub/cmp insns): Carry bit is actually a borrow bit.
4879 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
4880 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
4882 (hireg-add,hireg-cmp,hireg-move): Ditto.
4884 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
4885 (-CGEN-LANG-VERSION): Ditto.
4887 1999-04-18 Doug Evans <devans@casey.cygnus.com>
4889 * pmacros.scm (-pmacro-make): New arg `default-values',
4890 all callers updated.
4891 (-pmacro-default-values): New proc.
4892 (-pmacro-process-keyworded-args): New proc.
4893 (-pmacro-process-args): New proc.
4894 (-pmacro-invoke): Process arguments before expanding macro.
4895 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
4896 (define-pmacro): Handle default values specified in arg list.
4897 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
4898 (rtx-boolif-op-arg[01]): New procs.
4899 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
4900 (rtx-simplify): Handle not,orif,andif.
4901 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
4902 * utils.scm (alist-copy): New proc.
4903 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
4905 (swi): Explicitly set pc.
4907 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
4909 1999-04-17 Ben Elliston <bje@cygnus.com>
4911 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
4912 correctly adjusts the program counter now.
4914 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
4915 (f-signed?): Rename from `f-hdt-signed?'.
4916 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
4917 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
4918 (f-hdt-offset8): Use new field names.
4919 (ldr): Use `imm12' field, not `offset12', since we do our own
4921 (str, str-*): Likewise.
4922 (ldu-*): Remove most; better not implemented than broken.
4924 (ldrsh-pu): New insn.
4928 (ldm-p): Likewise; replace (load-indiv-reg) version.
4930 1999-04-15 Doug Evans <devans@casey.cygnus.com>
4932 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
4933 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
4934 (*): Explicitly specify mode in c-call.
4935 (logical-op): Recognize sets of h-gr[15] as sets of pc.
4937 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
4938 (arith-imm-op): New pmacro.
4939 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
4940 * thumb.cpu (bx-rs,bx-hs): Rewrite.
4942 1999-04-14 Doug Evans <devans@casey.cygnus.com>
4944 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
4946 * rtl.scm (rtl-find-ifields): Implement.
4948 * utils-gen.scm: New file.
4949 * read.scm: Load it.
4950 * desc.scm: Move generic attribute code to utils-gen.scm.
4951 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
4952 * Makefile.in: Rebuild.
4954 * arm7.cpu (R15-OFFSET): New attribute.
4956 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
4957 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
4958 for reg-shift version.
4960 (data processing insns): Reorganize. Use dnai.
4962 * attr.scm (attr-kind): New proc.
4963 (attr-list-enum-list): Rewrite.
4964 (-attr-sort): Split result into two lists, bools and non-bools.
4965 (current-attr-list-for): Update.
4967 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
4968 * sid-cpu.scm (-gen-attr-decls): New proc.
4969 (-gen-insn-attr-decls): New proc.
4970 (cgen-desc.h): New proc.
4971 (cgen-cpu.h): Put everything in @cpu@ namespace.
4972 (gen-parallel-exec-type): Change prefix of parexec struct from
4974 (-gen-trace-record-type): Ditto for trace_record struct.
4975 (-gen-write-case): Update.
4976 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
4977 @prefix@. Update scache struct references.
4978 (-gen-sem-case): Update scache struct references.
4979 (-gen-sem-switch-fn): Update idesc struct reference.
4980 Update insn_type enum reference.
4981 (cgen-write.cxx): Update scache,argbuf references.
4982 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
4983 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
4984 from @cpu@ to @prefix@.
4985 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
4986 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
4987 from @CPU@ to @PREFIX@.
4988 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
4989 from @CPU@ to @PREFIX@.
4990 (-gen-decode-insn-globals): Generate insn attributes.
4991 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
4992 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
4993 semantic fn typedef.
4994 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
4995 Change prefix of scache struct from @cpu@ to @prefix@.
4996 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
4997 Change prefix of idesc struct from @cpu@ to @prefix@.
4998 Change prefix of insn_type enum from @cpu@ to @prefix@.
4999 (-gen-argbuf-fields-union): Change prefix of sem_fields union
5000 from @cpu@ to @prefix@.
5001 (-gen-scache-decls): Change prefix of scache struct from
5002 @cpu@ to @prefix@. Update idesc struct name.
5003 Update decode,execute methods.
5004 (-gen-extract-case): Update to type name changes.
5005 (-gen-decode-fn): Ditto.
5006 (cgen-decode.h): Put everything in @cpu@ namespace (except
5007 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
5008 (cgen-decode.cxx): Add using namespace @cpu@.
5009 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
5010 model_mark_get/set from @cpu@ to @prefix@.
5011 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
5013 (gen-model-fn-decls): Update idesc struct name. Change prefix
5014 of model_insn_before/after from @cpu@ to @prefix@.
5015 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
5016 Update insn_word type name.
5017 (-gen-model-timing-table): Update INSN_TIMING struct name.
5018 (-gen-model-init-fn): Update MODEL_DATA struct name.
5019 (-gen-mach-defns): Update name of init_idesc_table fn.
5020 (cgen-model.cxx): Add using namespace @cpu@.
5021 * sid.scm (gen-cpu-class): Delete.
5022 (gen-attr-type): New proc.
5023 (gen-obj-attr-sid-defn): New proc.
5024 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5025 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5027 (gen-cpu-insn-enum): Update name of insn enum.
5028 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5030 (swi): Rename @cpu@_swi to @prefix@_swi.
5032 * decode.scm (-build-decode-table-entry): Remove heuristic for
5033 distinguishing insns, and use insn ifield-assertion specs.
5035 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5036 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5037 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5038 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5039 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5040 all callers updated.
5041 (gen-attr-name): New proc
5042 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5043 (gen-obj-attr-defn): Delete num_nonbools count.
5045 * iformat.scm (ifmt-analyze): Handle insn-condition.
5046 (ifmt-compute!): Ditto.
5047 * insn.scm (<insn>): Specify default value for condition,
5048 post-cond-trap,compiled-condition,compiled-semantics.
5049 (<insn>,make!): New arg condition.
5050 (<insn>): Add getters for condition,compiled-condition.
5051 (-insn-parse): New arg condition, all callers updated.
5052 (-insn-read): Recognize condition spec.
5053 (define-full-insn): New arg condition.
5054 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5055 * semantics.scm (semantic-compile): Change arg sem-code to
5057 (semantic-attrs): Ditto.
5058 * sim.scm (sim-finish!): Update calls to define-full-insn.
5059 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5060 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5061 * sid.scm (sim-finish!): Update call to define-full-insn.
5063 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5065 * Makefile.am (sim-cpu): Allow specification of ISA.
5066 * Makefile.in: Rebuild.
5068 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5070 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5072 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5074 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5076 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5078 * attr.scm (atlist?): New proc.
5079 (-attr-eval): Rewrite.
5080 (attr-parse): New proc.
5081 (atlist-parse): Use it.
5083 * decode.scm (exprtable-entry-make): New proc.
5084 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5085 (exprtable-make,exprtable-insns): New procs.
5087 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5089 (hardware-builtin!): Make h-memory a vector.
5091 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5092 All callers updated.
5093 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5095 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5097 (-insn-parse): Set semantics to #f if not specified.
5098 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5100 (-parse-insn-format): Recognize `=' iformat spec.
5102 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5103 (isa-max-insn-bitsize): Ditto.
5105 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5107 (<ifield>,gen-extract): Ditto.
5108 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5109 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5110 (gen-define-ifmt-ifields): New proc.
5111 (gen-semantic-code): Rewrite.
5112 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5113 (-gen-decoder-switch): Handle expression tables.
5114 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5116 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5117 instead of gen-define-fields.
5118 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5120 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5121 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5122 (-gen-ifld-extract-beyond): Ditto.
5123 (<multi-ifield>,gen-ifld-extract): Ditto.
5124 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5125 rtl evaluation code.
5126 (op:read): Build an <eval-state> to pass to gen-read.
5127 (op:write): Build an <eval-state> to pass to gen-write.
5128 (op:record-profile): Build an <eval-state> to pass to
5130 * sim-cpu.scm (gen-semantic-code): Rewrite.
5131 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5133 (-gen-ifld-extract-beyond): Ditto.
5134 (<multi-ifield>,gen-ifld-extract): Ditto.
5135 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5136 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5137 rtl evaluation code.
5138 (op:read): Build an <eval-state> to pass to gen-read.
5139 (op:write): Build an <eval-state> to pass to gen-write.
5140 (op:record-profile): Build an <eval-state> to pass to
5143 * operand.scm (<operand>): Give `selector' default value of #f.
5144 Give `num' default value of -1. Give `cond?' default value of #f.
5145 (op:new-mode): Delete arg `set?', all uses updated.
5147 * read.scm (reader-error): Handle #f return from port-filename.
5148 (-init-parse-cpu!): Call rtl-c-init!.
5149 (reader-install-builtin!): Call rtl-builtin!.
5151 * rtl-c.scm: New file.
5152 * semantics.scm: New file.
5153 * read.scm: Load them.
5154 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5156 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5158 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5159 (-rtx-num-text,-rtx-max-num): New globals.
5160 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5161 (-rtx-macro-lookup): New proc.
5162 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5163 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5164 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5165 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5166 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5167 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5168 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5169 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5170 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5171 (rtx-pretty-name): New proc.
5172 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5173 (rtx-traverse-*): Rewrite rtx traversing.
5174 (rtx-eval-*): Rewrite rtx evaluation.
5175 (rtx-compile): New proc.
5176 (rtx-simplify): New proc.
5177 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5178 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5179 (ifield,index-of): Rewrite.
5180 (name): Renamed from `operand:'.
5181 (operand,xop,local): New rtx's.
5182 (current-insn): Rewrite.
5183 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5184 (cgen-hob.h): Remove rule for.
5185 (cgen-hob.o): Depend on cgen-hob.c only.
5186 * Makefile.in: Rebuild.
5188 * utils-cgen.scm (vmake): New proc.
5189 (<context>): New class.
5190 (context-make-prefix,context-error): New procs.
5192 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5194 * i960.cpu: Add some ??? comments.
5195 (xnor, ornot): New instructions.
5196 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5198 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5200 * cos.scm (-object-error): Print better error message.
5202 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5203 (-pmacro-env-ref): Renamed from -env-ref.
5205 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5207 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5209 (hardware-builtin!): Delete h-pc builtin.
5210 * arm.cpu (h-pc): Define.
5211 (h-gr): Delete get,set specs. Make array of 16 regs again.
5212 * arm7.cpu (set-logical-cc-maybe): Delete.
5213 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5214 (data processing insns): Rewrite.
5215 * m32r.cpu (h-pc): Define.
5216 * fr30.cpu (h-pc): Define.
5217 * i960.cpu (h-pc): Define.
5218 * sparc.cpu (h-pc): Define.
5220 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5221 (s-parallel): Replace do {...} while (0) with {...}.
5222 (s-sequence): Ditto.
5224 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5226 (-gen-write-case,-gen-sem-case): Ditto.
5227 (-gen-sem-case): Only specify `written' if profiling or
5228 parallel-write-back.
5229 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5230 (-gen-sem-switch-fn): New proc.
5231 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5232 based on with-sem-switch option.
5233 * sid-decode.scm (-gen-decode-insn-globals): Only define
5234 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5235 addresses in idesc_table if !with-sem-switch.
5236 (-gen-sem-fn-decls): Rewrite.
5237 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5238 member based on with-sem-switch. Only define
5239 `idesc_table_initialized_p' member if with-sem-switch.
5240 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5241 * sid.scm (-with-sem-switch?): New variable.
5242 (option-init!): Initialize it.
5243 (option-set!): Set it.
5244 (with-sem-switch?): New proc.
5245 (-op-gen-set-trace): Only emit `written' reference if profiling.
5246 (sim-finish!): Use h_pc_set to set pc.
5248 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5250 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5251 All callers updated.
5252 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5254 * sid.scm (gen-argbuf-type): Delete.
5255 (-gen-argbuf-fields-union): Move to ...
5256 * sid-decode.scm: ... here.
5258 * read.scm (-reader-process-expanded-1): New proc.
5259 (-reader-process-expanded): Call it to catch nested begin's.
5260 (reader-process): Move `begin' handling to -reader-process-expanded.
5262 * insn.scm (-insn-read): Fix name of `format' spec.
5264 * pmacros.scm (.pmacro): New builtin.
5265 (scan-symbol): If procedure macro, return macro rather than its symbol.
5266 (check-macro): Don't do lookup, instead check if (car expr) is
5268 (scan-list): Handle .pmacro.
5269 (scan): No longer re-examine text for another macro invocation.
5270 (-pmacro-build-lambda): New proc.
5271 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5272 another, fetch the other's value (rather than doing it during
5275 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5277 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5278 * Makefile.in: Rebuild.
5280 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5281 (-fill-slot!): Simplify.
5282 (-build-slots): Simplify.
5284 * dev.scm (load-sid): Don't load sid-arch.scm.
5286 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5288 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5291 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5293 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5294 * decode.scm: ... here. New file.
5295 * sid-decode.scm: Use decoder computation code in decode.scm.
5296 * read.scm: Load decode.scm.
5298 * arm.cpu (arm710 model): Add u-exec function unit.
5299 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5300 Add get/set specs to redirect reg 15 to h-pc.
5301 (h-*): Indicate for both ARM and THUMB isas.
5302 (cbit,nbit,vbit,zbit): Ditto.
5303 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5304 (h-cpsr): Make virtual. Add get/set specs.
5305 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5306 (h-spsr): New virtual reg.
5307 * arm7.cpu (shift-type): New explicitly defined keyword.
5308 (h-operand2-shifttype): Use it.
5309 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5310 All callers updated. Don't set cbit.
5311 (logical-op): Add rm to ifield list. Change case to case:. Use
5312 shift-type enum as case choices. Set cbit.
5313 (and,orr,eor,add-imm): Uncomment out.
5314 (undefined): Temporarily comment out.
5315 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5316 (lda-pc,lda-sp): Ditto.
5317 (ldr-pc): Rename from ldr.
5318 (cbranch): Mark insns as being thumb insns.
5320 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5322 * cgen-sid.scm: Don't load sid-arch.scm.
5323 (sim-arguments): Delete unused entries.
5324 * sid-arch.scm: Delete.
5326 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5327 (<insn>,ifld-assertions): New member.
5328 (<insn>,make!): New arg ifld-assertions, all callers updated.
5329 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5330 (insn:fields): Delete.
5331 (-insn-parse): New arg ifld-assertions. All callers updated.
5332 (-insn-read,define-insn): New procs.
5333 (define-full-insn): New arg ifld-assertions. All callers updated.
5334 (insn-init!): New comment define-insn.
5336 * model.scm (-model-parse): Ensure at least one unit specified.
5338 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5339 (<c-expr-temp>,get-name): New method.
5340 (-rtx-make-current-closure,s-closure): New proc.
5341 (hw:): Wrap rtx indices in a closure.
5342 (-gen-case-prefix): New proc.
5344 * rtx-funcs.scm (case:): Fix call to s-case.
5345 (closure): New rtx func.
5347 * hardware.scm (<hardware-base>): New member isas-cache.
5348 (<hardware-base>,get-isas): New method.
5349 (hardware-builtin): Indicate for all isas.
5350 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5351 * mach.scm (current-arch-mach-name-list): Return list of names.
5352 (current-isa-mach-name-list): Ditto.
5353 (define-arch): Install builtin objects here.
5354 * read.scm (keep-atlist?): Only keep if both mach and isa are
5356 (keep-mach-atlist?): New proc.
5357 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5358 (reader-install-builtin!): Renamed from -install-builtin!.
5359 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5360 -gen-cpu-reg-access-defns. Rewrite.
5361 (gen-reg-access-defn): Delete.
5362 (-gen-hardware-struct): New proc.
5363 (-gen-hardware-types): Simplify. Add multiple-isa support.
5364 (gen-semantic-fn,-gen-all-semantics): Delete.
5365 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5366 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5367 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5368 Call sem-analyze-insns!.
5369 (cgen-semantics.cxx): Add multiple-isa support.
5370 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5371 (-gen-scache-decls,-gen-decode-fn): Ditto.
5372 (cgen-decode.h): Call sem-analyze-insns!.
5373 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5374 * sid.scm (-with-multiple-isa?): New variable.
5375 (option-init!): Initialize it.
5376 (option-set!): Set it.
5377 (with-multiple-isa?): New proc.
5378 (gen-cpu-ref): New arg isas. All callers updated.
5379 (gen-cpu-class): New proc.
5380 (*-get-macro,*-set-macro): Delete.
5381 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5382 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5383 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5384 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5385 (-sim-insns-analyzed): New global variable.
5386 (sim-init!): Reset it.
5387 (sim-analyze-insns!): New proc.
5388 (sim-analyze!): Don't do instruction analysis here.
5389 (sim-finish!): Specify isa of x-invalid insn.
5390 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5392 1999-03-22 Doug Evans <devans@casey.cygnus.com>
5394 * thumb.cpu (cpu,mach,model): Delete.
5395 (dntf): New pmacro. Use it for all field definitions.
5396 (dntop): New pmacro. Use it for all operand definitions.
5397 (asr): Correct field list.
5398 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5400 * utils-cgen.scm (define-getters): New macro to simplify
5401 writing class accessors.
5402 (define-setters): Ditto.
5403 (sanitize): Recognize isa elements.
5405 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5406 state-parallel-exec?.
5407 * sid-model.scm (*): Ditto.
5408 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
5409 state-decode-assist.
5411 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5412 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5413 * sim-decode.scm (-gen-decode-switch): Ditto.
5415 * sim-arch.scm (-regs-for-access-fns): Delete.
5416 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5417 (-gen-arch-reg-access-defns): Delete.
5419 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5420 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5421 with state-parallel=exec?.
5422 (cgen-*): Call sim-analyze-insns! here.
5423 * sim-decode.scm (cgen-*): Ditto.
5424 * sim-model.scm (cgen-*): Ditto.
5425 * sim.scm (-sim-insns-analyzed): New global variable.
5426 (sim-init!): Reset it.
5427 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
5428 already done the analysis.
5430 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5433 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5434 (arm arch): Update isa spec.
5435 (arm,thumb isas): Define.
5436 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5437 (arm7tdmi mach): Add isa spec.
5438 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
5439 `const' on word number.
5440 * fr30.cpu (fr30 arch): Update isa spec.
5442 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5444 * i960.cpu (i960 arch): Update isa spec.
5446 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5447 liw-insns,parallel-insns moved to isas spec.
5448 * m32r.cpu (m32r arch): Update isas spec.
5450 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5451 liw-insns,parallel-insns moved to isa spec.
5452 * sparc.cpu (sparc arch): Update isas spec.
5453 (sparc isa): Define.
5454 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5455 decode-assist moved to isa spec.
5456 * sparc64.cpu (sparc64 cpu): Ditto.
5457 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5458 * desc-cpu.scm (-gen-isa-table-defns): New proc.
5459 (-gen-mach-table-defns): Output mach table.
5460 (-gen-hash-defines): Delete insn size macros, except for
5462 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
5463 (cgen-desc.h): Define MAX_ISAS.
5464 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
5465 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
5466 (arch-* accessors): Renamed from arch:*. All callers updated.
5467 (current-arch-isa-name-list): New proc.
5468 (-arch-parse-isas): Renamed from -arch-parse-isa.
5469 (def-isa-attr!): Rewrite.
5470 (<iframe>): New class.
5471 (<itype>): New class.
5473 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5474 (isa-integral-insn?,isa-parallel-exec?): New procs.
5475 (-isa-parse,-isa-read,define-isa): New proc.
5476 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5477 liw-insns moved to <isa>.
5478 (cpu-* accessors): Renamed from cpu:*. All callers updated.
5479 (-cpu-parse,-cpu-read): Update.
5480 (state-*): Renamed from state:*. All callers updated.
5481 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5483 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5484 (state-decode-assist): New proc.
5485 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5486 (-adata-set-derived!): Rewrite.
5487 (adata-integral-insn?): Renamed from adata:integral-insn?. All
5489 (arch-init!): Add define-isa command.
5490 * read.scm (<reader>): Default keep-isa member to (all).
5491 (reader-* accessors): Renamed from reader:*. All callers updated.
5492 (-keep-isa-set!): Call string->symbol on isa name list.
5493 (keep-isa-validate!): Rewrite.
5494 (current-isa): New proc.
5495 (keep-isa?): Recognize "all".
5496 (-init-parse-cpu!): New arg keep-isa. All callers updated.
5497 Call -keep-isa-set!.
5498 (cmd-if): Recognize keep-isa?.
5499 (cpu-load): New arg keep-isa. All callers updated.
5500 (-opt-spec-update): New proc.
5501 (common-arguments): First arg is string, not symbol.
5502 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
5504 * rtl.scm (rtx-get): Default mode of string arg is INT.
5506 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
5508 * rtx-funcs.scm (join:): Pass cpu to handler.
5510 * configure.in (guile_include_dir): Delete.
5511 * configure: Rebuild.
5512 * Makefile.in: Rebuild.
5513 * doc/Makefile.in: Rebuild.
5515 * sid-cpu.scm (-extract-chunk-specs): New proc.
5516 (gen-define-fields): Use it.
5517 (-extract-chunk): New proc.
5518 (-gen-extract-beyond-var-list): Use it.
5519 (gen-extract-fields): Simplify.
5521 1999-03-22 Ben Elliston <bje@cygnus.com>
5523 * arm7.cpu (ldri-p): New instruction.
5524 (swi): Do not vector through 0x8 yet--there is nothing there.
5527 (all): Use (const x) in subreg expressions.
5529 1999-03-19 Ben Elliston <bje@cygnus.com>
5531 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5534 1999-03-17 Doug Evans <devans@casey.cygnus.com>
5536 * fr30.cpu (define-arch): Specify "forced" default-alignment.
5537 * mach.scm (-parse-alignment): Recognize "forced" alignment.
5538 * sim-cpu.scm (-extract-chunk-specs): New proc.
5539 (gen-define-fields): Use it.
5540 (-extract-chunk): New proc.
5541 (-gen-extract-beyond-var-list): Use it.
5542 (gen-extract-fields): Simplify.
5544 Port to guile 1.3.1.
5545 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5546 (LIBIBERTY): New var.
5547 (HOB_OBJS): Add cgen-gh.o.
5548 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5549 * Makefile.in: Rebuild.
5550 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5551 * config.in: Rebuild.
5552 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5553 libncurses, libtermcap.
5554 Add checks for needed functions in guile 1.2 not in guile 1.3,
5555 and vice versa. Add test for 3 argument scm_make_vector.
5556 * configure: Rebuild.
5557 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5558 definitions if guile doesn't have them.
5559 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5560 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
5561 with gh_vector_set_x.
5562 (cgh_qsort): Replace gh_list_length with gh_length.
5563 * cgen-gh.h: Add decls for added functions.
5564 (cgh_qsort): Don't declare if IN_HOBBIT.
5565 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
5566 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5567 scm_make_vector with gh_make_vector.
5568 * cos.scm: Use vector-length instead of length on vectors.
5569 * dev.scm (cload): Make varargs proc with keyword/value args.
5570 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
5571 provide version that works with guile 1.2 or 1.3.
5572 Include private copy of scmhob.h.
5573 * scmhob.h: New file. Keep our own copy for now.
5575 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
5577 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5579 (-rtx-traverse-operands): Dump cx temp stack if debugging.
5580 (-cx-temp-dump-stack): Pretty up output.
5582 * arm.cpu: comment out thumb.cpu until isa support ready.
5583 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5584 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5585 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5587 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5589 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5591 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5592 (<hw-address>,mode-ok?): unsigned/signed are compatible.
5594 * operand (op:new-mode): Improve error message.
5596 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
5597 * arm7.cpu: New file.
5599 1999-03-12 Ben Elliston <bje@cygnus.com>
5601 * arm.cpu: Lots of minor fixes after desk checking.
5603 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5605 * thumb.cpu: snapshot of current work
5607 * rtl.scm (rtx-get): Tweak error message.
5609 1999-03-10 Doug Evans <devans@casey.cygnus.com>
5611 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5612 * Makefile.in: Rebuild.
5614 * cos.c (cos_vector_copy): New function.
5615 (_object_copy): Use it.
5617 * mode.scm (mode:eq?): Clean up.
5618 * rtl.scm (cx-new-mode): Copy attributes.
5619 (rtx-get): Don't make copy if <c-expr> with identical mode.
5621 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5623 (gr-names): h-gr register names moved here.
5625 (cr-names): h-cr register names moved here.
5627 (dr-names): h-dr register names moved here.
5629 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5630 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5631 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5633 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5635 (gr-names): h-gr register names moved here.
5637 (cr-names): h-cr register names moved here.
5639 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5640 (h-accums,h-psw): Ditto.
5641 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5643 (gr-names): h-gr register names moved here.
5644 (h-gr-indices): Delete.
5645 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
5646 (sparc64 h-gr): Ditto.
5647 (h-y): Add get/set specs.
5649 (fp operands): Rewrite.
5650 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5651 (h-tbr,h-cwp,h-wim): Ditto.
5652 * sparc64.cpu (h-fpsr): Add get/set specs.
5653 * sparccom.cpu (ldd-reg+reg): Load value all at once.
5654 (fp-ld-op): New arg `dest', all callers updated.
5655 (*): Replace `make-di' with `join'.
5657 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5659 (gen-semantic-code): Save/restore rtl generator state.
5660 (cgen-cpu.h): Call rtl-gen-init!.
5661 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5662 (-gen-ifld-extract-beyond): Ditto.
5663 (<multi-ifield>,gen-ifld-extract): Ditto.
5664 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5666 (-hw-gen-set-quiet-pc): Ditto.
5667 (<hw-pc>,gen-write): Ditto.
5668 (-hw-cxmake-get): Ditto. Call getter function if present.
5669 (<hw-register>,cxmake-get-raw): New method.
5670 (<hw-register>,gen-set-quiet-raw): New method.
5671 (-hw-gen-set-quiet): New arg `gstate'.
5672 (hw-fun-access?): Delete.
5673 (gen-reg-access-defn): Output function contents.
5674 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5676 (-gen-hw-index): Ditto.
5677 (op:read): Update gen-read invocation.
5678 (op:write): Update gen-write invocation.
5679 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5681 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5682 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5683 (<unit>,gen-profile-code): Update to sim.scm version.
5685 * sim-arch.scm (-regs-for-access-fns): New proc.
5686 (-biggest-reg-mode): New proc.
5687 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5688 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5689 virtual regs separately.
5690 (-gen-cpu-reg-access-defns): Replace fun-access? with new
5692 (gen-semantic-code): Save/restore rtl generator state.
5693 (cgen-cpu.h): Call rtl-gen-init!.
5694 (cgen-cpu.c): Ditto. #include cgen-ops.h.
5695 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
5696 renamed to mach-bfd-name.
5697 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5698 (-gen-ifld-extract-beyond): Ditto.
5699 (<multi-ifield>,gen-ifld-extract): Ditto.
5700 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5701 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5702 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5704 (hw-fun-access?): Delete.
5705 (-hw-gen-set-quiet-pc): New arg `gstate'.
5706 (<hw-register>,gen-get-macro): Rewrite.
5707 (<hw-register>,gen-set-macro): Rewrite.
5708 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5709 (-hw-cxmake-get): New arg `gstate'. Rewrite.
5710 (<hw-register>,cxmake-get-raw): New method.
5711 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
5712 (<hw-register>,gen-set-quiet-raw): New method.
5713 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5715 (-gen-hw-index): Ditto.
5716 (<hw-index>): New arg `gstate'.
5717 (-gen-hw-selector): Update call to rtx-c.
5718 (<pc>): New arg `gstate'.
5719 (op:read): Update gen-read invocation.
5720 (op:write): Update gen-write invocation.
5721 (<operand>,cxmake-get): Handle raw-reg.
5722 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5723 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5724 (<operand>,gen-set-quiet): Handle raw-reg.
5725 (<operand>,gen-set-trace): Handle raw-reg.
5726 (-gen-mach-data): mach:cpu renamed to mach-cpu.
5728 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5729 cgen_operand_type enum.
5730 (gen-operand-table): Add operand type enum. Replace pointer to
5731 hardware element with its enum. Null terminate table.
5732 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5733 Build operand table.
5734 * ifield.scm (-ifield-parse): Recognize ISA attribute.
5735 * mach.scm (<arch-data>): New member `isas'.
5736 (adata-isas): New accessor.
5738 (isa-default-insn-word-bitsize): New accessor.
5739 (isa-enum): New proc.
5740 (current-arch-default-insn-word-bitsize): Delete.
5741 (current-isa-list,current-isa-lookup): New procs.
5742 (-arch-parse-isa): New proc.
5743 (-arch-parse): Rewrite.
5744 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
5745 (define-arch): Define ISA attribute.
5746 (def-isa-attr!,isa-supports?): New procs.
5747 (<mach>): New member `isas'.
5748 (mach-isas): New accessor.
5749 (-mach-parse): New arg `isas', all callers updated.
5750 (-mach-read): Recognize `isas'.
5751 (arch-finish!): Rewrite.
5752 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5753 @arch@_cgen_get_{int,vma}_operand.
5754 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5755 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5756 of pointer to table entry.
5757 * opcodes.scm (gen-switch): Handle multiply defined operands.
5758 * operand.scm (op-sort): New proc.
5760 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5761 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5762 (hw-enum): Accept symbol argument.
5763 (hardware-builtin!): Delete attribute FUN-ACCESS.
5764 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5766 * attr.scm (atlist-source-form): New proc.
5767 (attr-builtin!): New attr `PRIVATE'.
5768 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5769 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5770 if they have `PRIVATE' attribute.
5771 (gen-hw-table-defns): Output definitions of explicitly defined
5773 * hardware.scm (<keyword>): New member print-name. Rename member
5774 `value' to `values', all uses updated.
5775 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
5776 (keyword-parse): Rewrite.
5777 (-keyword-read): New proc.
5778 (define-keyword): New proc.
5779 (-hw-parse-keyword): New proc.
5780 (-hw-parse-indices): Rewrite keyword handling, support new index spec
5782 (-hw-parse-values): Ditto.
5783 (-hw-parse-get,-hw-parse-set): Rewrite.
5784 (hardware-init!): Add new comment define-keyword.
5785 * mach.scm (<arch>): New member `kw-list'.
5786 (arch:kw-list,arch_set-kw-list!): New accessors.
5787 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
5789 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
5790 * mode.scm (mode-class-integral?): New proc.
5791 (mode-class-float?,mode-class-numeric?): New procs.
5792 (mode-integral?,mode-float?,mode-numeric?): New procs.
5793 (mode-compatible?): New proc.
5794 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
5796 (<ifield>,gen-extract): Ditto.
5797 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
5798 (<gstate>): New class.
5799 (gstate-simulator?,gstate-set-simulator?!): New accessors.
5800 (gstate-context,gstate-set-context!): New accessors.
5801 (gstate-macro?,gstate-set-macro?!): New accessors.
5802 (gstate-make,gstate-copy): New procs.
5803 (-rtl-current-gstate): New global.
5804 (current-gstate-simulator?): New proc.
5805 (current-gstate-context,current-gstate-macro?): New procs.
5806 (current-gstate,current-gstate-set!): New procs.
5807 (rtl-gen-init!): Rewrite.
5808 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
5809 (tstate-make): New arg `gstate', all callers updated.
5810 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
5811 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
5812 (tstate-gstate,tstate-set-gstate!): New accessors.
5813 (tstate-copy): New proc.
5814 (tstate-new-cond?,tstate-new-set?): Rewrite.
5815 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
5816 (rtx-traverse): New arg `gstate', all callers updated.
5817 (rtx-strdump): New proc.
5818 (-simplify-for-compilation): New arg `gstate', all callers updated.
5819 (semantic-in-out-operands): Ditto.
5820 (semantic-attrs): Ditto.
5821 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
5822 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
5823 (rtx-value): Rewrite.
5824 (<c-expr>,gen-name): New method.
5825 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
5826 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
5827 (cx-new-mode): New proc.
5828 (-rtx-c-with-tstate): New proc.
5829 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
5831 (-rtx-mode): Rewrite.
5832 (-rtx-mode-compatible?): New proc.
5833 (<c-expr-temp>): New member `value'.
5834 (cx-temp:value): New accessor.
5835 (<c-expr-temp>,make!): Override default method.
5836 (<c-expr-temp>,cxmake-get): Rewrite.
5837 (<c-expr-temp>,gen-set-quiet): Rewrite.
5838 (<c-expr-temp>,gen-set-trace): Rewrite.
5839 (gen-temp-defs): Use cx-temp:value.
5840 (record-temp!): New arg value, all callers updated.
5841 (cx-temp:cx:make): Delete.
5842 (-cx-temp-dump-stack): New proc.
5843 (rtx-get): New arg `gstate', all callers updated. Do mode
5844 compatibility checks. Ensure result has specified mode.
5845 (rtx-set-quiet): New arg `gstate', all callers updated.
5846 (rtx-set-trace): Ditto.
5847 (s-c-call): New arg `tstate', all callers updated.
5848 (s-c-raw-call): Ditto.
5849 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
5850 (s-cmpop,s-if,e-if): Ditto.
5851 (s-subreg): New proc.
5852 (-par-new-temp!): New proc.
5853 (-par-next-temp!): Rewrite.
5854 (-par-replace-set-dests): Use -par-new-temp!.
5855 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
5856 (s-sequence): Use -rtx-c-with-state.
5857 * rtx-funcs.scm (*): Update.
5858 (raw-reg:): New rtx function.
5860 (join:,subreg:): New rtx functions.
5862 * insn.scm (<insn>): New members pre-cond-trap, condition,
5863 post-cond-trap, compiled-condition.
5865 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
5867 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
5869 * utils-cgen.scm (parse-symbol): New proc.
5870 (parse-string): New proc.
5871 (gen-get-macro,gen-set-macro): New arg `index-args'.
5872 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
5873 Prepend \ to newlines.
5875 * utils.scm (alist-remove-duplicates): Delete.
5877 * sid.scm (sim-init!): Delete private debugging code.
5879 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
5881 * cgen-sid.scm: New file for C++ simulator application.
5882 * sid-arch.scm: Ditto.
5883 * sid-cpu.scm: Ditto.
5884 * sid-decode.scm: Ditto.
5885 * sid-model.scm: Ditto.
5887 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
5889 1999-03-05 Ben Elliston <bje@cygnus.com>
5891 * arm.cpu: New file.
5893 1999-03-03 Doug Evans <devans@casey.cygnus.com>
5895 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
5896 * Makefile.in: Rebuild.
5898 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
5899 (-attr-parse): Validate default value.
5901 * read.scm (-CGEN-VERSION): Change to 0.7.1.
5902 (-CGEN-LANG-VERSION): Ditto.
5903 (-keep-all-machs): Renamed from -keep-all, all uses updated.
5904 (<reader>): New member keep-isa plus accessors.
5905 (-keep-isa-set!,keep-isa-validate!): New procs.
5906 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
5907 (common-arguments): New variable.
5908 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
5909 (-debug-repl,continue): New procs.
5910 (-cgen,cgen): New procs.
5911 * cgen-gas.scm: Rewrite.
5912 * cgen-opc.scm: Rewrite.
5913 * cgen-sim.scm: Rewrite.
5914 * cgen-stest.scm: Rewrite.
5916 * gas-test.scm (gas-test-init!): Call opcodes-init!.
5917 (gas-test-finish!): Call opcodes-finish!.
5918 (gas-test-analyze!): Call opcodes-analyze!.
5919 (<hw-asm>): New method test-data.
5920 (<operand>,testdata): Rewrite.
5921 * sim-test.scm (sim-test-init!): Call opcodes-init!.
5922 (sim-test-finish!): Call opcodes-finish!.
5923 (sim-test-analyze!): Call opcodes-analyze!.
5924 (<hw-asm>): New method test-data.
5925 (<operand>,testdata): Rewrite.
5927 1999-03-01 Doug Evans <devans@casey.cygnus.com>
5929 * fixup.scm (reverse!): Define if missing.
5930 * *.scm: Use reverse! instead of list-reverse!.
5932 * utils.scm (leading-id-char?): New proc.
5933 (id-char?): Rewrite.
5934 (chars-until-delimiter): New proc.
5935 * opc-itab.scm (extract-syntax-operands): Rewrite.
5936 (strip-mnemonic): Rewrite.
5937 (compute-syntax): Rewrite.
5939 * pmacros.scm (-pmacro-substr): New proc.
5940 (pmacros-init!): Add builtin .substr.
5942 1999-02-26 Doug Evans <devans@casey.cygnus.com>
5944 * thumb.cpu: New file.
5946 1999-02-24 Doug Evans <devans@casey.cygnus.com>
5948 * Makefile.am (CGENCFLAGS): New variable.
5949 (WITH_HOBBIT): Use automake conditional.
5950 (CGEN_HOB_SRC): New variable.
5951 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
5952 (*.o): Compile with CGENCFLAGS.
5953 (cgen-hob.c): Simplify.
5954 (cgen-nohob.c): New rule.
5955 (hobbit): Renamed from hob.x.
5956 (CLEANFILES): Add cgen-nohob.c.
5957 * Makefile.in: Rebuild.
5958 * doc/Makefile.in: Rebuild.
5959 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
5960 (WITH_HOBBIT): Use AM_CONDITIONAL.
5961 * configure: Rebuild.
5962 * aclocal.m4: Rebuild.
5964 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
5965 with string-write-map.
5967 * sim-cpu.scm (hw-need-storage?): New proc.
5968 (-gen-hardware-types): Use it.
5969 (gen-parallel-exec-elm): Call op-save-index?.
5971 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5973 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
5975 (-gen-ifld-extract-beyond): Ditto.
5976 (<integer>): Delete all references.
5977 (<sim-hardware>): Delete.
5978 (hw-profilable?): New proc.
5979 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
5980 (<hw-register>): Rename method get-index-mode to save-index?.
5981 (<hw-register>): New methods gen-get-macro,gen-set-macro.
5982 (<hw-register>,gen-sym-decl): Make virtual.
5983 (<hw-memory>,gen-sym-decl): Make virtual.
5984 (<hw-memory>): Rename method get-index-mode to save-index?.
5985 (<hw-address>,gen-sym-decl): Make virtual.
5986 (<operand>): New method save-index?.
5987 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
5989 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
5990 prefix added. All uses updated.
5992 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
5993 rather than pointer to table entry.
5995 * opcodes.scm: Remove all attribute support, lives in desc.scm.
5996 Remove all hw-asm,op-asm support.
5997 (-gen-parse-number,-gen-parse-address): New procs.
5998 (<keyword>,gen-parse): Redo function name computation.
5999 (<keyword>,gen-print): Ditto.
6000 (<operand>,gen-function-name): Rewrite.
6001 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
6002 (opcodes-init!): Delete call to add-parser!.
6004 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
6005 Define enum using hardware semantic name.
6006 (-gen-hw-decl,-gen-hw-defn): New procs.
6007 (gen-hw-table-decls): Use -gen-hw-decl.
6008 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
6009 CGEN_HW_ENTRY structs.
6010 (gen-operand-table): Output hw's enum, not pointer to table entry.
6011 (-gen-cpu-open): Build table of selected hardware elements.
6013 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
6014 (<hardware> support): Delete.
6015 (<hw-asm>): Delete, moved to hardware.scm.
6016 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6017 (<hw-asm>,gen-table-entry): New method.
6018 (<hw-asm>,parse!): Delete.
6019 (<keyword>,gen-table-entry): New method.
6020 (<keyword>,parse!): Delete.
6021 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6022 for gen-decl,gen-defn,gen-ref,gen-init.
6023 (desc-init!): Don't create parser for operand asm specs.
6025 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6026 * ifield.scm (<ifield>): New member `mode'.
6027 (<ifield>,make!): New arg `mode'.
6028 (ifld-mode): Rewrite.
6029 (ifld-hw-type): Rewrite.
6030 (<ifield>,min-value): Rewrite.
6031 (<ifield>,max-value): Rewrite.
6032 (-ifield-parse): New arg `mode'.
6033 (-ifield-read): Update.
6034 (define-full-ifield): New arg `mode'.
6035 (define-full-multi-ifield): Ditto.
6036 (-multi-ifield-parse): Ditto.
6037 (-multi-ifield-read): Update.
6038 (define-full-multi-ifield): New arg `mode'.
6039 (ifield-builtin!): Update definition of f-nil.
6040 * simplify.inc (define-normal-ifield): Update call to
6042 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6043 (define-normal-hardware): Delete arg asm. New args indices, values,
6044 handlers. Update call to define-full-hardware.
6045 (define-simple-hardware,dsh): New pmacros.
6046 (define-normal-operand): Update call to define-full-operand.
6047 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6048 Specify INT/UINT mode instead.
6049 (h-gr,h-cr): Use "indices" instead of "asm".
6050 (h-dr,h-ps): Update keyword syntax.
6051 (h-r13,h-r14,h-r15): Ditto.
6052 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6053 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6054 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6055 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6056 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6057 Specify INT/UINT mode instead.
6058 (h-gr): Use "indices" instead of "asm".
6059 (h-cc): Update keyword syntax.
6060 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6061 Specify INT/UINT mode instead.
6062 (h-hi16,h-slo16,h-ulo16): Update.
6063 (h-gr,h-cr): Use "indices" instead of "asm".
6064 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6065 (h-accums): Update keyword syntax.
6066 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6067 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6068 Specify INT/UINT mode instead.
6069 (h-gr-indices): New pmacro.
6070 (h-gr32,h-gr64): Split up from h-gr.
6071 (h-a): Update type spec. Use values instead of asm spec.
6072 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6073 (h-y,h-annul-p): Ditto.
6074 (h-asr): Update keyword spec.
6075 (h-lo10,h-lo13,h-hi22): Update.
6076 (get-freg-spec,set-freg-spec): New pmacros.
6077 (h-fr32,h-fr64): Split up from h-fr.
6078 (rdd): Comment out get/set specs.
6079 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6080 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6081 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6082 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6083 UNSIGNED. Specify INT/UINT mode instead.
6084 (h-*): Use dsh instead of dnh where appropriate.
6085 (h-ixcc): Update type spec. Use "values" instead of "asm".
6086 (h-p,h-membarmask): Ditto.
6087 (membarmask): Use "handlers" instead of "asm".
6089 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6090 values,handlers,getters,setters plus accessors.
6091 (hw-mode-ok?,hw-default-mode): New procs.
6092 (<hardware-base>): Rename method new-mode to mode-ok?
6093 (<hardware-base>): New method get-index-mode.
6094 (hw-index-mode): New proc.
6095 (pc?): Delete, moved to operand.scm.
6096 (address?): New proc.
6097 (<hardware>): Delete.
6098 (<hw-asm>): Definition moved here from desc.scm.
6099 (keyword-parse): New proc.
6100 (hardware-parsers): Delete.
6101 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6102 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6103 (-hw-parse-get,-hw-parse-set): New procs.
6104 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6105 indices,values,handlers,get,set. Rewrite.
6106 (-hw-read-extra): Delete.
6108 (define-hardware): Don't add object if not selected.
6109 (define-full-hardware): Ditto.
6110 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6111 (<hw-register>): Member `type' moved to baseclass. Delete member
6113 (<hw-register>,parse!): Rewrite.
6114 (<hw-register>): Delete methods get-rank,get-mode.
6115 (<hw-register>): Method new-mode renamed to mode-ok?
6116 (<hw-register>): New method get-index-mode.
6117 (<hw-pc>,parse!): Rewrite.
6118 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6119 (<hw-memory>,parse!): Rewrite.
6120 (<hw-memory>): Delete methods get-rank,get-mode.
6121 (<hw-memory>): Method new-mode renamed to mode-ok?
6122 (<hw-memory>): New method get-index-mode.
6123 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6125 (<hw-immediate>,parse!): Rewrite.
6126 (<hw-immediate>): Delete methods get-rank,get-mode.
6127 (<hw-immediate>): Method new-mode renamed to mode-ok?
6128 (<hw-address>): Delete member hw-asm.
6129 (<hw-address>,parse!): Rewrite.
6130 (<hw-address>): Delete methods get-rank,get-mode.
6131 (<hw-address>): Method new-mode renamed to mode-ok?
6132 (hw-profilable?): Delete.
6133 (hardware-init!): Delete hardware-parsers reference.
6134 Update argument specs of command define-full-hardware.
6135 (hardware-builtin!): Update definitions of hardware builtins.
6136 * operand.scm (<operand>): New members hw-name,mode-name.
6137 Delete member op-asm. New member handlers.
6138 (<operand>,make!): Update.
6139 (op:hw-name,op:mode-name,op:handlers): New procs.
6142 (<operand>): New method get-index-mode.
6143 (<pc>,make!): Update.
6144 (op:new-mode): Rewrite.
6145 (operand-parsers): Delete.
6146 (-operand-parse): Rewrite. Return #f if insn not selected.
6147 (-op-read-extra): Delete.
6148 (-operand-read): Update.
6149 (define-operand,define-full-operand): Update.
6150 (operand-init!): Delete operand-parsers reference.
6151 Update syntax of define-full-operand command.
6153 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6154 (define-full-insn): Update.
6155 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6156 (define-full-minsn): Update.
6158 * mode.scm (<mode>): New member class.
6159 (mode:class): New proc.
6161 (-mode-parse): New arg class.
6162 (define-full-mode): Update.
6163 (mode-find): Rewrite.
6164 (mode-make-int,mode-make-uint): New procs.
6165 (mode-init!): Update syntax of define-full-mode command.
6166 (mode-builtin!): Update definitions of builtin modes.
6168 * model.scm (<profile>): Delete.
6170 * read.scm (keep-atlist?): New proc.
6171 (keep-multiple?): New proc.
6172 (<parser-list>): Delete.
6173 (add-parser!,parse-spec!): Delete.
6175 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6176 (def-rtx-syntax-node): Ditto.
6177 (-rtx-traverse-debug?): New variable.
6178 (tstate-make): New proc.
6179 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6180 (tstate-new-cond?,tstate-new-set?): New procs.
6181 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6182 tstate. All callers updated.
6183 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6184 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6185 (-build-operand!): Replace arg cond? with tstate.
6186 (-build-reg-operand!,-build-mem-operand!): Ditto.
6187 (-build-index-of-operand!): Update making of <operand> object.
6188 (s-ifield): New arg tstate. All callers updated.
6189 (hw:): New arg tstate. All callers updated. Replace call to
6190 current-hw-lookup with current-hw-sem-lookup-1.
6191 (s-index-of): New arg tstate. All callers updated.
6193 (-rtx-use-sem-fn?): New proc.
6194 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6196 (s-convop): Only use semantic mode when using semantic cover fns.
6197 (s-cmpop): Call -rtx-use-sem-fn?.
6198 (s-cond,s-case): New arg tstate. All callers updated.
6199 (s-parallel,s-sequence): Ditto.
6201 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6203 * types.scm (<scalar>): Rewrite implementation.
6204 (<integer>): Delete.
6205 (parse-type): Rewrite.
6207 * utils-cgen.scm (parse-handlers): New proc.
6209 * utils.scm (!=): New proc.
6211 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6213 * pmacros.scm (-pmacro-expand): Fix typo.
6215 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6217 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6218 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6219 * i960.cpu (build-hex2): New pmacro.
6220 (insn-opcode): Simplify.
6221 (insn-opcode2): Ditto.
6223 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6224 * cgen-stest.scm (catch-with-backtrace): Ditto.
6226 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6228 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6229 All callers updated.
6230 (-pmacro-invoke): New proc.
6231 (-pmacro-sym,-pmacro-str): New procs.
6232 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6233 (pmacros-init!): Install builtins .iota, .map, .apply.
6234 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6235 (h-fr): Simplify register name spec.
6236 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6237 * utils.scm (num-args-ok?): New proc.
6239 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6241 * pmacros.scm (-pmacro-error): New proc.
6242 (-pmacro-expand): Use it.
6243 (-pmacro-splice): New proc.
6244 (pmacros-init!): Install new builtin .splice.
6246 * sparc.cpu: Include sparc64.cpu when appropriate.
6247 (f-mmask,f-simm11): Moved to sparc64.cpu.
6248 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6249 (ANNUL attribute): Delete.
6250 (test-* pmacros): New arg cc, all callers updated.
6251 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6252 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6254 (ldstub,swap): Moved to sparccom.cpu.
6255 * sparc64.cpu: Add more insns.
6257 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6259 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6261 (cgen-sem-switch.c): Ditto.
6262 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6263 moved to cgen-engine.h.
6264 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6265 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6266 global. Cache attributes and insn length in IDESC.
6267 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6268 @cpu@_opcode renamed to @cpu@_get_idata.
6269 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6270 done later underneath sim_resume.
6271 (@mach@_mach): Record @cpu@_prepare_run.
6272 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6274 (-hw-gen-set-quiet-pc): Ditto.
6275 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6276 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6277 (<hw-addr>,cxmake-get): Ditto.
6278 (<hw-iaddr>,cxmake-get): Ditto.
6279 (<pc>,cxmake-get): Ditto.
6280 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6281 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6282 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6283 (<hw-pc>,gen-write): Use hw-selector-default.
6284 (<hw-register>,gen-write): Ditto.
6285 (<hw-memory>,gen-write): Ditto.
6286 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6287 (-gen-hw-selector): New proc.
6289 * desc.scm: New file.
6290 * desc-cpu.scm: New file.
6291 * opcodes.scm: Split up into several smaller files.
6292 * opc-asmdis.scm: New file.
6293 * opc-ibld.scm: New file.
6294 * opc-itab.scm: New file.
6295 * opc-opinst.scm: New file.
6296 * Makefile.am (desc): New target.
6297 (opcodes): Update args to cgen-opc.scm.
6298 * Makefile.in: Rebuild.
6299 * aclocal.m4: Rebuild.
6300 * config.in: Rebuild.
6301 * configure.in: Update arg to AC_INIT.
6302 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6303 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6305 * configure: Rebuild.
6306 * cgen-gas.scm: Update files to load.
6307 * cgen-opc.scm: Ditto. Reorganize option letters.
6308 * cgen-sim.scm: Update files to load.
6309 * cgen-stest.scm: Ditto.
6310 * dev.scm (cload): New app "DESC".
6311 (load-opc): Update files to load.
6312 (load-gtest,load-sim,load-stest): Ditto.
6314 * attr.scm (bool-attr?): New proc.
6315 (attr-list-enum-list): New proc.
6316 (-attr-sort): Rewrite.
6317 (attr-builtin!): Give ALIAS attribute a fixed index.
6318 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6319 calculate attribute enum list.
6320 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6322 * insn.scm (-insn-parse): Renamed from parse-insn.
6324 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6327 * mode.scm (-mode-parse): Renamed from parse-mode.
6329 * operand.scm (<operand>): New member `selector'.
6330 (<operand>,make!): Use default selector.
6331 (hw-selector-default): New variable.
6332 (hw-selector-default?): New proc.
6334 * pmacros.scm (pmacros-init!): New proc.
6335 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6336 (-env-set!): Delete.
6337 (-pmacro-expand): New proc apply-macro.
6338 Use it in scan-list,scan. Scan list first, then see if macro
6340 (define-pmacro): Rewrite.
6341 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6343 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6344 selected if (current-mach) seen.
6345 (rtx?): Renamed from rtx-uneval?, all callers updated.
6346 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6348 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6349 selector, all callers updated.
6350 (hw:): New arg selector, all callers updated. Delete old comments
6352 (reg:,mem:): Handle selectors
6353 * rtx-funcs.scm (reg:): Handle selectors.
6355 * read.scm: Renamed from cpu.scm.
6356 (<command>): New class.
6357 (<reader>): New member commands.
6358 (reader-add-command!): New proc.
6359 (reader-lookup-command): New proc.
6360 (reader-error,-reader-process-expanded,reader-process): New procs.
6361 (reader-read-file!): New proc.
6362 (include): Call reader-read-file!.
6364 (cpu-load): Call reader-read-file!.
6365 * utils.scm (num-args): New proc.
6366 * simplify.inc: New file.
6367 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
6368 procs. Move define-normal-foo procs (and abbreviated forms) to
6369 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
6371 * fr30.cpu: Include simplify.inc.
6372 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6373 * i960.cpu: Include simplify.inc.
6374 * m32r.cpu: Include simplify.inc.
6375 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6376 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6377 * sparc.cpu: Include simplify.inc.
6378 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6379 * utils-cgen.scm (parse-error): Moved to read.scm.
6380 (sanitize): Rewrite.
6381 (utils-init!): New proc.
6383 1999-02-02 Doug Evans <devans@casey.cygnus.com>
6385 * sparc.cpu: New file.
6386 * sparc32.cpu: New file.
6387 * sparc64.cpu: New file.
6388 * sparccom.cpu: New file.
6389 * sparc.opc: New file.
6391 1999-01-27 Frank Eigler <fche@cygnus.com>
6393 * utils.scm (gen-copyright): New proc.
6395 1999-01-27 Doug Evans <devans@casey.cygnus.com>
6397 Parameterize rtl parsing, rather than having lots of little handlers.
6398 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6399 Delete member traverse.
6400 (rtx:set-traverse!): Delete.
6401 (-rtx-valid-types,-rtx-valid-matches): New variables.
6402 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6403 instead of expression. All callers updated.
6404 (def-rtx-node): New args arg-types,arg-modes.
6405 (def-rtx-syntax-node): Ditto.
6406 (def-rtx-dual-mode): Ditto.
6407 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6408 All callers updated.
6409 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6410 All callers updated.
6411 (rtx-macro-expand): New proc.
6412 (-rtx-traverse-check-args): Delete.
6413 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6414 an rtx specific traverser.
6415 (-rtx-any-mode?,-rtx-symornum?): New procs.
6416 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6417 (-rtx-traverse-no-mode): Delete.
6418 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6419 (-rtx-traverse-operands): Rewrite.
6420 (-rtx-traverse-expr): Rewrite.
6421 (rtx-traverse): Don't expand macros here, leave for caller to do.
6422 (rtx-simplify): Delete.
6423 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
6425 (rtx-true?,rtx-false?): Ditto.
6426 (-rtx-ref-type): Set dest is operand 1 now.
6427 (-simplify-for-compilation): New proc.
6428 (semantic-in-out-operands): Recognize regno as an alias for index-of.
6429 Expand macros before calling rtx-traverse. Sort operands by name
6430 to avoid unnecessary semantic formats.
6431 (semantic-attrs): New proc.
6432 (rtx-uneval?): Handle (<rtx-func> ...).
6433 (s-boolifop): Delete arg mode. All callers updated.
6434 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6435 (eq-attr): New arg obj.
6437 * m32r.cpu (rach): Update calls to andif.
6439 * minsn.scm (-minsn-parse-expansion): Renamed from
6440 parse-minsn-expansion.
6441 (-minsn-parse): Renamed from parse-minsn.
6442 (-minsn-read): Renamed from read-minsn.
6443 (def-minsn): Don't check APPLICATION here.
6444 (def-full-minsn): New proc.
6445 (define-macro-insn): Check APPLICATION here. Expand macros.
6446 (define-normal-macro-insn): Ditto.
6448 * utils.scm (word-value): New arg start-lsb?.
6449 (word-mask,word-extract): Ditto.
6450 (split-bits,powers-of-2): Use integer-expt instead of expt.
6451 (bit-set?): Handle 32 bit values (which are bignums).
6452 (cg-logand,cg-logxor): New functions.
6453 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6454 (<ifield>,field-value): Update call to word-value.
6455 (<ifield>,min-value): Use integer-expt instead of expt.
6456 (<ifield>,max-value): Ditto.
6458 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6460 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6462 Compute raw instruction format in addition to semantic based format.
6463 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6464 (<iformat> accessors): Rename accessors to ifmt-*.
6465 (<sformat>): New class.
6466 (fmt-enum): Renamed from fmt:enum.
6467 (-ifmt-search-key): Rewrite.
6468 (-sfmt-search-key): New proc.
6469 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6470 Compute iformat and sformat search keys.
6471 (ifmt-build): Update.
6472 (sfmt-build): New proc.
6473 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6474 (ifmt-compute!): Compute instruction format <iformat> based on
6475 instruction fields alone. Compute new semantic format <sformat>
6476 based on instruction fields and semantic information.
6477 (ifmt:lookup): Delete.
6478 * mach.scm (<arch>): New member sfmt-list, plus accessors.
6479 (current-sfmt-list): New proc.
6480 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6481 Rename member fmt to ifmt. New members fmt-desc, sfmt.
6482 (insn-length,insn-length-bytes): Update.
6483 (insn:mask-length,insn:mask): Update.
6484 (insn-lookup-op): Update.
6485 * gas-test.scm (gas-test-analyze!): Update.
6486 (gen-gas-test): Ditto.
6487 * sim-test.scm (sim-test-analyze!): Update.
6488 (gen-sim-test): Ditto.
6489 * opcodes.scm (gen-operand-instance-table): Update.
6490 (gen-operand-instance-ref): Ditto.
6491 (max-operand-instances): Use heuristic if semantics not parsed.
6492 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6493 (opcodes-analyze!): Only scan semantics of building operand instance
6495 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6496 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6497 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6498 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6499 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6500 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6501 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6503 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6504 New arg lsb0? All callers updated.
6505 (decode-bits): New arg lsb0?. All callers updated.
6506 (opcode-slots): Update call to bit-set?. Call integer-expt instead
6508 (-gen-decode-bits): New arg lsb0?. All callers updated.
6509 (build-slots): Call integer-expt instead of expt.
6510 (build-decode-table-entry): Handle crossing word boundaries better.
6511 (-gen-decode-switch): New arg lsb0?. All callers updated.
6512 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6514 * enum.scm (define-enum): Rewrite.
6515 (define-normal-enum): Ditto.
6516 (def-full-insn-enum): New proc.
6517 (define-normal-insn-enum): Rewrite.
6519 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6521 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6523 * dev.scm: Add sid support.
6525 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6526 (CLEANFILES): Add tmp-*.
6527 * Makefile.in: Rebuild.
6529 * doc/Makefile.am: New file.
6530 * doc/Makefile.in: New file.
6531 * doc/cgen.texi: New file.
6532 * Makefile.am (SUBDIRS): Define.
6533 * Makefile.in: Rebuild.
6534 * configure.in: Create doc/Makefile.
6535 * configure: Rebuild.
6537 1999-01-18 Doug Evans <devans@casey.cygnus.com>
6539 * insn.scm (insn:syn): Delete.
6541 1999-01-15 Doug Evans <devans@casey.cygnus.com>
6543 * fr30.cpu (model fr30-1): Add state variables load-regs,
6544 load-regs-pending. Delete h-gr. Clean up operand names of all units.
6545 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6546 (model m32rx): Ditto.
6547 (addi): Simplify function unit usage spec.
6548 (ld-plus): Rewrite operand names in function unit usage spec.
6549 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6550 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6551 overridden. Allow operand to appear in input and output spec.
6552 (<insn>,gen-profile-code): string-append -> string-list.
6554 * ifield.scm (define-ifield): Call pmacro-expand.
6555 (define-full-ifield,define-normal-ifield): Ditto.
6556 (define-multi-ifield,define-normal-multi-ifield): Ditto.
6558 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6559 with-scache and without-scache cases.
6561 1999-01-14 Doug Evans <devans@casey.cygnus.com>
6563 * fr30.cpu (fr30-1): Add state variable h-gr.
6564 Add units u-cti, u-load, u-store, u-ldm, u-stm.
6565 (all insns): First pass at providing cycle counts.
6566 * sim.scm (<unit>,gen-profile-code): Only check for output operands
6567 when initializing unit output operands, ditto for input operands.
6569 * insn.scm (insn-length,insn-length-bytes): New procs.
6570 * mach.scm (-adata-set-derived!): Use them.
6571 * sim-cpu.scm (-gen-sem-case): Ditto.
6573 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6574 (-gen-write-case): Ditto.
6575 (gen-semantic-fn): Ditto. Split into two:
6576 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
6578 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
6579 scache/no-scache appropriately. All callers updated.
6580 (-gen-sem-case): PCADDR->IADDR.
6581 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6583 * sim-decode.scm (*): Replace string-append,string-map with
6584 string-list,string-list-map where the result is sufficiently large.
6585 (-gen-decode-insn-table): Go back to simple version for non-scache
6586 case: just record IDESC in decoder tables and leave field extraction
6588 (-gen-decode-switch): Ditto.
6589 (-gen-decode-fn): Ditto.
6590 (-gen-extract-decls): Only emit format enum if with-scache?.
6591 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6593 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6594 (-gen-insn-timing): Ditto.
6595 * sim.scm (gen-argbuf-type): Only output sem_fields union in
6598 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6599 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6601 1999-01-12 Doug Evans <devans@casey.cygnus.com>
6603 * cpu.scm (keep-mach-validate!): New proc.
6604 (include): New proc.
6606 * mach.scm (current-arch-mach-name-list): New proc.
6607 (-parse-arch-machs): Always return canonical form.
6608 (def-arch): Validate user specified machs to be kept.
6609 (def-mach-attr!): Simplify.
6611 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6612 (option-init!): Initialize it.
6613 (option-set!): Set it.
6614 (gen-insn-table-entry): Emit 0 for operand instance ref if not
6615 output operand instance tables.
6616 (cgen-opc.in): Only output operand instance tables if asked to.
6618 * sim.scm (option-init!,option-set!): Clarify returned value.
6620 * sim.scm (gen-mach-bfd-name): Move from here.
6621 * utils-cgen.scm: To here.
6623 1999-01-11 Doug Evans <devans@casey.cygnus.com>
6625 * fr30.cpu (ilm): Fix comment field.
6626 (cond-branch): Remove explicit setting of COND-CTI, let cgen
6629 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6630 (rtx-true?, rtx-false?): New procs.
6631 * rtx-funcs.scm (annul): Rename vpc to pc.
6632 (-rtx-traverse-if): Improve determination of whether then/else parts
6633 are conditionally executed.
6635 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6637 (gen-argbuf-type): Simplify generated definition (big sem_fields
6638 union moved outside).
6640 1999-01-11 Ben Elliston <bje@cygnus.com>
6642 * doc/porting.texi: New file.
6644 * doc/intro.texi: New file.
6645 (Layout): Use @example to insert preformatted ASCII text (such as
6646 diagrams). @code is inappropriate here.
6648 1999-01-06 Doug Evans <devans@casey.cygnus.com>
6650 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6652 * m32r.opc (print_hash): Cast dis_info.
6654 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6655 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6658 1999-01-05 Doug Evans <devans@casey.cygnus.com>
6660 * i960.cpu (f-br-disp): Remove RELOC attribute.
6661 (f-ctrl-disp): Ditto.
6662 (callx-disp): set-quiet -> set for (reg h-gr 2).
6663 (callx-indirect,callx-indirect-offset): Ditto.
6665 * Makefile.am (gas-test): Fix dependencies.
6666 * Makefile.in: Rebuild.
6667 * cgen-gas.asm: File creation args are -<uppercase-letter>.
6668 * gas-test.scm (break-out-syntax,make-file-name): Delete.
6669 (gas-test-analyze!): Use syntax-break-out.
6670 * sim-test.scm (break-out-syntax,make-file-name): Delete.
6671 (sim-test-analyze!): Use syntax-break-out.
6672 (cgen-build.sh): Use gen-file-name.
6673 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6674 * insn.scm (syntax-break-out): New proc.
6675 * utils.scm (gen-file-name): New proc.
6677 * fixup.scm (nil,<?,<=?,>?): Delete.
6679 * utils.scm (count-true): Rewrite.
6681 * slib/sort.scm: Move sort.scm to slib directory.
6684 * iformat.scm (ifmt-compute!): Record empty format.
6686 * rtl.scm (semantic-in-out-operands): Simplify by moving several
6687 internal procs outside. Handle expression register numbers.
6690 * rtx-funcs.scm (annul): Rename new_pc to vpc.
6692 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6694 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6695 (gen-semantic-fn,-gen-sem-case): Ditto.
6696 (cgen-cpu.c): Define WANT_CPU to @cpu@.
6697 (cgen-semantics.c): Ditto.
6698 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6699 (gen-ifmt-argvars-defns): New proc.
6700 (gen-ifmt-argvars-assigns): New proc.
6701 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6702 (-gen-decode-fn): Handle non-with-scache case.
6703 (cgen-decode.c): Define WANT_CPU to @cpu@.
6704 * sim-models.scm (-gen-mach-defns): Emit bfd name.
6705 (cgen-model.c): Define WANT_CPU to @cpu@.
6706 * sim.scm (gen-ifld-extract-argvar): New proc.
6707 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6708 with FUN-ACCESS specified.
6709 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6710 (<hw-register>,gen-extract): New arg local?.
6711 (<hw-address>,gen-extract): Ditto.
6712 (-hw-cxmake-get): Handle non-with-scache case.
6713 (-hw-gen-set-quiet): Ditto.
6714 (<hw-address>,cxmake-get): Handle non-with-scache case.
6715 (gen-op-extract-argvar): New proc.
6716 (<operand>,gen-record-profile): Rewrite.
6717 (<operand>,gen-profile-code): Rewrite.
6718 (<unit>,gen-profile-code): Use -gen-argfld-ref.
6719 (gen-argbuf-fields-union): New proc.
6720 (gen-argbuf-type): Use it. Handle non-scache case.
6722 * *.scm: class:foo procs renamed to class-foo.
6723 * attr.scm (<attribute>): New member `for'.
6724 (-attr-parse): New first value in list for default if
6726 (non-bool-attr-list,attr:add!): Delete.
6727 (def-attr): Use current-attr-add!.
6728 (atlist-attr-value-no-default): New proc.
6729 (attr-lookup-default): Handle boolean attributes.
6730 (gen-attr-enum): New proc.
6731 (-attr-remove-meta-attrs-alist): New proc.
6732 (attr-nub): New proc.
6733 (current-attr-list-for): New proc.
6734 (current-{ifld,hw,op,insn}-attr-list): New procs.
6735 (attr-builtin!): New proc.
6736 * cpu.scm (keep-obj?): Rewrite.
6737 (-init-parse-cpu!): Call arch-init!.
6738 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6739 (-finish-parse-cpu!): Call arch-finish!.
6740 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6741 (def-enum,def-full-enum): Use current-enum-add!.
6742 (gen-obj-list-enums): New proc.
6743 * hardware.scm (hw:add!,hw:lookup): Delete.
6744 (def-hardware,def-hardware-ext): Use current-hw-add!.
6745 (hw:std-attrs,hw:attr-list): Delete.
6746 (hardware-builtin!): Define builtin hardware attributes.
6747 * ifield.scm (ifld:add!,ifld:lookup): Delete.
6748 (def-ifield,def-full-ifield): Use current-ifld-add!.
6749 (ifld:std-attrs,ifld:attr-list): Delete.
6750 (ifield-builtin!): New proc.
6751 * insn.scm (insn:add!,insn:lookup): Delete.
6752 (def-full-insn): Use current-insn-add!.
6753 (insn:std-attrs): Delete.
6754 (insn-builtin!): New proc.
6755 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6757 (<arch-data>): New member machs.
6758 (current-attr-list,current-enum-list): New procs.
6759 (current-op-list,current-minsn-list): New procs.
6760 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6761 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6763 (-parse-arch-machs): New proc.
6764 (-arch-parse): New arg machs, all callers updated.
6765 (-arch-read): Handle machs spec.
6766 (def-arch): Define MACH attribute here.
6767 (mach-init!,mach-finish!): Not here.
6768 (cpu:add!,cpu:lookup): Delete.
6769 (def-cpu): Use current-cpu-add!.
6770 (<mach>): New member bfd-name.
6771 (-mach-parse): New arg bfd-name, all callers updated.
6772 (-mach-read): Handle bfd-name spec.
6773 (mach:add!,mach:lookup): Delete.
6774 (def-mach): Use current-mach-add!.
6775 (def-mach-attr!): New proc.
6776 (arch-init!): New proc.
6777 (arch-finish!): New proc. Reverse all object lists here.
6778 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
6779 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
6780 (define-normal-macro-insn): Ignore minsn if mach not kept.
6781 * mode.scm (mode-builtin!): New proc.
6782 * model.scm (model:add!,model:lookup): Delete.
6783 (def-model): Use current-model-add!.
6784 * opcodes.scm (insn:attr-list): Delete.
6785 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
6786 (gen-attr-table-defn): Emit value for default.
6787 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
6788 (op:attr-list): Delete.
6789 (gen-operand-decls,gen-insn-decls): New proc.
6790 (compute-insn-attr-list): Delete.
6791 (cgen-opc.h): Reorganize and simplify.
6792 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
6793 (def-operand,def-full-operand): Use current-op-add!.
6794 (op:std-attrs): Delete.
6795 (operand-enum): Delete.
6796 (operand-builtin!): Define builtin operand attrs.
6797 * utils-cgen.scm (sanitize): Update calls to lookup procs.
6798 (gen-attr-enum-decl): Use gen-obj-list-enums.
6799 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
6801 * fr30.cpu (define-arch): Add machs spec.
6802 (f-i4): SIGNED attribute -> !UNSIGNED.
6803 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
6804 (HASH-PREFIX): Define operand attribute.
6805 (NOT-IN-DELAY-SLOT): Define insn attribute.
6806 * i960.cpu (define-arch): Add machs spec.
6807 * m32r.cpu (define-arch): Add machs spec.
6808 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
6809 (HASH-PREFIX): Define operand attribute.
6810 (FILL-SLOT): Define insn attribute.
6812 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
6814 * fr30.cpu (stilm): Correct mask for and operation.
6816 1998-12-17 Doug Evans <devans@casey.cygnus.com>
6818 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
6819 Replace START/EXIT with start/pass.
6820 (gen-sim-test): Delete ".text".
6822 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
6824 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
6826 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
6828 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
6829 (h-sbit): Make it FUN-ACCESS.
6830 (h-gr): Reorder so that general regs are always printed by number.
6832 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
6834 * i960.cpu (flushreg): Use nop.
6836 1998-12-14 Doug Evans <devans@casey.cygnus.com>
6838 * m32r.cpu (default-alignment): Specify.
6839 * mach.scm (<arch-data>): New member default-alignment.
6840 (adata:default-alignment): New proc.
6841 (current-arch-default-alignment): New proc.
6842 (-arch-parse): New arg default-alignment.
6843 (parse-alignment): New proc.
6844 (-arch-read): Handle default-alignment spec.
6846 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
6848 * insn.scm (f-%): Delete.
6849 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
6850 be readded if proved useful.
6851 (gen-extract-fields): Ditto. Use gen-ifetch.
6852 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
6853 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
6855 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
6857 * fr30.cpu (div2): Set zbit properly when remainder not zero.
6859 1998-12-14 Dave Brolley <brolley@cygnus.com>
6861 * fr30.cpu: Remove stub macros.
6862 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
6863 (div2): Don't use addc/subc.
6865 1998-12-11 Doug Evans <devans@casey.cygnus.com>
6867 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
6870 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
6872 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
6874 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
6876 * cpu.scm (keep-all?): New proc.
6877 (assert-keep-all): Use it.
6878 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
6879 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
6880 Check for spelling errors.
6882 1998-12-09 Doug Evans <devans@casey.cygnus.com>
6884 * rtl.scm (s-convop): Call -rtx-sem-mode.
6886 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
6888 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
6889 (-parse-hw-profile): Ditto.
6890 (<hw-register>, parse!): Return `void' result.
6891 (<hw-pc>, parse!): Ditto.
6892 (<hw-memory>, parse!): Ditto.
6893 (<hw-immediate>, parse!): Ditto.
6894 (<hw-address>, parse!): Ditto.
6896 * ifield.scm (-ifield-parse): Validate encode/decode fields.
6897 (-ifld-parse-encode-decode): New proc.
6898 (-ifld-parse-encode,-ifld-parse-decode): New proc.
6899 (-multi-ifield-parse): Set encode/decode to #f.
6900 (ifld:decode-mode): New proc.
6901 * utils.scm (nub): Rewrite.
6902 * operand.scm (op-nub): Rewrite.
6903 * sim.scm (<ifield>, gen-type): Rewrite.
6904 (-gen-ifld-argbuf-defn): New proc.
6905 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
6906 (<sim-hardware>): Forward gen-trace-extract onto `type'.
6907 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
6908 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
6909 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
6910 New method gen-trace-extract.
6911 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
6912 from gen-argbuf-elm, return "" if not caching register address.
6913 Rewrite gen-extract. New method gen-trace-extract.
6914 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
6915 gen-extract, gen-trace-extract, cxmake-get.
6916 (<hw-iaddress>): New method cxmake-get.
6917 (op-needed-iflds): New proc.
6918 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
6919 (-gen-op-argbuf-defn): New proc.
6920 (gen-op-extract): Renamed from op:extract.
6921 (gen-op-trace-extract): Renamed from op:trace-extract.
6922 (fmt-extractable-operands): Renamed from fmt-semantic-operands
6924 (gen-argbuf-elm): Rewrite.
6925 * sim-decode.scm (-gen-record-args): Update.
6927 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
6929 * pmacros.scm (-pmacro-expand): Handle procedural macros in
6930 argument position. Flag symbolic macros in function position as
6932 (define-pmacro): Handle quoting in definition of symbolic macros.
6933 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
6935 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
6937 * fr30.opc (parse_register_list): Account for reverse masks
6939 (print_register_list): Ditto.
6940 (parse_low_register_list_ld): New function.
6941 (parse_hi_register_list_ld): New function.
6942 (parse_low_register_list_st): New function.
6943 (parse_hi_register_list_st): New function.
6944 (print_hi_register_list_ld): New function.
6945 (print_hi_register_list_st): New function.
6946 (print_low_register_list_ld): New function.
6947 (print_low_register_list_st): New function.
6948 * fr30.cpu (ldr15dr): Implement workaround.
6949 (ldm0,ldm1,stm0,stm1): Implemented.
6951 1998-12-08 Doug Evans <devans@casey.cygnus.com>
6953 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
6954 * configure: Regenerate.
6955 * Makefile.am (WITH_HOBBIT): Update.
6956 (cgen-hob.c): Remove Makefile dependency.
6957 (cgen.o): Depend on cgen-gh.h, config.h.
6958 * Makefile.in: Regenerate.
6959 * aclocal.m4: Regenerate.
6961 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
6963 * i960.cpu, i960.opc: New files.
6965 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
6967 * fr30.opc (parse_register_number): New function.
6968 (parse_register_list): New function.
6969 (parse_low_register_list): Use parse_register_list.
6970 (parse_hi_register_list): Use parse_register_list.
6971 * fr30.cpu (sth): Fix assembler syntax. Implement more
6974 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
6976 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
6977 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
6978 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
6979 (-op-gen-set-trace-parallel): Ditto.
6980 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
6982 * fr30.cpu (call,calld): Fix setting of pc.
6983 (f-op5): Fix start bit number.
6985 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
6987 * fr30.cpu (st): Fix operand ordering. Implement more
6990 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
6992 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
6993 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
6994 (fmt-semantic-operands): Move to sim.scm.
6995 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
6996 * operand.scm (<hw-index>): New member `name'. All builders updated.
6997 (<hw-index>): New method get-name.
6998 (op-profilable?): Moved to sim.scm.
7000 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
7001 (op-profilable?): Moved here from operand.scm.
7002 (gen-extract-type): Delete.
7003 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
7004 (-gen-argfld-ref): New proc.
7005 (-gen-ifld-argfld-name): New proc.
7006 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
7007 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
7008 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
7009 (<hardware-base>): Delete method gen-extract-type. New method
7011 (<hw-register): Ditto. Update method gen-extract.
7012 (<operand>, method gen-argbuf-elm): Rewrite.
7013 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
7014 (s-cmpop): Fix handling of eq,ne for unsigned modes.
7015 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7017 * sim-decode.scm (-gen-record-args): Tweak.
7019 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7021 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7023 * doc/porting: Fix typo: gas->sim.
7024 * fr30.opc (print_m4): New function.
7025 * fr30.cpu: Implemented many insns.
7027 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7029 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7031 * fr30.cpu (f-rel9): Delete RELOC attribute.
7032 (f-rel12): Add PCREL-ADDR attribute.
7033 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7034 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7035 * fr30.opc (print_label9): Delete.
7037 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7038 code for CTI indicators.
7039 * insn.scm (insn-cti?): Simplify.
7040 * utils-cgen.scm (atlist:cti?): New proc.
7042 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7044 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7045 (f-i20-4,f-i20-16,f-i20): New fields.
7051 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7052 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7053 * mach.scm (arch-data): Ditto.
7054 (current-arch-default-insn-word-bitsize): Renamed from
7055 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7056 (-arch-read): Update.
7058 * hardware.scm (hw:attr-list): Move here ...
7059 * opcodes.scm: ... from here.
7061 * ifield.scm (fld:bitrange): Delete.
7062 (fld:word-offset,fld:word-length): New procs.
7063 (ifield?): Use class-instance.
7064 (<ifield>, method field-start): Rewrite.
7065 (ifld:enum): New proc.
7066 (<ifield>, methods field-mask,field-value): Rewrite.
7067 (-ifield-parse): Rewrite.
7068 (<multi-ifield> support): Rewrite.
7069 (ifld-beyond-base?): Rewrite.
7070 (ifld:std-attrs): New variable.
7071 (ifld:attr-list): New proc.
7072 * iformat.scm (-compute-insn-mask): Rewrite.
7073 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7075 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7076 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7078 (<operand>): Ditto. Forward onto index instead.
7079 (gen-ifld-decls,gen-ifld-defns): New procs.
7080 (ifld:insert,ifld:extract): New procs.
7081 (<ifield>): New methods gen-insert, gen-extract.
7082 (<multi-ifield>): Ditto.
7083 (<hw-index>): Forward gen-insert,gen-extract onto value.
7084 (<hw-asm>): Delete insert/extract support.
7085 (<hw-register,hw-memory,hw-immediate>): Ditto.
7086 (gen-hash-defines): Use string-list.
7087 Define CGEN_MAX_IFMT_OPERANDS.
7088 (gen-switch): Use string-list,string-list-map.
7089 (gen-fget-switch,gen-fset-switch): Use string-list.
7090 (gen-parse-switch,gen-insert-switch): Ditto.
7091 (gen-extract-switch,gen-print-switch): Ditto.
7092 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7093 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7094 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7095 (gen-ivalue-entry): New proc.
7096 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7097 computation. Use 0 for operand ref table if ALIAS insn.
7098 (gen-minsn-table-entry): Use string-list.
7099 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7100 (gen-opcode-open): Record address of ifield table.
7101 (cgen-opc.h): Call gen-ifld-decls.
7102 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7103 * types.scm (<bitrange>): New members word-offset,word-length.
7104 Delete member total-length. Delete methods start,mask,value.
7105 (bitrange:word-offset,bitrange:word-length): New procs.
7106 * sim-cpu.scm (gen-define-fields): Simplify.
7107 (gen-extract-fields): Simplify.
7108 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7109 (<ifield>): New methods gen-ifld-extract-decl.
7110 Delete method gen-ifld-extract-beyond.
7111 (<multi-ifield>): New methods gen-ifld-extract-decl.
7112 (<multi-ifield>, method gen-ifld-extract): Implement.
7113 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7114 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7116 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7117 (-rtx-traverse-syntax-no-mode): New proc.
7118 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7119 (s-ifield): New proc.
7120 (s-shop): Don't prepend `unsigned' for unsigned modes.
7121 * rtx-funcs.scm (ifield): New rtx function.
7122 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7123 (delay): New rtx function.
7124 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7126 * cos.scm (-elm-make-method-getter): Fix typo.
7128 * utils.scm (backslash): Handle lists of strings.
7130 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7132 * fr30.cpu (f-rel9): Correct for pc+2.
7133 (label9): Use print_label9.
7134 * fr30.opc (print_label9): New function.
7136 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7138 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7139 * fr30.opc (parse_low_register_list): Renamed.
7140 (parse_hi_register_list): Renamed.
7141 (print_hi_register_list): Renamed.
7142 (print_low_register_list): Renamed.
7144 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7146 * fr30.cpu (f-rel9): Now a pc relative offset.
7148 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7150 * opcodes.scm (op-asm): Move to here, from operands.scm.
7151 (<op-asm>, method parse!): Validate arguments.
7152 (<operand>, method gen-function-name): Fix thinko.
7153 * operand.scm (<operand>, method make!): Don't set op-asm here.
7154 * utils.scm (list-elements-ok?): New proc.
7156 * opcodes.scm: Clean up pass.
7158 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7160 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7161 the fr30_int function.
7162 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7163 (h-dr): Add FUN-ACCESS attribute.
7165 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7167 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7168 for C symbol for models array.
7170 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7172 * fr30.opc (parse_reglist_low): New function.
7173 (parse_reglist_hi): New function.
7174 (print_reglist_low): New function.
7175 (print_reglist_hi): New function.
7176 * fr30.cpu: Finish remaining insn stubs.
7178 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7180 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7182 * fr30.cpu (ldi32m): Don't use for disassembly.
7184 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7186 * fr30.cpu (int): Implement it.
7188 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7190 * rtx-funcs.scm (nop): Fix C code.
7192 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7194 * fr30.cpu (f-i32): New ifield.
7197 (ldi32m): New macro insn.
7198 (inte): Provide simple version for now.
7200 * sim-arch.scm: New file.
7201 * sim.scm: Move architecture support generation to sim-arch.scm.
7202 * cgen-sim.scm: Load sim-arch.scm.
7205 * hardware.scm (pc?) New proc.
7206 (class <hardware-base>): Rewrite method 'pc?.
7207 (class <hardware>): Forward 'pc? to the hardware type.
7208 (class <hw-pc>): New method 'pc?.
7210 Add support for variable length ISAs.
7211 * ifield.scm (ifld-beyond-base?): New proc.
7212 * m32r.cpu: Remove integral-insn? spec.
7213 * mach.scm (arch:derived,arch:set-derived!): New procs.
7214 (arch:app-data,arch:set-app-data!): New procs.
7215 (class <arch>): New members derived, app-data.
7216 (class <cpu>): Delete member integral-insn?.
7217 (cpu:integral-insn?): Delete.
7218 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7219 (-cpu-read): Delete integral-insn? support.
7220 (state:decode-assist): Delete.
7221 (state:int-insn?): Delete.
7222 (<derived-arch-data>): New class.
7223 (-adata-set-derived!): New proc.
7224 (mach-finish!): Call it.
7225 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7226 (gen-operand-instance): Add COND_REF support.
7227 (gen-operand-instance-table): Ditto.
7228 (gen-hash-defines): Update.
7229 (gen-extract-switch): Update type of `insn_value' arg.
7230 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7231 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7233 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7234 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7235 beyond the base insn (for large insns).
7236 (-gen-extract-beyond-var-list): New proc.
7237 (gen-extract-fields): Handle large insns.
7238 (-gen-write-case): Update sem_arg computation.
7239 Update initial vpc computation.
7240 (gen-semantic-fn): Ditto. Update type of `insn'.
7241 (-gen-sem-case): Update sem_arg computation.
7242 Update initial vpc computation.
7243 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7244 (-gen-extract-word): New proc.
7245 (<ifield>): New method gen-ifld-extract-beyond.
7246 (gen-ifld-extract-beyond): New proc.
7247 * types.scm (bitrange-overlap?): New proc.
7249 * utils.scm (bits->bytes): New proc.
7250 (bytes->bits): New proc.
7252 Move extraction support into decoder.
7253 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7254 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7255 support to sim-decode.scm.
7256 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7257 be array of IDESC,FMT entries. Make the array const.
7258 (-gen-gcc-label-table): Make array const.
7259 (-gen-decode-switch): Branch to extraction code after insn has been
7261 (-gen-decode-insn-globals): Delete extract handler from
7263 (gen-decode-fn): Add extraction support.
7264 (-gen-sem-fn-decls): Delete extraction fn decls.
7265 (-gen-idesc-decls): Update @cpu@_decode decl.
7266 (-gen-idesc-init-fn): Delete extraction support.
7267 (-gen-extract-decls): New proc.
7269 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7270 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7272 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7273 All callers updated.
7274 (table-entry:make): Record insn value as insn object, not name.
7277 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7278 collision with C function.
7279 (path_dirname): Similarily.
7280 * hobbit.c,hobbit.h: Rebuild.
7282 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7284 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7286 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7288 * fr30.cpu: Implement more instruction stubs.
7290 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7292 * fr30.cpu: Implement more instruction stubs.
7294 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7296 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7298 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7300 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7301 (op:std-attrs): Ditto.
7302 * opcodes.scm (gen-operand-instance): Ditto.
7303 (gen-switch): Ditto.
7304 * m32r.cpu (condbit,accum): Update.
7305 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7307 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7309 * enum.scm (-enum-read): Fix typo.
7311 * iformat.scm (-ifmt-search-key): Simplify a little.
7313 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7315 * doc/porting: semantics.c -> sem.c.
7316 * Makefile.in: Regenerate.
7317 * fr30.cpu (add): Change ADD to add. Add more registers and set
7318 status bits on 'add' instruction.
7320 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7322 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7325 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7327 * minsn.scm (minsn:enum): Update, call current-arch-name.
7329 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7331 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7332 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7333 (ARCH,CGEN,CGENFLAGS): New variables.
7334 (gas-test,sim-test): New rules.
7335 * Makefile.in: Rebuild.
7336 * configure.in (arch): Define.
7337 * configure: Rebuild.
7339 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7340 * All .scm files: Ditto.
7342 * dev.scm: Fix gas-test call to cpu-load.
7343 * gas-test.scm: Clean up pass to remove bit-rot.
7344 * sim-test.scm: Ditto.
7346 * enum.scm (read-enum): Fix typo in `vals' handling.
7348 * hardware.scm (-parse-hw-type): Fix typo.
7349 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7350 (def-hardware,define-normal-hardware): Ditto.
7352 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7353 (display-var): Use it.
7354 * hobbit.c: Rebuild.
7355 * hobbit.h: Rebuild.
7357 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7358 avoid hobbit problem.
7359 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7360 `parallel-insns-' to avoid hobbit problem.
7362 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7364 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7365 (parse_slo16,parse_ulo16): Ditto.
7366 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7368 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
7370 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7371 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7372 * Makefile.in: Rebuild.
7373 * insn.scm (define-normal-insn): Expand pmacros.
7374 * mode.scm (<mode>): New member `host?'. All uses updated.
7375 (mode:host?): New proc.
7376 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7377 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7378 (define-rtx-dual-mode): Ditto.
7379 (s-index-of): New proc.
7380 (s-unop): Use plain C for host mode operations.
7381 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7382 * rtx-funcs.scm (index-of): New rtx function.
7383 * sim.scm (<hw-index>): New method cxmake-get.
7385 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
7387 * sim-cpu.scm (-gen-engine-decls): Delete.
7389 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
7391 * doc/rtl (Example): Correct Typo.
7392 * doc/porting: Add 'make dep' step to opcodes port instructions.
7393 * fr30.opc: New file.
7394 * fr30.cpu: New file.
7396 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
7398 * configure.in: Handle guile $exec_prefix = $prefix/foo.
7399 * Makefile.am (GUILEINCDIR): New variable.
7401 * configure: Regenerate.
7402 * Makefile.in: Ditto.
7403 * aclocal.m4: Ditto.
7405 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
7407 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7408 (cgen-semantics.c): Ditto.
7409 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7410 * sim-model.scm (cgen-model.c): Ditto.
7411 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7412 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7414 * opcodes.scm (read-cpu.opc): Handle empty file.
7416 * cos.scm (-elm-make-method-setter): Fix typo.
7418 * cpu.scm (-init-parse-cpu!): Call types-init!.
7419 (-finish-parse-cpu!): Call types-finish!.
7420 * ifield.scm (<ifield>): Delete members start,length.
7421 New member bitrange.
7422 (<ifield>, methods field-start,field-length): Update.
7423 (fld:start): New arg insn-len. All callers updated.
7424 (<ifield>, methods field-mask,field-value): Update.
7425 (-ifield-parse): Update.
7426 (ifield-init!): Update.
7427 * iformat.scm (compute-insn-length): Simplify.
7428 (compute-insn-mask): Update.
7429 * insn.scm (insn:value): Update.
7430 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7431 (current-arch-default-insn-bitsize): New proc.
7432 (current-arch-insn-lsb0?): New proc.
7433 (-arch-parse,-arch-read): Update.
7434 (<cpu>): New member file-transform.
7435 (-cpu-parse,-cpu-read): Update.
7436 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7437 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7438 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7439 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7440 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7441 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7442 * operand.scm (op:start): Update call to field-start method.
7443 * sim-decode.scm (opcode-slots): New arg lsb0?.
7444 (fill-slot!,build-slots): Ditto.
7445 (build-decode-table-entry,build-decode-table-guts): Ditto.
7446 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7447 (gen-decode-fn): Ditto.
7448 (cgen-decode.c): Update call to gen-decode-fn.
7449 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7450 (-gen-cpu-header,-gen-cpuall-includes): New procs.
7451 (cgen-cpuall.h): Call -gen-cpuall-includes.
7452 * types.scm (<bitrange>): New class.
7453 (types-init!,types-finish!): New procs.
7454 * utils-cgen.scm (parse-number): New proc.
7455 (parse-boolean): New proc.
7456 * utils.scm (word-value): Renamed from shift-bits, rewrite.
7457 (word-mask): Rewrite.
7458 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7459 (m32rxf): New field `file-transform'.
7460 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7462 * hobbit.h: Fix include file name.
7464 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
7466 * slib: New directory of slib files used by cgen/hobbit.
7467 * hobbit.scm: New file.
7468 * hobbit.c: New file.
7469 * hobbit.h: New file.
7470 * hobscmif.h: New file.
7471 * hob-main.c: New file.
7472 * hobslib.scm: New file.
7474 * Makefile.am: Add support for compiling hobbit, and using compiled
7475 version of hobbit to compile cgen.
7476 * Makefile.in: Regenerate.
7477 * configure.in: Support --with-hobbit.
7478 * configure: Regenerate.
7479 * acconfig.h (WITH_HOBBIT): Add.
7480 * config.in: Regenerate.
7482 * rtl.scm: New file, was cdl-c.scm.
7483 Definition of rtx funcs moved to rtx-funcs.scm.
7484 (semantic-in-out-operands): Rewrite to compute object form of
7486 * rtx-funcs.scm: New file.
7488 * cgen-gh.c: #include "config.h".
7489 (gh_cadddr,gh_cddddr): New fns.
7490 (cgh_vector_to_list): New fn.
7491 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7492 (cgh_init): Prefix qsort procs with "cgh-".
7493 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7494 * cgen.c: #include "config.h".
7496 * attr.scm (bitset-attr?): New proc.
7497 (<bitset-attribute>, method parse-value): Value syntax changed from
7498 (val1 val2 ...) to val1,val2,....
7499 (<bitset-attribute>): New method gen-value.
7500 (<integer-attribute>): New method gen-value.
7501 (<enum-attribute>): New method gen-value.
7502 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7503 (<reader>): New class.
7504 (CURRENT-ARCH,CURRENT-READER): New globals.
7505 (keep-mach?): Move here from mach.scm.
7506 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7507 (<arch>): New class.
7508 (<arch-data>): New class.
7509 (<cpu>): Make subclass of <ident>.
7510 (*ENDIAN* variables): Delete.
7511 (process-state-vars): Delete.
7512 (mach-finish!): Add `base' value to MACH attribute.
7513 * hardware.scm (<hardware>): Make subclass of <ident>.
7514 (hw:std-attrs): New global.
7515 (hw-profilable?): New proc.
7516 * ifield.scm (<ifield>): Make subclass of <ident>.
7517 (sort-ifield-list): Move here from iformat.scm.
7518 * iformat.scm (<iformat>): Renamed from <insn-format>.
7519 Make subclass of <ident>.
7520 (-ifmt-search-key): Include cti? in categorization of formats.
7521 (ifmt-analyze): Compile semantics (turn to object form).
7522 * insn.scm (<insn>): Make subclass of <ident>.
7523 New member compiled-semantics.
7524 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7525 * mode.scm (<mode>): Make subclass of <ident>.
7527 * model.scm (<unit>): Make subclass of <ident>.
7528 New members inputs,outputs.
7529 (<model>): Make subclass of <ident>. New member state.
7530 (-unit-parse): Parse inputs,outputs.
7531 (<iunit>): New class.
7532 (-insn-timing-parse-model): New proc.
7533 (parse-insn-timing): Function unit spec rewritten.
7534 * operand.scm (<operand>): Make subclass of <ident>.
7535 New members sem-name,num,cond? New method gen-pretty-name.
7536 (hw-index-scalar): New global.
7537 (op-nub-hw): Move here from rtl.scm.
7538 (op:lookup-sem-name,op-profilable?): New procs.
7539 * pmacros.scm: Rewrite to pass through hobbit.
7540 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7541 * utils.scm (logit): Make a macro.
7542 (bit-set?): Rewrite.
7543 (high-part): Rewrite.
7545 * m32r.cpu (define-arch): Move to top of file.
7546 (cpu family m32rbf): Renamed from m32rb.
7547 (model m32r/d): Function unit spec rewritten.
7548 (all insns): Ditto. Replace UBI with BI.
7550 * opcodes.scm (gen-attr-table-decls): Declare
7551 @arch@_cgen_hw_attr_table.
7552 (gen-attr-table-defns): Generate hw attribute table.
7554 * sim-cpu.scm (-gen-engine-decls): New proc.
7555 (-gen-model-decls): New proc.
7556 (gen-parallel-exec-type): Add new member `written' to struct parexec.
7557 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7558 (-gen-record-profile-args): Simplify.
7559 (-gen-parallel-sem-case): Delete.
7560 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7561 New local `written'. Delete profiling code.
7562 (-gen-sem-case): Ditto.
7563 (-uncond-written-mask,-any-cond-written?): New procs.
7564 (cgen-sem-switch.c): Include duplicates of insns that can be executed
7565 parallelly or serially, and write-back handlers for all parallel insns.
7566 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7567 support to initialization of struct insn_sem.
7568 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7569 (-gen-insn-sem-type): Add parallel write-back support to struct
7571 (-gen-idesc-init-fn): Add support for virtual insns.
7572 Add parallel write-back support.
7573 * sim-model.scm (gen-model-profile-fn): Delete
7574 (-gen-model-fn-decls): New proc.
7575 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7576 (-gen-model-init-fn): New proc.
7577 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7578 members in @mach@_init_cpu.
7579 (cgen-model.c): Generate model handlers for each insn.
7580 * sim.scm (gen-define-field-macro): Cti insns handled differently.
7581 (<hw-pc>): New method gen-write.
7582 (<hw-register>, method gen-write): New arg `mode'.
7583 (<hw-register>): Delete method gen-record-profile!.
7584 New method gen-profile-index-type.
7585 (<hw-memory>, method gen-write): New arg `mode'.
7586 (<hw-address>, method gen-extract): Delete.
7587 (<hw-address>, method gen-write): New arg `mode'.
7588 (<hw-index>, method get-write-index): Rewrite.
7589 (<pc>, method cxmake-get-direct): Delete.
7590 (<pc>): New method cxmake-get. Comment out methods
7591 gen-set-quiet,gen-set-trace.
7592 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7593 gen-profile-index-type,gen-profile-code.
7594 Delete method gen-pretty-name. Rewrite method gen-write.
7595 Delete method cxmake-get-direct.
7596 (-op-gen-set-trace): Update `written'.
7597 (-op-gen-set-trace-parallel): Ditto.
7598 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7599 (gen-cpu-insn-enum-decl): Add extra entries for parallel
7600 insns and their write-back handlers.
7601 (insn-op-lookup): New proc.
7602 (<unit>): New method gen-profile-code.
7603 (<iunit>): New method gen-profile-code.
7604 (gen-argbuf-elm): Add profiling elements.
7605 (gen-argbuf-type): Define cti insns separately in their own struct.
7606 Add member `addr_cache' to this struct. Add entries for pbb virtual
7607 insns. Move semantic entries here from struct scache.
7608 Delete everything from struct scache except argbuf.
7609 (<insn>, method gen-profile-locals): Rewrite.
7610 (<insn>, method gen-profile-code): Rewrite.
7611 (sim-finish!): Create virtual pbb insns.
7613 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
7615 * m32r.cpu (h-cr): Add bbpc,bbpsw.
7616 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7617 (h-psw,h-bpsw,h-bbpsw): Define.
7618 (rte,trap): Handle bbpc,bbpsw.
7619 * opcodes.scm (max-operand-instances): Fix typo.
7620 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7621 hardware elements to be fun-access.
7622 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7624 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
7626 * m32r.cpu (trap): Pass `pc' to m32r_trap.
7628 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
7630 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7632 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
7634 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7636 (mach m32r): Update.
7638 * mach.scm (mach:supports?): New proc.
7639 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7640 gen-reg-access-{decls,defns}.
7641 * sim.scm (gen-reg-access-{decl,defn}): New procs.
7642 (gen-mach-bfd-name): New proc.
7643 (gen-arch-reg-access-{decls,defns}): New procs.
7644 (cgen-arch.[ch]): Output register access cover fns.
7646 * hardware.scm (hardware-builtin!): Set print handlers for
7648 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7650 (CGEN_PRINT_NORMAL,print_hash): Ditto.
7651 (my_print_insn): Ditto. Delete args buf, buflen.
7652 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7653 (-hw-asm-specs): Add `handlers' spec.
7654 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
7656 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
7658 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7659 (<hw-asm>, parse!): New method.
7660 (gen-insn-table-entry): Print semantics.
7661 (gen-opcode-open): Renamed from gen-opcode-table.
7663 * utils.scm (string-write): No longer a macro.
7664 (-string-write): Handle procedure args.
7665 * opcodes.scm: Update all calls to string-write.
7666 * sim-cpu.scm: Ditto.
7667 * sim-decode.scm: Ditto.
7668 * sim-model.scm: Ditto.
7671 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
7673 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7674 (-gen-insn-builders,-gen-insn-builder): New procs.
7676 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
7678 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7679 (gen-opcode-table): Properly terminate comment.
7681 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
7684 Clean up pass over everything, so starting fresh.