1 2009-09-09 Doug Evans <dje@sebabeach.org>
3 * rtl-traverse.scm: Comment tweaks.
4 * rtl-xform.scm: Comment and reformatting tweaks.
5 * doc/rtl.texi: Add text to docs on ifield-assertions.
7 * insn.scm (/insn-parse): Canonicalize the ifield-assertion before
10 Add support for controlling warnings/errors.
11 Add tests for iformat description errors.
12 * dev.scm (cload): New option #:diag.
13 * read.scm (<reader>): New member verify-iformat?.
14 (/parse-diagnostic, parse-warning): New functions.
15 (parse-error): Guts moved to /parse-diagnostic.
16 (/set-diagnostic-options!): New function.
17 (cpu-load): New arg diagnostic-options, all callers updated.
18 Recognize -w diagnostic-option-list.
19 * ifield.scm (ifields-base-ifields): Move here from iformat.scm.
20 (ifld-simple-ifields, ifields-simple-ifields): New function.
21 * insn.scm (/parse-insn-format-iflds): New function.
22 (/parse-insn-format): Guts moved to /parse-insn-format-iflds.
23 New arg isa, all callers updated. Do some basic validation of the
24 ifield list if requested.
25 * mach.scm (/sanity-check-insns): Improve error message text.
26 * doc/running.texi: Document -w option.
27 * doc/porting.texi: Document #:trace, #:diag options to cload.
29 * ifield.scm (/multi-ifield-parse): Initialize bitrange.
31 * dev.scm (*): Change default verbosity level to 2.
33 * ifield.scm (<ifield> pretty-print): New method.
34 (ifld-pretty-print): New function.
35 (<multi-ifield> pretty-print): New method.
37 * ifield.scm (<ifield> field-start): Delete word-len arg.
40 (<multi-ifield> field-start): Ditto.
41 * operand.scm (<hw-index> field-start): Ditto.
43 * ifield.scm (ifld-beyond-base?): Remove args base-bitsize,
44 total-bitsize. All callers updated.
45 * insn.scm (<insn>): Rename member ifld-values to /insn-value.
46 New member /insn-base-value.
47 (insn-base-value): New function.
48 * mach.scm (/sanity-check-insns): New function.
49 (arch-analyze-insns!): Call it.
51 2009-09-08 Doug Evans <dje@sebabeach.org>
53 * iformat.scm (ifields-base-ifields): Simplify.
54 (compute-insn-length): Simplify, call ifields-base-ifields.
55 (compute-insn-base-mask): Ditto.
56 * ifield.scm (ifld-known-values): Ditto.
57 (ifld-base-ifields): Ditto.
58 * insn.scm (insn-value): Ditto.
59 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
61 2009-09-08 DJ Delorie <dj@redhat.com>
63 * cpu/mep.opc (mep_cgen_insn_supported_asm): Change the test to a
64 preprocessor macro, not an enum.
66 2009-09-08 Doug Evans <dje@sebabeach.org>
68 * rtl-c.scm (/rtl-c-get): Convert symbols to strings before passing
70 (*): Remove trailing ":" from error messages passed to estate-error.
72 2009-09-07 Doug Evans <dje@sebabeach.org>
74 * types.scm (<struct>): Delete.
76 * pmacros.scm (/pmacro-env-make): New argument `loc', all callers
78 (/pmacro-loc-error): New function.
80 * mach.scm (/isa-parse-decode-assist): New function.
81 (/isa-parse): Call it.
83 * decode.scm (/get-subopcode-value): New function.
84 (/opcode-slots): Call it.
85 (/fill-slot!): Add logging message.
87 * cos.scm (/object-error): Convert symbols to strings before passing
90 * read.scm (rtl-version-equal?): New function.
91 (rtl-version-at-least?, rtl-version-older?): New functions.
93 * *.scm: Use / to prefix "local" vars/fns, for r6rs compliance.
94 * pmacros.scm (/pmacro-builtin-splice): Refer to $unsplice for
96 (pmacros-init!): Tweak to prepare for $<pmacro> for builtin pmacros.
98 2009-09-03 Doug Evans <dje@sebabeach.org>
100 * rtl.scm (rtx-pretty-name): Fix thinko, don't assume (car rtx)
103 2009-09-01 DJ Delorie <dj@redhat.com>
105 * cpu/mep.opc (parse_signed16_range): Mark as potentially unused.
106 (parse_unsigned16_range): Likewise.
107 (mep_cgen_insn_supported_asm): Make BSR12 check dependent on VLIW
110 2009-09-01 Doug Evans <dje@sebabeach.org>
112 Pmacro .equals -> .equal?
113 * pmacros.scm (-pmacro-builtin-equal?): Renamed from
114 -pmacro-builtin-equals. All callers updated.
115 (pmacros-init!): Rename .equals to .equal?.
116 * doc/pmacros.texi: Update.
117 * testsuite/pmacros-1.test: Update.
119 * doc/porting.texi: Work around texi2html bug where it doesn't
120 properly escape <> inside double-quotes inside @code.
122 * doc/porting.texi (Doing an opcodes port): Add step to specify
125 2009-08-29 Doug Evans <dje@sebabeach.org>
127 * hardware.scm (-keyword-parse): Fix `enum-prefix' default for
129 * doc/rtl.texi: Improve docs on rtl 0.7 vs 0.8 differences.
131 2009-08-27 Doug Evans <dje@sebabeach.org>
133 Add do-count rtl function.
134 * rtl-c.scm (s-do-count): New function.
135 (do-count): New rtl handler.
136 * rtl-traverse.scm (-rtx-traverse-iteration): New function.
137 (-rtx-make-traverser-table): Add ITERATION.
138 * rtl.scm (rtx-make-iteration-limit-var): New function.
139 (rtx-env-make-iteration-locals): New function.
140 * rtx-funcs.scm (do-count): New rtl function.
141 * cpu/play.cpu: Add do-count-test insn.
142 * doc/rtl.texi: Add docs on do-count.
144 2009-08-26 Doug Evans <dje@sebabeach.org>
146 * read.scm (parse-error): Change error message output format
147 to match context-owner-error.
148 * rtl-c.scm (-rtl-c-get): Call estate-error instead of error.
149 (rtl-c-set-quiet, rtl-c-set-trace): Ditto.
150 (s-if, s-cond, -gen-non-vm-case-test): Ditto.
151 (operand): Call estate-error instead of context-error.
152 (local, delay): Ditto.
153 (ref, attr): Call estate-error instead of error.
154 * rtl-traverse.scm (tstate-error): New function.
155 (-rtx-traverse-error): Call tstate-error instead of context-error.
156 (-rtx-traverse-operands, -rtx-traverse): Ditto.
157 (estate-error): New function.
158 * rtl.scm (rtx-lvalue-mode-name): Handle locals. Call estate-error
160 (e-if): Call estate-error instead of error.
161 * rtx-funcs.scm (error): Call estate-error instead of context-error.
163 * utils-cgen.scm (context-error): New arg `intro', all callers updated.
164 Rewrite to call context-owner-error.
165 (context-owner-error): New function.
167 * ifield.scm (<ifield> constructor): New arg `location',
169 * insn.scm (<insn> constructor): Ditto.
170 (<multi-insn> constructor): Ditto.
171 * minsn.scm (<macro-insn> constructor): Ditto.
172 * operand.scm (<operand> constructor): Ditto.
173 * utils-cgen.scm (builtin-location): New function.
174 (<source-ident>): Fix default value of member `location'.
175 (source-ident?): New function.
177 * rtl-traverse.scm (estate-new-env): Rename arg state -> estate.
178 (estate-push-env, estate-with-modifiers): Ditto.
179 (estate-deepen): New function.
181 2009-08-25 Dave Korn <dave.korn.cygwin@googlemail.com>
183 * sim-model.scm (-gen-mach-defns): Use @PREFIX@_INSN__MAX instead of
184 @CPU@_INSN__MAX. Use @prefix@ instead of @cpu@ for engine_run
187 2009-08-25 Doug Evans <dje@sebabeach.org>
189 * doc/pmacros.texi (pmacro default argument values): Add text.
191 2009-08-23 Doug Evans <dje@sebabeach.org>
193 * hardware.scm (<keyword>): Rename member print-name -> enum-prefix.
194 Rename member prefix -> name-prefix.
195 (<keyword> getters): Update.
196 (-keyword-parse): Update. Default enum-prefix to NAME-.
197 (-keyword-read): Update. Don't compute default value for
199 (define-keyword): Update.
200 (-hw-parse-keyword): Pass "UNUSED" for enum-prefix to -keyword-parse.
201 * read.scm (cgen-rtl-version): New function.
202 (-supported-rtl-versions): Add (0 8).
203 * desc-cpu.scm (-gen-hw-decl): Remove cruft.
204 * desc.scm (<keyword> gen-defn): prefix -> name-prefix.
205 * gas-test.scm (<keyword> test-data): prefix -> name-prefix.
206 * cpu/arm.cpu (gr-names, shift-type): Call define-rtl-version.
207 Update, print-name -> enum-prefix, make uppercase.
208 Remove unnecessary name-prefix spec.
209 * cpu/fr30.cpu (gr-names, cr-names, dr-names): Ditto.
210 * cpu/ip2k.cpu (register-names): Ditto.
211 * cpu/m68k.cpu (dr-names, ar-names): Ditto.
212 * cpu/sparc.cpu (gr-names): Ditto.
213 * cpu/xc16x.cpu (gr-names, ext-names,psw-names): Ditto.
214 (grb-names, conditioncode-names, extconditioncode-names): Ditto.
215 (grb8-names, r8-names, regmem8-names, regdiv8-names): Ditto.
216 (reg0-name, reg0-name1, regbmem8-names, memgr8-names): Ditto.
217 * cpu/ia32.cpu (gr8-names, gr16-names, gr-names): Call
218 define-rtl-version. Update, print-name -> enum-prefix, make uppercase,
219 prefix -> name-prefix.
220 * cpu/sh64-compact.cpu (frc-names): Call define-rtl-version.
221 Update, print-name -> enum-prefix, make uppercase.
222 (drc-names, xf-names): Ditto.
223 * cpu/xstormy16.cpu (gr-names, gr-Rb-names): Ditto.
224 * doc/rtl.texi (Keywords): New section.
225 (hardware indices): Update text.
226 (rtl versions): Add 0.8.
228 Add define-rtl-version.
229 * read.scm (-CGEN-RTL-VERSION): Renamed from -CGEN-LANG-VERSION.
230 (cgen-rtl-major, cgen-rtl-minor): Similarly renamed.
231 (cgen-lang-fixlevel): Delete.
232 (-supported-rtl-versions): New variable.
233 (-cmd-define-rtl-version): New function.
234 (init-reader!): New command define-rtl-version.
235 (-cgen): Add rtl version to --version output.
236 * doc/rtl.texi: Document rtl version support.
237 * cpu/play.cpu: Add define-rtl-version.
239 2009-08-22 Doug Evans <dje@sebabeach.org>
241 * Makefile.am (OPTIONS): Define.
242 (desc): Just generate <arch>-desc.[ch] files.
243 * Makefile.in: Regenerate.
244 * desc-cpu.scm (cgen-desc.h): Skip call to gen-extra-cpu.h if there's
246 (cgen-desc.c): Similarly.
247 * gen-all-desc: New file.
248 * opcodes.scm (opc-file-provided?): New function.
250 * mach.scm (current-*-add!): Update calls to parse-error.
251 * operand.scm (op:new-mode): Update call to parse-error.
252 * utils-cgen.scm (make-obj-context): New function.
254 * NEWS: Copy over entries from 1.1 branch.
256 2009-08-20 Doug Evans <dje@sebabeach.org>
258 * gas-test.scm (<keyword> test-data): Catch invalid requests,
259 flag a warning and compensate.
260 (<hw-address test-data): Tweak for readability.
261 (<hw-iaddress test-data): Ditto.
262 (cgen-build.sh): Convert symbols to strings before passing to
264 (cgen-allinsn.exp): Ditto.
266 * doc/pmacros.texi (.splice): Add more text.
268 2009-08-19 Doug Evans <dje@sebabeach.org>
270 * configure.in (AM_INIT_AUTOMAKE): Change version to 1.1.50 to
271 distinguish from 1.1.
272 * configure: Regenerate.
273 * read.scm (-CGEN-VERSION): Update.
274 * doc/version.texi: Update.
276 New builtin .pmacro?.
277 * pmacros.scm (-pmacro-builtin-pmacro?): New function.
278 (pmacros-init!): Add .pmacro?.
279 * doc/pmacros.text: Document .pmacro?.
280 * testsuite/pmacros-1.test: Test .pmacro?.
282 * pmacros.scm (scan-list1): Reorganize tracing so that the tracing
283 of a pmacro begins before its arguments are evaluated, improves
286 * pmacros.scm (.sll, .srl, .sra): Fix thinko.
287 * testsuite/pmacros-1.test: Ditto. Add better tests.
289 * doc/rtl.texi (Instructions): Improve docs of when ${...} is needed
291 (Operands): Similarly.
293 2009-08-18 Doug Evans <dje@sebabeach.org>
295 * ifield.scm (ifld-encode-mode): Add FIXME.
296 * opcodes.scm (<ifield> gen-insert): Handle encode parameters with
298 (<ifield> gen-extract): Similarly.
300 * read.scm (parse-error): Handle #f for context-location.
301 * utils-cgen.scm (unspecified-location): Fix building of
304 * doc/rtl.texi: Document how to write hex and boolean values.
306 * gas-test.scm (<hw-asm> test-data): Handle () values.
307 (<keyword> test-data): Convert symbols to strings before passing
309 (<hw-index> test-data): Enumerate all cases. Emit correctly sized
312 * operand.scm (hw-index-scalar): Set `name'.
313 (hw-index-anyof, hw-index-derived): Ditto.
315 2009-08-17 Doug Evans <dje@sebabeach.org>
317 * pmacros.scm (-pmacro-builtin-internal-test): New function.
318 (pmacros-init!): Add .internal-test.
319 * testsuite/test-utils.sh.in (post_process): Tweak FAIL output.
320 * testsuite/testsuite.cpu (internal-verify): New pmacro.
321 * doc/pmacros.text: Document .internal-test.
323 * utils-cgen.scm (parse-name): Handle (add 3) -> add3.
324 (parse-comment): Allow numbers.
325 * doc/porting.texi: Document that names and comments may be lists.
327 * insn.scm (-insn-parse): Fix typo.
329 Rename .eval -> .exec. Add new .eval.
330 * pmacros.scm (-pmacro-built-exec): Renamed from -pmacro-builtin-eval.
331 (-pmacro-builtin-eval): New function.
332 (pmacros-init!): Add .exec.
333 * doc/pmacros.texi: Update, .exec -> .eval. Document new .eval.
334 * testsuite/location-1.test: Update.
335 * testsuite/pmacros-1.test: Add test for .eval.
337 2009-08-16 Doug Evans <dje@sebabeach.org>
339 * doc/porting.texi: Remove support for Guile 1.4.
341 * read.scm (current-reader-location): Return unspecified location
342 if reader hasn't been initialized yet.
344 2009-08-13 Doug Evans <dje@sebabeach.org>
346 * dev.scm: Document tracing options.
348 * pmacros.scm (pmacro-dump): New function.
349 (check-pmacro): Tweak debugging output.
350 * doc/cgenint.texi: Mention pmacro-dump, pmacro-debug.
351 * doc/pmacros.texi (.splice): Use pmacro-dump instead of pmacro-expand.
353 Add .let* pmacro builtin.
354 * pmacros.scm (-pmacro-builtin-let*): New function.
355 (pmacros-init!): Add .let*.
356 * doc/pmacros.texi: Document .let*.
357 * testsuite/pmacros-1.test: Test .let*.
359 2009-08-12 Doug Evans <dje@sebabeach.org>
361 Clean up cpu file parsing, pass context consistently instead of the
362 old "errtxt" argument.
363 NOTE: ACU == "All Callers Updated".
364 * attr.scm (-parse-simple-attribute): Renamed from
365 parse-simple-attribute, ACU.
366 (-attr-parse): Change errtxt argument to context, ACU.
368 (atlist-parse): Ditto. Put context arg first.
369 (attr-parse): Use parse-error instead of context-error.
370 * enum.scm (parse-enum-vals): Change errtxt argument to context, ACU.
371 (-enum-parse-prefix, -enum-parse, -enum-read): Ditto.
372 * hardware.scm (-keyword-parse): Renamed from keyword-parse.
373 `context' arg is now a <context> object. ACU.
374 (-keyword-read): `context' arg is now a <context> object. ACU.
375 (-hw-parse-indices): Change errtxt argument to context, ACU.
376 (-hw-parse-values, -hw-parse-handlers): Ditto.
377 (-hw-parse-getter, -hw-parse-setter, -hw-parse, -hw-read): Ditto.
378 (-hw-validate-layout, -hw-create-getter-from-layout,
379 -hw-create-setter-from-layout): Ditto.
380 (<hw-register>:parse!, <hw-pc>:parse!): Ditto.
381 (<hw-memory>:parse!, <hw-immediate>:parse!): Ditto.
382 (<hw-address>:parse!): Ditto.
383 * ifield.scm (-ifield-parse, ifield-read): Ditto.
384 (-ifld-parse-follows, -ifld-parse-encode-decode): Ditto.
385 (-ifld-parse-encode, -ifld-parse-decode): Ditto.
386 (-multi-ifield-parse, -multi-ifield-read): Ditto.
387 * insn.scm (-insn-parse, -insn-read): Ditto.
388 (parse-syntax): Ditto. Put context arg first.
389 (-parse-insn-format-symbol): Change errtxt argument to context, ACU.
390 (-parse-insn-format-ifield-spec, -parse-insn-format-list): Ditto.
391 (-parse-insn-format): Ditto.
392 * mach.scm (-arch-parse-alignment, -arch-parse-machs): Ditto.
393 (-arch-parse-isas): Ditto.
394 (-isa-read): Add context arg, ACU.
395 (-cpu-parse, -cpu-read, -mach-read): Ditto.
396 * minsn.scm (-minsn-parse-expansion): Change errtxt argument to
398 (-minsn-parse, -minsn-read, -minsn-compute-iflds): Ditto.
399 (minsn-make-alias): Ditto.
400 * mode.scm (-mode-parse): Ditto.
401 (parse-mode-name): Ditto. Put context arg first.
402 * model.scm (-prefetch-parse, -retire-parse, -pipeline-parse): Change
403 errtxt argument to context, ACU.
404 (-unit-parse, -model-parse, -model-read): Ditto.
405 * operand.scm (-operand-parse-getter): Use parse-error instead of
407 (-operand-parse-setter): Ditto.
408 (-operand-parse): Change errtxt argument to context, ACU.
409 (-operand-read, -derived-operand-parse, -derived-operand-read): Ditto.
410 (-anyof-operand-parse, -anyof-operand-read): Ditto.
411 * read.scm (reader-error): Delete. Use parse-error instead.
412 (parse-error): Change errtxt argument to context, ACU. Split args
413 argument into expr and maybe-help-text.
414 (-reader-process-expanded-1!): Reorganize.
415 * rtl.scm (-subr-read): Change errtxt argument to context, ACU.
416 * types.scm (parse-type): Ditto.
417 * utils-cgen.scm (single-location->simple-string): New function.
418 (<context>): Replace members file,lineno with location.
419 (make-prefix-context): Renamed from context-make-prefix, ACU.
420 (make-current-context): New function.
421 (context-append, context-append-name): New functions.
422 (context-make-reader): Delete.
423 (parse-name): Change errtxt argument to context, ACU.
424 Put context arg first.
425 (parse-comment): Ditto.
426 (parse-number): Change errtxt argument to context, ACU.
427 (arg-list-validate-name, arg-list-check-no-args,
428 arg-list-symbol-arg): Ditto.
430 * read.scm (-cmd-if): Don't assume test is a list.
432 * html.scm (get-insn-properties): Delete errtxt, unused.
434 2009-08-11 Doug Evans <dje@sebabeach.org>
436 * doc/rtl.texi (hardware types): Add pc.
438 2009-08-07 Doug Evans <dje@sebabeach.org>
440 Add -t option for tracing things like commands, pmacro expansion.
441 * dev.scm (cload): New arg #:trace.
442 * pmacros.scm (-pmacro-expand): Rewrite pmacro tracing.
443 (pmacro-trace): New arg `loc'. Rewrite pmacro tracing.
444 (pmacro-debug): Call pmacro-trace instead of -pmacro-expand.
445 * read.scm (<reader>): New members trace-commands?, trace-pmacros?.
446 (-reader-process-expanded-1!): Trace commands if requested.
447 (-reader-process!): Call pmacro-trace of pmacro tracing requested.
448 (-set-trace-options!): New function.
449 (-init-reader!): New function.
450 (cpu-load): New arg trace-options, all callers updated.
451 Call -init-reader! and -set-trace-options!.
452 (cgen-usage): Improve output formatting.
453 (common-arguments): New option -t.
455 * utils-cgen.scm (single-location->string): Renamed from
456 pretty-print-single-location. All callers updated.
457 (location->string): Renamed from pretty-print-location.
459 (source-properties-location->string): New function.
460 * doc/running.texi: Document -t.
462 2009-08-06 Doug Evans <dje@sebabeach.org>
464 * read.scm (debug-env, debug-var-names, debug-var, debug-tty,
465 debug-tty-port, debug-repl, debug-quit, debug-repl-env): Move to ...
466 * utils.scm: ... here.
468 2009-08-05 Doug Evans <dje@sebabeach.org>
470 Track source location better, for better error messages.
471 * pmacros.scm (-pmacro-eval): Delete, unused.
472 (pmacro-expand, -pmacro-expand): New arg `loc', all callers updated.
473 (-pmacro-expand-expr-list, -smacro-apply): Ditto.
474 (scan-list, scan): Ditto.
475 (-pmacro-builtin-pmacro, -pmacro-builtin-let, -pmacro-builtin-if,
476 -pmacro-builtin-case, -pmacro-builtin-cond, -pmacro-builtin-begin,
477 -pmacro-builtin-andif, -pmacro-builtin-orif): Ditto.
478 (scan-list1): New function.
479 (-pmacro-build-lambda): New arg `loc', all callers updated. Rewrite.
480 * read.scm (<reader>): New member `location'.
481 (-reader-lookup-command): Renamed from reader-lookup-command,
483 (reader-error): Rewrite to produce better source location info.
484 (current-reader-location): New function.
485 (-reader-process-expanded-1!): Renamed from -reader-process-expanded-1.
486 All callers updated. Record source location of expression.
487 (reader-process-expanded!): Renamed from reader-process-expanded.
489 (-reader-process!): Renamed from reader-process. New arg `loc'.
490 All callers updated. Record source location of define-pmacro.
491 * utils-cgen.scm (<location>): New class.
492 (single-location): New (pseudo) class.
493 (pretty-print-single-location, pretty-print-location): New functions.
494 (location-top, location-push-single, location-push): New functions.
495 (unspecified-location, current-input-location): New functions.
496 (location-property): New object property.
497 (location-property-set!): New function.
498 (<source-ident>): Renamed from <ordered-ident>. New member `location'.
500 * testsuite/location-1.test: New testcase.
501 * testsuite/run-tests.sh: Fix fail count handling.
502 * testsuite/test-utils.sh.in (run_cgen): New option `-f'. Allow tests
503 to expect cgen to fail.
505 * pmacros.scm (*): Use "pmacro" instead of "macro" more consistently.
507 * read.scm (-cmd-include): Renamed from include. All callers updated.
508 (-cmd-if): Renamed from cmd-if. All callers updated.
509 Use reader-process-expanded! on then/else clauses instead of eval1.
511 2009-07-22 Doug Evans <dje@sebabeach.org>
513 * modes.scm (TI,OI): New modes.
514 * types.scm (parse-type): Improve error checking. Don't hardwire
516 * utils.scm (non-negative-integer?): New function.
518 * pmacros.scm (-pmacro-builtin-find): New predicate.
519 (pmacros-init!): Add .find.
520 * doc/pmacros.tex: Document .find.
521 * testsuite/pmacros-1.test: Test .find.
523 2009-07-20 Doug Evans <dje@sebabeach.org>
525 * insn.scm (multi-insn-instantiate!): Use logging messages instead of
526 commented out printfs.
527 * rtl.scm (rtl-finish!): Whitespace tweaks.
528 * model.scm (parse-insn-timing): Tweak logging message.
529 * operand.scm: Comment and whitespace tweaks.
530 (op:type): Tweak error message.
531 (op-ifield): Tweak logging message.
532 (-derived-operand-parse, anyof-merge-semantics): Ditto.
533 * read.scm: Whitespace cleanup.
534 * utils.scm: Whitespace cleanup.
536 2009-07-19 Doug Evans <dje@sebabeach.org>
538 Fix binding of nested pmacro parameters.
539 * pmacros.scm (-pmacro-env-make): New arg prev-env.
541 (-pmacro-bulid-lambda): Ditto.
542 * doc/pmacros.texi: Update.
543 * testsuite/pmacros-1.test: Add testcase.
545 * ifield.scm (-multi-ifield-make-default-insert): Fix shifts
547 (-multi-ifield-make-default-extract): Ditto.
549 * rtl-c.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag): Define.
550 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
551 * rtx-funcs.scm (addc-cflag, addc-oflag, subc-cflag, subc-oflag):
553 (add-cflag, add-oflag, sub-cflag, sub-oflag): Deprecate.
554 * doc/rtl.texi: Update.
556 * doc/pmacros.texi (.not): Emphasize (.not 0) is not 1.
558 Rename builtin boolean pmacros, for consistency with rtl.
559 * pmacros.scm: .and -> .andif, .or -> .orif, .bitand -> .and,
560 .bitor -> .or, .bitxor -> .xor, .bitinv -> .inv.
561 * doc/pmacros.texi: Update.
562 * testsuite/pmacros-1.test: Update.
564 2009-07-17 Doug Evans <dje@sebabeach.org>
566 Use hash tables to record ifields, operands, insns, macro-insns.
567 * attr.scm (attr-builtin!): Tweak some comments.
568 * hardware.scm (hardware-builtin!): Call all-isas-attr-value.
569 * ifield.scm (<ifield>): Subclass from <ordered-ident> instead of
571 (<multi-ifield>): New constructor.
572 (ifield-builtin!): Add isa attr to f-nil, f-anyof.
573 * insn.scm (<insn>): Subclass from <ordered-ident> instead of
575 (-sub-insn-make!): Add hack to avoid differences in generated code.
576 (multi-insn-instantiate!): Add total number of multi-insns to
578 * mach.scm (<arch>): Rename members ifld-list, op-list, insn-list,
579 minsn-list to foo-table. New member next-ordinal.
580 Update getters/setters.
581 (arch-ifld-list, arch-op-list, arch-insn-list, arch-minsn-list):
583 (-get-next-ordinal!, -get-lowest-ordinal): New function.
584 (-make-ident-object-table, -ident-object-table->list,
585 -ident-object-table-add!, -ident-object-table-lookup): New functions.
586 (current-ifld-list, current-ifld-add! current-ifld-lookup,
587 -ifld-already-defined?): Rewrite.
588 (current-op-list, current-op-add! current-op-lookup,
589 -op-already-defined?): Rewrite.
590 (current-raw-insn-list, insn-list-car, insn-list-splice!): Delete.
591 (current-insn-list, current-insn-add! current-insn-lookup,
592 -insn-already-defined?): Rewrite.
593 (current-minsn-list, current-minsn-add! current-minsn-lookup,
594 -minsn-already-defined?): Rewrite.
595 (all-isas-attr-value, all-isas-attr, attr-isa-list): New functions.
596 (MAX-VIRTUAL-INSNS): Define.
597 (arch-analyze-insns!): Add hack to avoid differences in generated code.
598 Update use of arch-insn-list.
599 (mach-init!): Initialize ifld-table, op-table, insn-table, minsn-table.
600 (arch-finish!): Delete references to ifld-list, op-list, insn-list,
602 * minsn.scm (<macro-insn>): Subclass from <ordered-ident> instead of
603 <ident>. New constructor.
604 * operand.scm (<operand>): Subclass from <ordered-ident> instead of
606 * sid.scm (-virtual-insn-add!): New function.
607 (-create-virtual-insns!): Call it.
608 (-fill-sim-insn-list!): Rewrite.
609 * sim.scm (-virtual-insn-add!, -create-virtual-insns!): New functions.
610 (sim-finish!): Move contents to -create-virtual-insns!, and call it.
611 * utils-cgen.scm (<ordered-ident>): New class.
612 (obj-ordinal, obj-set-ordinal!): New functions.
613 (add-ident-methods!): Delete.
615 * model.scm (parse-insn-timing): Change logging message to level 3.
617 2009-07-16 Doug Evans <dje@sebabeach.org>
619 * doc/rtl.texi (Enumerated constants): Add example, fix a typo,
620 add a link to define-normal-insn-enum.
622 * doc/porting.texi (Conventions): Add docs on writing integers.
624 * cpu/simplify.inc (*): One line doc strings don't need \n.
625 (df): Invoke define-full-ifield instead of claiming it's an alias.
627 (dnop): Mark as deprecated.
629 * cpu/play.cpu: Add example of hardware `layout'.
630 * doc/porting.tex: Add docs on simplify.inc.
631 * doc/rtl.texi: Cleanup pass over "Simplification macros",
634 * ifield.scm: Whitespace/formatting cleanup.
636 * ifield.scm (-multi-ifield-parse): Watch for missing subfields.
638 * read.scm (parse-error): Don't print single entry args as a list.
639 (-reader-process-expanded-1): Convert symbol to string for
642 * insn.scm (multi-insn-instantiate!): Tweak logging message.
644 2009-07-15 Doug Evans <dje@sebabeach.org>
646 * cpu/simplify.inc (dno): New pmacro.
647 * doc/porting.texi: Add section on simplify.inc.
648 * doc/rtl.texi (Instruction operands): Mention dno, dnop.
650 2009-07-15 Doug Evans <devans@sourceware.org>
652 * gen-all-doc: Generate index.html.
654 2009-07-13 Doug Evans <dje@sebabeach.org>
656 Extend pmacro language, add testsuite.
657 * Makefile.am (SUBDIRS): Add testsuite.
658 * Makefile.in: Regenerate.
659 * configure.in (AC_OUTPUT): Create testsuite/Makefile,
660 testsuite/test-utils.sh.
661 * configure: Regenerate.
662 * dev.scm (cload): Handle testsuite app.
663 (load-testsuite): New function.
664 * pmacros.scm: (-pmacro-debug?): New global.
665 (-smacro-table): New global.
666 (-smacro-lookup, -smacro-set!): New functions.
667 (-pmacro-make): New argument `syntactic-form?', all callers updated.
668 (-pmacro-syntactic-form?): New function.
669 (-pmacro-expected-number, -pmacro-verify-number): New functions.
670 (-pmacro-expected-integer, -pmacro-verify-integer): New functions.
671 (-pmacro-expected-non-negative-integer): New function.
672 (-pmacro-verify-non-negative-integer): New function.
673 (-pmacro-expand-expr-list): New function.
674 (-pmacro-process-args-1): Renamed from -pmacro-process-args.
675 (-pmacro-process-args): Renamed from -pmacro-invoke.
676 (-pmacro-apply, -smacro-apply): New functions.
677 (-pmacro-expand): Rewrite syntactic form processing.
678 (-pmacro-build-lambda): Reformat.
679 (define-pmacro): Watch for more errors in definition.
680 (pmacro-debug): New function.
681 (pmacro-trace): Set/reset -pmacro-debug?.
682 (all existing builtin pmacro helpers): Rename to -pmacro-builtin-foo.
683 (-pmacro-builtin-substring): Fix. Add support for `end' marker.
684 (-pmacro-builtin-for-each, et.al.): New helpers for .for-each, .let,
685 .if, .case, .cond, .begin, .print, .dump, .error, .list, .ref,
686 .length, .replicate, .equals, .and, .or, .not, .eq, .ne, .lt, .gt,
687 .le, .ge, .add, .sub, .mul, .div, .rem, .sll, .srl, .sra, .bitand,
688 .bitor, .bitxor, bitinv, .car, .cdr, .caar, .cadr, .cdar, .cddr.
689 (pmacros-init!): Initialize -smacro-table.
690 Rewrite pmacro initialization.
691 * read.scm (reader-process-expanded): Renamed from
692 -reader-process-expanded. All callers updated.
693 Recognize () as a no-op.
694 (cpu-load): Tweak logging messages.
695 * utils.scm (message): Add comment.
696 * cpu/play.cpu: Add some instructions to play with .let.
697 * doc/cgenint.texi: Move some debugging related docs to here from
699 * doc/pmacros.texi: Reorganize. Add docs for new builtin pmacros.
700 * testsuite/Makefile.am: New file.
701 * testsuite/Makefile.in: New file.
702 * testsuite/test-utils.sh.in: New file.
703 * testsuite/run-tests.sh: New file.
704 * testsuite/testsuite.cpu: New file.
705 * testsuite/pmacros-1.test: New file.
707 * decode.scm: Comment and formatting tweaks.
708 (-build-decode-table-guts): Add more data to logging message.
710 2009-07-12 Doug Evans <dje@sebabeach.org>
712 Delete files that now live in ../cpu.
713 * cpu/iq10.cpu: Delete.
714 * cpu/iq2000.cpu: Delete.
715 * cpu/iq2000.opc: Delete.
716 * cpu/iq2000m.cpu: Delete.
717 * cpu/m32r.cpu: Delete.
718 * cpu/m32r.opc: Delete.
720 2009-07-09 Doug Evans <dje@sebabeach.org>
722 * utils-sim.scm (-gen-decode-bits): New argument `entire-val'.
723 All callers updated. Work around -ve shifts by referencing the
726 * utils.scm (message): Handle pairs.
728 2009-07-08 DJ Delorie <dj@redhat.com>
730 * cpu/mep-ivc2.cpu (cpmovtocsar0_C3, cpmovtocsar1_C3,
731 cpmovtocc_C3, cpmovtocsar0_P0S_P1, cpmovtocsar1_P0S_P1,
732 cpmovtocc_P0S_P1): Mark volatile. Note which registers are
735 2009-07-07 Doug Evans <dje@sebabeach.org>
737 * cpu/play.cpu (add): Use (ifield enum) for one format element.
738 * cpu/play.opc: New file.
740 Allow arbitrary enums in instruction formats, e.g. (f-op1 OP1_4).
741 * insn.scm (-parse-insn-format-ifield-spec): Recognize (ifield enum).
742 * doc/rtl.texi (Instructions): Update.
744 * cgen-opc.scm (-opc-file-path,opc-file-path): Move to opcodes.scm
745 (opc-arguments, -OPC): Call set-opc-file-path!.
746 * opcodes.scm (-opc-file-path,opc-file-path): Moved here.
747 (set-opc-file-path!): New function.
748 * dev.scm: Mention set-opc-file-path!. Mention doc options.
750 * opc-ibld.scm (gen-insn-builder): Convert symbols to strings
751 before passing to gen-c-args.
753 2009-07-06 DJ Delorie <dj@redhat.com>
755 * cpu/mep-core.cpu (fsft, ssarb): Mark as VOLATILE.
756 * cpu/mep-ivc2.cpu (many): Add VOLATILE to more insns that make
757 unspecified accesses to control registers.
759 2009-07-01 DJ Delorie <dj@redhat.com>
761 * cpu/mep-ivc2.cpu: Add VOLATILE to insns that make
762 unspecified accesses to control registers.
764 * cpu/mep-ivc2.cpu (cmov, cmovc, cmovh): Add intrinsic names to VLIW variants.
765 (ivc2rm, ivc2crn): Make data type consistent with non-VLIW variants.
767 2009-06-27 Doug Evans <dje@sebabeach.org>
769 * gen-all-intrinsics: New file.
771 2009-06-24 Doug Evans <dje@sebabeach.org>
773 * All *.scm files: Update copyright year.
774 * utils.scm (copyright-fsf, copyright-redhat): Ditto.
776 2009-06-23 DJ Delorie <dj@redhat.com>
778 * intrinsics.scm: Updates to support IVC2.
779 (belongs-to-group?): Check IVC2 slots.
780 (-slots-attribute): New.
781 (targets::attributes): Add SLOTS.
782 (target:add-well-known-intrinsics): Add CPMOV.
783 (md-insn): Add CPTYPE and CRET?.
784 (add-md-insn): Likewise.
785 (add-intrinsic-for-isa): Disable the duplicate tests, as IVC2 has
786 duplicate insns with different bit patterns.
787 (write-cgen-insn?): Add cret? support.
788 (intrinsics.h): Add vector types.
789 (runtime-op): Add vector support.
790 (intrinsic-protos.h): Let GCC define its types. Add cret? support.
792 * cpu/mep-core.cpu: Add CPTYPE and CRET attributes.
793 * cpu/mep-ivc2.cpu: Update all insns to include type information.
794 (h-cr-ivc2): Default to typeless.
795 (h-ccr-ivc2): Fix register width.
796 (SLOTS): Fix values and default.
797 (ivc2_*): Add control register names.
798 (crop, crqp, crpp, croc, crqc, crpc): Default to typeless.
800 * cpu/mep.opc (mep_cgen_insn_supported_asm): New, skip the short
801 version of BSR when assembling VLIW bundles. Use it in mep-asm.c
803 2009-06-22 Doug Evans <dje@sebabeach.org>
805 * semantics.scm (insn-build-known-values): Fix typo in comment.
807 2009-06-21 Doug Evans <dje@sebabeach.org>
809 * rtl-xform.scm (rtx-simplify-insn): New function.
810 * html.scm (gen-insn-docs): Call it.
811 * sem-frags.scm (sem-find-common-frags, -frag-test-data): Ditto.
812 * iformat.scm (ifmt-analyze): Minor simplification.
814 * semantics.scm (semantic-compile): Change arg sem-code-list to
816 (semantic-attrs): Ditto.
817 * iformat.scm (ifmt-analyze): Update.
818 (ifmt-compute!): Update.
819 * rtl-traverse.scm (-compile-expr-fn, rtx-compile): Move to
821 (-rtx-trim-args, -rtx-trim-for-doc, rtx-trim-for-doc): Ditto.
822 * rtl.scm (-rtx-canonicalize-expr, rtx-canonicalize): Ditto.
823 * semantics.scm (rtx-simplify): Ditto.
824 (rtx-const-equal, rtx-const-list-equal): Ditto, and make local.
825 (rtx-simplify-eq-attr-mach, rtx-simplify-eq-attr-insn): Ditto.
826 (-simplify-expr-fn): Move to rtl-xform.scm.
827 (-solve-expr-fn, rtx-solve): Ditto.
828 * rtl-xform.c: New file.
831 * rtl-c.scm (delay): Add FIXME, tweak formatting.
832 * rtl-traverse.scm (-rtx-traverse-expr): Tweak comments.
833 (-rtx-traverse, rtx-traverse): Ditto.
835 2009-06-20 Doug Evans <dje@sebabeach.org>
837 * doc/rtl.texi (Expressions): Enhance docs of shift ops.
839 * configure.in: Update version to 1.1.
840 * configure: Regenerate.
841 * read.scm (-CGEN-VERSION): Update to 1.1.0.
843 2009-06-20 Masaki Muranaka <monaka@monami-software.com>
844 Doug Evans <dje@sebabeach.org>
846 * desc-cpu.scm (cgen-desc.h): Tweak logit message for consistency.
847 (cgen-desc.c): Ditto.
848 * sid-cpu.scm (cgen-desc.h, cgen-cpu.h, cgen-defs.h): Ditto.
849 (cgen-write.cxx, cgen-semantics.cxx, cgen-sem-switch.cxx): Ditto.
850 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
851 * sid-model.scm (cgen-model.cxx, cgen-model.h): Ditto.
852 * sim-arch.scm (cgen-arch.h, cgen-arch.c): Ditto.
853 (cgen-cpuall.h, cgen-ops.c): Ditto.
854 * sim-cpu.scm (cgen-cpu.h, cgen-defs.h, cgen-cpu.c): Ditto.
855 (cgen-read.c, cgen-write.c, cgen-semantics.c): Ditto.
856 (cgen-sem-switch.c): Ditto.
857 * sim-decode.scm (cgen-decode.h, cgen-decode.c): Ditto.
858 * sim-model.c (cgen-model.c): Ditto.
860 2009-06-18 Doug Evans <dje@sebabeach.org>
862 * gen-all-doc: Add fr30, ip2k, iq2000, lm32, mep, mt.
864 * html.scm (doc-analyze!): Provide default IDOC attribute if missing.
866 * dev.scm (cload): Change #:arch argument to take the path to the
867 .cpu file instead of just the name of the architecture.
868 * read.scm (arch-path): Remove trailing '/'.
869 (cpu-load): Set `arch-path' to directory of .cpu file.
870 (-cgen): Don't set `arch-path' here.
872 * doc/porting.texi: Update.
874 2009-06-14 Doug Evans <dje@sebabeach.org>
876 * gen-all-doc: Use files in ../cpu where possible.
878 * Makefile.am (ARCHFILE): Fix path.
879 * Makefile.in: Regenerate.
880 * html.scm: Use "pre" instead of "plaintext".
882 * doc/cgenint.texi: Renamed from internals.texi. Several cleanups.
883 * doc/app.texi: Cleanup pass.
884 * doc/cgen.texi: Cleanup pass.
885 * doc/glossary.texi: Add entries for ifield, iformat, sformat, insn.
886 * doc/intro.texi: Cleanup pass.
887 * doc/mdate-sh: New file.
888 * doc/opcodes.texi: Cleanup pass.
889 * doc/pmacros.texi: Cleanup pass.
890 * doc/porting.texi: Cleanup pass.
891 * doc/rtl.texi: Cleanup pass.
892 * doc/running.texi: Cleanup pass. Document more runtime options.
893 * doc/stamp-vti: Update.
894 * doc/version.texi: Update.
896 * Makefile.am (AUTOMAKE_OPTIONS): Add 1.9
897 (GUILE): Fix definition.
898 * Makefile.in: Regenerate with automake 1.9.6.
899 * aclocal.m4: Regenerate with aclocal 1.9.6.
900 * configure.in (AC_PREREQ): Set to 2.59.
901 (GENINSRC_NEVER): Define.
902 * configure: Regenerate with autoconf 2.59.
903 * doc/Makefile.am (info_TEXINFOS): Add cgenint.texi.
904 (cgen.info,cgen.dvi): Delete.
905 (cgen_TEXINFOS,cgenint_TEXINFOS): Define.
906 (noinst_TEXINFOS): Add cgenint.texi.
907 (DOCFILES): Add missing files.
908 (MAINTAINERCLEANFILES,DISTCLEANFILES): Define.
909 * doc/Makefile.in: Regenerate with automake 1.9.6.
911 * guile.scm: Add "." to %load-path if >= guile version 1.8.
913 * attr.scm: Removing trailing whitespace.
914 * cgen-intrinsics.scm: Ditto.
915 * cgen-sim.scm: Ditto.
921 2009-05-28 DJ Delorie <dj@redhat.com>
923 * cpu/mep.opc (parse_signed16_range): New.
924 (parse_unsigned16_range): New.
925 * cpu/mep-ivc2.cpu (imm16p0, simm16p0): Use them.
927 2009-05-26 DJ Delorie <dj@redhat.com>
929 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Enable for C3 slots, fix
931 (f-ivc2-ccrn-c3hi): New.
932 (f-ivc2-ccrn-c3lo): New.
933 (f-ivc2-ccrn-c3): New.
934 (ivc2c3ccrn): Use it.
936 2009-05-22 DJ Delorie <dj@redhat.com>
938 * cpu/mep.opc (mep_examine_ivc2_insns): Fix bug in ivc2 decoder.
939 (mep_config_map): Regenerate.
941 * cpu/mep-ivc2.cpu (h-ccr-ivc2): Add generic names as well as
944 (cmovc): move to after field definitions, use ivc2-specific
946 (cpmovi_b_P0S_P1): New.
948 2009-05-19 DJ Delorie <dj@redhat.com>
950 * cpu/mep.opc: Regenerate configuration.
951 (parse_cdisp10): Only check CPU flags, not COP flags.
952 (check_configured_mach): Likewise.
954 2009-05-13 DJ Delorie <dj@redhat.com>
956 * intrinsics.scm (insns.md): Add RTL predicates.
957 (intrinsics.h): Remove old C intrinsics.
959 2009-04-29 DJ Delorie <dj@redhat.com>
962 * mep-core.cpu: Regenerated. Add support for deferred register
964 (SLOT): Add IVC2 slot types.
965 (sim-syscall): Rename to something more appropriate.
966 * mep-ext-cop.cpu: Regenerate.
967 * mep.opc: Regenerate. Add "coprocessor supported" define area.
968 (print_slot_insn): New.
969 (mep_examine_ivc2_insns): New.
970 (mep_print_insn_set_ivc2_mode): New.
971 (mep_print_insn): Support IVC2 slotting.
973 2009-04-20 DJ Delorie <dj@redhat.com>
975 * intrinsics.scm (intrinsics-analyze!): Include aliases.
976 (guess-mode): Drop COP* syntax.
977 (need-insn): Add "--syscall--" to the list.
978 (enum-type): Drop COP* syntax.
979 (intrinsics.h): Likewise.
980 (intrinsic-protos.h): Change file header to allow it to be
983 2009-04-17 DJ Delorie <dj@redhat.com>
985 * cpu/mep-c5.cpu (f-12s20): Change to signed.
986 (lhucpm1): Limit to C5 mach.
987 (dsp0,dsp1): Rewrite as aliases so that intrinsics are generated.
988 * cpu/mep-core.cpu (extend-cdisp10): New.
989 (f-cdisp10): Change to signed, use extend-cdisp10 to sign extend.
991 2009-04-08 DJ Delorie <dj@redhat.com>
993 * cpu/mep-c5.cpu: New.
994 * cpu/mep-core.cpu: Add C5 support.
995 * cpu/mep.opc: Likewise.
997 2009-02-18 Pierre Muller <muller@ics.u-strasbg.fr>
999 * opc-itab.scm (<>_cgen_init_opcode_table): Avoid compiler warning
1000 about calling memset with a zero length.
1002 2009-02-03 DJ Delorie <dj@redhat.com>
1004 * cpu/mep-core.cpu: Update to new MeP configuration.
1005 * cpu/mep-ext-cop.cpu: Likewise.
1006 * cpu/mep.opc: Likewise.
1008 2008-12-23 Frank Ch. Eigler <fche@redhat.com>
1010 * sim.scm (-op-gen-queued-write): Add needed symbol->string.
1012 2008-06-17 Dave Brolley <brolley@redhat.com>
1014 * cpu/xstormy16.cpu (h-pc): Add a set handler.
1017 2007-11-13 Dave Brolley <brolley@redhat.com>
1019 * cgen-intrinsics.scm (load-files): Remove reference to fixup.scm.
1021 2007-11-05 Dave Brolley <brolley@redhat.com>
1023 * intrinsics.scm,cgen-intrinsics.scm: New application which
1024 generates code to support intrinsic functions for insns in the
1025 mep architecture in gcc.
1027 2007-09-21 Dave Brolley <brolley@redhat.com>
1029 * cpu/mep-core.cpu (rnc, rnuc, rns, rnus, rn3c, rn3uc, rn3s)
1030 (rn3us): CDATA attribute now LONG.
1032 2007-08-21 Dave Brolley <brolley@redhat.com>
1034 * rtl-c.scm (const): Generate call to MAKEDI for integers larger
1037 2007-07-05 Nick Clifton <nickc@redhat.com>
1039 * utils.scm (copyright-fsf): Update copyright notice to refer to
1042 2007-05-22 Nick Clifton <nickc@redhat.com>
1044 * doc/cgen.texi: Use @copying around the copyright notice.
1045 * doc/internals.texi: Likewise.
1047 2007-02-05 Dave Brolley <brolley@redhat.com>
1049 * *mep*: New cpu description for Toshiba Media Processor (MeP).
1051 2007-02-05 Dave Brolley <brolley@redhat.com>
1053 * opc-asmdis.scm (-gen-init-asm-fn): Include CGEN_ASM_INIT_HOOK
1054 in the generated code for @arch@_cgen_init_asm if it is defined.
1056 * Contribute the following changes:
1057 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1059 * attr.scm (<string-attribute>): New attribute class.
1060 (attr-kind): Handle <string-attribute>.
1061 (parse-simple-attribute): New function.
1062 (<boolean-attribute> 'parse-value): Use parse-simple-attribute.
1063 (<bitset-attribute> 'parse-value): Likewise.
1064 (<boolean-attribute> 'parse-value): Likewise.
1065 (<enum-attribute> 'parse-value): Likewise.
1066 (<string-attribute> 'parse-value): New function.
1067 (-attr-parse): Handle <string-attribute>.
1068 (-attr-read): Likewise.
1069 (<string-attribute> 'gen-value-for-defn-raw): New function.
1070 (<string-attribute> 'gen-value-for-defn): New function.
1072 2006-11-07 Dave Brolley <brolley@redhat.com>
1074 * sid-model.scm (gen-model-unit-fn-decl): Use symbol->string where
1077 2006-10-18 Dave Brolley <brolley@redhat.com>
1079 * Contribute the following changes:
1081 2006-07-11 Dave Brolley <brolley@redhat.com>
1083 * cpu/sh64-compact.cpu (movual, movual2): New insns.
1085 * cpu/sh.cpu (sh4a-nofpu-models): New pmacro.
1086 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1087 hardware or memory mode which was used.
1088 * sid-cpu.scm (hw-need-write-stack?): New function.
1089 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1090 identify hardware which uses write stacks.
1091 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1092 Initialized to an empty list.
1093 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1094 hw-need-write-stack?.
1095 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1096 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1097 (used-in-delay-rtl?): New method of <hardware-base>.
1098 (hw-used-in-delay-rtl?): New function.
1100 2006-06-20 Dave Brolley <brolley@redhat.com>
1102 * sid.scm (gen-attr-type): Removed.
1103 * cpu/sh.cpu (SH2a-nofpu-MACH): Add sh5.
1104 (SH2a-MACH): Add sh5.
1105 (sh2a-nofpu-models): Add units for sh5.
1106 (sh2a-fpu-models): Likewise.
1108 2006-06-15 Dave Brolley <brolley@redhat.com>
1110 * cpu/sh-sim.cpu: New file.
1111 * cpu/sh-sid.cpu: New file.
1112 * cpu/sh64-media.cpu (dshci): Add xtiming argument and splice it in.
1113 (All fields): Remap for (insn-lsb0? #f)
1114 (All insns): Add timing specs.
1115 * cpu/sh64-compact.cpu (dshcf,dshcop): Replace 'ignored' argument with
1116 'xattrs' and .splice it in.
1117 (32-BIT-INSN,SH4-GROUP,SH4A-GROUP): New insn attributes.
1118 (h-frc,h-drc): Add PROFILE attribute.
1120 (h-vbr): New hardware.
1121 (All fields): Remap for (insn-lsb0? #f)
1122 (f-imm20-hi,f-imm20-lo,f-imm20): New fields.
1123 (fr0,fmovm,fmovn,imm20,imm12x4,imm12x8,vbr): New operands.
1124 (fpscr): Use h-fpscr.
1125 (fsdm,fsdn): Use h-fsd.
1126 (dshci): Add xtiming argument and splice it in.
1127 (dr,xd): pmacros removed.
1128 (All insns): Add timing specs, *-MACH attribibutes,
1129 SH4{A}-GROUP attributes.
1130 (divu,mulr,ldc-vbr,ldc-sr,ldcl-vbr,movl12,movl13,stcl-vbr): New insns.
1131 * cpu/sh.cpu): Include sh-sid.cpu or sh-sim.cpu depending on whether
1132 we're being processed for sim or sid.
1133 (define-arch): Change insn-lsb0? for #f. Add machs sh2e, sh2a-fpu,
1134 sh2a-nofpu, sh4-nofpu, sh4a-nofpu, sh4a, sh4al.
1135 (define-isa compact): Add (isa-parallel-insns 2).
1136 (define-isa media): Add (isa-parallel-insns 2). Add
1137 (default-insn-word-bitsize 32). Change base-insn-bitsize to 32.
1138 (define-mach): Add sh2e, sh2a-fpu, sh2a-nofpu, sh4-nofpu, sh4a-nofpu,
1140 (SH2-MACH, SH2e-MACH, SH2a-nofpu-MACH, SH2a-MACH, SH3-MACH)
1141 (SH3e-MACH, SH4-nofpu-MACH, SH4-MACH, SH4a-nofpu-MACH, SH4a-MACH)
1142 (SH4al-MACH, SH5-MACH): New pmacros.
1143 (common-units, common-fp-units, sh2a-nofpu-units, sh2a-fpu-units)
1144 (sh4-nofpu-units, sh4-common-fp-units, sh5-media-units)
1145 (sh5-media-fp-units, common-model, common-model-with-fp)
1146 (sh3-model, sh3e-model): New pmacros.
1147 (define-model sh2): New model.
1148 (define-model sh2e): New model.
1149 (define-model sh3): New model.
1150 (define-model sh3e): New model.
1151 (define-model sh2a-nofpu): New model.
1152 (define-model sh2a-fpu): New model.
1153 (define-model sh4-nofpu): New model.
1154 (define-model sh4): New model.
1155 (define-model sh4a-nofpu): New model.
1156 (define-model sh4a): New model.
1157 (define-model sh4al): New model.
1158 (define-model sh5-media): New model.
1159 (define-model sh5): Add all units.
1160 (all-models, sh2e-models, sh2a-nofpu-models, sh2a-fpu-models)
1161 (sh3-models, sh3e-models, sh4-nofpu-models, sh4-models)
1162 (sh5-media-models, shad-models, fsqrt-models): New pmacros.
1163 (h-pc): Add PROFILE attribute.
1166 (h-gr,h-grc): Likewise.
1167 (h-cr): Set h-sr in setter.
1168 (h-frbit): Get/Set h-fpscr.
1169 (h-szbit,h-prbit): Likewise.
1170 (h-fp): Add PROFILE attribute. Now indexed by even indices 0-62.
1171 Add getter and setter.
1172 (h-fc): Add PROFILE attribute. Now indexed by quad indices 0-60.
1173 Adjust getter and setter.
1174 (h-fmtx): Add PROFILE attribute. Now indexed by 0, 16, 32 and 48.
1175 Adjust getter and setter.
1176 (h-dr): Add PROFILE attribute. Now indexed by even indices 0-62.
1177 (h-fsd,h-fmov): New hardware.
1179 2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
1181 * doc/app.texi, doc/internals.texi, doc/intro.texi,
1182 doc/notes.texi, doc/porting.texi, doc/running.texi,
1183 doc/sim.texi: Fix some typos.
1185 2006-07-14 Dave Brolley <brolley@redhat.com>
1187 * sid.scm (-op-gen-delayed-set-maybe-trace): If delay used, note the
1188 hardware or memory mode which was used.
1189 * sid-cpu.scm (hw-need-write-stack?): New function.
1190 (-gen-hw-stream-and-destream-fns): Compute stack-regs. Use it to
1191 identify hardware which uses write stacks.
1192 (useful-mode-names): Renamed to write-stack-memory-mode-names.
1193 Initialized to an empty list.
1194 (-gen-writestacks, -gen-reset-fn, -gen-unified-write-fn): Use
1195 hw-need-write-stack?.
1196 * hardware.scm (used-in-delay-rtl?): New member of <hardware-base>.
1197 (define-getters <hardware-base>): Define used-in-delay-rtl?.
1198 (used-in-delay-rtl?): New method of <hardware-base>.
1199 (hw-used-in-delay-rtl?): New function.
1201 2006-06-20 Dave Brolley <brolley@redhat.com>
1203 * sid.scm (gen-attr-type): Removed.
1205 2006-05-10 Dave Brolley <brolley@redhat.com>
1207 * read.scm (cmd-if): Provide the correct argument to reader-error. Add
1208 support for (if (application-is? <appname>) (...) (...)).
1209 (-cgen): Add trailing "/" to arch-path.
1210 * utils.scm (dirname): Removed. dirname is a primitive function.
1212 2006-05-09 Dave Brolley <brolley@redhat.com>
1214 * utils-sim.scm (-gen-decode-insn-entry): Generated code should shift
1215 'entire_insn' not 'base_insn'.
1216 * sid-model.scm (-gen-model-class-decls): Handle the case where insn-timing
1218 * sim.scm (-gen-arch-model-decls): Likewise.
1219 * sid-cpu.scm (-gen-scache-semantic-fn): Generate code to set
1220 abuf->written if profiling.
1221 (-gen-hw-stream-and-destream-fns): Use symbol->string instead of
1222 object->string om the mode.
1223 (-hw-gen-write-stack-decl): Likewise.
1224 * read.scm (include): Use arch-path as file location.
1225 (arch-path): Define it with a default setting.
1226 (-cgen): Update arch-path when "-a" option is specified.
1227 * utils.scm (dirname): New function.
1229 2006-05-05 Steve Ellcey <sje@cup.hp.com>
1231 * configure.in: Remove AC_ARG_PROGRAM.
1232 * configure: Regenerate with autoconf 2.59.
1234 2006-03-14 Hans-Peter Nilsson <hp@axis.com>
1236 * dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
1239 2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
1241 * cpu/xc16x.opc (parse_hash): Return NULL if the input was parsed
1242 or an error message otherwise.
1243 (parse_dot, parse_pof, parse_pag, parse_sof, parse_seg): Likewise.
1244 Fix up comments to correctly describe the functions.
1246 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1247 Anil Paranjape <anilp1@kpitcummins.com>
1248 Shilin Shakti <shilins@kpitcummins.com>
1250 * cpu/xc16x.cpu: New file containing complete CGEN specific XC16X
1252 * cpu/xc16x.opc: New file containing supporting XC16C routines.
1254 2006-02-10 Nick Clifton <nickc@redhat.com>
1256 * cpu/iq2000.opc (parse_hi16): Truncate shifted value to 16 bits.
1258 2005-12-28 Nathan Sidwell <nathan@codesourcery.com>
1260 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): Stringize mode
1262 (-hw-gen-write-stack-decl): Likewise.
1264 2005-12-05 Hans-Peter Nilsson <hp@axis.com>
1266 * utils-sim.scm (-gen-decode-insn-entry): Correct last change for
1267 non-(adata-integral-insn? CURRENT-ARCH) case.
1269 2005-10-28 Dave Brolley <brolley@redhat.com>
1271 Contribute the following changes:
1272 2005-09-19 Dave Brolley <brolley@redhat.com>
1274 * attr.scm (gen-value-for-defn-raw): New methods.
1275 (gen-value-for-defn): Don't test for 'SID-SIMULATOR. Call
1276 gen-value-for-defn-raw.
1277 * sid.scm (gen-obj-attr-sid-defn): Call gen-value-for-defn-raw.
1279 2002-12-13 Dave Brolley <brolley@redhat.com>
1281 * utils-cgen.scm (gen-attr-type): Moved from sid.scm.
1282 (-gen-attr-accessors): New function.
1283 (gen-obj-attr-defn): Update terminating initializer.
1284 (gen-obj-attr-end-defn): New function.
1285 * sid.scm (gen-attr-type): Moved to utils-cgen.scm.
1286 * sid-cpu.scm (cgen-desc.h): Generate code to include
1287 "opcode/cgen-bitset.h"
1288 * intrinsics.scm (kept-insn-isas): Correct the extraction of the isa
1290 * desc.scm ('gen-defn): Update terminating initializer.
1291 * desc-cpu.scm (gen-ifld-decls): Call -gen-attr-accessors. Update
1292 terminatinig initializer.
1293 (gen-hw-decls): Ditto.
1294 (gen-operand-decls): Ditto.
1295 (gen-insn-decls): Ditto.
1296 (-gen-hash-defines): Generate code to include "opcde/cgen-bitset.h"
1297 (gen-insn-table): Update terminating initializer.
1298 (-gen-cpu-open): Update generation of @arch@_cgen_rebuild_tables,
1299 @arch@_cgen_cpu_open, @arch@_cgen_cpu_close.
1300 * attr.scm (charmask-bytes): New function.
1301 (bitset-attr->charmask): New function.
1302 (<bitset-attribute>): Handle isa-attributes specially. Also handle
1303 differences for SID-SIMULATOR.
1304 (<integer-attribute>): Handle differences for SID-SIMULATOR.
1305 (<enum-attribute>): Ditto.
1307 2005-10-26 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1309 * cpu/m32r.opc (parse_hi16): Do not assume a 32-bit host word size.
1311 2005-10-24 DJ Delorie <dj@redhat.com>
1313 * operand.scm (-anyof-merge-syntax): Print a more useful error
1316 2005-10-19 Nick Clifton <nickc@redhat.com>
1318 * cpu/m32r.opc (parse_slo16): Fix bad application of previous
1321 2005-10-18 Andreas Schwab <schwab@suse.de>
1323 * cpu/m32r.opc (parse_slo16): Better version of previous patch.
1325 2005-10-14 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1327 * cpu/m32r.opc (parse_slo16): Do not assume a 32-bit host word
1330 2005-08-02 Dave Brolley <brolley@redhat.com>
1332 * rtl-c.scm (s-unop): Don't dereference
1333 CGEN_CPU_FPU (current_cpu)->ops->xxxxx in the generated code.
1334 (s-binop, s-convop, s-cmpop): Likewise.
1336 2005-07-29 Dave Brolley <brolley@redhat.com>
1338 * sid-cpu.scm (-gen-scache-semantic-fn): Generate a declation of 'written'
1339 if with-profile or with-parallel-write.
1340 (cgen-semantics.cxx): Make the @prefix@ namespace available if with-parallel.
1341 * operand.scm (op:new-mode): Convert (obj:name op) to a string for
1344 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1346 * cpu/fr30.opc (print_register_list): Correct format strings.
1347 * cpu/ip2k.opc: Likewise.
1349 2005-07-05 Nick Clifton <nickc@redhat.com>
1351 * cpu/iq2000.opc (parse_lo16, parse_mlo16): Make value parameter
1352 unsigned in order to avoid compile time warnings about sign
1355 2005-07-01 Nick Clifton <nickc@redhat.com>
1357 * desc-cpu.scm: Update to ISO C90 function declaration style.
1358 * opc-asmdis.scm: Likewise.
1359 * opc-ibld.scm: Likewise.
1360 * opc-itab.scm: Likewise.
1361 * cpu/fr30.opc: Likewise.
1362 * cpu/i960.opc: Likewise.
1363 * cpu/ip2k.opc: Likewise.
1364 * cpu/iq2000.opc: Likewise.
1365 * cpu/m32r.opc: Likewise.
1366 * cpu/openrisc.opc: Likewise.
1367 * cpu/sh.opc: Likewise.
1368 * cpu/sparc.opc: Likewise.
1369 * cpu/xstormy16.opc: Likewise.
1371 2005-06-15 Dave Brolley <brolley@redhat.com>
1373 * sid-cpu.scm (-gen-hw-stream-and-destream-fns): New function.
1374 (cgen-cpu.h): Call it.
1376 Contributed on behalf of Graydon Hoare
1377 2001-06-05 graydon hoare <graydon@redhat.com>
1379 * utils.scm (foldl): Define.
1383 (intersection): Simplify.
1384 * sid.scm : Set APPLICATION to SID-SIMULATOR.
1385 (-op-gen-delayed-set-maybe-trace): Define.
1386 (<operand> 'gen-set-{quiet,trace}): Delegate to
1387 op-gen-delayed-set-quiet etc. Note: this is still a little tangled
1388 up and needs cleaning.
1389 (-with-parallel?): Hardwire with-parallel to #t.
1390 (<operand> 'cxmake-get): Replace with lookahead-aware code
1391 * sid-decode.scm: Remove per-insn writeback fns.
1392 (-gen-idesc-decls): Redefine sem_fn type.
1393 * sid-cpu.scm (gen-write-stack-structure): Replace parexec stuff
1394 with write stack stuff.
1395 (cgen-write.cxx): Replace per-insn writebacks with single write
1396 stack writeback. Add write stack reset function.
1397 (-gen-scache-semantic-fn insn): Replace parexec stuff with write
1399 * rtl-c.scm (xop): Clone operand into delayed operand if #:delayed
1400 estate attribute set.
1401 (delay): Set #:delayed attribute to calculated delay, update
1402 maximum delay of cpu, check (delay ...) usage.
1403 * operand.scm (<operand>): Add delayed slot to <operand>.
1404 * mach.scm (<cpu>): Add max-delay slot to <cpu>.
1405 * dev.scm (load-sid): Set APPLICATION to SID-SIMULATOR.
1406 * doc/rtl.texi (Expressions): Add section on (delay ...).
1408 2005-06-13 Jim Blandy <jimb@redhat.com>
1410 * pmacros.scm (-pmacro-upcase, -pmacro-downcase): Handle symbols
1413 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1415 * doc/porting.texi: Change all mention of md_apply_fix3 and
1416 gas_cgen_md_apply_fix3 to md_apply_fix and gas_cgen_md_apply_fix
1419 2005-05-18 Dave Brolley <brolley@redhat.com>
1421 * utils-sim.scm (-gen-decode-default-entry): New function.
1422 (-gen-decode-insn-entry): Now takes 'invalid-insn' argument. Generate
1423 code to check that all opcodes bits match.
1424 (-gen-decoder-switch): Use -gen-decode-default-entry.
1426 2005-05-16 Jim Blandy <jimb@redhat.com>
1428 * sid.scm (gen-ifetch): Require BITSIZE to be exactly the size
1429 fetched by one of our GETIMEM* methods.
1430 * utils-gen.scm (-extract-chunk-specs): Always fetch full
1431 base-insn-sized chunks.
1433 2005-05-10 Nick Clifton <nickc@redhat.com>
1435 * Update the address and phone number of the FSF organization in
1436 the GPL notices in the following files:
1437 COPYING.CGEN, utils.scm, cpu/iq2000m.cpu, cpu/openrisc.cpu,
1438 cpu/powerpc.cpu, slib/random.scm
1440 2005-05-06 Jim Blandy <jimb@redhat.com>
1442 * pprint.scm, cos-pprint.scm: Add documentation.
1444 * pprint.scm (pprint): Don't wipe out elide-table after each call.
1446 * pprint.scm, cos-pprint.scm: New files.
1448 2005-04-04 Nick Clifton <nickc@redhat.com>
1450 * opcodes.scm (-gen-parse-address): Initialise value to zero to
1451 avoid a compile time warning.
1453 2005-03-18 Nick Clifton <nickc@redhat.com>
1455 * cpu/ip2k.opc (parse_lit8): Change wording of error message to
1456 "percent-operand" from "%operand" as the latter confuses xgettext
1457 into thinking that it is a C printf formating directive, which
1458 prevents proper translation.
1460 2005-02-23 Nick Clifton <nickc@redhat.com>
1462 * opcodes.scm (gen-parse-number): Add a cast to the desired
1463 pointer signed'ness in order to prevent compile time warnings.
1464 * cpu/ip2k.opc: Fixed compile time warnings about differing
1465 signed'ness of pointers passed to functions.
1466 * cpu/iq2000.opc: Likewise.
1467 * cpu/m32r.opc: Likewise.
1468 * cpu/openrisc.opc: Likewise.
1469 * cpu/xstormy16.opc: Likewise.
1471 2005-02-22 Alan Modra <amodra@bigpond.net.au>
1473 * desc-cpu.scm (gen-ifld-decls): Move cgen_ifld_table from here..
1474 (cgen-desc.h): ..to here, after opcode/cgen.h include.
1476 2005-02-16 Dave Brolley <brolley@redhat.com>
1478 * utils.scm: Update copyright years.
1479 * utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
1480 * sid.scm (gen-ifetch): Handle the case where bitsize == 24.
1481 * operand.scm (-derived-operand-parse): Move logit message from level 1
1484 2005-02-15 Nick Clifton <nickc@redhat.com>
1486 * opc-itab.scm (-gen-ifmt-table-1): Add an ATTRIBUTE_UNUSED to
1487 prevent compile time warning messages.
1488 * opc-opinst.scm (-gen-operand-instance-table): Likewise.
1489 * utils-gen.scm (attr-int-gen-defn): Likewise.
1490 (attr-gen-defn): Likewise.
1491 * cpu/ip2k.opc (parse_addr16_p): Remove unused function.
1492 (print_dollarhex16): Remove unused function.
1494 2005-02-15 Jim Blandy <jimb@redhat.com>
1496 * guile.scm (cgen-call-with-debugging): Doc fix.
1498 Make backtraces work more reliably.
1499 * guile.scm: Set up debugging parameters, and enable debugging and
1500 source positions while loading.
1501 (cgen-call-with-debugging, cgen-debugging-stack-start): New
1503 * read.scm: Don't set debugging parameters here.
1504 (catch-with-backtrace): Function deleted.
1505 (-cgen): Simply note the presence or absence of the -b option.
1506 Pass the flag to cgen-call-with-debugging, so debugging is turned
1507 off here if the user didn't request it, for faster computation.
1508 (cgen): Call cgen-debugging-stack-start here, instead of
1509 catch-with-backtrace.
1511 * Makefile.am (GUILE): Explicitly load guile.scm here, and leave a
1513 (desc, html, opcodes, sim-arch, sim-cpu, gas-test, sim-test):
1514 Don't write out the trailing -s here.
1515 * Makefile.in: Regenerated.
1516 * cgen-doc.scm, cgen-gas.scm, cgen-stest.scm): Don't load
1517 fixup.scm here; let the caller decide which Scheme's customization
1519 * dev.scm: Load guile.scm, not fixup.scm.
1520 * fixup.scm: Deleted; contents have all moved to guile.scm.
1523 * guile.scm (debug-write): New function.
1525 2005-02-14 Jim Blandy <jimb@redhat.com>
1527 * pmacros.scm (pmacros-init!): For .eval macros, use eval1 as the
1528 transformer procedure, not eval. Transformer procedures take one
1531 2005-02-11 Nick Clifton <nickc@redhat.com>
1533 * cpu/iq2000.opc (parse_jtargq10): Change type of valuep argument
1534 to 'bfd_vma *' in order avoid compile time warning message.
1536 2005-02-09 Jim Blandy <jimb@redhat.com>
1538 * cgen-sim.scm (load-files): Don't load fixup.scm. (See
1539 corresponding change in the sim/common directory.)
1541 2005-02-07 Jim Blandy <jimb@redhat.com>
1543 * cgen-opc.scm: Don't load fixup.scm here. (See corresponding
1544 changes in the opcodes directory.)
1546 * guile.scm: New file, containing Guile-specific definitions and
1547 adaptations. This is loaded by the app-specific shell scripts.
1548 Initially identical to fixup.scm.
1549 * cgen-sid.scm: Don't load fixup.scm here.
1551 * cos.scm: Profile elm-xset! when requested, not elm-set!; the
1554 2005-01-27 Jim Blandy <jimb@redhat.com>
1556 * utils.scm (string/symbol->append): Renamed from 'concat'.
1557 * opcodes.scm (gen-switch): Use new name.
1558 * insn.scm (-sub-insn-make!): Same.
1559 * rtl.scm (rtx-dump): Same.
1560 * semantics.scm (semantic-compile): Same.
1562 2005-01-20 Jim Blandy <jimb@redhat.com>
1564 * opcodes.scm (gen-switch): Use concat instead of string-map.
1566 * utils.scm (concat): New function.
1567 * insn.scm (-sub-insn-make!): Use concat instead of string-map.
1568 * rtl.scm (rtx-dump): Same.
1569 * semantics.scm (semantic-compile): Same.
1571 2004-12-16 Jim Blandy <jimb@redhat.com>
1573 * utils-cgen.scm (parse-name): Don't assume that string-map can be
1574 applied to symbols. Process everything as strings, and then
1575 convert to a symbol at the end.
1577 * read.scm (debug-repl): Temporarily redirect input and output to
1578 /dev/tty while we debug, so we don't interfere with whatever CGEN
1579 is reading or writing.
1580 * utils.scm (setter-getter-fluid-let, with-input-and-output-to):
1583 2004-11-15 Michael K. Lechner <mike.lechner@gmail.com>
1585 * cpu/iq2000.cpu: Added quotes around macro arguments so that they
1586 will work with newer versions of guile.
1588 2004-10-27 Nick Clifton <nickc@redhat.com>
1590 * cpu/iq2000m.cpu: Import latest version from cpu/ directory.
1591 * cpu/iq2000.cpu: Likewise.
1593 2004-07-21 DJ Delorie <dj@redhat.com>
1595 * cpu/xstormy16.cpu (movhmemgr): Use hmem8, not lmem8.
1597 2003-03-14 Frank Ch. Eigler <fche@redhat.com>
1599 * cpu/iq2000.opc (parse_jtargq10): Add ATTRIBUTE_UNUSED on unused args.
1600 (parse_jtargq10, iq2000_cgen_isa_register, parse_mlo16): Declare.
1602 2004-03-30 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1604 * cpu/m32r.opc (parse_hi16): Fixed shigh(0xffff8000) bug.
1606 2004-03-22 Dave Brolley <brolley@redhat.com>
1608 * utils.scm (copyright-fsf): Update copyright years.
1609 (copyright-red-hat): Ditto.
1610 * sid.scm (-op-gen-set-trace): Generate trace code before semantic
1612 (-op-gen-set-trace-parallel): Ditto.
1614 2004-02-10 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.dot.com>
1616 * cpu/m32r.opc (my_print_insn): Fixed incorrect output when
1617 disassembling codes for 0x*2 addresses.
1619 2004-01-29 Dave Brolley <brolley@redhat.com>
1621 * decode.scm (-opcode-slots): For short insns, generate 'opcode' with
1622 zeroes in the extra bit positions and generate 'opcode-mask' with ones
1623 in the extra bit positions.
1625 2003-12-15 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1627 * cpu/m32r.cpu: Add PIPE_O attribute to "pop" instruction.
1629 2003-12-04 Alan Modra <amodra@bigpond.net.au>
1631 * cpu/openrisc.opc (openrisc_sign_extend_16bit): Don't rely on
1632 "short" being 16 bit.
1633 (parse_hi16): Likewise. Fix type-punned pointer warnings too, and
1634 internationalize error message.
1635 (parse_lo16): Likewise. Remove useless code.
1637 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1639 * cpu/m32r.cpu : Add new model m32r2.
1640 Add new instructions.
1641 Replace occurrances of 'Mitsubishi' with 'Renesas'.
1642 Changed PIPE attr of push from O to OS.
1643 Care for Little-endian of M32R.
1644 * cpu/m32r.opc (CGEN_DIS_HASH, my_print_insn):
1645 Care for Little-endian of M32R.
1646 (parse_slo16): signed extension for value.
1648 2003-10-26 Dave Brolley <brolley@redhat.com>
1650 * sid-decode.scm (-gen-record-profile-args): Test trace_counter_p
1651 and final_insn_count_p. Don't test WITH_PROFILE_MODEL_P.
1652 (-gen-extract-fn): Call -gen-record-profile-args.
1654 2003-10-21 Dave Brolley <brolley@redhat.com>
1656 * sid-model.scm (-gen-model-class-decls): Generate MAX_UNITS as
1658 * decode.scm (-opcode-slots): Correct typo in logit call.
1660 2003-10-09 Jim Blandy <jimb@redhat.com>
1662 * desc-cpu.scm (gen-hw-table-decls): Emit an 'extern' declaration
1663 for @arch@_cgen_hw_table. GDB needs to be able to find this.
1665 * mach.scm (def-isa-attr!): hardware can have ISA attributes, too.
1667 2003-10-06 Dave Brolley <brolley@redhat.com>
1669 * gen-all-doc: Add fr550.
1671 2003-09-11 Doug Evans <dje@sebabeach.org>
1673 * Makefile.am (ARCHFILE): New var.
1674 (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
1675 (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
1676 * Makefile.in: Regenerate.
1678 2003-09-08 Dave Brolley <brolley@redhat.com>
1680 On behalf of Doug Evans <dje@sebabeach.org>
1681 Pass in paths to input files, instead of assuming they live in
1682 $srcdir/cpu. Plus misc. option processing cleanup.
1683 * cgen-doc.scm (doc-arguments): Make options strings not symbols.
1684 Add pre-process pass to all options.
1685 * cgen-gas.scm (gas-arguments): Ditto.
1686 * cgen-sid.scm (sim-arguments): Ditto.
1687 * cgen-sim.scm (sim-arguments): Ditto.
1688 * cgen-stest.scm (stest-arguments): Ditto.
1689 * cgen-opc.scm (opc-arguments): Ditto. New argument -OPC.
1690 (-opc-file-path): New global.
1691 (opc-file-path): New fn.
1692 * opcodes.scm (read-cpu.opc): Replace srcdir,cpu args with opc-file.
1693 All callers updated.
1694 (gen-extra-cpu.h,gen-extra-cpu.c,gen-extra-opc.h,gen-extra-opc.c,
1695 gen-extra-asm.c,gen-extra-dis.c,gen-extra-ibld.h,gen-extra-ibld.c):
1696 Replace srcdir arg with opc-file. All callers updated.
1697 * read.scm (-opt-spec-update): Delete.
1698 (opt-get-first-pass,opt-get-second-pass): New fns.
1699 (-cgen): Process application-specific arguments in two passes.
1701 2003-08-29 Dave Brolley <brolley@redhat.com>
1703 * cpu/frv.cpu: Removed.
1704 * cpu/frv.opc: Removed.
1706 2003-08-21 Nick Clifton <nickc@redhat.com>
1708 * cpu/frv.cpu (mbtoh): Replace input parameter to
1709 u-media-dual-expand and u-media-dual-btoh with output parameter.
1710 (cmbtoh): Add profiling hack.
1712 2003-08-19 Michael Snyder <msnyder@redhat.com>
1714 * cpu/frv.cpu: Fix typo, Frintkeven -> FRintkeven
1716 2003-08-07 Michael Meissner <gnu@the-meissners.org>
1718 * opc-opinst.scm (-gen-operand-instance-table): Initialize all of
1719 the elements for the END record of CGEN_OPINST, silencing warnings.
1721 2003-07-15 Doug Evans <dje@sebabeach.org>
1723 Add guile 1.6.4 support.
1724 - empty list must be quoted
1725 - string functions have stricter type checking
1726 - eval now takes a second argument
1727 - symbol-bound? is deprecated
1728 * attr.scm (-attr-parse): Use stringsym-append to build errtxt.
1729 (bitset-attr->list): Ensure arg to string-cut is a string.
1730 (attr-parse): Ensure args to string-ref and string-drop1 are strings.
1731 (<enum-attribute>,gen-value-for-defn): Fetch string name of self.
1732 * cos.scm (-class-list): Must quote empty list.
1733 (-class-parent-classes,-class-compute-class-desc): Ditto.
1734 (class-make,make,object-reset!): Ditto.
1735 (method-make-make!): Call eval1 instead of eval.
1736 (method-make-forward!,method-make-virtual-forward!): Ditto.
1737 * decode.scm (subdtable-add): Use stringsym-append instead of
1739 (-gen-exprtable-name): Fetch string name of exprtable-entry-insn.
1740 (-build-decode-table-entry): Fetch string name of insn.
1741 * desc-cpu.scm (-gen-isa-table-defns): Fetch string name of isa.
1742 (-gen-mach-table-defns): Ditto for mach.
1743 (gen-ifld-defns): Ditto for ifld.
1744 (gen-hw-table-defns): Ditto for hw.
1745 (gen-operand-table): Ditto for op.
1746 (gen-insn-table-entry): Ditto for insn.
1747 * desc.scm (gen-attr-table-defn): Ditto for attr.
1748 (<keyword>,gen-defn): Don't pass symbols to string-append.
1749 * enum.scm (parse-enum-vals): Use symbolstr-append instead of
1751 (enum-vals-upcase): Use symbol-upcase to build result.
1752 (-enum-parse): Use stringsym-append to build errtxt.
1753 * fixup.scm (*guile-major-version*,*guile-minor-version*): New globals.
1754 (eval1): New function.
1755 (symbol-bound?): Provide own version if >= guile 1.6.
1756 * hardware.scm (define-keyword): Use string-append instead of
1758 * html.scm (gen-html-header,gen-table-of-contents,gen-arch-intro,
1759 cgen.html,cgen-insn.html): Convert current-arch-name to a string
1761 (gen-list-entry): Handle either symbol or string `name' arg.
1762 (gen-obj-doc-header): Fetch string name of `o' arg.
1763 (define-cpu-intro): Ditto for cpu.
1764 (gen-mach-intro): Ditto for mach.
1765 (gen-model-intro): Ditto for model.
1766 (gen-isa-intro): Ditto for isa.
1767 (gen-machine-doc-1): Ditto for isa.
1768 (gen-reg-doc-1): Convert mach to string first.
1769 (gen-insn-doc-1): Ditto. Convert model/unit names to strings first.
1770 (gen-insn-doc-list): Fetch string name of mach. Convert insn name
1772 (gen-insn-categories): Fetch string name of mach. Convert
1773 enum-val-name to string first.
1774 (gen-insn-docs): Fetch string name of mach.
1775 * ifield.scm (ifld-ilk): Result is a string.
1776 * iformat.scm (-ifmt-search-key): Convert attr value to string first.
1777 Fetch string name of ifld.
1778 (-sfmt-search-key): Similarily for ifld and op.
1779 * insn.scm (syntax-make): Fetch string name of syntax element.
1780 * mach.scm (-cpu-parse): Use stringsym-append to build errtxt.
1781 * minsn.scm (minsn-make-alias): Fetch string name of minsn.
1782 * mode.scm (mode:c-type): Result is a string.
1783 (mode:enum): Fetch string name of mode.
1784 (-mode-parse): Use stringsym-append to build errtxt.
1785 * model.scm (model:enum): Fetch string name of model.
1786 (-model-parse): Use stringsym-append to build errtxt.
1787 (parse-insn-timing): Must quote empty list.
1788 * opc-itab.scm (-gen-minsn-table-entry): Fetch string name of minsn.
1789 (-gen-minsn-opcode-entry): Ditto.
1790 * opcodes.scm (<operand>,gen-function-name): `what' arg is a symbol,
1792 (read-cpu.opc): Convert current-arch-name to a string before using.
1793 * operand.scm (<operand>,gen-pretty-name): Ensure `name' is a string.
1794 (<derived-operand>): Must quote empty list.
1795 (op-sort): Simplify, call alpha-sort-obj-list to do sort.
1796 * pgmr-tools.scm (pgmr-pretty-print-insn-value): Fetch string name
1798 * pmacros.scm (-pmacro-build-lambda): Use eval1 instead of eval.
1799 (-pmacro-sym): Must convert symbols to strings before passing to
1801 (-pmacro-str): Ditto.
1802 (pmacros-init!): Use eval1 instead of eval.
1803 * read.scm (keep-mach-atlist?): Simplify, use bitset-attr->list.
1804 (keep-isa-atlist?): Ditto.
1805 (cmd-if): Use eval1 instead of eval.
1806 * rtl-c.scm (<c-expr>,get-name): Fetch string name of self.
1807 (-rtl-c-get): Fetch string name of src.
1808 (s-unop): Ditto for mode.
1809 (s-binop,s-binop-with-bit,s-shop,s-convop,s-cmpop): Ditto.
1810 (-gen-par-temp-defns,subword): Ditto.
1811 (join): Use stringsym-append instead of string-append.
1812 * rtl-traverse.scm (rtx-option?): Convert option to string first.
1813 (rtx-traverse-debug): Fetch string name of rtx-obj.
1814 * rtl.scm (def-rtx-node): Use eval1 instead of eval.
1815 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
1816 (rtx-pretty-name): Result is a string.
1817 (-rtx-hw-name): Use symbolstr-append instead of symbol-append.
1818 * semantics.scm (semantic-compile): Simplify, use alpha-sort-obj-list.
1819 * sid-cpu.scm (cgen-write.cxx): Convert current-arch-name to a string
1821 (-gen-sfrag-case): Fetch string name of user.
1822 * sid-model.scm (unit:enum): Fetch string name of unit.
1823 * sid.scm (<hw-memory>,cxmake-get): Fetch string name of mode.
1824 (<hw-memory>,gen-set-quiet): Ditto.
1825 (gen-mode-defs): Ditto.
1826 (sim-finish!): Convert current-arch-name to a string before using.
1827 * sim-cpu.scm (-gen-scache-semantic-fn): Fetch string name of insn.
1828 (-gen-no-scache-semantic-fn): Ditto.
1829 (cgen-defs.h): Fetch string name of isa.
1830 (cgen-read.c): Convert current-arch-name to a string before using.
1831 (cgen-write.c): Ditto.
1832 * sim-model.scm (unit:enum): Fetch string name of unit.
1833 (gen-model-fn-decls): Use stringsym-append instead of string-append.
1834 (-gen-model-timing-table): Fetch string name of model.
1835 (-gen-mach-model-table): Ditto.
1836 (-gen-mach-defns): Fetch string name of mach.
1837 * sim.scm (gen-reg-access-defn): Fetch string name of hw.
1838 (<hw-memory>,cxmake-get): Fetch string name of mode.
1839 (<hw-memory>,gen-set-quiet): Ditto.
1840 (gen-mode-defs): Ditto.
1841 (sim-finish!): Must quote empty list.
1842 * utils-cgen.scm (<ident>): Must quote empty list.
1843 (obj:str-name): New fn.
1844 (parse-comment): Result is a string.
1845 (parse-symbol): Result is a symbol.
1846 (parse-string): Result is a string.
1847 (keyword-list?): Convert arg to string before calling string-ref.
1848 (keyword-list->arg-list): Ditto.
1849 (gen-attr-name): Convert attr-name to string first.
1850 (alpha-sort-obj-list): Use symbol<? instead of string<?.
1851 * utils-gen.scm (attr-gen-decl): Fetch string name of attr.
1852 (gen-define-ifmt-ifields): Ditto for fld.
1853 * utils.scm (gen-c-symbol): Ensure str is a string before calling
1855 (gen-file-name): Ditto.
1856 (symbol-downcase,symbol-upcase,symbol<?): New fns.
1857 (stringsym-append,symbolstr-append,->string,->symbol): New fns.
1858 (reduce): Call eval1 instead of eval.
1859 * cpu/m32r.cpu (addi): Don't use `#.'.
1861 * gen-all-sim: Fix some typos.
1863 2003-07-08 Doug Evans <dje@sebabeach.org>
1865 * gen-all-doc: Ensure run from cgen src dir.
1866 * gen-all-opcodes: Build in ./tmp-opcodes. Don't delete dir when done.
1867 * gen-all-sid: Similarily, in ./tmp-sid.
1868 * gen-all-sim: Similarily, in ./tmp-sim.
1870 2003-06-20 Doug Evans <dje@sebabeach.org>
1872 * gen-all-sim: Add fr30,sh64 support. Only generate m32r by default.
1874 2003-06-19 Doug Evans <dje@sebabeach.org>
1876 * mach.scm (-ifld-already-defined?): New proc.
1877 (current-ifld-add!): Use it.
1878 (-op-already-defined?): New proc.
1879 (current-op-add!): Use it.
1880 (-insn-already-defined?): New proc.
1881 (current-insn-add!): Use it.
1882 (-minsn-already-defined?): New proc.
1883 (current-minsn-add!): Use it.
1884 (obj-isa-list): New proc.
1885 (isa-supports?): Use it.
1887 2003-06-10 Doug Evans <dje@sebabeach.org>
1889 * insn.scm (insn-builtin!): RELAX renamed to RELAXABLE.
1890 * cpu/m32r.cpu (all insns): Ditto.
1892 * mach.scm (current-*-add!): Disallow redefinition. Make result
1895 * gen-all-doc: Split arm and frv docs up a bit.
1897 * cpu/arm.cpu: Add IDOC attribute.
1898 * cpu/frv.cpu: Ditto.
1899 * cpu/i960.cpu: Ditto.
1900 * cpu/openrisc.cpu: Ditto.
1901 * cpu/xstormy16.cpu: Ditto.
1902 * cpu/m32r.cpu: Ditto.
1903 (all insns): Explicitly specify IDOC attribute.
1905 * Makefile.am (MACH,ISAS,INSN_FILE_NAME): New vars.
1906 (desc,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Use MACH,ISAS.
1907 (html): Use MACH,ISAS,INSN_FILE_NAME. Generate insn.html separately.
1908 * Makefile.in: Regenerate.
1909 * attr.scm (<integer-attribute>:parse-value-def): Implement.
1910 (-attr-read): Defer computing default value until we know the type.
1911 (attr-has-attr?): Delete, move contents to <attr-list>:has-attr?.
1912 (<attr-list>:attr-present?): New method.
1913 (atlist-attr-present?,obj-attr-present?): New fns.
1914 (obj-has-attr-value?,obj-has-attr-value-no-default?): New fns.
1915 (attr-builtin!): New insn attr IDOC.
1916 * cgen-doc.scm (doc-arguments): New args -I,-N.
1917 * enum.scm (parse-enum-vals): New arg errtxt, all callers updated.
1918 Support comment as fourth element of enum value.
1919 (enum-val-name,enum-val-value,enum-val-attrs,enum-val-comment): New fns.
1920 * html.scm (gen-html-header): New arg kind, all callers updated.
1921 (gen-table-of-contents): New arg insn-file, all callers updated.
1922 (gen-list-entry,gen-doc-header): New fn.
1923 (get-operands): Delete.
1924 (gen-iformat-table): Rewrite.
1925 (gen-insn-doc-1): Print constant-folded and trimmed semantics.
1926 (gen-insn-doc-list): New args name, comment, insns. All callers updated.
1927 (get-insn-properties,guess-insn-idoc-attr!): New fn.
1928 (insn-sets-pc?,insn-refs-mem?,insn-uses-fpu?): New fns.
1929 (get-insns-for-category,gen-categories-insn-lists): New fns.
1930 (gen-insn-docs): Simplify each insn's semantics first.
1931 Print insn tables sorted by IDOC categories.
1932 (*insn-html-file-name*): New global.
1933 (cgen-insn.html): New fn.
1935 * insn.scm (<insn>): Create a setter for the `tmp' member.
1936 * semantics.scm (insn-build-known-values): Renamed from
1937 -build-known-values. All callers updated.
1939 * rtl.scm: Move traveral/evaluation support to ...
1940 * rtl-traverse.scm: New file.
1941 * read.scm: Maybe-load rtl-traverse.scm.
1943 * rtl.scm (-rtx-valid-types): Add SETRTX.
1945 * rtx-funcs.scm (nop,parallel): Fix mode.
1947 * utils.scm (eqv-lookup-index): New fn.
1948 (assq-lookup-index): Renamed from lookup-index. All callers updated.
1950 * dev.scm (load-doc): Set APPLICATION.
1952 2003-06-10 Dave Brolley <brolley@redhat.com>
1954 * sid-cpu.scm: Generate #include of config.h into @prefix@-sem.cxx.
1955 * sid-decode.scm: Generate #include of config.h into
1956 @prefix@-decode.cxx.
1957 * sid-model.scm: Generate #include of config.h into @prefix@-model.cxx.
1959 2003-06-07 Doug Evans <dje@sebabeach.org>
1961 * gen-all-sid: New file.
1962 * gen-all-opcodes: New file.
1964 2003-06-05 Nick Clifton <nickc@redhat.com>
1966 * cpu/frv.cpu (FRintieven): New operand. An even-numbered only
1967 version of the FRinti operand.
1968 (FRintjeven): Likewise for FRintj.
1969 (FRintkeven): Likewise for FRintk.
1970 (mdcutssi, media-dual-word-rotate-r-r, mqsaths,
1971 media-quad-arith-sat-semantics, media-quad-arith-sat,
1972 conditional-media-quad-arith-sat, mdunpackh,
1973 media-quad-multiply-semantics, media-quad-multiply,
1974 conditional-media-quad-multiply, media-quad-complex-i,
1975 media-quad-multiply-acc-semantics, media-quad-multiply-acc,
1976 conditional-media-quad-multiply-acc, munpackh,
1977 media-quad-multiply-cross-acc-semantics, mdpackh,
1978 media-quad-multiply-cross-acc, mbtoh-semantics,
1979 media-quad-cross-multiply-cross-acc-semantics,
1980 media-quad-cross-multiply-cross-acc, mbtoh, mhtob-semantics,
1981 media-quad-cross-multiply-acc-semantics, cmbtoh,
1982 media-quad-cross-multiply-acc, media-quad-complex, mhtob,
1983 media-expand-halfword-to-double-semantics, mexpdhd, cmexpdhd,
1984 cmhtob): Use new operands.
1985 * cpu/frv.opc (CGEN_VERBOSE_ASSEMBLER_ERRORS): Define.
1986 (parse_even_register): New function.
1988 2003-06-04 Doug Evans <dje@sebabeach.org>
1990 Better handling of 64 bit and mixed 32/64 bit architectures.
1991 * hardware.scm (hw-update-word-modes!): New fn.
1992 * mach.scm (define-cpu)): Call mode-set-word-modes!,
1993 hw-update-word-modes!.
1994 (state-word-bitsize): Replace FIXME with requested check.
1995 (arch-analyze-insns!): Call mode-ensure-word-sizes-defined.
1996 * mode.scm (mode-find): Ignore INT,UINT.
1997 (-mode-word-sizes-kind): New global.
1998 (mode-set-word-modes!,mode-set-identical-word-bitsizes!,
1999 mode-set-biggest-word-bitsizes!,mode-ensure-word-sizes-defined): New fns.
2000 (mode-init!): Initialize -mode-word-sizes-kind. Move initialization
2002 (mode-builtin!): ... here. Initialize WI/UWI/AI/IAI to something
2003 unusable, correct values set later.
2004 (mode-finish!): Remove cruft.
2005 * html.scm (doc-init!): Call mode-set-biggest-word-bitsizes!.
2006 * opcodes.scm (opcodes-init!): Ditto.
2007 * rtx-funcs.scm (annul): Fix mode of pc.
2008 * cpu/ia64.cpu: Remove cruft that sets word modes.
2009 * cpu/xstormy16.cpu (define-cpu): Set word-bitsize.
2011 2003-06-03 Nick Clifton <nickc@redhat.com>
2013 * cpu/frv.cpu (media-dual-word-rotate-r-r): Use a signed 6-bit
2014 immediate value not unsigned.
2016 2003-05-21 J"orn Rennecke <joern.rennecke@superh.com>
2018 * cpu/sh.cpu: Amend comments to refer to SuperH.
2019 * cpu/sh64-compact.cpu: Change comment to refer to SuperH.
2020 * cpu/sh64-media.cpu: Likewise.
2021 (Saturation): Update manual reference.
2023 2003-05-15 Doug Evans <dje@sebabeach.org>
2025 * Makefile.am (srcroot): New var.
2027 * Makefile.in: Regenerate.
2028 * cgen-doc.scm: New file.
2029 * html.scm: New file.
2030 * gen-all-doc: New file.
2031 * dev.scm (cload): Handle DOC application.
2033 * machs.scm (machs-for-cpu): New fn.
2034 * model.scm (models-for-cpu): New fn.
2035 * utils.scm (gen-c-copyright): Renamed from gen-copyright.
2037 (iota): Rewrite to be identical to pmacro version. All uses updated.
2038 * utils-cgen.scm (alpha-sort-obj-list): New fn.
2040 * utils-sim.scm (-gen-decoder-switch): Back out patch of 2003-01-09.
2041 (-gen-decode-bits): Instead put in better fix here.
2043 * cpu/i960.cpu (index): Rename to indx. All uses updated.
2045 2003-05-01 DJ Delorie <dj@redhat.com>
2047 * cpu/xstormy16.cpu (alignfix-mem): Correct logic for unaligned
2049 (set-alignfix-mem): Likewise.
2051 2003-04-16 Dave Brolley <brolley@redhat.com>
2053 * doc/rtl.texi (Iiming): Correct example to use 'model-name'.
2054 * utils.scm (copyright-fsf): Update generate copyright years.
2055 (copyright-cygnus): Ditto.
2056 * sid.scm (-op-gen-set-trace): Generate code to fill in bitmask of modified
2058 (-gen-arch-model-decls): Don't generate unit enum declaration or MAX_UNITS
2060 (<operand>'gen-profile-code): New parameter 'when'.
2061 (<iunit>'gen-profile-code): Ditto.
2062 (<insn>'gen-profile-code): Ditto.
2063 (<unit>'gen-profile-code): Ditto. Only generate 'referenced' and
2064 'insn_reference' for the 'after' function.
2065 * model.scm (unit:enum): Moved to sim-model.scm.
2066 * sim-model.scm (unit:enum): Moved from model.scm.
2067 * sid-decode.scm (-gen-scache-decls): Generate the 'written' field.
2068 * cgen-sid.scm (sim-arguments): Document the generation of model.h.
2069 * sid-model.scm (unit:enum): New version for sid.
2070 (gen-model-class-name): New function.
2071 (gen-model-unit-fn-decl): New function.
2072 (gen-model-fn-decls): Call gen-model-unit-fn-decl.
2073 (gen-model-unit-fn-name): New parameter 'when'.
2074 (-gen-model-insn-fn-name): Ditto.
2075 (-gen-model-insn-qualified-fn-name): New function.
2076 (-gen-model-insn-fn-decl): New function.
2077 (-gen-model-insn-fn-decls): New function.
2078 (-gen-model-insn-fn): New parameter 'when'. Call
2079 -gen-model-insn-qualified-fn-name.
2080 (-gen-model-insn-fns): Generate the constructor for the model. Generate
2081 functions for modelling insn before and after execution.
2082 (-gen-model-class-decls): New function.
2083 (" (gen-model-class-name model) "): New function.
2084 (gen-model-classes): New function.
2085 (-gen-insn-timing): Generate functions for modelling insn before and after
2087 (-gen-insn-unit-timing): Generate class-qualified names.
2088 (-gen-model-timing-table): Ditto.
2089 (cgen-model.cxx): Generate #include for @cpu@.h. Omit generation of code
2090 not needed (yet) by sid.
2091 (cgen-model.h): New function.
2093 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2095 * cpu/sh.cpu: Replace occurrances of 'Hitachi' with 'Renesas'.
2096 * cpu/sh64-compact.cpu: Likewise.
2097 * cpu/sh64-media.cpu: Likewise.
2099 2003-03-21 DJ Delorie <dj@redhat.com>
2101 * cpu/xstormy16.cpu (basic-psw): New argument ws (wordsize),
2102 which indicates if the sign flag is set from bit 15 or 7.
2104 (set-psw): New argument ws, propogate it.
2105 (set-psw-nowrite): Likewise.
2106 (set-mem-psw): Likewise.
2107 (set-psw-carry): Likewise. Use temporaries to prevent
2108 prematurely overwriting needed inputs.
2109 (set-psw-rrotate17): Fix logic.
2110 (shrgrgr): Preserve carry for zero-bit shifts.
2111 (shrgrimm): Likewise.
2112 (shlgrgr): Likewise.
2113 (shlgrimm): Likewise.
2114 (asrgrgr): Likewise.
2115 (asrgrimm): Likewise.
2118 2003-03-12 Frank Ch. Eigler <fche@redhat.com>
2120 * sid.scm: Set APPLICATION to SID-SIMULATOR.
2122 2002-03-05 DJ Delorie <dj@redhat.com>
2124 * cpu/xstormy16.cpu (set-psw-add): Use temporaries to prevent
2125 prematurely overwriting needed inputs.
2126 (set-psw-sub): Likewise.
2128 Fri Feb 21 19:48:19 2003 J"orn Rennecke <joern.rennecke@superh.com>
2130 * cpu/sh64-media.cpu (make-mextr): Fix setting of count.
2132 2003-02-18 DJ Delorie <dj@redhat.com>
2134 * xstormy16.cpu (set-mem-alignfix-psw): Remove.
2135 (movlmemimm): Just mask the address.
2136 (movhmemimm): Likewise.
2137 (movlmemgr): Likewise.
2138 (movhmemgr): Likewise.
2139 (set-psw): Always set the psw last.
2140 (set-psw-carry): Likewise.
2141 (set-psw-add): Likewise.
2142 (set-psw-sub): Likewise.
2144 * xstormy16.cpu (set-psw-rrotate17): New. Choose the correct set
2145 of 16 patterns from the set-psw-rotate17 function.
2146 (movgrigr, movgripostincgr, movgripredecgr, movgriigr,
2147 movgriipostincgr, movgriipredecgr): Set psw correctly.
2148 (movfgrigr, movfgripostincgr, movfgripredecgr, movfgriigr,
2149 movfgriipostincgr, movfgriipredecgr): Fix semantics.
2150 (rrcgrgr, rrcgrimm4): Use new set-psw-rrotate17 function.
2152 2003-02-11 Dave Brolley <brolley@redhat.com>
2154 * desc-cpu.scm (gen-ifld-defns): Add all ifields to the
2155 @arch@_cgen-ifld_table.
2156 (gen-maybe-multi-ifld): Use the ifield enumerators to index the
2157 @arch@_cgen-ifld_table.
2159 2003-02-03 Frank Ch. Eigler <fche@redhat.com>
2161 * sid-cpu.scm (-gen-sfrag-engine-fn): Generate more hygienic C++.
2163 2003-01-09 Graydon Hoare <graydon@redhat.com>
2165 * utils-sim.scm (-gen-decoder-switch): Fix edge condition for
2168 2003-01-07 Graydon Hoare <graydon@redhat.com>
2170 * utils-gen.scm (attr-int-gen-defn): Define.
2172 2002-12-21 Doug Evans <dje@sebabeach.org>
2174 * ifield.scm (-ifield-parse): Rewrite <bitrange> computation.
2175 (-get-ifld-word-offset,-get-ifld-word-length): New fns.
2177 * dev.scm (cload): Update location of .cpu files.
2179 2002-12-19 Doug Evans <dje@sebabeach.org>
2181 * utils-sim.scm (gen-profile-sym): New fn.
2182 (<operand>,sbuf-profile-sym): New method.
2183 (<operand>,sbuf-profile-elm): Use it.
2184 * sim.scm (<operand>,gen-record-profile): Use sbuf-profile-sym instead
2185 of hardcoding symbol name.
2186 (<operand>,gen-profile-code): Ditto.
2187 (<unit>,gen-profile-code): Use gen-profile-sym instead of hardcoding
2190 * mode.scm (mode-sem-mode): New fn.
2191 * operand.scm (op:new-mode): Update. mode-name.
2192 (op-natural-mode?) New fn.
2193 * rtl.scm (hw): Set hw-name,mode-name.
2195 Back out sim*.scm changes of 2001-04-02 Ben Elliston <bje@redhat.com>
2197 * sim-decode.scm (-gen-decode-insn-globals): Use @PREFIX@_INSN__MAX
2198 as size of IDESC-TABLE-VAR.
2199 (@prefix@_init_idesc_table): Ditto.
2200 * sim-model.scm (-gen-mach-defns): Ditto.
2201 * sim.scm (gen-cpu-insn-enum-decl): Rename last elm from max to -max.
2203 * utils-sim.scm (-gen-decode-insn-entry): Fix some spacing in output.
2205 * insn.scm (-parse-insn-format-symbol): Improve error message.
2206 (-parse-insn-format): Ditto.
2208 * gen-all-sim: New script.
2210 2002-12-16 DJ Delorie <dj@delorie.com>
2212 * cpu/xstormy16.opc (parse_immediate16): Add prototype.
2214 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
2216 * cpu/xstormy16.cpu (imm16): Call handler immediate16.
2217 * cpu/xstormy16.opc (parse_small_immediate): Return on '@'.
2218 (parse_immediate16): Handle immediate16 values, which now include
2219 @hi(label) and @lo(label)
2221 2002-12-03 Alan Modra <amodra@bigpond.net.au>
2223 * desc-cpu.scm (gen-maybe-multi-ifld): Remove superfluous parens.
2224 Add braces and cast for union field.
2225 (gen-multi-ifield-nodes): Add braces and cast for union field.
2226 (cgen_operand_table): Similarly fix sentinel.
2227 (cgen_cpu_close): Constify "insns". Formatting.
2228 (cgen-desc.c): Include xregex.h.
2229 * cpu/ip2k.opc (ip2k_cgen_insn_supported): Move to opc.c section.
2231 <opc.c>: Include safe-ctype.h.
2232 (ip2k_asm_hash): Use ISSPACE and TOLOWER.
2233 (PARSE_FUNC_DECL): Declare. Use to prototype parse_fr, parse_addr16,
2234 parse_addr16_p, parse_addr16_cjp, parse_lit8 and parse_bit3.
2235 (parse_fr): Constify "old_strp". Correct type of "tempvalue".
2236 Don't test it for >= 0. Use ISSPACE rather than isspace. Formatting.
2237 (parse_addr16): Correct type of "value". Formatting.
2238 (parse_addr16_p): Likewise.
2239 (parse_addr16_cjp): Likewise.
2240 (parse_lit8): Likewise.
2241 (parse_bit3): Formatting.
2242 (PRINT_FUNC_DECL): Define. Use to prototype print_fr, print_dollarhex,
2243 print_dollarhex8, print_dollarhex16, print_dollarhex_addr16h,
2244 print_dollarhex_addr16l, print_dollarhex_p, print_dollarhex_cj and
2246 (print_fr): Add ATTRIBUTE_UNUSED on unused args. Formatting.
2247 (print_dollarhex): Add ATTRIBUTE_UNUSED on unused args.
2248 (print_dollarhex8): Likewise.
2249 (print_dollarhex16): Likewise.
2250 (print_dollarhex_addr16h): Likewise.
2251 (print_dollarhex_addr16l): Likewise.
2252 (print_dollarhex_p): Likewise.
2253 (print_dollarhex_cj): Likewise.
2254 (print_decimal): Likewise.
2255 * cpu/xstormy16.opc (parse_mem8): Use ISALNUM rather than isalnum.
2257 2002-11-30 Hans-Peter Nilsson <hp@axis.com>
2259 * doc/rtl.texi (Model variants): Mention current limitations for
2260 unit inputs and outputs.
2261 (Hardware elements) <attribute PROFILE>: Be slightly more
2263 (Instructions) <timing>: input/output overrides have a direction
2266 2002-11-25 DJ Delorie <dj@redhat.com>
2268 * xstormy16.cpu (sdiv, divlh, sdivlh): Fix sdivlh/divlh encodings.
2270 2002-11-21 Jeff Johnston <jjohnstn@redhat.com>
2272 * cpu/iq10.cpu: New file.
2273 * cpu/iq2000.cpu: Likewise.
2274 * cpu/iq2000.opc: Likewise.
2275 * cpu/iq2000m.cpu: Likewise.
2277 2002-11-19 DJ Delorie <dj@redhat.com>
2279 * cpu/xstormy16.cpu (sdiv, divlh, sdivlh): New.
2281 2002-11-05 Frank Ch. Eigler <fche@redhat.com>
2283 * dev.scm: Call getenv with a string, not a symbol.
2285 2002-10-08 Doug Evans <dje@transmeta.com>
2286 Hans-Peter Nilsson <hp@axis.com>
2288 * types.scm (bitrange-overlap?): Handle lsb0?.
2290 2002-09-07 Frank Ch. Eigler <fche@redhat.com>
2292 From Robert Cragie <rcc@jennic.com>:
2293 * cpu/arm7.cpu (ldm*-sw*, stm*-sw*): New instructions.
2295 2002-07-17 Frank Ch. Eigler <fche@redhat.com>
2296 Ben Elliston <bje@redhat.com>
2297 John Healy <jhealy@redhat.com>
2298 Jeff Johnston <jjohnstn@redhat.com>
2299 Alan Lehotsky <alehotsky@redhat.com>
2300 Ubicom Inc. <SupportDesk@ubicom.com>
2302 * cpu/ip2k.cpu: New file.
2303 * cpu/ip2k.opc: Likewise.
2305 2002-07-01 Hans-Peter Nilsson <hp@axis.com>
2307 * utils-gen.scm (-gen-extract-word): Handle lsb0?.
2309 2002-06-25 J"orn Rennecke <joern.rennecke@superh.com>
2311 * cpu/sh64-compact.cpu (movw5): Use Correct operand field for reg.
2312 * cpu/sh64-media.cpu (-ldhi-byte, -ldhi-word, -ldhi-long): New macros.
2313 (-ldlo-byte, -ldlo-word, -ldlo-long): Likewise.
2314 (-sthi-word, -sthi-long -stlo-byte, -stlo-word, -stlo-long): Likewise.
2315 (ldhil, ldhiq, ldlol, ldloq, stlol, stloq): Implement.
2316 (mshfhib, mshfhil, mshfhiw, mshflob, mshflol, mshflow): Fix indices.
2317 (-sthi-byte): If there is a single byte to store, store it at
2319 (sthil, sthiq): Fix big-endian behaviour.
2320 (mcnvslw, mcnvswb, mcnvswub, mmacfxwl, mmacnfx.wl): Fix indices.
2321 (mmulfxl, mmulfxw, mmulfxrpw, mmulhiwl, mmullowl): Likewise.
2322 (saturate): Use Dimode to check if saturation operation is required.
2323 (usaturate): Likewise.
2325 (-maddsl, -maddsub): Compute to-be-saturated value in wider mode.
2326 (-maddsw, mmacfxwl, mmacnfx.wl, -mshaldsl, -mshaldsw): Likewise.
2327 (-mshardl, -mshardw, -msubsl, -msubsub, -msubsw): Likewise.
2328 (msadubq): Fix subword index in second operand of first subtraction.
2330 2002-06-20 Hans-Peter Nilsson <hp@axis.com>
2332 * sim-cpu.scm (gen-semantic-code): Prepend with setup-semantics
2335 2002-06-18 Dave Brolley <brolley@redhat.com>
2337 * cpu/frv.cpu: New cpu description.
2338 * cpu/frv.opc: New cpu support code.
2340 2002-05-21 Dave Brolley <brolley@redhat.com>
2342 * decode.scm (-opcode-slots): Don't consider bits beyond the
2345 2002-05-17 Johan Rydberg <jrydberg@rtmk.org>
2347 * cpu/powerpc.cpu: New file.
2349 2002-05-01 Graydon Hoare <graydon@redhat.com>
2351 * desc-cpu.scm (@arch@_cgen_cpu_close): Fix memory leaks.
2353 2002-03-20 Hans-Peter Nilsson <hp@axis.com>
2355 * doc/pmacros.texi (Symbol concatenation): Mention that .sym
2356 results are expanded recursively.
2358 2002-03-19 Hans-Peter Nilsson <hp@axis.com>
2360 * pmacros.scm (-pmacro-expand,scan): If result is a symbol,
2361 call scan-symbol on it, to enable recursive macro-expansion.
2363 2002-01-25 Frank Ch. Eigler <fche@redhat.com>
2365 * sid-cpu.scm (-gen-hardware-types): Generate single hardware union
2366 for multiple-isa configurations.
2367 * sid-decode.scm (-gen-decode-fn): Tolerate empty insn list.
2369 2002-02-04 Ben Elliston <bje@redhat.com>
2371 * cpu/sh.cpu, cpu/sh.opc: New files.
2372 * cpu/sh64-comact.cpu, cpu/sh64-media.cpu: Likewise.
2374 2002-01-29 Hans-Peter Nilsson <hp@axis.com>
2376 * doc/rtl.texi: Fix typo: define-attr, not define-attribute.
2377 (Enumerated constants): Mention that an ifield must not specify a
2379 (Instruction operands): Ditto for index.
2380 (Expressions) <parallel>: Remove misplaced mention of local
2382 <if>: Mention that mode must be specified and non-VOID when the
2385 2002-01-28 Hans-Peter Nilsson <hp@axis.com>
2387 * doc/porting.texi: When referring to *.opc, mention they are in
2388 the cpu subdir. Call top-level directory toplevel, not devo.
2389 Close string in define-normal-insn example.
2391 * doc/pmacros.texi: Fix .substr typo to .substring.
2392 Mention that .sym expansions are not further expanded.
2394 2002-01-22 Graydon Hoare <graydon@redhat.com>
2396 * desc-cpu.scm (ifld-number-cache): Add.
2398 (gen-maybe-multi-ifld-of-op): Add.
2399 (gen-maybe-multi-ifld): Add.
2400 (gen-multi-ifield-nodes): Add.
2401 (cgen-desc.c): Add call to gen-multi-ifield-nodes.
2403 2002-01-10 matthew green <mrg@redhat.com>
2405 * cpu/xstormy16.cpu (gr-Rbj-names): Rename this ...
2406 (gr-Rb-names): ... to this.
2407 (h-Rb): New hardware piece.
2408 (h-Rbj): Use gr-Rb-names.
2410 (holdx): New instruction.
2412 2002-01-07 Ben Elliston <bje@redhat.com>
2414 * utils.scm (package-cygnus-simulators): Rename from this ..
2415 (package-red-hat-simulators): .. to this.
2416 * opcodes.scm (option-set!): Use package-red-hat-simulators.
2417 * sid-cpu.scm (cgen-desc.h): Likewise.
2418 (cgen-cpu.h): Likewise.
2419 (cgen-defs.h): Likewise.
2420 (cgen-write.cxx): Likewise.
2421 (cgen-semantics.cxx): Likewise.
2422 (cgen-sem-switch.cxx): Likewise.
2423 * sid-decode.scm (cgen-decode.h): Likewise.
2424 (cgen-decode.cxx): Likewise.
2425 * sid-model.scm (cgen-model.cxx): Likewise.
2426 * sid.scm (option-set!): Likewise.
2427 * sim.scm (option-set!): Likewise.
2429 2002-01-07 Ben Elliston <bje@redhat.com>
2431 * utils.scm (copyright-fsf): Add 2002.
2432 (copyright-cygnus): Rename to copyright-red-hat.
2433 (copyright-red-hat): Add 2002.
2434 (CURRENT-COPYRIGHT): Update comment.
2435 * opcodes.scm (option-set!): Update callers.
2436 * sid-model.scm (cgen-model.cxx): Likewise.
2437 * sid-cpu.scm: Likewise.
2438 * sid-decode.scm: Likewise.
2439 * sid.scm (option-set!): Handle "redhat" as an option for
2440 "copyright"; use copyright-red-hat.
2441 * sim.scm (option-set!): Likewise.
2443 2002-01-03 Dave Brolley <brolley@redhat.com>
2445 * decode.scm (-distinguishing-bit-population): Compute num-insns, the
2446 number of insns in the list. Update the population count function to
2447 identify and prioritize 3 catgories of useful bits.
2448 (-population-top-few): Don't consider bits with a population count of
2450 (-build-decode-table-entry): Don't call
2451 filter-harmlessly-ambiguous-insns. Filter out non-specialized and
2452 identical insns at the next tree level.
2453 * insn.scm (filter-harmlessly-ambiguous-insns): Note in a comment that
2454 this function is no longer used.
2455 (filter-non-specialized-ambiguous-insns): New function.
2456 (filter-identical-ambiguous-insns): New function.
2457 (find-identical-insn): New function.
2458 (filter-harmlessly-ambiguous-insns): Removed.
2460 2001-11-26 Geoffrey Keating <geoffk@redhat.com>
2461 matthew green <mrg@redhat.com>
2462 Frank Ch. Eigler <fche@redhat.com>
2463 Nick Clifton <nickc@cambridge.redhat.com>
2465 * cpu/xstormy16.cpu: New file.
2466 * cpu/xstormy16.opc: New file.
2468 2001-11-26 Frank Ch. Eigler <fche@redhat.com>
2470 * doc/sim.texi, rtl.texi, porting.texi: Correct texinfo markup typos.
2472 2001-11-14 Dave Brolley <brolley@redhat.com>
2474 * utils-gen.scm (-gen-extract-word): Correct computation of the length
2475 of the field being extracted.
2477 2001-10-29 Johan Rydberg <johan@rydberg.com>
2479 * doc/rtl.texi (Expressions): Document the (error ..), (sqrt ..),
2480 (cos ...) and (sin ..) rtx.
2482 2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
2484 * desc-cpu.scm: Do not include ctype.h in generated desc
2485 files. They will inherit safe-ctype.h instead.
2487 2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
2489 * desc-cpu.scm: Add missing function prototypes (for generated
2490 C files). Fix compile time warning messages about unused
2491 parameters (for generated C files).
2492 * opc-asmdis.scm: The same.
2493 * opc-ibld.c: The same.
2494 * opc-itab.scm: The same.
2495 * cpu/fr30.opc: The same.
2496 * cpu/m32r.opc: The same.
2497 * cpu/openrisc.opc: The same.
2499 2001-09-17 graydon hoare <graydon@redhat.com>
2501 * insn.scm (syntax-break-out): Correct logic in handling escaped
2504 2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
2506 * opc-itab.scm (@arch@_cgen_init_opcode_table): Unconditionally
2507 call @arch@_cgen_build_insn_regex now that regex support is in
2510 2001-07-12 Frank Ch. Eigler <fche@redhat.com>
2512 * insn.scm (filter-harmlessly-ambiguous-insns): Fix msg typo.
2513 (mask-superset?): Look for strict supersets to allow rejection of
2516 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2518 * sid-cpu.scm (-gen-mach-params): New proc to emit ...CHUNK_BITSIZE...
2519 (cgen-desc.h): Call it.
2520 * sid-decode.scm (-gen-decode-fn): Use base-insn-bitsize as
2522 * utils-sim.scm (-gen-decode-insn-entry): For SID only, prepare
2523 entire_insn for extraction, if it's shorter than base-insn-bitsize.
2525 2001-07-11 Frank Ch. Eigler <fche@redhat.com>
2527 * desc-cpu.scm (-gen-mach-table-defns): Emit fourth field: the
2528 mach->cpu insn-chunk-bitsize.
2529 (-gen-cpu-open): In @arch@_cgen_rebuild_tables, process above new
2530 field toward CGEN_CPU_TABLE->insn_chunk_bitsize.
2531 * mach.scm (<cpu>): New field insn-chunk-bitsize.
2532 (-cpu-parse, -cpu-read): Parse/initialize it.
2533 * doc/rtl.texi (define-cpu): Document it.
2535 2001-07-09 Geoffrey Keating <geoffk@redhat.com>
2537 * ifield.scm (<ifield> 'field-start): Don't look at word-len.
2539 2001-07-06 Ben Elliston <bje@redhat.com>
2541 * opcodes.scm (read-cpu.opc): Read .opc files from subdir/cpu.
2543 2001-07-05 Ben Elliston <bje@redhat.com>
2547 * read.scm (include): Include files from srcdir/cpu.
2548 (-cgen): Likewise for loading .cpu files.
2549 * sid.scm (sim-finish!): Read .sim files from srcdir/cpu.
2550 * *.cpu: Move all cpu descriptions into cpu subdirectory.
2552 * simplify.inc: Likewise.
2554 2001-07-04 Ben Elliston <bje@redhat.com>
2556 * read.scm (include): Log "Including file" message at level 1,
2557 rather than outputting it with (display).
2558 (cpu-load): Log "Loading cpu description" and "Processing cpu
2559 description" messages at levels 1 and 2, respectively, rather than
2562 2001-06-14 Geoffrey Keating <geoffk@redhat.com>
2564 * desc.scm (<keyword> 'gen-defn): Add extra zero into
2565 CGEN_KEYWORD_ENTRY initializers.
2567 * gas-test.scm (gen-gas-test): Create 8 testcases, not just 5.
2568 (<operand> 'test-data): Involve both the index and the hardware
2569 in testcase generation.
2570 (<hw-indx> 'test-data): Generate test data from the underlying
2572 (<ifield> 'test-data): Generate test data by computing bit
2573 patterns for the field, then decoding them.
2574 (<hw-address> 'test-data): Allow for new calling convention.
2575 (<hw-iaddress> 'test-data): Likewise.
2576 (<keyword> 'test-data): Convert index values into keywords.
2577 (<hw-asm> 'test-data): Convert index values into integer strings.
2579 * gas-test.scm (cgen-build.sh): Escape '.' as well.
2581 2001-06-01 Frank Ch. Eigler <fche@redhat.com>
2583 * rtl.scm (hw): Encode hw access mode into <operand> name, since this
2584 is required for multi-mode hw types (memory).
2586 2001-05-11 Ben Elliston <bje@redhat.com>
2588 * gas-test.scm (cgen-build.sh, gentest): Escape $ with a backslash
2589 when generating allinsn.d from objdump output. Without it, the
2590 testsuite will treat $ as the regular expression for end of line.
2592 2001-05-09 Ben Elliston <bje@redhat.com>
2594 * doc/porting.texi (Doing a GAS port): Replace `cgen_opcode_open'
2595 with `cgen_cpu_open'; documentation had become out of date.
2596 * doc/rtl.texi (Instruction operands): Likewise.
2598 2001-05-07 Frank Ch. Eigler <fche@redhat.com>
2600 * iformat.scm (compute-insn-base-mask-length): Rewrite to tolerate
2601 various-base-length instruction sets.
2603 2001-04-02 Ben Elliston <bje@redhat.com>
2605 * sid-cpu.scm (-last-insn): New function.
2606 (-gen-sem-switch-engine): Loop through idesc while less than or
2607 equal to the last instruction enum, not less than the MAX enum.
2608 (-gen-sfrag-engine-fn): Clean up frag_label_table initialisation.
2609 * sid-decode.scm (-gen-decode-insn-globals): Define the idesc
2610 table's size to be the last instruction enum plus one, not
2612 * sid.scm (gen-cpu-insn-enum-decl): Do not append a dummy `max'
2613 instruction onto the instruction list.
2615 * sim-decode.scm (@prefix@_init_idesc_table): Compute tabsize
2616 using the size of the table and its elements.
2617 (-gen-decode-insn-globals): Define the idesc table's size to be
2618 the last instruction enum plus one, not @PREFIX@_INSN_MAX.
2619 * sim-model.scm (-gen-mach-defns): Define CPU_MAX_INSNS as the
2620 last instruction enum plus one, not @CPU@_INSN_MAX.
2622 2001-03-28 Ben Elliston <bje@redhat.com>
2624 * doc/version.texi (UPDATED, EDITION): Update.
2625 * doc/stamp-vti: Likewise.
2627 2001-03-26 Ben Elliston <bje@redhat.com>
2629 * doc/credits.texi (Credits): Update.
2631 * gas-test.scm (<keyword>,test-data): Prefix keywords by their
2632 specified prefix and, if necessary, escape `$' in gas-build.sh to
2633 prevent unwanted shell variable expansion.
2635 2001-03-24 Ben Elliston <bje@redhat.com>
2637 * gas-test.scm (<hw-asm>,test-data): Choose pseudo-random data.
2638 (<keyword>,test-data): Likewise.
2639 (<hw-address>,test-data): Likewise.
2640 (<hw-iaddress>,test-data): Likewise.
2641 (-collate-test-set): New function.
2642 (build-test-set): Use it.
2643 (gen-gas-test): Generate five test cases per instruction.
2644 (cgen-allinsn.exp): Include "-*- Tcl -*-" in DejaGNU test file.
2646 * read.scm: Load "slib/random" if random is not defined.
2647 * slib/random.scm: New file.
2649 * utils.scm: Remove comments about the Hobbit compiler.
2650 (copyright-cygnus): Add 2001.
2651 (package-cygnus-simulators): Replace "Cygnus" with "Red Hat".
2652 (package-gnu-simulators): Tidy.
2654 2001-03-23 Ben Elliston <bje@redhat.com>
2656 * cgen-gas.scm: Inline documentation improvements.
2658 2001-03-21 Ben Elliston <bje@redhat.com>
2660 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2661 given in a syntax string is undefined.
2663 * opc-itab.scm (compute-syntax): Emit a parse error if an operand
2664 name is empty or invalid -- eg. "$(rs)" instead of "($rs)".
2666 2001-03-20 Patrick Macdonald <patrickm@redhat.com>
2668 * desc-cpu.scm (@arch@_cgen_cpu_open): Correct machine calculation
2669 for arg_type CGEN_CPU_OPEN_BFDMACH.
2671 2001-03-20 Ben Elliston <bje@redhat.com>
2673 * opc-itab.scm (-gen-insn-enum): Do not append a dummy `max'
2674 instruction onto the instruction list. Define MAX_INSNS to be the
2675 value of the last instruction enum plus one.
2677 2001-03-14 Nick Clifton <nickc@redhat.com>
2679 * utils.scm (copyright-fsf): Add 2001. Remove (C).
2681 2001-03-05 Dave Brolley <brolley@redhat.com>
2683 * sim-decode.scm (-gen-extract-case): Generate declaration of "insn"
2684 if the number of ifields is greater than zero.
2686 2001-03-01 Frank Ch. Eigler <fche@redhat.com>
2688 * sid.cpu (-op-gen-set-trace[-parallel], -create-virtual-insns!):
2689 Emit LIKELY/UNLIKELY branch probability hints.
2690 * sid-decode.cpu (-gen-record-args): Ditto.
2692 2001-02-02 Patrick Macdonald <patrickm@redhat.com>
2694 * desc-cpu.scm (-gen-hash-defines): Rename
2695 CGEN_ACTUAL_MAX_SYNTAX_BYTES to CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS.
2697 2001-01-26 Frank Ch. Eigler <fche@redhat.com>
2699 * sid-cpu.scm (gen-parallel-exec-type): Use unsigned long long for
2701 (-gen-write-fn, -gen-sem-case, -gen-sfrag-case): Ditto.
2702 * sid-decode.scm (-gen-scache-decls): Exclude writeback tracking field
2704 * sid.scm (<operand> gen-write): Use unsigned long long expression
2706 (-op-gen-set-trace, -op-gen-set-trace-parallel): Ditto.
2707 (<unit> gen-profile-code): Ditto.
2709 2001-01-23 Johan Rydberg <jrydberg@opencores.org>
2711 * doc/rtl.texi (Expressions): Document the (index-of ...) and
2714 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2716 * operand.scm (<operand> pretty-sem-name): New field.
2717 (<operand> make): Initialize it from hw-name.
2718 (op:set-pretty-sem-name!): New function.
2719 (<operand> gen-pretty-name): Default to fetching new field.
2720 * rtl.scm (hw): Copy hw-name to pretty-sem-name instead. Restore
2721 sem-name setting from -rtx-hw-name.
2723 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2725 * rtl.scm (hw): Copy hw-name to new operand's sem-name, to simplify
2726 its subsequent gen-pretty-name.
2728 * read.scm: Increase thread working stack limit and backtrace
2731 2001-01-08 Frank Ch. Eigler <fche@redhat.com>
2733 * doc/rtl.texi: Deprecate and depreciate the decode-assist construct.
2735 2001-01-06 Johan Rydberg <jrydberg@opencores.org>
2737 * openrisc.cpu (or32): Setup semantics for h-delay-insn to
2738 current insn plus 4.
2739 (h-delay-insn): New hardware register.
2740 (l-jal): Uses h-delay-insn instead of pc when setting link register.
2744 * openrisc.opc (parse_hi16): Sign extend value.
2745 (parse_lo16): Likewise.
2747 2001-01-06 Ben Elliston <bje@redhat.com>
2749 * utils-gen.scm (gen-sfmt-enum-decl): Use @prefix@ and @PREFIX@
2750 instead of @cpu@ and @CPU@ to generically prefix symbol names.
2751 * sim-cpu.scm (-gen-sem-fn-table-entry): Likewise.
2752 (-gen-semantic-fn-table): Likewise.
2753 (-gen-scache-semantic-fn): Likewise.
2754 (-gen-no-scache-semantic-fn): Likewise.
2755 (cgen-read.c): Likewise.
2756 (cgen-sem-switch.c): Likewise.
2757 * desc-cpu.scm (cgen-desc.c): Use @arch@, not @prefix@, since this
2758 is a filename prefix.
2759 * sim-decode.scm (IDESC-TABLE-VAR): Use @prefix@, et al.
2760 (-gen-decode-insn-globals): Likewise.
2761 (-gen-idesc-decls): Likewise.
2762 (cgen-decode.h): Likewise.
2763 (cgen-decode.c): Likewise.
2764 * sim.scm (gen-cpu-insn-enum-decl): Likewise.
2765 (gen-cpu-insn-enum): Likewise.
2766 (sim-finish!): Likewise.
2768 2001-01-05 Johan Rydberg <jrydberg@opencores.org>
2770 * openrisc.cpu: New file.
2771 * openrisc.opc: Likewise.
2773 2000-12-12 Ben Elliston <bje@redhat.com>
2775 * doc/rtl.texi (Expressions): Document the (delay ..) rtx.
2777 2000-12-07 Ben Elliston <bje@redhat.com>
2779 * sim-decode.scm (-gen-extract-case): Do not emit a definition for
2780 "insn" when there are zero ifields to extract.
2782 2000-12-04 Frank Ch. Eigler <fche@redhat.com>
2784 * utils-sim.scm (gen-define-argbuf-macro): Handle sfmt=#f case, to be
2785 used by simple/non-scache simulators.
2786 * sim-cpu.scm (-gen-read-case): Call gen-define/undef-field-macro
2787 regardless of with-scache?.
2788 (-gen-write-case, -gen-no-scache-semantic-fn, -gen-sem-case): Ditto.
2790 2000-12-03 Ben Elliston <bje@redhat.com>
2792 * desc-cpu.scm (cgen-desc.h): Clarify generated filenames.
2793 (cgen-desc.c): Likewise.
2795 2000-12-01 Greg McGary <greg@mcgary.org>
2797 * desc.scm (<keyword>,gen-defn): Prepend prefix to keyword names.
2799 2000-12-01 Ben Elliston <bje@redhat.com>
2801 * sim-cpu.scm (cgen-cpu.h): Only emit argbuf, scache and extract
2802 definitions if run without with-multipla-isa?.
2803 (cgen-defs.h): New function. Emit an ISA-specific defs file.
2804 * cgen-sim.scm (sim-arguments): Accept -G option to generate defs.
2806 2000-11-24 Ben Elliston <bje@redhat.com>
2808 * sim-cpu.scm (-gen-hardware-struct): New function.
2809 (-gen-hardware-types): If with-multiple-isa is specified, emit all
2810 hardware elements wich have share one or more ISAs with the ISAs
2813 * sim.scm (-with-multiple-isa?): New symbol.
2814 (with-multiple-isa?): New function.
2815 (option-init!): Initialise -with-multiple-isa?.
2816 (option-set!): Handle with-multiple-isa option.
2818 2000-11-21 Ben Elliston <bje@redhat.com>
2820 * utils.scm (copyright-fsf): Add the year 2000.
2822 2000-11-20 Frank Ch. Eigler <fche@redhat.com>
2824 * opc-itab.scm (-gen-ifmt-table, -gen-macro-insn-table: Remove
2825 unneeded "\n\n" from F() macro definition.
2827 2000-11-15 Greg McGary <greg@mcgary.org>
2829 * utils-cgen.scm (gen-define-with-symcat): New function.
2830 * desc-cpu.scm (gen-ifld-defns): Use it.
2831 (gen-hw-table-defns): Use it.
2832 (-gen-hash-defines): Use it.
2833 (gen-operand-table): Use it.
2834 (gen-insn-table): Use it. Remove spurious `#undef MNEM'.
2835 * opc-itab.scm (-gen-ifmt-table): Use it.
2836 (-gen-insn-opcode-table): Use it.
2837 (-gen-macro-insn-table): Use it.
2838 * opc-opinst.scm (-gen-operand-instance-tables): Use it.
2839 * sim-cpu.scm (cgen-semantics.c): Use it.
2840 (cgen-sem-switch.c): Use it.
2842 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2844 * utils-sim.scm (-gen-decode-insn-entry): Add fn? parameter to signal
2845 request to emit calls to insn extractors as functions rather than
2846 branches to inline blocks.
2847 (-gen-decode-expr-set-itype, -gen-decode-expr-entry): Ditto.
2848 (-gen-decode-table-entry, -gen-decoder-switch, gen-decoder): Ditto.
2850 * sim-decode.c (-gen-decode-fn): Tell (gen-decode) to emit branches
2851 to extractor clauses.
2853 2000-11-10 Frank Ch. Eigler <fche@redhat.com>
2855 * decode.scm (-distinguishing-bit-population): Significantly
2856 improve popularity heuristic. Renamed from
2857 (-mask-bit-population): Gone.
2858 (-population-above-threshold): Sort new bit numbers in order of
2860 (-population-top-few): Allow up to three more bits to be selected
2861 than requested. Correct selection order to prefer better bits.
2862 Correct bug in fewer-than-requested case. Keep threshold as
2864 (decode-best-get-bits): Pass also the insn-values.
2866 * utils-sim.scm (-gen-decoder-switch): Add comment suggesting a
2867 future optimization.
2869 * utils.scm (message): Format nested lists better.
2871 2000-11-09 Doug Evans <dje@casey.transmeta.com>
2873 * dev.scm: Add srcdir to %load-path.
2875 * rtx-funcs.scm (subword): Mode of argument can be different
2876 than mode of result, so don't use OP0 to specify argument's mode.
2878 2000-11-02 Ben Elliston <bje@redhat.com>
2880 * doc/porting.texi (Building a GAS test suite): Document my change
2883 2000-11-01 Ben Elliston <bje@redhat.com>
2885 * sim-test.scm (cgen-build.sh): Include "-*- Asm -*-" in test cases.
2887 2000-10-31 Ben Elliston <bje@redhat.com>
2889 * gas-test.scm (cgen-build.sh): Allow the generated script to run
2890 with no command line arguments if the gas build directory can be
2893 2000-10-26 Doug Evans <dje@casey.transmeta.com>
2895 * insn.scm (-parse-insn-format-symbol): Fix spelling error,
2896 op-ifld -> op-ifield.
2898 2000-10-23 Frank Ch. Eigler <fche@redhat.com>
2900 * thumb.scm (cc-tests): Add (ISA thumb) attribute.
2902 2000-10-13 matthew green <mrg@cygnus.com>
2904 * utils-cgen.scm (get-ifetch): Move from here ...
2905 * sim.scm (get-ifetch): ... to here.
2906 * sid.scm (get-ifetch): Copy and port to c++.
2908 2000-10-06 Dave Brolley <brolley@redhat.com>
2910 * utils-gen.scm (-gen-ifld-extract-base): Compute start position as
2911 ifld-start + ifld-word-offset.
2912 (gen-ifld-extract): Check adata-integral-insn? before checking whether
2913 the field is beyond the base number of bits.
2914 (gen-define-ifields): Use a base-length of 32 if adata-integral-insn?.
2915 (gen-extract-ifields): Ditto.
2916 * gas-test.scm (gentest): Generate backslashes before '[' and ']'
2917 characters in the regular expression.
2919 2000-10-02 Frank Ch. Eigler <fche@redhat.com>
2921 * desc-cpu.scm: (gen-operand-decls): Emit MAX_OPERANDS as a
2922 preprocessor constant.
2924 2000-09-21 Frank Ch. Eigler <fche@redhat.com>
2926 * slib/logical.scm: New file from slib. Provides robust bitwise
2927 logical operations for large integers.
2928 * read.scm: maybe-load it.
2930 2000-09-15 Frank Ch. Eigler <fche@redhat.com>
2932 * enum.scm (define-full-insn-enum): Filter with keep-isa predicate.
2933 * ifield.scm (-ifield-parse, -multi-ifield-parse): No longer assert
2934 single-isa predicate, but support keep-isa filtering.
2936 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2938 * rtl-c.scm (s-sequence): Handle nested c-calls in both
2939 statement-expression and comma-expression contexts.
2940 (s-c-call, s-c-raw-call): Add warning comment about bad assumption.
2942 2000-09-08 Frank Ch. Eigler <fche@redhat.com>
2944 * decode.scm (-population-top-few): Signal error gracefully if
2945 decoding is about to become ambiguous.
2947 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2949 * doc/rtl.texi (decode-assist): Describe this field as optional.
2951 2000-09-06 Frank Ch. Eigler <fche@redhat.com>
2953 * utils-gen.scm (gen-multi-ifld-extract): Handle case of multi-ifield
2956 2000-09-05 Dave Brolley <brolley@redhat.com>
2958 * sim.scm (sim-finish!): Honour the definition of FAST_P when calling
2959 @cpu@_pbb_begin. Use 0 if FAST_P is not defined.
2961 2000-08-29 Dave Brolley <brolley@redhat.com>
2963 * utils-gen.scm (gen-ifld-extract): Pass total-len if
2964 adata-integral-insn is true for this architecture.
2966 2000-08-24 Frank Ch. Eigler <fche@redhat.com>
2968 * hardware.scm (<hw-immediate> get-index-mode): Define method.
2969 * operand.scm (<operand> gen-pretty-name): Tolerate no op:sem-name.
2970 * rtl-c.scm (-c-rtl-get): Improve an error message.
2971 * sim.scm (-op-gen-set-trace): Support <derived-operand> lvalues.
2973 2000-08-22 Frank Ch. Eigler <fche@redhat.com>
2975 * Makefile.in (DIST_COMMON): Regenerated.
2976 * ifield.scm (<derived-ifield> needed-iflds): New method.
2977 * iformat.scm (-ifmt-lookup-sfmt!): Use base ifields for
2978 sfmts built from <derived-ifield>s.
2979 * operand.scm (-derived-parse-encoding): Give <derived-ifield> a fixed
2980 type symbol 'derived-ifield, not an unparseable string.
2981 * utils-sim.scm (op-needed-iflds) Handler 'derived-ifield case.
2982 (-sfmt-contents): Add tracing.
2984 From Doug Evans <dje@transmeta.com>:
2985 * sim.scm (<operand> cxmake-get): Result is a <c-expr>, not a string of
2988 2000-08-20 Doug Evans <dje@casey.transmeta.com>
2990 * rtl-c.scm (rtl-c-expr-with-estate): New fn.
2991 (rtl-c-expr-parsed,rtl-c-expr): New fns.
2992 (-rtl-c-get): Rename from rtl-c-get.
2993 (rtl-c-get): New fn for getter logging.
2995 2000-07-28 Ben Elliston <bje@redhat.com>
2999 2000-07-25 Ben Elliston <bje@redhat.com>
3001 * doc/credits.texi (Credits): Add Frank Eigler.
3003 2000-07-24 Dave Brolley <brolley@redhat.com>
3005 * opc-itab.scm (gen-insn-opcode-table): Initialize the first element
3007 * desc.scm (gen-attr-table-defn): Initialize all elements fully.
3008 (<keyword>): Initialize all elements fully.
3009 * desc-cpu.scm (-gen-isa-table-defns): Initialize the last element
3011 (-gen-mach-table-defns): Ditto.
3012 (-gen-ifld-defns): Ditto.
3013 (-gen-operand-table): Ditto.
3014 (-gen-insn-table): Ditto.
3015 (-gen-cpu-open): Nothing to do for the mach table.
3017 2000-07-13 Ben Elliston <bje@redhat.com>
3019 * doc/version.texi (UPDATED): Update.
3021 2000-07-05 Ben Elliston <bje@redhat.com>
3023 * configure.in (AC_PATH_PROG): Remove.
3024 * configure: Regenerate.
3025 * Makefile.am (GUILE): Locate guile dynamically.
3026 * Makefile.in: Regenerate.
3027 * doc/Makefile.in: Likewise.
3029 2000-07-03 Ben Elliston <bje@redhat.com>
3031 * desc-cpu.scm (cgen-desc.c): Include "libiberty.h".
3032 * opc-itab.scm (cgen-opc.c): Likewise.
3034 2000-06-28 Frank Ch. Eigler <fche@redhat.com>
3036 * rtl.scm (-rtx-traverse-locals): Correct call to `symbol?' for
3037 guile 1.4 compatibility.
3038 (rtx-env-dump): Comment out buggy display calls.
3040 2000-06-15 matthew green <mrg@redhat.com>
3042 * opc-itab.scm (-gen-ifmt-table-1): Add extra braces to pacify GCC.
3044 2000-06-14 Frank Ch. Eigler <fche@redhat.com>
3046 * Makefile.in: Regenerated.
3048 * desc-cpu.scm (gen-ifld-decls): Exclude derived ifields.
3049 (gen-ifld-defns): Ditto.
3050 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Ditto.
3051 * rtl.c (rtl-finish!): Ditto.
3052 * opc-itab.scm (-gen-ifield-decls): Ditto.
3053 * opcodes.scm (gen-switch): Exclude derived operands.
3054 * operand.scm (op-iflds-used): Expand derived operands.
3055 (hw-index-derived): New dummy function to create dummy object.
3056 (-derived-operand-parse): Fix mode arg passed to <derived-operand>
3057 constructor. Set object's hw-name and index fields.
3058 (-anyof-merge-subchoices): Set instance object's index also.
3059 (-anyof-name): New helper function.
3060 (anyof-merge-semantics): Correct replacement of operand names in
3062 (op-ifield): Tolerate derived-operands and their funny indices better.
3063 * ifield.scm (ifld-known-values): Expand derived ifields.
3064 (non-multi-ifields, non-derived-ifields): New utility functions.
3065 (ifld-decode-mode): Tolerate objects with unbound decode field.
3066 * iformat.scm (compute-insn-length): Expand derived ifields.
3067 (compute-insn-base-mask): Ditto.
3068 * insn.scm (insn-base-ifields): Remove.
3069 (<insn>): Add iflds-values entry to cache ifld-base-ifields values.
3070 (insn-value): Call ifld-base-ifields and ifld-constant? instead.
3071 * mach.scm (arch-analyze-insns!): Exclude multi-insns.
3072 * sem-frags.scm (sim-sfrag-analyze-insns!): Ditto.
3073 (-frag-test-data): Ditto.
3074 * sid-cpu.scm (cgen-write.cxx,-gen-sem-switch): Ditto.
3075 (-gen-sem-switch-engine); Ditto.
3076 * sid-model.scm (-gen-model-insn-fns, -gen-model-timing-table): Ditto.
3077 * sid-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3078 (-gen-record-args): Tolerate unbound op-ifield.
3079 * sid.scm (<derived-operand> cxmake-get): New sketch implementation.
3080 (-gen-arch-model-decls, scache-engine-insns, pbb-engine-insns):
3081 Exclude multi-insns.
3082 * sim-decode.scm (cgen-decode.h, cgen-decode.cxx): Ditto.
3083 * utils-sim.scm (op-extract?): Handle derived operands.
3085 * gas-test.scm (cgen-build.sh): Quote '*' chars printed by objdump.
3086 * semantics.scm (-build-operand!): Handle 'DFLT case during parsing.
3087 * hardware.scm (hardware-for-mode): New function.
3089 * insn.scm (filter-harmlessly-ambiguous-insns): New function for
3090 cleaning up decode tables.
3091 (mask-superset?): Little helper function for above.
3092 * decode.scm (-build-decode-table-entry): Call it.
3093 (-opcode-slots): Add some more tracing.
3094 * arm.cpu: Disable decode-splits construct due to implementation
3095 conflict with `filter-harmlessly-ambiguous-insns'
3097 * decode.scm (-population-top-few): New function for better decode
3098 bit generation. Includes minor helper functions.
3099 (decode-get-best-bits): Call it instead.
3100 (OLDdecode-get-best-bits): Renamed previous version of above.
3103 2000-06-13 Ben Elliston <bje@redhat.com>
3105 * configure.in: Use AC_EXEEXT with Cygnus mode. Remove AC_ARG_WITH
3106 for the Guile library directory.
3107 * configure: Regenerate.
3108 * Makefile.in, doc/Makefile.in: Regenerate.
3110 * Makefile.in, doc/Makefile.in: Regenerate.
3111 * configure.in: Remove unnecessary tests. Move to version 1.0.
3112 * acconfig.h, config.in: Remove.
3113 * configure, aclocal.m4: Regenerate.
3114 * doc/stamp-vti, doc/version.texi: Likewise.
3115 * AUTHORS: New file.
3117 2000-06-07 Ben Elliston <bje@redhat.com>
3119 * fixup.scm (symbol-bound?): Reduce debugging output.
3121 2000-06-02 matthew green <mrg@redhat.com>
3123 * insn.scm (insn-base-ifields): Returns all the instruction fields for
3124 a given instruction, replacing derived fields with their subfields.
3125 (insn-value): Use `insn-base-ifields' to find all constant values.
3126 (multi-insn-instantiate!): Comment some debug messages.
3128 2000-06-01 Ben Elliston <bje@redhat.com>
3130 * doc/rtl.texi (Expressions): Document a hazard with the choice of
3131 symbol names used in a (c-call ..) rtx.
3133 * sim-test.scm (build-test-set): Return (()) for an instruction
3134 with no operands, so it too is included in the generated test set.
3136 2000-05-31 Ben Elliston <bje@redhat.com>
3138 * Makefile.am (gas-test): Ensure $(ISA) is not empty.
3139 (sim-test): Likewise.
3140 * Makefile.in: Regenerate.
3142 2000-05-30 Frank Ch. Eigler <fche@redhat.com>
3144 * read.scm (-cgen): In debugging mode (-b), ask guile for untruncated
3145 stack traceback, in an order that resembles gdb's `bt'.
3147 2000-05-24 Frank Ch. Eigler <fche@redhat.com>
3149 * desc-cpu.scm (-gen-hash-defines): Use ifmt-ifields again.
3150 * opc-itab.scm (-gen-ifmt-table-1): Ditto.
3151 * gas-test.scm (gas-test-analyze!, cgen-build.sh): Filter out
3153 * ifield.scm (multi-ifield): Define workable field-mask and field-value
3155 (ifld-base-ifields): New routine to replace ifmt-expanded-ifields.
3156 * iformat.scm (ifmt-expanded-ifields): Gone.
3157 (ifields-base-ifields): New function. Call ifld-base-ifields for real
3159 (-ifmt-lookup-ifmt!): Use it to expand derived/multi combos in new
3162 * opcodes.scm (multi-ifield gen-extract): Correct spacing in generated
3165 2000-05-23 Frank Ch. Eigler <fche@redhat.com>
3167 * sid.scm (with-any-profile?): New function clone.
3169 2000-05-19 Frank Ch. Eigler <fche@redhat.com>
3171 * utils-gen.scm (gen-multi-ifld-extract): Fix decode hook for sim.
3173 2000-05-18 Frank Ch. Eigler <fche@redhat.com>
3175 * ifield.scm (-multi-ifield-parse): Add encode/decode args.
3176 (-multi-ifield-read): Parse them.
3177 (define-full-multi-ifield): Pass #f/#f as defaults for them.
3178 * opcodes.scm (multi-ifield gen-insert): Add encode hook.
3179 (multi-ifield gen-extract): Add decode hook.
3180 * utils-gen.scm (gen-multi-ifld-extract): Add decode hook for sim.
3182 * insn.scm (syntax-break-out): More correctly handle \-escaped
3184 (syntax-make-elements): Ditto.
3185 * opc-itab.scm (compute-syntax): Ditto.
3187 2000-05-17 Ben Elliston <bje@redhat.com>
3189 * gas-test.scm (cgen-build.sh): Log the correct script filename.
3191 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3193 * gas-test.scm (build-test-set): Return (()) for an instruction
3194 with no operands, so it too is included in the generated test set.
3196 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3198 * desc-cpu.scm (-gen-hash-defines): Define CGEN_ACTUAL_MAX values for
3199 IFMT_OPERANDS and SYNTAX_BYTES.
3201 2000-05-15 Frank Ch. Eigler <fche@redhat.com>
3203 * sim.scm (with-any-profile?): New function.
3204 * utils-sim.scm (-sfmt-contents): Use above instead of `with-profile?'
3205 to decide whether or not to include profiling counters.
3207 2000-05-10 Frank Ch. Eigler <fche@redhat.com>
3209 Fuller derived-operand support for opcodes.
3210 * insn.scm (non-multi-insns): New filter to oppose `multi-insns'.
3211 * desc-cpu.scm (-define-hash-defines): Compute CGEN_MAX_SYNTAX_BYTES.
3212 Correctly compute ..._IFMT_OPERANDS. Omit useless ..._INSN_OPERANDS.
3213 (gen-operand-table): Omit derived- and anyof- operands from table.
3214 (gen-insn-table): Omit multi-insns from table.
3215 * iformat.scm (ifmt-expanded-fields): New function to expand
3216 subfields of derived-ifields.
3217 (ifmt-compute!): Ignore remaining multi-insns.
3218 * mach.scm (isa-min-insn-bitsize, isa-max-insn-bitsize): Ignore
3220 * opc-itab.scm (-gen-ifmt-table-1): Use ifmt-expanded-ifields.
3221 (-gen-insn-enum, -gen-insn-opcode-table): Ignore multi-insns.
3222 * opcodes.scm (derived-operand): Define abort()ing gen-insert,
3223 gen-extract, gen-fget, gen-fset, gen-parse, gen-print functions.
3224 (gen-switch): Omit anyof-operands.
3225 * operand.scm (-anyof-syntax): New function.
3226 (-anyof-merge-syntax): Call it.
3227 * utils.scm (collect): New idiomatic function.
3229 2000-05-10 Ben Elliston <bje@redhat.com>
3231 * m68k.cpu: New file (work in progress).
3233 2000-05-05 Frank Ch. Eigler <fche@redhat.com>
3235 * Makefile.am (all-local): New target. Create stamp-cgen.
3236 * Makefile.in: Regenerated.
3237 * doc/Makefile.in: Regenerated.
3239 2000-04-26 Frank Ch. Eigler <fche@redhat.com>
3241 * operand.scm (-operand-g/setter-syntax): Correct off-by-one error.
3242 (-operand-parse-setter): Ditto.
3243 * utils-sim.scm (needed-iflds): Store ifield (index) in argbuf, even
3244 for CACHE-ADDR operands.
3245 * sid-decode.scm (-gen-record-args): Remove newly duplicated extract
3246 trace entries. Widen byte-wide values for printing.
3247 * sid.scm (-op-gen-set-trace): Enhance result trace with op indices.
3248 Widen byte-wide values for printing. Hexify memory addresses.
3250 2000-04-23 matthew green <mrg@redhat.com>
3252 * m32r.cpu: Fix a typo.
3254 Fri Apr 21 22:18:48 2000 Jim Wilson <wilson@cygnus.com>
3256 * ia64.cpu (define-model): Change merced to Itanium.
3257 (f-qp): Change quilifying to qualifying.
3258 (movbr_ph, movbr_pvec): Delete.
3259 (I-I21): Delete uses of movbr_ph and movbr_pvec.
3261 2000-04-07 Ben Elliston <bje@redhat.com>
3263 * doc/porting.texi (Building a simulator test suite): Clarify
3264 where generated test cases are placed.
3266 2000-04-07 Ben Elliston <bje@redhat.com>
3268 * Makefile.am (gas-test): Remove dependency on `cgen'.
3270 * Makefile.in: Regenerate.
3272 2000-04-04 Frank Ch. Eigler <fche@redhat.com>
3274 * hardware.scm (<hw-pc> parse): Allow user to set type for pc register.
3275 * mode.scm (mode-finish!): Add placeholder code for mach-dependent
3276 type reconfiguration.
3277 * utils-sim.scm (-sfmt-contents): Add profile-counters only if
3280 2000-03-30 Ben Elliston <bje@redhat.com>
3282 * doc/rtl.texi (Enumerated constants): Add concept index entries.
3284 2000-03-24 Ben Elliston <bje@redhat.com>
3286 * Makefile.am (stamp-cgen): Reinstate target.
3287 * Makefile.in: Regenerate.
3289 2000-03-22 Ben Elliston <bje@redhat.com>
3291 * slib/ppfile.scm: Remove; unused.
3292 * slib/defmacex.scm: Likewise.
3294 2000-03-21 Ben Elliston <bje@redhat.com>
3296 * doc/internals.texi (Source file overview): Document.
3298 * Makefile.am (GUILEDIR): Remove.
3299 (CGEN): Ditto. Callers use $(GUILE) instead.
3300 (GUILEFLAGS): Ditto.
3302 (APPDESCFILES): Ditto.
3303 (OPCODESFILES): Ditto.
3305 (pkgdata_SCRIPTS): Ditto.
3306 (stamp-cgen): Remove target.
3307 * Makefile.in: Regenerate.
3309 * configure.in: Remove header and library tests.
3310 * configure: Regenerate.
3311 * config.in: Likewise.
3313 2000-03-20 Ben Elliston <bje@redhat.com>
3315 * read.scm: Cease loading "hob-sup.scm".
3316 * utils.scm: Inherit the fastcall family of procedures (for now).
3317 * hob-sup.scm: Remove.
3319 2000-03-20 Ben Elliston <bje@redhat.com>
3321 * configure.in (AC_OUTPUT): Do not emit .gdbinit.
3322 * configure: Regenerate.
3323 * gdbinit.in: Remove.
3325 2000-03-17 Ben Elliston <bje@redhat.com>
3327 * Makefile.am (CGEN): Use guile, not cgen.
3328 (CGENCFLAGS, LIBIBERTY, INCLUDES): Remove.
3329 (bin_PROGRAMS, cgen_SOURCES): Likewise.
3330 (CGENFILES): Fold CGEN_HOB_INPUT_FILES and CGEN_NOHOB_FILES.
3331 (HOBBIT_INPUT_FILES, HOBBIT_OUTPUT_FILE): Remove.
3332 (HOB_OBJS): Likewise.
3333 (CGEN_HOB_SRC, CGEN_HOB_OBJ): Likewise.
3334 (CGENOBJS): Likewise.
3335 (cgen_DEPENDENCIES, cgen_LDFLAGS, cgen_LDADD): Likewise.
3336 (hobbit, hobbit.o, hobbit.c): Remove targets.
3337 (cos.o, cgen.o, cgen-gh.o, hob-sup.o): Likewise.
3338 (CLEANFILES): Update.
3339 * acconfig.h (WITH_HOBBIT): Remove.
3340 * configure.in: Do not test for 3 arg scm_make_vector. Remove
3341 option --with-cgen-hobbit.
3342 * cos.h, cos.c, hob-main.c, hob-sup.c, hob-sup.h, hob.sh: Remove.
3343 * cgen-gh.h, cgen-gh.c, cgen-hob.scm, cgen.c: Likewise.
3344 * hobbit.c, hobbit.h, hobbit.scm: Likewise.
3345 * hobscmif.h, hobslib.scm, scmhob.h: Likewise.
3346 * Makefile.in: Regenerate.
3347 * config.in: Likewise.
3348 * aclocal.m4: Likewise.
3349 * configure: Likewise.
3350 * README (Hobbit support): Remove.
3351 * doc/internals.texi (Conventions): Do not mention Hobbit.
3352 * doc/porting.texi (Supported Guile versions): Likewise.
3354 2000-03-16 Frank Ch. Eigler <fche@redhat.com>
3356 * sid-cpu.scm (-gen-sem-switch-engine): Adjust calling &
3357 callback convention to new sid sidutil::basic_cpu code.
3358 (-gen-sfrag-engine-fn): Ditto.
3359 * sid.scm (-create-virtual-insns!): Ditto.
3360 (-hw-gen-set-quiet-pc): Mark delay slot execution specially in pbb
3362 (cxmake-skip): Implement properly for pbb mode.
3364 2000-03-03 Ben Elliston <bje@redhat.com>
3366 * doc/internals.texi: New file.
3368 2000-02-29 Ben Elliston <bje@redhat.com>
3370 * doc/rtl.texi (Derived operands): Remove unnecessary footnote.
3371 * doc/porting.texi: Formatting tweaks.
3373 2000-02-25 Nick Clifton <nickc@cygnus.com>
3375 * desc-cpu.scm (*_cgen_cpu_open): Initialise signed_overflow_ok_p
3378 Thu Feb 24 14:09:01 2000 Doug Evans <devans@seba.cygnus.com>
3380 * operand.scm (<anyof-operand>,make!): Initialize mode-name, not
3383 2000-02-23 Andrew Haley <aph@cygnus.com>
3385 * m32r.cpu (pcmpbz): Make pcmpbz a special (i.e. hidden)
3388 2000-02-24 Ben Elliston <bje@redhat.com>
3390 * doc/rtl.texi (Derived operands): Add some cindex entries.
3392 2000-02-23 Ben Elliston <bje@redhat.com>
3394 * ia32.cpu (dndo): Move general purpose macro from here ..
3395 * simplify.inc (dndo): .. to here.
3397 2000-02-18 Frank Ch. Eigler <fche@redhat.com>
3399 * arm.cpu (h-tbit): Add c-call setter function.
3402 2000-02-17 Frank Ch. Eigler <fche@redhat.com>
3404 * sem-frags.scm (-frag-hash-compute!): Add appstuff arg for traversal.
3405 (-frag-cost-compute!): Ditto.
3406 * utils.scm (copyright-cygnus): Add Y2K.
3407 * sid-cpu.scm (@prefix@_pbb_run): Add unsigned& argument.
3409 2000-01-25 Nick Clifton <nickc@cygnus.com>
3411 * desc-cpu.scm (@arch@_cgen_cpu_open): Add code to initialise
3412 flags field of the CGEN_CPU_TABLE structure.
3414 Sun Dec 12 14:20:36 1999 Doug Evans <devans@seba.cygnus.com>
3416 * operand.scm (<anyof-instance>): Renamed from <anyof-value>.
3417 All references updated.
3419 Tue Nov 30 11:06:22 1999 Doug Evans <devans@seba.cygnus.com>
3421 * ia32.cpu: Rewrite addressing mode support.
3423 * ifield.scm (<ifield>): New member `follows'.
3424 (ifld-known-values): New proc.
3425 (<ifield>): New method set-word-offset!.
3426 (ifld-set-word-offset!): New proc.
3427 (ifld-new-word-offset): New proc.
3428 (<ifield>): New method next-word.
3429 (<multi-ifield>): New method next-word.
3430 (ifld-next-word): New proc.
3431 (ifld-precedes?): New proc.
3432 (-ifield-parse): New args word-offset,word-length,follows.
3433 All callers updated. Handle CISC-style vs RISC-style ifields.
3434 (-ifield-read): Recognize word-offset,word-length,follows specs.
3435 (-ifld-parse-follows): New proc.
3436 (-multi-ifield-make-default-insert): New proc.
3437 (-multi-ifield-make-default-extract): New proc.
3438 (-multi-ifield-parse): Provide default values for insert,extract
3439 handlers if not specified.
3440 (<derived-ifield>): New class.
3441 (derived-ifield?): New predicate.
3442 (ifld-derived-operand?): New predicate.
3443 (f-anyof): New global.
3444 (ifld-anyof?,ifld-anyof-operand?): New predicates.
3445 (f-derived,ifld-derived?): Delete.
3446 (ifield-builtin!): Delete init of f-derived. Init f-anyof.
3447 * insn.scm (-sub-insn-ifields): New proc.
3448 (-sub-insn-make!): New proc.
3449 (multi-insn-instantiate!): Provide initial implementation.
3450 (-insn-parse): If insn contains "anyof" operands, create a
3451 <multi-insn> object instead of a plain <insn>.
3452 (-parse-insn-format-symbol): Rewrite derived operand handling.
3453 Add anyof operand handling.
3454 (-parse-insn-format-ifield-spec): Rewrite.
3455 (-parse-insn-format-operand-spec): Delete.
3456 (-parse-insn-format-list): Delete support for `(operand value)'.
3457 (anyof-operand-format?): Replaces derived-operand-format?.
3458 * operand.scm (-operand-parse-getter): Improve error messages.
3459 (-operand-parse-setter): Ditto.
3460 (<derived-operand>): New members args,syntax,base-ifield,encoding,
3462 (<anyof-operand>): Change baseclass from <derived-operand> to
3463 <operand>. Delete member values. New members base-ifield,choices.
3464 (anyof-operand?): New predicate.
3465 (-derived-parse-encoding,-derived-parse-ifield-assertion): New procs.
3466 (-derived-operand-parse): Rewrite.
3467 (-derived-operand-read): Rewrite.
3468 (-anyof-parse-choice): New proc.
3469 (-anyof-operand-parse): Rewrite.
3470 (-anyof-operand-read,define-anyof-operand): New procs.
3471 (<anyof-value>): Rewrite.
3472 (-anyof-initial-known): New proc.
3473 (anyof-satisfies-assertions?): New proc.
3474 (-anyof-merge-syntax,-anyof-merge-encoding): New procs.
3475 (-anyof-merge-getter,-anyof-merge-setter): New procs.
3476 (-anyof-merge-semantics,-anyof-merge-ifield-assertion): New procs.
3477 (-anyof-merge-subchoices,-anyof-all-subchoices): New procs.
3478 (-anyof-value-from-derived): New proc.
3479 (-anyof-all-choices-1,anyof-all-choices): New procs.
3480 (operand-init!): Create define-anyof-operand reader command.
3482 * insn (syntax-break-out): Take syntax as argument instead of insn.
3483 All callers updated.
3484 (syntax-make): Move here, from ???.
3486 * types.scm (<bitrange>): Rename accessors from bitrange:foo to
3487 bitrange-foo. All uses updated.
3488 (bitrange-next-word): New proc.
3490 * semantics.scm (-solve-expr-fn,rtx-solve): New procs.
3492 * rtl.scm (rtx-canonicalize): Provide initial implementation.
3493 (rtx-make-const,rtx-make-enum): New procs.
3494 (rtx-arg1,rtx-arg2): Renamed from -rtx-arg[12]. All callers updated.
3495 (rtx-mem-addr,rtx-mem-sel): New procs.
3496 (rtx-change-address): New proc.
3497 (rtx-make-ifield,rtx-make-operand,rtx-make-local): New proc.
3498 (rtx-make-set,rtx-single-set?): New procs.
3499 (rtx-combine): New proc.
3501 * rtl.scm (rtx-traverse): New arg `appstuff'. All callers updated.
3502 (rtx-traverse-with-locals): Ditto.
3503 (-rtx-traverse,-rtx-traverse-*): Ditto.
3505 * rtl.scm (define-subr): New proc.
3506 (rtl-init!): Create reader command `define-subr'.
3508 * cos.c (_object_mi_p): Ensure argument is an object.
3509 (indent): New function.
3510 (_object_print_elms): Add pretty-printing support.
3511 (_object_print): Ditto.
3513 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall7.
3514 (*floats-s->c-fun-table*): Ditto.
3515 * hobbit.c,hobbit.h: Rebuild.
3516 * hob-sup.c (fastcall7): New proc.
3517 * hob-sup.h (fastcall7): Declare.
3518 * hob-sup.scm (fastcall7): New macro.
3520 * mach.scm (<arch>): New member subr-list.
3521 (current-subr-list,current-subr-add!,current-subr-lookup): New procs.
3522 (arch-finish!): Reverse recorded subr list.
3524 * read.scm (debug-env): New global.
3525 (debug-var-names,debug-var,debug-repl-env): New procs.
3526 (debug-repl): Rewrite. New arg `env-list'. All callers updated.
3527 (debug-quit): Renamed from `continue'.
3529 * simplify.inc (dsmf): New pmacro.
3531 * utils.scm (plus-scan): New proc.
3532 (split-bits): Rewrite.
3533 (split-value): New proc.
3535 1999-10-13 Doug Evans <devans@casey.cygnus.com>
3537 * doc/Makefile.am (DOCFILES): Add notes.texi.
3538 * doc/Makefile.in: Rebuild.
3540 1999-10-11 Doug Evans <devans@casey.cygnus.com>
3542 * ifield.scm (ifld-derived?): New proc.
3543 (f-derived): New global.
3544 (ifield-builtin!): Create ifield f-derived.
3545 (<multi-insn>): New class.
3546 (multi-insn?): New predicate.
3547 (multi-insn-instantiate!): New proc.
3548 (-insn-parse): Create <multi-insn> objects for insns with derived
3550 (-parse-insn-format-symbol): Handle derived ifields.
3551 (-parse-insn-format-ifield-spec): New proc.
3552 (-parse-insn-format-operand-spec): New proc.
3553 (-parse-insn-format-list): Simplify.
3554 (-parse-insn-format): No longer allow (ifield-object value) spec.
3555 (derived-operand-format?): New proc.
3556 (insn-alias?): New proc.
3557 (non-alias-insns): Rewrite.
3558 (insn-real?): Renamed from real-insn?, all callers updated.
3559 (virutal-insns): Rewrite.
3560 (multi-insns): New proc.
3561 * mach.scm (arch-analyze-insns!): Instantiate multi-insns if present.
3562 * operand.scm (op-ifield): Renamed from op:ifield, all callers updated.
3563 Return #f if operand doesn't have an index or if index is not an
3565 (hw-index-anyof): New proc.
3566 (-operand-parse): Allow integer indices.
3567 (<derived-operand>): New class.
3568 (derived-operand?): New predicate.
3569 (<anyof-operand>): New class.
3570 (<anyof-value>): New class.
3571 (-anyof-parse-value,-anyof-operand-parse): New procs.
3572 (-derived-operand-parse,-derived-operand-read): New procs.
3573 (define-derived-operand,define-full-derived-operand): New procs.
3574 (operand-init!): New reader command define-derived-operand.
3576 * utils.scm (list-take): Handle negative amount.
3577 (element?): Rewrite.
3579 1999-10-10 Doug Evans <devans@casey.cygnus.com>
3581 * dev.scm: quick-utils.scm renamed to ~/.cgenrc.
3583 1999-10-04 Richard Henderson <rth@cygnus.com>
3585 * ia64.cpu: Checkpoint.
3587 1999-09-29 Doug Evans <devans@casey.cygnus.com>
3589 * sim-cpu.scm (-gen-semantic-fn-table): Virtual insns are always valid.
3591 * sim.scm (sim-finish!,x-invalid): Always set pc. Set vpc based on
3592 default-insn-bitsize. Pass vpc to sim_engine_invalid_insn.
3594 Wed Sep 29 14:39:39 1999 Dave Brolley <brolley@cygnus.com>
3596 * sim.scm (sim-finish!): Don't call sim_io_error for invalid insn. Use
3597 PC returned by sim_engine_invalid_insn.
3599 1999-09-28 Doug Evans <devans@casey.cygnus.com>
3601 * ia32.cpu: New file.
3603 1999-09-25 Doug Evans <devans@casey.cygnus.com>
3605 * utils.scm (bit-set?): Fix off by one error.
3607 * rtl-c.scm (s-sequence): Fix non-void-mode result output.
3609 * rtl.scm (hw): Check for valid hardware element before trying to
3612 * arm.cpu (arm7f cpu): Renamed from arm. All users updated.
3613 * arm7.cpu (bx): Fix name of target address operand in assembler spec.
3614 (*): arm_compute_operand2_foo renamed to compute_operand2_foo.
3615 * thumb.cpu (*): arm_compute_operand2_foo renamed to
3616 compute_operand2_foo.
3618 * cgen-sid.scm (sim_arguments): Add support for building defs.h.
3619 * sid.scm (-hw-gen-set-quiet-pc): Handle #:delay modifier.
3620 Call delayed_branch/branch methods instead of assigning to `vpc'.
3621 (<hw-pc>,cxmake-skip): Call skip method.
3622 (-gen-hw-selector): Call rtl-c++ instead of rtl-c.
3623 (<pc>,cxmake-skip): Ditto.
3624 (-create-virtual-insns!): Ditto.
3625 (op:read): Call estate-make-for-normal-c++ instead of estate-...-c.
3627 (op:record-profile): Specify #:output-language "c++".
3628 * sid-cpu.scm (-gen-insn-attr-decls): Rename @cpu@_insn_attr to
3630 (cgen-desc.h): Use @arch@ namespace instead of @cpu@.
3632 (-gen-reg-access-defns): Use rtl-c++ instead of rtl-c.
3633 (gen-semantic-code): Ditto.
3634 (-gen-sem-case,-gen-sfrag-code): Ditto.
3635 (-gen-hardware-types): Delete class @cpu@_cpu_base.
3636 (cgen-cpu.h): File is now #included by main cpu class, rather than
3638 (cgen-defs.h): New proc.
3639 (-gen-scache-semantic-fn): Change result type to sem_status.
3640 New local `status'. Call done_cti_insn/done_insn method at end.
3641 (cgen-semantics.cxx): Include @cpu@.h instead of @arch@-main.h,
3643 (cgen-sem-switch.cxx): Ditto.
3644 * sid-decode.scm (-gen-idesc-decls): Update return type of
3646 (cgen-decode.h): Add using namespace @arch@.
3647 (cgen-decode.cxx): Include @cpu@.h instead of @arch@-main.h.
3649 * rtl-c.scm (<rtl-c-eval-state>): New member output-language.
3650 (estate-output-language-c?,estate-output-language-c++?): New procs.
3651 (<rtl-c-eval-state>,vmake!): Handle #:output-language.
3652 (estate-make-for-normal-rtl-c++): New proc.
3653 (rtl-c++-parsed,rtl-c++): New proc.
3654 (s-c-call): Invoke cpu class method if c++.
3655 (join): Use s-c-raw-call.
3657 * rtl-c.scm (subword): Don't pass current_cpu to SUBWORD.
3660 * rtl-c.scm (delay): Mark the sequence as #:delay'd.
3661 * rtl.scm (<eval-state>): New member `modifiers'.
3662 (<eval-state>,vmake!): Handle #:modifiers.
3663 (estate-with-modifiers): New proc.
3665 * rtl.scm (rtx-side-effects?): New proc.
3666 (rtx-canonical-bool): Don't change expr if it has side effects.
3667 * semantics.scm (-simplify-expr-fn): Handle exprs with side-effects
3670 1999-09-23 Doug Evans <devans@casey.cygnus.com>
3672 * sim.scm (gen-scache-type): Fix typo in last patch.
3674 Tue Sep 21 17:12:55 1999 Dave Brolley <brolley@cygnus.com>
3676 * sim.scm (gen-scache-type): Add last_insn_p flag for parallel support.
3678 1999-09-05 Doug Evans <devans@casey.cygnus.com>
3680 * sid.scm (<hw-pc>,cxmake-skip): New method.
3681 (<pc>,cxmake-skip): New method.
3683 * decode.scm (decode-build-table): Delete args startbit,index-list.
3684 All callers updated.
3685 * utils-sim.scm (gen-decoder): Delete args startbit,index-list.
3686 All callers updated.
3687 * sim-decode.scm (-gen-decode-fn): Always pass 0 for startbit
3688 to decode-get-best-bits.
3689 * sid-decode.scm (-gen-decode-fn): Ditto.
3691 * hardware.scm (hw-bits): New proc.
3692 (-hw-parse): New arg layout. All callers updated.
3693 (define-full-hardware): New arg layout. All callers updated.
3694 (-hw-validate-layout): New proc.
3695 (-hw-create-[gs]etter-from-layout): New procs.
3696 (<hw-register>,parse!): Handle layout spec.
3697 * types.scm (type-bits): New proc.
3699 * sem-frags.scm (-frag-cost-compute!): Fix calculation of
3700 UNARY, BINARY, TRINARY rtxs.
3702 * attr.scm (<enum-attribute>,parse-value): Allow strings.
3703 * enum.scm (parse-enum-vals): Use reverse! instead of reverse.
3704 Support '- as "unused spot" indicator.
3706 1999-09-03 Doug Evans <devans@casey.cygnus.com>
3708 * pgmr-tools.scm (pgmr-pretty-print-insn-format): Fix typo.
3710 1999-09-02 Doug Evans <devans@casey.cygnus.com>
3712 * rtx-funcs.scm (subword): Fix mode spec of `value'.
3714 * rtl.scm (-rtx-traverse-operands): Fix debugging message
3716 (tstate-make): New arg `depth'. All callers updated.
3717 (tstate-depth,tstate-set-depth!): New procs.
3718 (tstate-incr-depth!,tstate-decr-depth!): New procs.
3719 (-rtx-traverse-operands): Indent debugging output by traversal depth.
3720 (-rtx-traverse): Ditto. Keep track of traversal depth.
3722 1999-09-01 Doug Evans <devans@casey.cygnus.com>
3724 * sim-decode.scm (-gen-decoder+supporting cast): Move to utils-sim.scm.
3725 * sid-decode.scm (-gen-decoder+supporting cast): Ditto.
3726 * utils-sim.scm: Decoder generator support moved here.
3727 (-decode-equiv-entries?,-decode-sort-entries): New procs.
3728 (-gen-decoder-switch): Sort entries for more fall-throughs.
3730 * Makefile.am (gas-test,sim-test): Specify ISA when invoking cgen.
3731 * Makefile.in: Rebuild.
3732 * sim-test.scm (build-sim-testcase): Add logging message.
3733 * dev.scm (cload): Recognize SIM-TEST application.
3734 (load-stest): Set APPLICATION to SIM-TEST.
3736 * desc-cpu.scm (-gen-hash-defines): Add \n to output.
3738 * ifield.scm (-ifield-parse): Allow bit numbers up to 127.
3739 * mach.scm (-isa-parse): Allow insn bitsizes from 8 to 128.
3740 * mode.scm (mode-make-int,mode-make-uint): Allow values up to 64 bits.
3742 * insn.scm (syntax-break-out): Handle ${foo}.
3744 Sun Aug 29 11:11:15 1999 Doug Evans <devans@canuck.cygnus.com>
3746 * Makefile.am (noinst_PROGRAMS,noinst_LIBRARIES): Delete.
3747 (bin_PROGRAMS): Define.
3748 (CGEN_HOB_INPUT_FILES): Remove $(srcdir)/.
3749 (cgen-hob.c): Prepend $(srcdir)/ here.
3750 (APPDESCFILES,OPCODESFILES,SIMFILES,pkgdata_SCRIPTS): Define.
3751 (libcpu_a_SOURCES): Delete.
3752 (cgen_DEPENDENCIES,cgen_LDADD): Rewrite.
3753 (CGEN_HOB_OBJ,CGENOBJS): New variables.
3754 * configure.in (LIBS): Replace -Wl,-rpath with -R.
3755 Add AC_CHECK_LIB(guile,main).
3756 * Makefile.in: Rebuild.
3757 * doc/Makefile.in: Rebuild.
3758 * aclocal.m4: Rebuild.
3759 * config.in: Rebuild.
3760 * configure: Rebuild.
3762 1999-08-28 Doug Evans <devans@casey.cygnus.com>
3764 Rename rtx functions from name: to name, accept optional leading
3766 VM -> VOID, DM -> DFLT, use DFLT instead of VM for default mode.
3767 * attr.scm (-attr-eval): Update.
3768 * hardware.scm (hw-mode-ok?): Rename arg mode to new-mode-name.
3769 (<hw-register>,mode-ok?): Disallow VOID.
3770 (<hw-immediate>,mode-ok?): Disallow VOID.
3771 (<hw-address>,mode-ok?): Disallow VOID.
3772 * mode.scm (mode-name?): New proc.
3773 (VOID): Renamed from VM.
3774 (DFLT): Renamed from DM.
3775 (mode-builtin!): Update.
3776 * opcodes.scm (<ifield>,gen-insert): Update.
3777 (<ifield>,gen-extract): Update.
3778 (<multi-ifield>,gen-insert,gen-extract): Update.
3779 * operand.scm (op:mode): Update.
3780 (<pc>,make!): Update.
3781 (op:new-mode): Update.
3782 (-operand-read): Update.
3783 * rtl.scm (-rtx-valid-types): Add OPTIONS, EXPLNUMMODE,
3784 NONVOIDMODE, DFLTMODE. Rename VMMODE to VOIDMODE.
3785 (def-rtx-dual-mode,define-rtx-dual-mode): Delete.
3786 (-rtx-lazy-sem-mode): Renamed from -rtx-mode. All callers updated.
3787 (rtx-make): Call -rtx-munge-mode&options.
3788 (rtx accessors): Rewrite.
3789 (rtx-pretty-name): Update.
3790 (-rtx-traverse-*): Update.
3791 (-rtx-traverse-explnummode,-rtx-traverse-nonvoidmode): New procs.
3792 (-rtx-traverse-voidmode,-rtx-traverse-dfltmode): New procs.
3793 (-rtx-make-traverse-table): Update.
3794 (-rtx-traverse-operands): Update.
3795 (-rtx-option?,-rtx-option-list?): New procs.
3796 (-rtx-munge-mode&options): New proc.
3797 (-rtx-traverse-expr): Call -rtx-munge-mode&options.
3798 (-rtx-traverse): Update.
3799 (rtx-traverse,rtx-traverse-with-locals,rtx-compile): Update.
3800 (rtx-compile-time-constant?): Update.
3801 (rtx-true?,rtx-false?,rtx-true,rtx-false): Update.
3802 (rtx-value): Update.
3803 (hw,reg,mem): Renamed from foo:. Update. All callers updated.
3804 * rtx-funcs.scm (*): Update.
3805 * rtl-c.scm (rtl-c-get): Update.
3806 (rtl-c-set-quiet,rtl-c-set-trace): Update.
3807 (s-c-call,s-c-raw-call): Update.
3808 (s-boolifop,s-convop,s-if,s-cond): Update.
3809 (s-case-vm,-gen-non-vm-case-test,s-case): Update.
3810 (-par-replace-set-dests,-par-replace-set-srcs): Update.
3811 (s-parallel,s-sequence): Update.
3812 (rtl-c-build-table): Update.
3813 * sem-frags.scm (-frag-hash-compute!): Update.
3814 (-frag-cost-compute!): Improperly handle unary,binary,trinary ops
3815 for temporary bug compatibility with previous version.
3816 (-frag-expr-locals,-frag-expr-stmts): Update.
3817 (-frag-compute-desired-frags,-frag-pick-best): Update.
3818 * semantics.scm (-simplify-expr-fn): Update.
3819 (rtx-simplify): Update.
3820 (-rtx-ref-type): Update. Account for modifiers.
3821 (-build-operand!,-build-reg-operand!,-build-mem-operand!): Update.
3822 (-build-ifield-operand!): Update.
3823 (-build-known-values): Update.
3824 (semantic-compile): Update.
3825 (-gen-reg-access-defns): Update.
3826 (gen-semantic-code,-gen-sem-case): Update.
3827 (-gen-sfrag-code,-gen-sfrag-case): Update.
3828 * sim-cpu (gen-semantic-code): Update.
3829 * sim.scm (<hw-pc>,gen-write,cxmake-skip): Update.
3830 (<hw-register>,gen-write,gen-set-macro,cxmake-get-raw): Update.
3831 (-hw-cxmake-get): Update.
3832 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3833 (<hw-index>,cxmake-get): Update.
3834 (<operand>,gen-type,gen-read,cxmake-get): Update.
3835 (<operand>,gen-set-quiet,gen-set-trace): Update.
3836 (<pc>,cxmake-get): Update.
3837 (sim-finish!): Update.
3838 * utils-gen.scm (-gen-ifld-extract-base): Update.
3839 (-gen-ifld-extract-beyond): Update.
3840 (gen-multi-ifld-extract): Update.
3841 * sid-decode.scm (-decode-expr-ifield-values-used): Update.
3842 * sid.scm (<hw-pc>,gen-write): Update.
3843 (-gen-decode-insn-globals): Update.
3844 (-hw-cxmake-get): Update.
3845 (<hw-register>,cxmake-get-raw): Update.
3846 (<hw-memory>,cxmake-get,gen-set-quiet,gen-write): Update.
3847 (<hw-index>,cxmake-get): Update.
3848 (<operand>,gen-type,gen-read,cxmake-get): Update.
3849 (<operand>,gen-set-quiet,gen-set-trace): Update.
3850 (<pc>,cxmake-get): Update.
3851 (-create-virtual-insns!): Update.
3852 (-decode-split-build-assertion): Update.
3854 * simplify.inc: Update.
3856 1999-08-20 Doug Evans <devans@casey.cygnus.com>
3858 * sim.scm (-op-gen-queued-write): Fix memory address calculation.
3859 Prefix queue function name with sim_ instead of @cpu@_.
3861 * sim.scm (-with-parallel-only?): New global.
3862 (option-init!): Initialize it.
3863 (option-set!): Set it.
3864 (with-parallel-only?): New proc.
3865 * sim-decode.scm (-gen-decode-insn-globals): Don't include parallel
3866 and writeback markers if with-parallel-only.
3867 (-gen-idesc-init-fn): Update.
3868 * sim-cpu.scm (cgen-cpu.h): Don't generate struct parexec if
3871 Wed Aug 18 15:04:30 1999 Doug Evans <devans@canuck.cygnus.com>
3873 * sim-cpu.scm (-gen-semantic-fn-table): Handle unsupported insns
3874 with the invalid insn handler.
3876 * utils.scm (list-maybe-ref): New proc.
3878 * mach.scm (-isa-parse): Signal error if isa wasn't specified in
3880 (-mach-parse): Signal error if mach wasn't specified in define-arch.
3882 * i960.cpu (test*-*): Delete `expr' arg.
3883 (test-op,branch-op): Update.
3885 1999-08-09 Doug Evans <devans@casey.cygnus.com>
3887 * sim.scm (gen-reg-getter-fn,gen-reg-setter-fn): New procs.
3888 (gen-reg-access-decl): Replace `name' arg with `hw'. All callers
3890 (gen-reg-access-defn): Ditto.
3891 (-gen-hw-addr): Rewrite.
3892 (-op-gen-queued-write): Rewrite.
3893 * sim-cpu.scm (-gen-cpu-reg-access-decls):
3894 (-gen-scache-semantic-fn): Handle with-generic-write.
3895 (-gen-no-scache-semantic-fn): Ditto.
3897 1999-08-08 Doug Evans <devans@casey.cygnus.com>
3899 * utils-gen.scm (gen-define-ifmt-ifields): Tweak output.
3901 * sim.scm (-with-generic-write?): New global.
3902 (option-init!): Initialize it.
3903 (option-set!): Set it.
3904 (with-generic-write?): New proc.
3905 (-gen-hw-addr): New proc.
3906 (-op-gen-queued-write): New proc.
3907 (-op-gen-set-{quiet,trace}-parallel): Use it if with-generic-write?.
3909 * sim-cpu.scm (-gen-hardware-types): Output code with parallel support
3911 (-gen-sem-switch): Preserve existing with-parallel? value.
3912 (-gen-sem-parallel-switch): Ditto.
3913 (-gen-write-case): Add /indent support.
3914 (cgen-write.c): Rewrite.
3916 * utils.scm (-current-print-state): New global.
3917 (make-print-state): New proc.
3918 (pstate-indent,pstate-set-indent!): New procs.
3919 (pstate-cmd?,pstate-cmd-do): New procs.
3920 (/indent): New global.
3921 (/indent-set,/indent-add): New procs.
3922 (string-write): Set -current-print-state.
3923 (-string-write): New arg pstate, all callers updated.
3924 Handle print-state commands.
3925 (-string-list-flatten): New proc.
3926 (string-list->string): Use it.
3928 * sim-cpu.scm (-gen-sem-fn-name): Move here from sim-decode.scm.
3929 (-gen-sem-fn-table-entry): New proc.
3930 (-gen-semantic-fn-table): New proc.
3931 (-gen-scache-semantic-fn): Make fn static.
3932 (-gen-no-scache-semantic-fn): Ditto.
3933 (cgen-semantics.c): Define macro SEM_FN_NAME.
3934 * sim-decode.scm (-gen-decode-insn-globals): Delete FMT,TYPE,IDX,
3935 FAST,FULL. Update @cpu@_insn_sem contents.
3936 (-gen-semf-fn-name): Delete.
3937 (-gen-sem-fn-decls): Delete.
3938 (-gen-idesc-decls): Output prototypes of @cpu@_sem_init_idesc_table,
3939 @cpu@_semf_init_idesc_table.
3940 (-gen-idesc-init-fn): Update. Don't initialize pointers to semantic
3942 (cgen-decode.h): Print sfmt enum.
3943 * sid-decode.scm (-gen-semf-fn-name): Delete.
3944 * utils-gen.scm (gen-sfmt-enum-decl): New proc.
3946 * iformat.scm (sfmt-build): Rename sformats from fmt-foo to sfmt-foo.
3947 (ifmt-compute!): Ditto.
3948 * sim-decode.scm (-gen-decoder-switch): Ditto.
3949 * sid-decode.scm (-gen-decode-expr-entry): Ditto.
3950 (-gen-decoder-switch): Ditto.
3952 * insn.scm (insn-virtual?): New proc.
3954 * enum.scm (gen-enum-decl): Speed up, build string as list and then
3956 * mach.scm (<arch>): attr-list is now a pair of lists.
3957 (current-attr-list): Rewrite.
3958 (current-attr-add!,current-attr-lookup): Rewrite.
3959 * sim.scm (gen-cpu-insn-enum-decl): Replace append with append!.
3961 1999-08-06 Richard Henderson <rth@cygnus.com>
3963 * ia64.cpu: Initial checkpoint.
3965 1999-08-06 Doug Evans <devans@casey.cygnus.com>
3967 * pmacros.scm (-pmacro-apply): Fix definition, takes only 1 arg.
3968 (pmacros-init!): Update .apply help string.
3970 1999-08-03 Doug Evans <devans@casey.cygnus.com>
3972 * sim.scm (-hw-gen-set-quiet-pc): Update call to SEM_BRANCH_VIA_CACHE.
3973 (<hw-pc>,cxmake-skip): New method.
3974 (<pc>,cxmake-skip): New method.
3975 (-gen-argbuf-fields-union): Add branch_target to `chain' member.
3976 (gen-argbuf-type): New member `skip_count'.
3977 (sim-finish!): Update calls to @cpu@_pbb_cti_chain.
3978 * utils-cgen.scm (atlist-cti?): Don't include SKIP-CTI insns.
3980 * utils-sim.scm: New file.
3981 * dev.scm (load-sim): Load it.
3982 (load-sid): Load it.
3983 * cgen-sid.scm: Load it.
3984 * cgen-sim.scm: Load it.
3985 * iformat.scm (<sformat>): New member sbuf, not initialized by
3987 * rtx-funcs.scm (skip): Rewrite.
3988 * rtl-c.scm (skip): Rewrite.
3989 * m32r.cpu (sc,snc): Update `skip' usage.
3990 * mode.scm (mode-real-mode): New proc.
3991 * sem-frags.scm (-frag-split-by-sbuf): Rename from -frag-split-by-sfmt.
3992 Distinguish fragments by the <sformat-abuf> they use.
3993 * sim.scm (gen-profile-index-type): Delete.
3994 (ifield argbuf support): Move to utils-sim.scm and sim-decode.scm.
3995 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
3996 (hardware argbuf support): Move to utils-sim.scm and sim-decode.scm.
3997 (operand argbuf support): Move to utils-sim.scm and sim-decode.scm.
3998 (-gen-argbuf-elm): Rewrite.
3999 (-gen-argbuf-hw-elm): Delete.
4000 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4002 (-sim-sformat-argbuf-list,-sim-insns-analyzed?): New globals.
4003 (sim-init!): Initialize them.
4004 (sim-analyze-insns!): Set them.
4005 (current-sbuf-list): New proc.
4006 * sim-cpu.scm (-gen-no-scache-semantic-fn): Update calls to
4007 gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns.
4008 * sim-model.scm (-gen-model-insn-fn): Ditto.
4009 * sim-decode.scm (-gen-extract-decls): Delete.
4010 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4011 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4013 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4014 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4015 (-gen-op-extract,-gen-op-trace-extract): New procs.
4016 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4017 gen-sfmt-argvars-foo and rewrite.
4018 (-gen-record-args): Rewrite.
4019 (-gen-extract-case): Tweak.
4020 * sid.scm (gen-profile-index-type): Delete.
4021 (ifield argbuf support): Move to utils-sim.scm.
4022 (-gen-ifld-decoded-val): Delete, use gen-extracted-ifld-value instead.
4023 (hardware argbuf support): Move to utils-sim.scm and sid-decode.scm.
4024 (operand argbuf support): Move to utils-sim.scm and sid-decode.scm.
4025 (-sim-sformat-argbuf-list): New global.
4026 (sim-init!): Initialize it.
4027 (sim-analyze-insns!): Set it.
4028 (current-sbuf-list): New proc.
4029 * sid-decode.scm (-gen-argbuf-elm): Rewrite.
4030 (-gen-argbuf-hw-elm): Delete.
4031 (-gen-argbuf-fields-union): Generate structs for each sbuf instead
4033 (-gen-record-argbuf-ifld,-gen-trace-argbuf-ifld): New procs.
4034 (-gen-extract-decls): Delete.
4035 (<hardware-base>,gen-extract,gen-trace-extract): Move here from
4037 (<hw-register,gen-extract,gen-trace-extract): Ditto.
4038 (<hw-address,gen-extract,gen-trace-extract): Ditto.
4039 (-gen-op-extract,-gen-op-trace-extract): New procs.
4040 (gen-sfmt-op-argbuf-defns,gen-sfmt-op-argbuf-assigns): Rename from
4041 gen-sfmt-argvars-foo and rewrite.
4042 (-gen-record-args): Rewrite.
4043 (-gen-extract-case): Tweak.
4045 * cgen-gh.c (gh_putc,gh_puts): New functions.
4046 * cgen-gh.h (gh_putc,gh_puts): Declare them.
4047 * cos.c (_object_print_elms,_object_print): Use them.
4048 * hob-sup.c (fastcall_print): Use them.
4049 * configure.in: Check for scm_gen_puts, scm_puts.
4050 * config.in: Rebuild.
4051 * configure: Rebuild.
4052 * aclocal.m4: Rebuild.
4053 * Makefile.in: Rebuild.
4055 * dev.scm (load-opc): Use load instead of maybe-load.
4056 (load-gtest,load-sim,load-stest): Ditto.
4059 1999-07-23 Doug Evans <devans@casey.cygnus.com>
4061 * sid-cpu.scm (-gen-sem-switch-engine): Move definition of `count'
4062 up to avoid g++ 'goto crosses initialization' warning.
4063 (-gen-sfrag-engine-fn): Delete vpc arg to NEXT_FRAG.
4064 (-gen-sfrag-case): Update use of NEXT_FRAG.
4066 1999-07-22 Doug Evans <devans@casey.cygnus.com>
4068 * cos.c (cos_init): Protect _make_x_symbol from garbage collection.
4070 * read.scm: Load sem-frags.scm.
4071 * sem-frags.scm (*): Lots rewritten.
4072 * sid.scm (-with-sem-frags?): New global
4073 (with-sem-frags?): New proc.
4074 (option-init!): Initialize -with-sem-frags?.
4075 (option-set!): Recognize with-sem-frags.
4076 (sim-init!): Call sim-sfrag-init! if with-sem-frags.
4077 * sid-cpu.scm (cgen-sem-switch.cxx): Generate semantic frag version
4079 (-gen-sfrag-engine-decls): New proc.
4080 (-gen-sfrag-code,-gen-sfrag-case,-gen-sfrag-enum-decl): New procs.
4081 (-gen-sfrag-engine-frag-table,-gen-sfrag-engine-fn): New procs.
4082 (-gen-sfrag-engine): New proc.
4083 (-gen-sem-case): Emit setup-semantics if specified.
4084 (-gen-sem-switch-engine): Update init/use of computed goto label.
4085 * sid-decode.scm (-gen-decode-expr-entry): Fetch ifield values
4087 (-gen-idesc-decls): Replace sem_address with cgoto.
4088 (-gen-scache-decls): Rewrite definition of `execute' member.
4089 * arm.cpu (arm isa): Enable decode-splits.
4090 * arm7.cpu (multiply insns): Rename result to mul-result.
4092 Rename decode-specialize to decode-split.
4093 * decode.scm (*): Update.
4094 * insn.scm (*): Update.
4095 * mach.scm (*): Update.
4096 * sid.scm (*): Update.
4098 1999-07-19 Doug Evans <devans@casey.cygnus.com>
4100 Record objects as a smob.
4101 * cos.c (scm_tc16_object): New static global.
4102 (cos_init): Initialize it.
4103 (OBJECT_P,OBJECT_ELEMENTS,OBJECT_CLASS_DESC): Update macros.
4104 (OBJECT_CLASS,OBJECT_ELEMENT_OFFSET): Update.
4105 (_object_tag): Delete.
4106 (_object_make_smob): New function.
4107 (_object_make_x,_object_make_with_values_x): Rewrite.
4108 (_object_elements,_object_class_desc): Rewrite.
4109 (_object_copy,object_p): Rewrite.
4110 (_object_specialize): Rewrite.
4111 (_object_print_elms,_object_print): New functions.
4112 (object_smob): New static global.
4113 (default_make_x): Use OBJECT_ELEMENT_OFFSET instead of magic number.
4115 * cos.c (_make_x_symbol): New static global.
4116 (object_make): Use it.
4117 (cos_init): Initialize it.
4119 1999-07-15 Doug Evans <devans@casey.cygnus.com>
4121 * rtl-c.scm (ifield): Back out last patch, use estate-ifield-var?
4122 instead to determine whether to use FLD macro.
4123 (<rtl-c-eval-state>): New member ifield-var?.
4124 (<rtl-c-eval-state>,vmake!): Recognize #:ifield-var?.
4125 * utils-gen.scm (-gen-ifld-extract-base): Specify #:ifield-var? #f.
4126 (-gen-ifld-extract-beyond,gen-multi-ifld-extract): Ditto.
4128 * rtl.scm (rtx-sequence-assq-locals): New proc.
4130 * cos.scm (-object-error): Don't crash on non-objects.
4132 * Makefile.am (CLEANFILES): Add hobbit.
4133 * Makefile.in: Rebuild.
4135 * rtl-c.scm (s-c-call): Delete unnecessary code.
4137 1999-07-14 Doug Evans <devans@casey.cygnus.com>
4139 * rtl-c.scm (ifield): Always reference value via `FLD'.
4141 * cos.c (elm_bound_p): Return problem SCM boolean values.
4143 * utils-cgen.scm (display-argv): New proc.
4144 * cgen-opc.scm (cgen): Call it.
4145 * cgen-sim.scm (cgen): Ditto.
4146 * cgen-gas.scm (cgen): Ditto.
4147 * cgen-stest.scm (cgen): Ditto.
4148 * cgen-sid.scm (cgen): Ditto.
4150 1999-07-05 Doug Evans <devans@casey.cygnus.com>
4152 * opc-asmdis.scm (-gen-parse-switch): New local var `junk'.
4153 * opc-ibld.scm (-gen-insert-switch): Initialize result to NULL.
4154 (-gen-extract-switch): Initialize result to 1.
4155 * opcodes.scm (gen-ifield-default-type): New proc.
4156 (gen-ifield-value-decl): Renamed from gen-ifield-type. All callers
4158 (<hw-index>,gen-insert): Handle non-ifield indices.
4159 (<hw-index>,gen-extract): Ditto.
4160 (<hw-asm>,gen-parse): Ditto.
4161 (<hw-asm>,gen-print): Ditto.
4162 (<keyword>,gen-parse): Ditto.
4163 (<keyword>,gen-print): Ditto.
4164 (<operand>,gen-fget): Ditto.
4165 (<operand>,gen-fset): Ditto.
4167 * sim.scm (-gen-hw-index-raw): Handle scalar indices.
4168 (-gen-hw-index): Ditto.
4169 * sid.scm (-gen-hw-index-raw): Handle scalar indices.
4170 (-gen-hw-index): Ditto.
4172 * sem-frags.scm: New file.
4174 * attr.scm (attr-parse): Add better checking of input.
4176 * hardware.scm (-hw-parse-getter): Renamed from -hw-parse-get.
4178 (-hw-parse-setter): Renamed from -hw-parse-set. All uses updated.
4180 * ifield.scm (ifld-nil?): New proc.
4182 * operand.scm (<operand>): New members getter,setter.
4183 (<operand>,make!): New args getter,setter. All uses updated.
4184 (op:getter,op:setter): New procs.
4185 (<hw-index>,field-start): Return 0 for non-ifield indices.
4186 (<hw-index>,field-length): Return 0 for non-ifield indices.
4187 (-operand-parse-getter,-operand-parse-setter): New procs.
4188 (-operand-parse): New args getter,setter. All callers updated.
4189 Always use hw-index-scalar for scalar operands.
4190 (-operand-read): Handle getter,setter.
4191 (define-full-operand): New args getter,setter. All uses updated.
4192 * semantics.scm (-build-ifield-operand!): Update.
4193 (-build-index-of-operand!): Update.
4194 * sim.scm (<operand>,cxmake-get): If operand has getter, use it.
4195 * simplify.inc (define-normal-operand): Update.
4197 * rtl.scm (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4198 * rtl-c.scm (s-unop): Indirect fp ops through fpu op vector.
4199 (s-binop,s-cmpop,s-convop): Ditto.
4200 (abs,sqrt,cos,sin,min,max,umin,umax): New rtx fns.
4201 * sparc.cpu (insn-fmt2): Add FPOPS1,FPOPS2.
4202 (fcc-tests): New insn-enum.
4203 (fcc-value): Rename from fcc-type.
4204 * sparcfpu.cpu: New file. All fp support moved here.
4206 * rtl.scm (<rtx-func>): New member class.
4207 (rtx-class-*?): New procs.
4208 (def-rtx-node): New arg class. All callers updated.
4209 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-dual-node): Ditto.
4210 * rtx-funcs.scm (*): Specify class.
4212 * utils-cgen.scm (context-make-reader): New proc.
4214 * utils.scm (assert-fail-msg): New variable.
4216 (list-drop,list-tail-drop): New procs.
4218 1999-06-22 Doug Evans <devans@casey.cygnus.com>
4220 * desc-cpu.scm (-gen-hash-defines): Restore generation of
4221 CGEN_MIN_INSN_SIZE deleted on March 22.
4223 * ifield.scm (<ifield>,needed-iflds): New method.
4224 (<multi-ifield>,needed-iflds): New method.
4225 (ifld-needed-iflds): New proc.
4226 (multi-ifield?): New proc.
4227 * iformat.scm (<sfmt>): Delete member ifmt. New members length,iflds.
4228 (-sfmt-search-key): Include insn length in key.
4229 (-sfmt-order-iflds,-sfmt-used-iflds): New procs.
4230 (<fmt-desc>): Delete members ifmt-key,sfmt-key. New member used-iflds.
4231 (-ifmt-lookup-ifmt!): Compute key here.
4232 (-ifmt-lookup-sfmt!): Compute key here. Delete arg ifmt.
4233 All callers updated.
4234 (ifmt-build): Delete arg desc. New args search-key,iflds.
4235 All callers updated.
4236 (sfmt-build): Delete args desc,ifmt. New args search-key,cti?,
4237 in-ops,out-ops,sorted-used-iflds. All callers updated.
4238 * minsn.scm (minsn-make-alias): Use insn-set-ifmt!. Update call
4240 * operand.scm (op-iflds-used): New proc.
4241 * utils-gen.scm (gen-ifld-type): Move here from sim.scm
4243 And from sid.scm,sid-cpu.scm as well.
4244 (gen-ifld-extract-decl,-gen-ifld-extract-base): Ditto.
4245 (-gen-extract-word,-gen-ifld-extract-beyond): Ditto.
4246 (gen-ifld-extract,gen-multi-ifld-extract): Ditto.
4247 (gen-extracted-ifld-value): Ditto.
4248 (-extract-chunk-specs): Ditto.
4249 (gen-define-ifields,gen-define-ifmt-ifields): Ditto.
4250 (-extract-chunk,-gen-extract-beyond-var-list): Ditto.
4251 (gen-extract-ifields,gen-extract-ifmt-ifields): Ditto.
4252 (-extract-insert-subfields): New function.
4253 * sim.scm (gen-record-argbuf-ifld): Renamed from gen-ifld-extract.
4254 (gen-record-argvar-ifld): Renamed from gen-ifld-extract-argvar.
4255 * sim-cpu.scm (-gen-extract-ifmt-macro): Replace calls to
4256 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4258 (-gen-no-scache-semantic-fn): Ditto.
4259 (-gen-sem-case): Ditto.
4260 (-gen-read-case): Update calls to gen-define-ifields,
4261 gen-extract-ifields.
4262 * sim-decode.scm (-gen-record-args): Update.
4263 (-gen-sfmt-argvars-assigns): Update.
4264 (-gen-extract-case): Update.
4265 * sim-model.scm (-gen-model-insn-fn): Replace calls to
4266 gen-define-ifields with gen-define-ifmt-ifields. Ditto for
4268 * sid.scm (gen-ifld-argbuf-defn): Use gen-ifld-type.
4269 (gen-record-argbuf-ifld): Rename from gen-ifld-extract.
4270 (gen-record-argvar-ifld): Rename from gen-ifld-extract-argvar.
4271 * sid-decode.scm (-gen-decode-expr-entry): Update calls to
4272 gen-define-ifields, gen-extract-ifields.
4273 (-gen-record-args): Update.
4274 (gen-sfmt-argvars-assigns): Update.
4275 (-gen-extract-case): Replace calls to gen-define-ifmt-ifields
4276 with gen-define-ifields. Ditto for gen-extract-foo.
4277 (-gen-decode-fn): Use gen-ifld-extract-decl/gen-ifld-extract
4278 procs rather than method calls.
4280 1999-06-18 Doug Evans <devans@casey.cygnus.com>
4282 * sid.scm (-create-virtual-insns!): New local `context', pass it
4285 * rtl.scm (-rtx-traverse): Output symbol shortcuts in source form,
4286 (operand name) not (operand object), (local name) not (local object).
4287 (rtx-traverse-with-locals): New proc.
4288 (-compile-expr-fn): New proc.
4289 (rtx-compile): Rewrite.
4290 * rtl-c.scm (rtl-c-get): Handle operand/local names for src arg.
4291 (rtl-c-set-quiet): Don't accept operand/local names for dest arg.
4292 (rtl-c-set-trace): Ditto.
4293 (operand define-fn): Recognize operand name argument.
4294 (local define-fn): Recognize sequence temp name argument.
4295 * rtx-funcs.scm (operand): Argument is operand name, not object,
4296 so call current-op-lookup.
4297 (local): Similarily, so call rtx-temp-lookup.
4299 * rtl.scm (rtx-field?): Use rtx-name instead of car.
4300 (rtx-operand?): Ditto.
4301 (rtx-pretty-name): Ditto.
4302 (rtx-local-obj): Flag symbol argument as an error.
4303 (rtx-local-name): New proc.
4304 (rtx-sequence-locals,rtx-sequence-exprs): New procs.
4306 * rtl.scm (-rtx-traverse-operands): Fix debugging output of arg-types.
4308 * read.scm (debug-repl): Renamed from -debug-repl. All callers
4311 * arm7.cpu (do-word/byte-store): Use (trunc: QI rd) rather than
4314 * hobbit.scm (*reckless-s->c-fun-table*): Add fastcall4, fastcall6.
4315 (*floats-s->c-fun-table*): Ditto.
4316 * hobbit.c,hobbit.h: Rebuild.
4317 * rtl.scm (-rtx-traverse-expr): Use fastcall6.
4318 * semantics.scm (rtx-simplify): Use /fastcall-make.
4320 * iformat.scm (-sfmt-search-key): Don't include memory modes.
4322 * insn.scm (<insn>): Delete members condition, compiled-condition.
4323 (<insn>,make!): Update
4324 (<insn> getters,setters): Update.
4325 (-insn-parse,insn-read,define-full-insn): Update.
4326 * minsn.scm (minsn-make-alias): Update.
4327 * iformat.scm (ifmt-analyze): Delete insn-condition reference.
4328 (ifmt-compute!): Ditto.
4329 * sim.scm (sim-finish!): Update.
4330 * simplify.inc: (define-normal-insn): Update.
4331 * sid-cpu.scm (gen-semantic-code): Update.
4333 * iformat.scm (-ifmt-lookup-ifmt!): Use insn-set-ifmt!.
4334 (-ifmt-lookup-sfmt!): Use insn-set-sfmt!.
4335 (ifmt-compute!): Ditto.
4337 1999-06-16 Doug Evans <devans@casey.cygnus.com>
4339 * minsn.scm (minsn-compute-iflds): Print better error message for
4342 1999-06-12 Doug Evans <devans@casey.cygnus.com>
4344 * rtl.scm (tstate->estate): Don't copy over expr-fn.
4346 * Makefile.am (HOBFLAGS): New variable.
4347 (cgen-hob.c): Use it.
4349 (libcpu_a_SOURCES): Add hob-sup.c.
4350 (hob-sup.o): New rule.
4351 * Makefile.in: Rebuild.
4352 * cgen.c: #include hob-sup.h.
4353 (cgen_init_c): Call hobbit_init_support.
4354 * hobbit.scm (*fastcall-make*,*c-symbol*): New variables.
4355 (*special-scm->c-functions*): Add them.
4356 (display-c-expression): Handle *c-symbol*.
4357 (*reckless-s->c-fun-table*): Add *fastcall-make*, fastcall5.
4358 (*floats-s->c-fun-table*): Ditto.
4359 (normalize): Recognize /fastcall-make.
4360 (normalize-fastcall-make): New proc.
4361 * hobbit.c,hobbit.h: Rebuild.
4362 * hob-sup.scm: New file.
4363 * hob-sup.c: New file.
4364 * hob-sup.h: New file.
4365 * read.scm: Load hob-sup.scm.
4366 * rtl.scm (-rtx-name-list): New variable.
4367 (rtx-name-list): New proc.
4368 (rtx-lookup): Try symbol first.
4369 (def-rtx-node): Add name to -rtx-name-list.
4370 (def-rtx-syntax-node,def-rtx-operand-node,def-rtx-macro-node): Ditto.
4371 (-rtx-traverse-anymode): New proc.
4372 (-rtx-traverse-{emode,intmode,floatmode,nummode,vmmode}): New procs.
4373 (-rtx-traverse-{rtx,setrtx,testrtx,condrtx,casertx}): New procs.
4374 (-rtx-traverse-{locals,env,attrs,symbol,string,number}): New procs.
4375 (-rtx-traverse-{symornum,object}): New procs.
4376 (-rtx-make-traverse-table): Rewrite.
4377 (-rtx-traverse-operands): Rewrite arg-types handling.
4378 Handle #f result of traverser.
4379 (-rtx-traverse): Renamed from -rtx-traverse-normal.
4380 Move debug handling here.
4381 (-rtx-traverse-debug): Delete.
4382 (rtl-finish!): Change -rtx-traverse-table into list of handlers
4384 * semantics.scm (semantic-compile:process-expr!): Fix call to
4386 * utils.scm (map1-improper): New proc.
4388 1999-06-08 Doug Evans <devans@casey.cygnus.com>
4390 * arm.sim (h-tbit): Replace FUN-ACCESS with FUN-SET.
4392 * sid.scm (-hw-cxmake-get): s/FUN-ACCESS/FUN-GET/.
4393 (-hw-gen-set-quiet): s/FUN-ACCESS/FUN-SET/.
4394 (<operand>,cxmake-get): Tweak.
4395 (sim-finish!): Delete FUN-ACCESS attribute. Create FUN-GET,FUN_SET.
4397 1999-06-07 Doug Evans <devans@casey.cygnus.com>
4399 * thumb.cpu (dnti): Delete timing spec.
4402 * arm.cpu (arm isa): New fields condition, setup-semantics.
4403 (thumb isa): New field setup-semantics.
4404 (h-gr): Add attribute CACHE-ADDR.
4405 * arm7.cpu (dnai): Delete condition.
4406 (eval-cond): Delete.
4408 * mach.scm (<isa>): New member setup-semantics.
4409 (-isa-parse-setup-semantics): New proc.
4410 (-isa-parse): New arg setup-semantics.
4411 (-isa-read): Recognize setup-semantics.
4413 * sid-cpu.scm (gen-extract-fields): Split into two:
4414 gen-extract-ifields, gen-extract-ifmt-ifields.
4415 (-gen-scache-semantic-fn): Delete `taken_p'. Delete
4416 tracing begin/end messages (done by caller now).
4417 (-gen-sem-case): Delete `taken_p'. Add npc,br_status. Delete
4418 tracing begin/end messages (done by x-before,x-after virtual insns).
4419 (-gen-sem-switch-engine): Redo vpc initialization. Save vpc at
4420 end so don't have to look it up again next time.
4421 * sid-decode.scm (-decode-expr-ifield-values): New proc.
4422 (-decode-expr-ifield-tracking-key): New proc.
4423 (-decode-expr-ifield-tracking): New proc.
4424 (-decode-expr-ifield-values-used): New proc.
4425 (-decode-expr-ifield-mark-used!): New proc.
4426 (-gen-decode-expr-set-itype): New proc.
4427 (-gen-decode-expr-entry): Rewrite.
4428 (-gen-decode-table-entry): New proc.
4429 (-gen-decoder-switch): Use it.
4430 (-gen-virtual-insn-finder): New proc.
4431 (-gen-argbuf-elm): Move here from sid.scm.
4432 (-gen-argbuf-hw-elm): Ditto.
4433 (-gen-argbuf-fields-union): Add entries for chain,before insns.
4434 (-gen-scache-decls): Add `cond' member to @prefix@_scache for
4435 conditional-execution isas.
4436 (-gen-decode-fn): Record conditional-exec ifield.
4437 * sid.scm (-current-pbb-engine?): New global.
4438 (current-pbb-engine?,set-current-pbb-engine?!): New procs.
4439 (<ifield>,gen-ifld-extract): New arg `indent'.
4440 (<multi-ifield>,gen-ifld-extract): Ditto.
4441 (-hw-gen-set-quiet-pc): Add pbb support. Delete `taken_p'.
4442 (-op-gen-set-trace): Don't print tracing messages for pbb engine.
4443 (-gen-arch-model-decls): Only scan real insns.
4444 (scache-engine-insns,pbb-engine-insns): New procs.
4445 (-create-virtual-insns!): New proc.
4446 (sim-finish!): Call it.
4447 (-decode-specialize-insn?): New proc.
4448 (-decode-specialize-build-assertion): New proc.
4449 (-decode-specialize-insn-1): New proc.
4450 (-decode-specialize-insn): New proc.
4451 (-fill-sim-insn-list!): New proc.
4452 (sim-analyze!): Create copies of insns to be specialized.
4453 * utils-cgen.scm (obj-set-name!): New proc.
4455 * attr.scm (-attr-eval): Rewrite calls to rtx-simplify/rtx-compile.
4456 * iformat.scm (ifmt-analyze): Pass `insn' to semantic-compile,
4458 (ifmt-compute!): Delete arg `arch'. Result is list of iformats,
4460 * mach.scm (arch-analyze-insns!): Update call to ifmt-compute!.
4461 * rtl-c.scm (rtl-c-get): Use DM for default mode instead of VM.
4462 Avoid infinite loop when rtx-eval-with-estate leaves expr alone.
4463 (attr): Rewrite test for insn owner.
4464 (member): New rtx function.
4465 * rtl.scm (rtx-* accessors): Define as cxr directly rather than
4466 as separate function.
4467 (rtx-ifield?,rtx-ifield-name): New procs.
4468 (rtx-operand-obj): Rewrite.
4469 (rtx-operand-name): New proc.
4470 (rtx-cmp-op-mode,rtx-cmp-op-arg): New procs.
4471 (rtx-number-list-values,rtx-member-value,rtx-member-set): New procs.
4472 (tstate-make): New args owner, known. All callers updated.
4473 (tstate-known-lookup): New proc.
4474 (rtx-traverse): New arg owner. All callers updated.
4475 (rtx-make-bool): New proc.
4476 (rtl-find-ifields): Rewrite.
4477 (rtx-simplify,rtx-simplify-eq-attr-{insn,mach}): Moved to ...
4478 * semantics.scm: ... here.
4479 (rtx-const-equal,rtx-const-list-equal): New procs.
4480 (-build-known-values): New proc.
4481 (semantic-compile): New arg `insn'. Call rtx-simplify.
4482 (semantic-attrs): Ditto.
4483 * rtx-funcs.scm (member,number-list): New rtx functions.
4485 * attr.scm (attr-remove-meta-attrs-alist): Delete leading '-' in name.
4486 Rewrite. Delete arg `all-attrs'. All callers updated.
4487 (attr-remove-meta-attrs): Delete leading '-' in name. All callers
4489 * utils-cgen.scm (gen-bool-attrs): Remove meta attrs.
4491 * decode.scm (subdtable-add): Handle `expr' entries.
4492 (exprtable-entry-make): Use vector. Record ifields refered to by expr.
4493 (exprtable-entry-*): Update.
4494 (exprtable-entry-iflds): New proc.
4495 (exprentry-cost): New proc.
4496 (exprtable-sort,-gen-exprtable-name): New procs.
4497 (exprtable-make): New arg `name'. All callers updated. use vector.
4498 (exprtable-*): Update.
4499 (-build-decode-table-entry): Don't issue collision warning if all are
4500 specialized insns. Sort exprtable entries before building table.
4502 * read.scm (-reader-process-expanded-1): Move pretty printing of
4503 input to logging level 4.
4505 * utils.scm (string-list->string): New proc.
4507 * insn.scm (<insn>): Define setters for ifield-assertion, condition,
4509 (insn-read): Delete leading '-' in name. All callers updated.
4510 (real-insn?): New proc.
4511 (real-insns): Rewrite.
4512 (insn-has-ifield?): New proc.
4513 (insn-builtin!): Create insn attribute SPECIALIZED.
4515 * mach.scm (<arch>): Delete member app-data.
4516 (current-raw-insn-list): New proc.
4517 (insn-list-car,insn-list-splice!): New procs.
4518 (<decode-specialize>): New class.
4519 (-isa-parse-decode-specialize): New proc.
4520 (-isa-parse-decode-specializes): New proc.
4521 (<isa>): New members `condition', `decode-specializes'.
4522 (-isa-parse-condition): New proc.
4523 (-isa-parse): New args condition, decode-specializes.
4524 (-isa-read): Recognize condition, decode-specializes.
4525 (-isa-add-decode-specialize!): New proc.
4526 (modify-isa): New proc.
4527 (isa-conditional-exec?,state-conditional-exec?): New procs.
4528 (arch-init!): New reader command `modify-isa'.
4530 * mode.scm (mode-class-signed?,mode-class-unsigned?): New procs.
4531 (mode-signed,mode-unsigned?): New procs.
4533 Thu Jun 3 16:00:40 1999 Doug Evans <devans@canuck.cygnus.com>
4535 * types.scm (<array>): New method get-shape.
4536 * hardware.scm (<hardware-base>): Forward get-shape,get-num-elms
4538 (hw-shape,hw-num-elms): New procs.
4539 * sim.scm (<hw-register>,gen-profile-index-type): Use "unsigned short"
4540 if there's more than 255 registers.
4541 * sid.scm (<hw-register>,gen-profile-index-type): Ditto.
4543 * hardware.scm (-hw-parse): Flag as error CACHE-ADDR specified
4546 1999-05-21 Doug Evans <devans@casey.cygnus.com>
4548 * cgen-sid.scm (sim-arguments): Add -X.
4549 * sid-cpu.scm (-gen-hardware-types): Comment out scache vars.
4550 (-gen-all-semantic-fns): Don't include PBB support virtual insns.
4551 (-gen-sem-case): Use CASE/NEXT macros again. Tweak indenting.
4552 Simplify by supporting pbb engine only.
4553 (-gen-sem-switch-init): New proc.
4554 (-gen-sem-switch-engine): Rename from -gen-sem-switch-fn.
4555 (cgen-sem-switch.cxx): New proc.
4556 * sid-decode.scm (-gen-decode-insn-globals): Replace with-sem-switch?
4557 with with-pbb?. Support dual scache/pbb engines.
4558 (-gen-idesc-decls): Replace with-sem-switch? with with-pbb?.
4559 Support dual scache/pbb engines.
4560 (cgen-decode.h): Generate semantic fn decls if with-scache?.
4561 * sid.scm (*) with-pbb? replaces with-sem-switch?.
4562 (sim-finish!): Create pbb support virtual insns if with-pbb?.
4564 1999-05-10 Ben Elliston <bje@cygnus.com>
4566 * arm7.cpu: Remove coprocessor related fields, operands and insn
4567 definitions for now. Take the undefined instruction trap instead.
4568 (ldmda-wb): New instruction.
4569 (ldmib-wb): Likewise.
4570 (ldmdb-wb): Likewise.
4571 (stmdb-wb): Likewise.
4572 (stmib-wb): Likewise.
4573 (stmda-wb): Likewise.
4575 1999-05-08 Doug Evans <devans@casey.cygnus.com>
4577 * sid.scm (<hw-memory>,cxmake-get): Call GETMEM method, not function.
4578 (<hw-memory>,gen-set-quiet): Call SETMEM method, not function.
4580 * utils-cgen.scm (keyword-list->arg-list): Fix call to substring,
4581 hobbit can't handle optional third arg.
4583 1999-05-07 Doug Evans <devans@casey.cygnus.com>
4585 * arm.cpu (h-tbit): Delete set spec.
4586 (h-mbits): Don't call arm_mbits_set in set spec.
4587 * arm.sim: New file.
4588 * hardware.scm (modify-hardware): New proc.
4589 (hardware-init!): Add modify-hardware command.
4590 * sid.scm (-hw-cxmake-get): Use method call if FUN-ACCESS specified.
4591 (-hw-gen-set-quiet): Ditto.
4592 (sim-finish!): Call invalid_insn method. Define FUN-ACCESS builtin
4593 hardware attribute. Load $arch.sim file if present.
4594 * utils-cgen.scm (keyword-list?): New proc.
4595 (keyword-list->arg-list,arg-list-validate-name): New procs.
4596 (arg-list-check-no-args,arg-list-symbol-arg): New procs.
4598 * arm7.cpu (eval-cond): Pass pc to @cpu@_eval_cond handler.
4600 * sid-cpu.scm (-gen-hardware-types): Rename @cpu@_cpu to
4603 * attr.scm (obj-prepend-atlist!): New proc.
4605 * opc-opinst.scm (cgen-opinst.c): Analyze instructions if necessary.
4607 * sid.scm (<operand>,profilable?): Use op:type.
4608 * sim.scm (<operand>,profilable?): Use op:type.
4610 1999-05-04 Doug Evans <devans@casey.cygnus.com>
4612 * utils.scm (find-index,find): Be more stack friendly.
4614 * arm7.cpu (arith-imm-op): Compute pc before setting cpsr.
4617 1999-05-01 Doug Evans <devans@casey.cygnus.com>
4619 * arm.cpu (h-gr-usr): New hardware element.
4620 (h-gr-fiq,h-gr-svc,h-gr-abt,h-gr-irq,h-gr-und): New hardware elements.
4621 (arm-mode): New keyword.
4622 (h-mbits): Add set spec.
4623 (h-spsr): Implement get/set specs.
4625 * read.scm: Load slib/pp.scm, slib/genwrite.scm.
4626 (-reader-process-expanded-1): Pretty print logging output.
4628 * sid-cpu.scm (-gen-reg-access-defns): Make getters `const'.
4629 (cgen-cpu.h): Print enums before hardware elements.
4630 (cgen-semantics.cxx): @arch@-cgen.h renamed to @arch@-main.h.
4631 * sid-decode.scm (cgen-decode.cxx): Ditto.
4632 * sid-model.scm (cgen-model.cxx): Ditto.
4634 * utils-cgen.scm (context-error): Accept variable number of
4637 * rtx-funcs.scm (error:): New rtx function.
4638 * rtl-c.scm (s-case-vm): New proc.
4639 (-gen-non-vm-case-get,s-case-non-vm): New procs.
4640 (s-case): Simplify, handle non-VM result.
4641 (error:): New rtx function.
4643 1999-04-30 Doug Evans <devans@casey.cygnus.com>
4645 * arm.cpu (h-pc): Add set spec to zero bottom bits.
4646 (test-hi,test-ls): Fix cbit handling.
4647 (shift-type,h-operand2-shifttype): Move here ...
4648 * arm7.cpu: ... from here.
4649 (set-cond,set-cond-maybe,dnix): Delete, unused.
4650 (set-zn-flags,set-logical-cc,set-add-flags,set-sub-flags): Move ...
4651 * arm.cpu: ... to here.
4652 * thumb.cpu (cmp,alu-cmp): Use set-sub-flags.
4653 (alu-cmn): Use set-add-flags.
4654 (alu-tst): Use set-zn-flags.
4655 (alu-cmp): Use set-sub-flags.
4656 (lsl,lsr,asr): Set condition codes.
4657 (add,addi,sub,subi,mov,addi8,subi8): Ditto.
4658 (alu-op): Split into three: alu-logical-op,alu-arith-op,
4660 (hireg-op): Split sem-fn into lo-dest-sem-fn,hi-dest-sem-fn.
4661 All callers updated.
4662 (sub-sp): Rename from add-sp-neg.
4663 (f-lbwl-offset): Delete.
4664 (f-lbwl-hi,f-lbwl-lo): New ifields.
4665 (lbwl-hi,lbwl-lo): Update.
4666 (bl-hi): Add 4 to pc.
4667 (push-reg,pop-reg): Simplify.
4668 (push,push-lr): Push registers in correct order.
4669 (pop,pop-pc): Pop registers in correct order.
4670 (save-reg-inc,load-reg-inc): Simplify.
4671 (ldmia): Save registers in correct order.
4673 1999-04-30 Ben Elliston <bje@cygnus.com>
4675 * arm7.cpu (f-op-hdt): Remove; unused.
4676 (f-ror-imm8-value,f-ror-imm-rotate): New fields.
4677 (f-ror-imm8): New multi-ifield.
4678 (f-operand2-bit7): Remove; use the generic `f-bit7' instead. All
4680 (f-uimm12): New field.
4681 (ror-imm8): New operand.
4683 (hdt-offset8): Reinstate operand.
4684 (offset4-hi,offset4-lo): Remove.
4685 (set-cond): Remove macro; unused.
4686 (set-cond-maybe): Likewise.
4687 (load-word/byte): Use uimm12 operand for a true 12-bit immediate.
4688 (store-word/byte): Likewise.
4689 (load-halfword): Use hdt-offset8 multifield operand instead of two
4690 4-bit operands that are explicitly combined by semantic code.
4691 (do-halfword-store): Bug fix. Set address when not preindexing.
4692 (store-halfword): Also use hdt-offset8 operand.
4693 (arith-op): Avoid clobbering source registers when one of them is
4694 the destination register.
4695 (arith-imm-op): Likewise.
4696 (tst-imm): Use ror-imm8 operand. Handle special case of rot 0.
4697 (teq-imm): Likewise.
4698 (ldm-p): Rename to ldmdb.
4699 (stm-pw): Rename to stmdb-wb.
4700 (multi-action): New macro; test reg-list bits and execute a
4701 semantic fn if the bit is set.
4702 (ldmda,ldmib,ldmia,ldmia-wb,ldmdb): New multiple load insns.
4703 (stmdb,stmib,stmia,stmia-wb,stmda,stmdb-wb): Store insns.
4704 (all insns): Use dnai entries for simplicity rather than dni.
4705 (*): Use short-form of (const ..).
4707 1999-04-29 Doug Evans <devans@casey.cygnus.com>
4709 * rtl.scm (<rtx-func>): Rename member type to style. Rename
4710 member eval to evaluator.
4711 (rtx-foo accessors): Rename from rtx:foo. All callers updated.
4712 (tstate-make): Delete arg op-fn. All callers updated.
4713 (tstate-op-fn,tstate-set-op-fn!): Delete.
4714 (rtx-traverse): Delete op-fn arg. All callers updated.
4715 * semantics.scm (-simplify-for-compilation-process-expr): New proc,
4716 split out of -simplify-for-compilation.
4718 * Makefile.am (CGEN_NONHOB_FILES,CGENFILES): New variables.
4719 (cgen_DEPENDENCIES): Add stamp-cgen.
4720 (stamp-cgen): New rule.
4721 * Makefile.in: Rebuild.
4723 * rtl-c.scm (enum:): Define emitter for.
4724 * rtl.scm (rtx-constant?): Rename from rtx-const? and check for
4726 (rtx-constant-value,rtx-enum-value): New procs.
4727 (-rtx-traverse-normal): Expand enum-value to (enum enum-value).
4728 (rtx-compile-time-constant?): Return #t for enums.
4729 (rtx-true?,rtx-false?): Handle enums.
4730 (rtx-simplify-eq-attr-mach): Use rtx-true,rtx-false instead of
4731 building result by hand.
4732 (rtx-simplify-eq-attr-insn): Ditto.
4733 * rtx-funcs.scm (enum:,enum): New rtx functions.
4735 * mach.scm (<arch>): New members insns-analyzed?, semantics-analyzed?,
4737 (arch-analyze-insns!): New proc.
4738 * opcodes.scm (opcodes-analyze!): Call arch-analyze-insns! instead
4739 of calling ifmt-compute! directly.
4740 * sid.scm (-sim-insns-analyzed?): Delete.
4741 (sim-analyze!): Call arch-analyze-insns! instead of calling
4742 ifmt-compute! directly.
4743 * sim.scm (-sim-insns-analyzed?): Delete.
4744 (sim-analyze!): Call arch-analyze-insns! instead of calling
4745 ifmt-compute! directly.
4747 * utils.scm (string-take-with-filler): New proc.
4748 (string-take): Use it.
4750 * pgmr-tools.scm: New file.
4751 * read.scm: Load it.
4752 * insn.scm (pretty-print-insn-format): Move to pgmr.scm.
4754 * insn.scm (insn-base-mask): Renamed from insn:mask.
4755 All callers updated.
4756 (insn-base-mask-length): Renamed from insn:mask-length.
4757 All callers updated.
4758 (insn-foo): Renamed from insn:foo. All callers updated.
4759 * minsn.scm (minsn-foo): Renamed from minsn:foo. All callers updated.
4760 * iformat.scm (compute-insn-base-mask-length): Renamed from
4761 compute-insn-mask-length. All callers updated.
4762 (compute-insn-base-mask): Renamed from compute-insn-mask.
4763 All callers updated.
4765 * enum.scm (-enum-parse-prefix): New proc.
4766 (<enum>,make!): Don't parse enum values here.
4767 (-enum-parse): Do it here. Call -enum-parse-prefix.
4768 (define-full-insn-enum): Ditto.
4769 (enum-vals-upcase): New proc.
4770 * hardware.scm (define-keyword): Make enum prefix uppercase.
4771 * hobscmif.h (CHAR_LOWERP,CHAR_UPPERP,CHAR_WHITEP): New macros.
4773 * ifield.scm (<ifield>,field-mask): Allow container to be #f.
4774 (<ifield>,field-extract): New method.
4775 (<multi-ifield>,field-extract): New method.
4776 (ifld-extract): New proc.
4777 * opcodes.scm (ifld-insert-fn-name): Renamed from ifld-insert.
4778 (ifld-extract-fn-name): Renamed from ifld-extract.
4780 * ifield.scm (ifld-new-value): Renamed from ifield-make.
4781 All callers updated.
4783 * ifield.scm (ifld-lsb0?): New proc.
4784 (sort-ifield-list): New arg up?. All callers updated.
4785 * iformat.scm (compute-insn-mask): Get lsb0? flag from argument,
4786 rather than global state.
4788 1999-04-27 Doug Evans <devans@casey.cygnus.com>
4790 * insn.scm (pretty-print-insn-format): New proc.
4792 * Makefile.in: Rebuild.
4793 * aclocal.m4: Rebuild
4794 * configure: Rebuild.
4796 Mon Apr 26 10:30:18 1999 Doug Evans <devans@canuck.cygnus.com>
4798 * configure.in (AM_INIT_AUTOMAKE): Update version to 0.7.2.
4799 * configure: Rebuild.
4800 * aclocal.m4: Rebuild.
4801 * Makefile.in: Rebuild.
4802 * doc/Makefile.in: Rebuild.
4803 * doc/version.texi: Rebuild.
4805 1999-04-25 Doug Evans <devans@casey.cygnus.com>
4807 * utils.scm (bits->bools): New proc.
4809 1999-04-23 Doug Evans <devans@casey.cygnus.com>
4811 * sid.scm (<multi-ifield>,gen-ifld-extract-decl): Fix call to
4812 subfield's gen-ifld-extract-decl method.
4814 1999-04-23 Ben Elliston <bje@cygnus.com>
4816 * arm7.cpu (ldrsh-pu): Remove.
4817 (do-halfword-load): New pmacro.
4818 (load-halfword): Likewise.
4819 (do-halfword-store): Likewise.
4820 (store-halfword): Likewise.
4821 (strh-*): New instructions.
4822 (ldrsb-*): Likewise.
4824 (ldrsh-*): Likewise.
4826 1999-04-22 Doug Evans <devans@casey.cygnus.com>
4828 * ifield.scm (ifld-constant?): Delete special handling of RESERVED
4831 * arm7.cpu (do-word/byte-store): Fix typo.
4833 1999-04-22 Ben Elliston <bje@cygnus.com>
4835 * arm7.cpu (do-word/byte-load): Handle cases where the destination
4836 register is the program counter (R15).
4838 * arm7.cpu (do-word/byte-store,store-word/byte): New pmacros.
4839 (str-*): Implement using store-word-byte. Remove older versions.
4840 (bic): Use the `inv' rtx for obtaining bitwise complements.
4841 (bic-imm): Likewise.
4843 (mvn-imm): Likewise.
4844 (store-indev-reg): Remove crufty pmacro.
4845 (load-indiv-reg): Likewise.
4846 (ldm-p): Reverse the order of register processing for decrement.
4848 (stbi): Remove; handled by the str-* insns.
4850 1999-04-21 Doug Evans <devans@casey.cygnus.com>
4852 * thumb.cpu (cmp): Fix carry bit computation.
4855 1999-04-20 Doug Evans <devans@casey.cygnus.com>
4857 * arm.cpu (h-tbit): Specify set spec.
4859 * arm7.cpu (bx): Don't call C routine, just set h-tbit.
4860 (set-sub-flags): Interpret "carry bit" as a borrow.
4861 (all sub/cmp insns): Carry bit is actually a borrow bit.
4862 * thumb.cpu (bx-rs,bx-hs): Don't call C routine, just set h-tbit.
4863 (add-carry,sub-carry,thumb-neg,thumb-bic,thumb-inv): Delete. Use
4865 (hireg-add,hireg-cmp,hireg-move): Ditto.
4867 * read.scm (-CGEN-VERSION): Change version to 0.7.2.
4868 (-CGEN-LANG-VERSION): Ditto.
4870 1999-04-18 Doug Evans <devans@casey.cygnus.com>
4872 * pmacros.scm (-pmacro-make): New arg `default-values',
4873 all callers updated.
4874 (-pmacro-default-values): New proc.
4875 (-pmacro-process-keyworded-args): New proc.
4876 (-pmacro-process-args): New proc.
4877 (-pmacro-invoke): Process arguments before expanding macro.
4878 (-pmacro-get-arg-spec,-pmacro-get-default-values): New procs.
4879 (define-pmacro): Handle default values specified in arg list.
4880 * rtl.scm (rtx-alu-op-mode,rtx-alu-op-arg): New procs.
4881 (rtx-boolif-op-arg[01]): New procs.
4882 (rtx-true,rtx-false,rtx-canonical-bool): New procs.
4883 (rtx-simplify): Handle not,orif,andif.
4884 * semantics.scm (-simplify-for-compilation): Simplify not,orif,andif.
4885 * utils.scm (alist-copy): New proc.
4886 * arm7.cpu (do-word/byte-load,load-word/byte): New pmacros.
4888 (swi): Explicitly set pc.
4890 * thumb.cpu (bx-rs,bx-hs): Reverse test for switch to arm mode.
4892 1999-04-17 Ben Elliston <bje@cygnus.com>
4894 * arm7.cpu (ldr-pu): Do not add 8 to R15; the step() method
4895 correctly adjusts the program counter now.
4897 * arm7.cpu (f-halfword?): Rename from `f-hdt-halfword?'.
4898 (f-signed?): Rename from `f-hdt-signed?'.
4899 (f-offset4-hi): Rename from `h-hdt-off4-ms'.
4900 (f-offset4-lo): Rename from `h-hdt-off4-ls'.
4901 (f-hdt-offset8): Use new field names.
4902 (ldr): Use `imm12' field, not `offset12', since we do our own
4904 (str, str-*): Likewise.
4905 (ldu-*): Remove most; better not implemented than broken.
4907 (ldrsh-pu): New insn.
4911 (ldm-p): Likewise; replace (load-indiv-reg) version.
4913 1999-04-15 Doug Evans <devans@casey.cygnus.com>
4915 * arm.cpu (h-pc): Delete VIRTUAL attribute, get/set specs.
4916 * arm7.cpu (*): Fix mode of result of arm_compute_carry_out_*.
4917 (*): Explicitly specify mode in c-call.
4918 (logical-op): Recognize sets of h-gr[15] as sets of pc.
4920 (and-imm,orr-imm,xor-imm,mov-imm,bic-imm,mvn-imm): Ditto.
4921 (arith-imm-op): New pmacro.
4922 (add-imm,adc-imm,sub-imm,sbc-imm,rsb-imm,rsc-imm): Use it.
4923 * thumb.cpu (bx-rs,bx-hs): Rewrite.
4925 1999-04-14 Doug Evans <devans@casey.cygnus.com>
4927 * rtl.scm (rtx-simplify-eq-attr-insn): Fix call to context-error.
4929 * rtl.scm (rtl-find-ifields): Implement.
4931 * utils-gen.scm: New file.
4932 * read.scm: Load it.
4933 * desc.scm: Move generic attribute code to utils-gen.scm.
4934 * Makefile.am (CGEN_HOB_INPUT_FILES): Add it.
4935 * Makefile.in: Rebuild.
4937 * arm7.cpu (R15-OFFSET): New attribute.
4939 (logical-op): Delete arg `result?'. All callers updated. Use dnai.
4940 Delete use of eval-cond (dnai specifies it). Specify R15-OFFSET of 12
4941 for reg-shift version.
4943 (data processing insns): Reorganize. Use dnai.
4945 * attr.scm (attr-kind): New proc.
4946 (attr-list-enum-list): Rewrite.
4947 (-attr-sort): Split result into two lists, bools and non-bools.
4948 (current-attr-list-for): Update.
4950 * cgen-sid.scm (sim-arguments): Add -H -> build desc.h file.
4951 * sid-cpu.scm (-gen-attr-decls): New proc.
4952 (-gen-insn-attr-decls): New proc.
4953 (cgen-desc.h): New proc.
4954 (cgen-cpu.h): Put everything in @cpu@ namespace.
4955 (gen-parallel-exec-type): Change prefix of parexec struct from
4957 (-gen-trace-record-type): Ditto for trace_record struct.
4958 (-gen-write-case): Update.
4959 (-gen-scache-semantic-fn): Change function prefix from @cpu@ to
4960 @prefix@. Update scache struct references.
4961 (-gen-sem-case): Update scache struct references.
4962 (-gen-sem-switch-fn): Update idesc struct reference.
4963 Update insn_type enum reference.
4964 (cgen-write.cxx): Update scache,argbuf references.
4965 (cgen-semantics.cxx): Simplify namespace choice (always @cpu@).
4966 * sid-decode.scm (IDESC-TABLE-VAR): Change prefix of insn_data
4967 from @cpu@ to @prefix@.
4968 (-gen-decode-insn-entry): Use gen-cpu-insn-enum.
4969 (-gen-decode-expr-entry): Ditto. Change prefix of INSN_X_INVALID
4970 from @CPU@ to @PREFIX@.
4971 (-gen-decoder-switch): Change prefix of INSN_X_INVALID
4972 from @CPU@ to @PREFIX@.
4973 (-gen-decode-insn-globals): Generate insn attributes.
4974 (-gen-sem-fn-name): Change function prefix from @cpu@ to @prefix@.
4975 (-gen-sem-fn-decls): Use -gen-sem-fn-name. Add `using' for
4976 semantic fn typedef.
4977 (-gen-idesc-decls): Simplify cpu class name (always @cpu@_cpu).
4978 Change prefix of scache struct from @cpu@ to @prefix@.
4979 Change prefix of semantic fn typedef from @cpu@ to @prefix@.
4980 Change prefix of idesc struct from @cpu@ to @prefix@.
4981 Change prefix of insn_type enum from @cpu@ to @prefix@.
4982 (-gen-argbuf-fields-union): Change prefix of sem_fields union
4983 from @cpu@ to @prefix@.
4984 (-gen-scache-decls): Change prefix of scache struct from
4985 @cpu@ to @prefix@. Update idesc struct name.
4986 Update decode,execute methods.
4987 (-gen-extract-case): Update to type name changes.
4988 (-gen-decode-fn): Ditto.
4989 (cgen-decode.h): Put everything in @cpu@ namespace (except
4990 semantic fn decls). Change prefix of insn_word from @cpu@ to @prefix@.
4991 (cgen-decode.cxx): Add using namespace @cpu@.
4992 * sid-model.scm (-gen-hw-profile-decls): Change prefix of
4993 model_mark_get/set from @cpu@ to @prefix@.
4994 (gen-model-unit-fn-name): Change function prefix from @cpu@ to
4996 (gen-model-fn-decls): Update idesc struct name. Change prefix
4997 of model_insn_before/after from @cpu@ to @prefix@.
4998 (-gen-model-insn-fn): Update scache/idesc/argbuf struct names.
4999 Update insn_word type name.
5000 (-gen-model-timing-table): Update INSN_TIMING struct name.
5001 (-gen-model-init-fn): Update MODEL_DATA struct name.
5002 (-gen-mach-defns): Update name of init_idesc_table fn.
5003 (cgen-model.cxx): Add using namespace @cpu@.
5004 * sid.scm (gen-cpu-class): Delete.
5005 (gen-attr-type): New proc.
5006 (gen-obj-attr-sid-defn): New proc.
5007 (<operand>,gen-profile-code): Update name of model_mark_get/set fn.
5008 (gen-cpu-insn-enum-decl): Change prefix of insn_type enum from
5010 (gen-cpu-insn-enum): Update name of insn enum.
5011 * thumb.cpu (bx-rs): Rename @cpu@_do_bx to @prefix@_do_bx.
5013 (swi): Rename @cpu@_swi to @prefix@_swi.
5015 * decode.scm (-build-decode-table-entry): Remove heuristic for
5016 distinguishing insns, and use insn ifield-assertion specs.
5018 * desc-cpu.scm (gen-A-attr-mask): Simplify.
5019 (gen-ifld-defns): Boolean attributes begin at number 0 now.
5020 (gen-hw-table-defns,gen-operand-table,gen-insn-table): Ditto.
5021 * opc-itab.scm (-gen-macro-insn-table): Ditto.
5022 * utils-cgen.scm (gen-attr-enum-decl): Change type arg to prefix,
5023 all callers updated.
5024 (gen-attr-name): New proc
5025 (gen-attr-mask): Use it. Boolean attributes start at 0 now.
5026 (gen-obj-attr-defn): Delete num_nonbools count.
5028 * iformat.scm (ifmt-analyze): Handle insn-condition.
5029 (ifmt-compute!): Ditto.
5030 * insn.scm (<insn>): Specify default value for condition,
5031 post-cond-trap,compiled-condition,compiled-semantics.
5032 (<insn>,make!): New arg condition.
5033 (<insn>): Add getters for condition,compiled-condition.
5034 (-insn-parse): New arg condition, all callers updated.
5035 (-insn-read): Recognize condition spec.
5036 (define-full-insn): New arg condition.
5037 * minsn.scm (minsn-make-alias): Update call to (make <insn> ...).
5038 * semantics.scm (semantic-compile): Change arg sem-code to
5040 (semantic-attrs): Ditto.
5041 * sim.scm (sim-finish!): Update calls to define-full-insn.
5042 * simplify.inc (define-normal-insn): Update call to define-full-insn.
5043 * sid-cpu.scm (gen-semantic-code): Handle insn-condition.
5044 * sid.scm (sim-finish!): Update call to define-full-insn.
5046 Tue Apr 13 17:04:34 1999 Doug Evans <devans@canuck.cygnus.com>
5048 * Makefile.am (sim-cpu): Allow specification of ISA.
5049 * Makefile.in: Rebuild.
5051 Sun Apr 11 00:37:56 1999 Jim Wilson <wilson@cygnus.com>
5053 * i960.cpu (sll-expr, srl-expr, sra-expr): Handle large shift counts.
5055 1999-04-10 Doug Evans <devans@casey.cygnus.com>
5057 * sparccom.cpu (check-fp-enable): Wrap TRAP32_FP_DIS in c-code.
5059 * arm.cpu (gr-names): Put pc first so it gets prefered in disassembly.
5061 * attr.scm (atlist?): New proc.
5062 (-attr-eval): Rewrite.
5063 (attr-parse): New proc.
5064 (atlist-parse): Use it.
5066 * decode.scm (exprtable-entry-make): New proc.
5067 (exprtable-entry-insn,exprtable-entry-expr): New procs.
5068 (exprtable-make,exprtable-insns): New procs.
5070 * hardware.scm (hw-mode-ok?): Delete argument `set?'.
5072 (hardware-builtin!): Make h-memory a vector.
5074 * iformat.scm (ifmt-ifields): Renamed from ifmt-fields.
5075 All callers updated.
5076 (ifmt-analyze): Use csem-* accessors on result of semantic-compile.
5078 * insn.scm (<insn>). Rename ifld-assertions to ifield-assertion.
5080 (-insn-parse): Set semantics to #f if not specified.
5081 (define-insn,define-full-insn): Take out code that ignores ALIAS's
5083 (-parse-insn-format): Recognize `=' iformat spec.
5085 * mach.scm (isa-min-insn-bitsize): Ignore ALIAS's.
5086 (isa-max-insn-bitsize): Ditto.
5088 * opcodes.scm (<ifield>,gen-insert): Call rtl-c instead of
5090 (<ifield>,gen-extract): Ditto.
5091 (<multi-ifield>,gen-insert,gen-extract): Ditto.
5092 * sid-cpu.scm (-gen-reg-access-defns): Ditto.
5093 (gen-define-ifmt-ifields): New proc.
5094 (gen-semantic-code): Rewrite.
5095 * sid-decode.scm (-gen-decode-expr-entry): New proc.
5096 (-gen-decoder-switch): Handle expression tables.
5097 (-gen-extract-case): Call gen-define-ifmt-ifields instead of
5099 * sid-model.scm (-gen-model-insn-fn): Call gen-define-ifmt-ifields
5100 instead of gen-define-fields.
5101 * sid.scm (<ifield>,gen-ifld-extract-decl): New arg `indent', all
5103 (<multi-ifield,gen-ifld-extract-decl): Ditto.
5104 (-gen-ifld-extract-base): Call rtl-c instead of rtl-c-with-alist.
5105 (-gen-ifld-extract-beyond): Ditto.
5106 (<multi-ifield>,gen-ifld-extract): Ditto.
5107 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5108 rtl evaluation code.
5109 (op:read): Build an <eval-state> to pass to gen-read.
5110 (op:write): Build an <eval-state> to pass to gen-write.
5111 (op:record-profile): Build an <eval-state> to pass to
5113 * sim-cpu.scm (gen-semantic-code): Rewrite.
5114 * sim.scm (-gen-ifld-extract-base): Call rtl-c instead of
5116 (-gen-ifld-extract-beyond): Ditto.
5117 (<multi-ifield>,gen-ifld-extract): Ditto.
5118 (<hw-register>,gen-get-macro,gen-set-macro): Ditto.
5119 (<*>,cxmake-get,gen-set-quiet,gen-set-trace,gen-write): Update to new
5120 rtl evaluation code.
5121 (op:read): Build an <eval-state> to pass to gen-read.
5122 (op:write): Build an <eval-state> to pass to gen-write.
5123 (op:record-profile): Build an <eval-state> to pass to
5126 * operand.scm (<operand>): Give `selector' default value of #f.
5127 Give `num' default value of -1. Give `cond?' default value of #f.
5128 (op:new-mode): Delete arg `set?', all uses updated.
5130 * read.scm (reader-error): Handle #f return from port-filename.
5131 (-init-parse-cpu!): Call rtl-c-init!.
5132 (reader-install-builtin!): Call rtl-builtin!.
5134 * rtl-c.scm: New file.
5135 * semantics.scm: New file.
5136 * read.scm: Load them.
5137 * rtl.scm: C generation moved to rtl-c.scm. Semantic analysis moved
5139 (<rtx-func>): Delete members syntax?,macro,c,expr. New members
5141 (rtx-lookup): Renamed from -rtx-func-lookup. All callers updated.
5142 (-rtx-num-text,-rtx-max-num): New globals.
5143 (def-rtx-operand-node,define-rtx-operand-node): New procs.
5144 (-rtx-macro-lookup): New proc.
5145 (rtx-lvalue-mode-name): Renamed from rtx-expr-mode-name.
5146 (rtx-env-stack-empty?,rtx-env-stack-head): New procs.
5147 (rtx-env-var-list,rtx-env-empty-stack,rtx-env-init-stack1): New procs.
5148 (rtx-env-make,rtx-env-empty?,rtx-env-make-locals): New procs.
5149 (rtx-env-push,rtx-temp-lookup,-rtx-closure-make): New procs.
5150 (rtx-make,rtx-kind?,rtx-const?,rtx-const-value,rtx-symbol-name,
5151 rtx-operand?,rtx-operand-obj,rtx-local?,rtx-local-obj, rtx-xop-obj,
5152 rtx-index-of-value,rtx-if-mode,rtx-if-test,rtx-if-then,rtx-if-else,
5153 rtx-eq-attr-owner,rtx-eq-attr-attr,rtx-eq-attr-value): New procs.
5154 (rtx-pretty-name): New proc.
5155 (-rtx-traverser-table,-rtx-make-traverse-table): New procs.
5156 (rtx-traverse-*): Rewrite rtx traversing.
5157 (rtx-eval-*): Rewrite rtx evaluation.
5158 (rtx-compile): New proc.
5159 (rtx-simplify): New proc.
5160 (rtx-simply-eq-attr-mach,rtx-simplify-eq-attr-insn): New procs.
5161 * rtx-funcs.scm: C generation moved to rtl-c.scm.
5162 (ifield,index-of): Rewrite.
5163 (name): Renamed from `operand:'.
5164 (operand,xop,local): New rtx's.
5165 (current-insn): Rewrite.
5166 * Makefile.am (CGEN_HOB_INPUT_FILES): Add rtl-c.scm, semantics.scm.
5167 (cgen-hob.h): Remove rule for.
5168 (cgen-hob.o): Depend on cgen-hob.c only.
5169 * Makefile.in: Rebuild.
5171 * utils-cgen.scm (vmake): New proc.
5172 (<context>): New class.
5173 (context-make-prefix,context-error): New procs.
5175 Fri Apr 9 19:26:28 1999 Jim Wilson <wilson@cygnus.com>
5177 * i960.cpu: Add some ??? comments.
5178 (xnor, ornot): New instructions.
5179 (*): Delete obsolete COND-CTI and UNCOND-CTI attributes.
5181 1999-04-08 Doug Evans <devans@casey.cygnus.com>
5183 * cos.scm (-object-error): Print better error message.
5185 * pmacros.scm (-pmacro-env-make): Renamed from -env-make.
5186 (-pmacro-env-ref): Renamed from -env-ref.
5188 1999-03-31 Doug Evans <devans@casey.cygnus.com>
5190 * hardware.scm (<hw-pc>,parse!): Allow get/set specs.
5192 (hardware-builtin!): Delete h-pc builtin.
5193 * arm.cpu (h-pc): Define.
5194 (h-gr): Delete get,set specs. Make array of 16 regs again.
5195 * arm7.cpu (set-logical-cc-maybe): Delete.
5196 (set-zn-flags,set-add-flags,set-sub-flags): New macros.
5197 (data processing insns): Rewrite.
5198 * m32r.cpu (h-pc): Define.
5199 * fr30.cpu (h-pc): Define.
5200 * i960.cpu (h-pc): Define.
5201 * sparc.cpu (h-pc): Define.
5203 * rtl.scm (-rtx-traverse-operands): Add some error checking to LOCALS.
5204 (s-parallel): Replace do {...} while (0) with {...}.
5205 (s-sequence): Ditto.
5207 * sid-cpu.scm (gen-parallel-exec-type): Make type of `written'
5209 (-gen-write-case,-gen-sem-case): Ditto.
5210 (-gen-sem-case): Only specify `written' if profiling or
5211 parallel-write-back.
5212 (-gen-scache-semantic-fn,-gen-all-semantic-fns): Put procs back in.
5213 (-gen-sem-switch-fn): New proc.
5214 (cgen-semantics.cxx): Emit either semantic fns or semantic switch
5215 based on with-sem-switch option.
5216 * sid-decode.scm (-gen-decode-insn-globals): Only define
5217 idesc_table_initialized_p if with-sem-switch. Record semantic fn
5218 addresses in idesc_table if !with-sem-switch.
5219 (-gen-sem-fn-decls): Rewrite.
5220 (-gen-idesc-decls): Define @cpu@_sem_fn type. Define `execute'
5221 member based on with-sem-switch. Only define
5222 `idesc_table_initialized_p' member if with-sem-switch.
5223 (cgen-decode.h): If !with-sem-switch, declare semantic fns.
5224 * sid.scm (-with-sem-switch?): New variable.
5225 (option-init!): Initialize it.
5226 (option-set!): Set it.
5227 (with-sem-switch?): New proc.
5228 (-op-gen-set-trace): Only emit `written' reference if profiling.
5229 (sim-finish!): Use h_pc_set to set pc.
5231 1999-03-30 Doug Evans <devans@casey.cygnus.com>
5233 * sparccom.cpu (arith-cc-binop): New args s32-set-flags,s64-set-flags.
5234 All callers updated.
5235 (arith-carry-cc-binop): New arg set-flags. All callers updated.
5237 * sid.scm (gen-argbuf-type): Delete.
5238 (-gen-argbuf-fields-union): Move to ...
5239 * sid-decode.scm: ... here.
5241 * read.scm (-reader-process-expanded-1): New proc.
5242 (-reader-process-expanded): Call it to catch nested begin's.
5243 (reader-process): Move `begin' handling to -reader-process-expanded.
5245 * insn.scm (-insn-read): Fix name of `format' spec.
5247 * pmacros.scm (.pmacro): New builtin.
5248 (scan-symbol): If procedure macro, return macro rather than its symbol.
5249 (check-macro): Don't do lookup, instead check if (car expr) is
5251 (scan-list): Handle .pmacro.
5252 (scan): No longer re-examine text for another macro invocation.
5253 (-pmacro-build-lambda): New proc.
5254 (define-pmacro): Rewrite. If defining one pmacro to be an alias of
5255 another, fetch the other's value (rather than doing it during
5258 1999-03-27 Doug Evans <devans@casey.cygnus.com>
5260 * Makefile.am (CGEN_HOB_INPUT_FILES): Add decode.scm.
5261 * Makefile.in: Rebuild.
5263 * decode.scm (decode-get-best-bits): Use memq instead of element?.
5264 (-fill-slot!): Simplify.
5265 (-build-slots): Simplify.
5267 * dev.scm (load-sid): Don't load sid-arch.scm.
5269 * sid-decode.scm: Replace computed goto decoder/extractor with plain
5271 * sim-decode.scm: Replace computed goto decoder/extractor with plain
5274 1999-03-26 Doug Evans <devans@casey.cygnus.com>
5276 * sim-decode.scm: Clean up pass. Move decoder computation into ...
5277 * decode.scm: ... here. New file.
5278 * sid-decode.scm: Use decoder computation code in decode.scm.
5279 * read.scm: Load decode.scm.
5281 * arm.cpu (arm710 model): Add u-exec function unit.
5282 (h-gr): Delete CACHE-ADDR for now. Make array of 15, not 16 regs.
5283 Add get/set specs to redirect reg 15 to h-pc.
5284 (h-*): Indicate for both ARM and THUMB isas.
5285 (cbit,nbit,vbit,zbit): Ditto.
5286 (h-ibit,h-fbit,h-tbit,h-mbits): New hardware elements.
5287 (h-cpsr): Make virtual. Add get/set specs.
5288 (h-spsr-fiq,h-spsr-svc,h-spsr-abt,h-spsr-irq,h-spsr-und): New hw.
5289 (h-spsr): New virtual reg.
5290 * arm7.cpu (shift-type): New explicitly defined keyword.
5291 (h-operand2-shifttype): Use it.
5292 (set-logical-cc-maybe): Delete carry-out arg. New args arg1,arg2.
5293 All callers updated. Don't set cbit.
5294 (logical-op): Add rm to ifield list. Change case to case:. Use
5295 shift-type enum as case choices. Set cbit.
5296 (and,orr,eor,add-imm): Uncomment out.
5297 (undefined): Temporarily comment out.
5298 * thumb.scm (mov,cmp,addi8,subi8,str-sprel,ldr-sprel): s/rd/bit10-rd/.
5299 (lda-pc,lda-sp): Ditto.
5300 (ldr-pc): Rename from ldr.
5301 (cbranch): Mark insns as being thumb insns.
5303 * attr.scm (<bitset-attribute>,parse-value): Recognize strings.
5305 * cgen-sid.scm: Don't load sid-arch.scm.
5306 (sim-arguments): Delete unused entries.
5307 * sid-arch.scm: Delete.
5309 * insn.scm (<insn>,iflds): Renamed from flds. All uses updated.
5310 (<insn>,ifld-assertions): New member.
5311 (<insn>,make!): New arg ifld-assertions, all callers updated.
5312 (<insn> accessors): Change insn:foo to insn-foo. All callers updated.
5313 (insn:fields): Delete.
5314 (-insn-parse): New arg ifld-assertions. All callers updated.
5315 (-insn-read,define-insn): New procs.
5316 (define-full-insn): New arg ifld-assertions. All callers updated.
5317 (insn-init!): New comment define-insn.
5319 * model.scm (-model-parse): Ensure at least one unit specified.
5321 * rtl.scm (-rtx-traverse-operands): Recognize environments.
5322 (<c-expr-temp>,get-name): New method.
5323 (-rtx-make-current-closure,s-closure): New proc.
5324 (hw:): Wrap rtx indices in a closure.
5325 (-gen-case-prefix): New proc.
5327 * rtx-funcs.scm (case:): Fix call to s-case.
5328 (closure): New rtx func.
5330 * hardware.scm (<hardware-base>): New member isas-cache.
5331 (<hardware-base>,get-isas): New method.
5332 (hardware-builtin): Indicate for all isas.
5333 * ifield.scm (-ifield-parse): Only keep if isa+mach are kept.
5334 * mach.scm (current-arch-mach-name-list): Return list of names.
5335 (current-isa-mach-name-list): Ditto.
5336 (define-arch): Install builtin objects here.
5337 * read.scm (keep-atlist?): Only keep if both mach and isa are
5339 (keep-mach-atlist?): New proc.
5340 (keep-isa-multiple?,current-keep-isa-name-list): New proc.
5341 (reader-install-builtin!): Renamed from -install-builtin!.
5342 * sid-cpu.scm (-gen-reg-access-defns): Renamed from
5343 -gen-cpu-reg-access-defns. Rewrite.
5344 (gen-reg-access-defn): Delete.
5345 (-gen-hardware-struct): New proc.
5346 (-gen-hardware-types): Simplify. Add multiple-isa support.
5347 (gen-semantic-fn,-gen-all-semantics): Delete.
5348 (-gen-read-args,-gen-read-case,-gen-read-switch): Delete.
5349 (cgen-cpu.c,cgen-read.c,cgen-sem-switch.c,cgen-mainloop.in): Delete.
5350 (cgen-write.cxx,cgen-semantics.cxx,cgen-decode.cxx): Renamed from *.c.
5351 Call sem-analyze-insns!.
5352 (cgen-semantics.cxx): Add multiple-isa support.
5353 * sid-decode.c (-gen-idesc-decls): Add multiple-isa support.
5354 (-gen-scache-decls,-gen-decode-fn): Ditto.
5355 (cgen-decode.h): Call sem-analyze-insns!.
5356 * sid-model.scm (cgen-model.cxx): Renamed from cgen-model.c.
5357 * sid.scm (-with-multiple-isa?): New variable.
5358 (option-init!): Initialize it.
5359 (option-set!): Set it.
5360 (with-multiple-isa?): New proc.
5361 (gen-cpu-ref): New arg isas. All callers updated.
5362 (gen-cpu-class): New proc.
5363 (*-get-macro,*-set-macro): Delete.
5364 (gen-reg-get-fun-name,gen-reg-set-fun-name): New procs.
5365 (-hw-gen-fun-get): Call gen-reg-get-fun-name.
5366 (-hw-gen-fun-set): Call gen-reg-set-fun-name.
5367 (-gen-hw-index): Call rtx-c instead of rtx-c-with-temps for rtxs.
5368 (-sim-insns-analyzed): New global variable.
5369 (sim-init!): Reset it.
5370 (sim-analyze-insns!): New proc.
5371 (sim-analyze!): Don't do instruction analysis here.
5372 (sim-finish!): Specify isa of x-invalid insn.
5373 * sim.scm (sim-finish!): Specify isa of added x-* virtual insns.
5375 1999-03-22 Doug Evans <devans@casey.cygnus.com>
5377 * thumb.cpu (cpu,mach,model): Delete.
5378 (dntf): New pmacro. Use it for all field definitions.
5379 (dntop): New pmacro. Use it for all operand definitions.
5380 (asr): Correct field list.
5381 (add,addi,sub,subi,add-sp,add-sp-neg): Ditto.
5383 * utils-cgen.scm (define-getters): New macro to simplify
5384 writing class accessors.
5385 (define-setters): Ditto.
5386 (sanitize): Recognize isa elements.
5388 * sid-cpu.scm (*): Replace cpu:parallel-exec? call with
5389 state-parallel-exec?.
5390 * sid-model.scm (*): Ditto.
5391 * sid-decode.scm (*): Ditto. Replace cpu:decode-assist with
5392 state-decode-assist.
5394 * sid-decode.scm (decode-bits): Replace list-reverse! with reverse!.
5395 (-gen-decode-switch): Rewrite to not generate deeply nested lists.
5396 * sim-decode.scm (-gen-decode-switch): Ditto.
5398 * sim-arch.scm (-regs-for-access-fns): Delete.
5399 (-biggest-reg-mode,-gen-arch-reg-access-decls): Delete.
5400 (-gen-arch-reg-access-defns): Delete.
5402 * sim-cpu.scm (*): Replace cpu:liw-insns with state-liw-insns,
5403 cpu:parallel-insns with state-parallel-insns, cpu:parallel-exec?
5404 with state-parallel=exec?.
5405 (cgen-*): Call sim-analyze-insns! here.
5406 * sim-decode.scm (cgen-*): Ditto.
5407 * sim-model.scm (cgen-*): Ditto.
5408 * sim.scm (-sim-insns-analyzed): New global variable.
5409 (sim-init!): Reset it.
5410 (sim-analyze-insns!): Renamed from sim-analyze!. Keep track if we've
5411 already done the analysis.
5413 * sim-model.scm (-gen-mach-defns): Add mach attribute number to
5416 * arm.cpu: Only include arm7.cpu,thumb.cpu if necessary.
5417 (arm arch): Update isa spec.
5418 (arm,thumb isas): Define.
5419 (arm7 cpu): default-insn-bitsize,base-insn-bitsize moved to isas.
5420 (arm7tdmi mach): Add isa spec.
5421 * arm7.cpu (*): Replace subreg: with subword:. Remove unnecessary
5422 `const' on word number.
5423 * fr30.cpu (fr30 arch): Update isa spec.
5425 (fr30bf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5427 * i960.cpu (i960 arch): Update isa spec.
5429 (i960base cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5430 liw-insns,parallel-insns moved to isas spec.
5431 * m32r.cpu (m32r arch): Update isas spec.
5433 (m32rbf cpu): default-insn-bitsize,base-insn-bitsize,decode-assist,
5434 liw-insns,parallel-insns moved to isa spec.
5435 * sparc.cpu (sparc arch): Update isas spec.
5436 (sparc isa): Define.
5437 * sparc32.cpu (sparc32 cpu): default-insn-bitsize,base-insn-bitsize,
5438 decode-assist moved to isa spec.
5439 * sparc64.cpu (sparc64 cpu): Ditto.
5440 * sparccom.cpu (trap insns): Correct mode of result of c-call:.
5441 * desc-cpu.scm (-gen-isa-table-defns): New proc.
5442 (-gen-mach-table-defns): Output mach table.
5443 (-gen-hash-defines): Delete insn size macros, except for
5445 (-cgen-cpu-open): Rewrite cpu_open handling. Take stdarg list of args.
5446 (cgen-desc.h): Define MAX_ISAS.
5447 (cgen-desc.c): Include stdarg.h. Call -gen-isa-table-defns.
5448 * mach.scm (<arch>): Rename arch-data to data. New member isa-list.
5449 (arch-* accessors): Renamed from arch:*. All callers updated.
5450 (current-arch-isa-name-list): New proc.
5451 (-arch-parse-isas): Renamed from -arch-parse-isa.
5452 (def-isa-attr!): Rewrite.
5453 (<iframe>): New class.
5454 (<itype>): New class.
5456 (isa-min-insn-bitsize,isa-max-insn-bitsize): New procs.
5457 (isa-integral-insn?,isa-parallel-exec?): New procs.
5458 (-isa-parse,-isa-read,define-isa): New proc.
5459 (<cpu>): Members default-insn-bitsize,base-insn-bitsize,decode-assist,
5460 liw-insns moved to <isa>.
5461 (cpu-* accessors): Renamed from cpu:*. All callers updated.
5462 (-cpu-parse,-cpu-read): Update.
5463 (state-*): Renamed from state:*. All callers updated.
5464 (state-default-insn-bitsize,state-base-insn-bitsize): Use isa spec,
5466 (state-parallel-insns,state-parallel-exec?,state-liw-insns): New procs.
5467 (state-decode-assist): New proc.
5468 (<derived-arch-data>): Delete min-insn-bitsize,max-insn-bitsize.
5469 (-adata-set-derived!): Rewrite.
5470 (adata-integral-insn?): Renamed from adata:integral-insn?. All
5472 (arch-init!): Add define-isa command.
5473 * read.scm (<reader>): Default keep-isa member to (all).
5474 (reader-* accessors): Renamed from reader:*. All callers updated.
5475 (-keep-isa-set!): Call string->symbol on isa name list.
5476 (keep-isa-validate!): Rewrite.
5477 (current-isa): New proc.
5478 (keep-isa?): Recognize "all".
5479 (-init-parse-cpu!): New arg keep-isa. All callers updated.
5480 Call -keep-isa-set!.
5481 (cmd-if): Recognize keep-isa?.
5482 (cpu-load): New arg keep-isa. All callers updated.
5483 (-opt-spec-update): New proc.
5484 (common-arguments): First arg is string, not symbol.
5485 (-cgen): Call -opt-spec-update. Rewrite argument parsing.
5487 * rtl.scm (rtx-get): Default mode of string arg is INT.
5489 * rtl.scm (s-subword): Renamed from s-subreg. All uses updated.
5491 * rtx-funcs.scm (join:): Pass cpu to handler.
5493 * configure.in (guile_include_dir): Delete.
5494 * configure: Rebuild.
5495 * Makefile.in: Rebuild.
5496 * doc/Makefile.in: Rebuild.
5498 * sid-cpu.scm (-extract-chunk-specs): New proc.
5499 (gen-define-fields): Use it.
5500 (-extract-chunk): New proc.
5501 (-gen-extract-beyond-var-list): Use it.
5502 (gen-extract-fields): Simplify.
5504 1999-03-22 Ben Elliston <bje@cygnus.com>
5506 * arm7.cpu (ldri-p): New instruction.
5507 (swi): Do not vector through 0x8 yet--there is nothing there.
5510 (all): Use (const x) in subreg expressions.
5512 1999-03-19 Ben Elliston <bje@cygnus.com>
5514 * arm7.cpu (smull): Use operand field `rs', not `mul-rn'. Thinko.
5517 1999-03-17 Doug Evans <devans@casey.cygnus.com>
5519 * fr30.cpu (define-arch): Specify "forced" default-alignment.
5520 * mach.scm (-parse-alignment): Recognize "forced" alignment.
5521 * sim-cpu.scm (-extract-chunk-specs): New proc.
5522 (gen-define-fields): Use it.
5523 (-extract-chunk): New proc.
5524 (-gen-extract-beyond-var-list): Use it.
5525 (gen-extract-fields): Simplify.
5527 Port to guile 1.3.1.
5528 * Makefile.am (GUILEINCDIR,GUILELDFLAGS,GUILELDADD): Delete.
5529 (LIBIBERTY): New var.
5530 (HOB_OBJS): Add cgen-gh.o.
5531 (hobbit): Delete $(CFLAGS) from link, add $(LIBS) $(LIBIBERTY).
5532 * Makefile.in: Rebuild.
5533 * acconfig.h: Add HAVE_3_ARG_SCM_MAKE_VECTOR.
5534 * config.in: Rebuild.
5535 * configure.in: Add checks for libdl, libreadline, libnsl, libsocket,
5536 libncurses, libtermcap.
5537 Add checks for needed functions in guile 1.2 not in guile 1.3,
5538 and vice versa. Add test for 3 argument scm_make_vector.
5539 * configure: Rebuild.
5540 * cgen-gh.c (scm_list_length,scm_list_append,scm_list_reverse): Provide
5541 definitions if guile doesn't have them.
5542 (gh_make_vector,gh_length,gh_vector_set_x,gh_vector_ref):
5543 (cgh_vector): Replace gh_vector with gh_make_vector. Replace gh_vset
5544 with gh_vector_set_x.
5545 (cgh_qsort): Replace gh_list_length with gh_length.
5546 * cgen-gh.h: Add decls for added functions.
5547 (cgh_qsort): Don't declare if IN_HOBBIT.
5548 * cos.c: Include config.h. Replace gh_vref with gh_vector_ref,
5549 gh_vset with gh_vector_set_x, gh_list_length with gh_length,
5550 scm_make_vector with gh_make_vector.
5551 * cos.scm: Use vector-length instead of length on vectors.
5552 * dev.scm (cload): Make varargs proc with keyword/value args.
5553 * hobscmif.h: Include config.h, cgen-gh.h. Undef make_vector and
5554 provide version that works with guile 1.2 or 1.3.
5555 Include private copy of scmhob.h.
5556 * scmhob.h: New file. Keep our own copy for now.
5558 Tue Mar 16 13:22:01 1999 Doug Evans <devans@canuck.cygnus.com>
5560 * rtl.scm (-rtx-traverse-error): Ensure expression is output in
5562 (-rtx-traverse-operands): Dump cx temp stack if debugging.
5563 (-cx-temp-dump-stack): Pretty up output.
5565 * arm.cpu: comment out thumb.cpu until isa support ready.
5566 * arm7.cpu (bl): Replace lr with (reg h-gr 14).
5567 (f-imm12,f-offset24,swi,undef): Fix thinko, add `const'.
5568 * thumb.cpu (h-gr-t,h-lr-t,h-sp-t,dnti,h-hiregs): s/MACH/ISA/.
5570 * sid-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5572 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5574 * hardware.scm (<hw-immediate>,mode-ok?): Ensure result is boolean.
5575 (<hw-address>,mode-ok?): unsigned/signed are compatible.
5577 * operand (op:new-mode): Improve error message.
5579 * arm.cpu: Move arm isa into arm7.cpu. Include arm7.cpu, thumb.cpu.
5580 * arm7.cpu: New file.
5582 1999-03-12 Ben Elliston <bje@cygnus.com>
5584 * arm.cpu: Lots of minor fixes after desk checking.
5586 1999-03-11 Doug Evans <devans@casey.cygnus.com>
5588 * thumb.cpu: snapshot of current work
5590 * rtl.scm (rtx-get): Tweak error message.
5592 1999-03-10 Doug Evans <devans@casey.cygnus.com>
5594 * Makefile.am (cos.o,cgen.o,cgen-gh.o): Fix dependencies.
5595 * Makefile.in: Rebuild.
5597 * cos.c (cos_vector_copy): New function.
5598 (_object_copy): Use it.
5600 * mode.scm (mode:eq?): Clean up.
5601 * rtl.scm (cx-new-mode): Copy attributes.
5602 (rtx-get): Don't make copy if <c-expr> with identical mode.
5604 * fr30.cpu (define-arch): Delete default-insn-word-bitsize,
5606 (gr-names): h-gr register names moved here.
5608 (cr-names): h-cr register names moved here.
5610 (dr-names): h-dr register names moved here.
5612 (h-ps): Replace FUN-ACCESS attribute with get/set specs.
5613 (h-sbit,h-ccr,h-scr,h-ilm): Ditto.
5614 * i960.cpu (define-arch): Delete default-insn-word-bitsize,
5616 * m32r.cpu (define-arch): Delete default-insn-word-bitsize,
5618 (gr-names): h-gr register names moved here.
5620 (cr-names): h-cr register names moved here.
5622 (h-accum): Replace FUN-ACCESS attribute with get/set specs.
5623 (h-accums,h-psw): Ditto.
5624 * sparc.cpu (define-arch): Delete default-insn-word-bitsize,
5626 (gr-names): h-gr register names moved here.
5627 (h-gr-indices): Delete.
5628 (sparc32 h-gr): Update. Replace FUN-ACCESS with get/set specs.
5629 (sparc64 h-gr): Ditto.
5630 (h-y): Add get/set specs.
5632 (fp operands): Rewrite.
5633 * sparc32.cpu (h-psr): Replace FUN-ACCESS with get/set specs.
5634 (h-tbr,h-cwp,h-wim): Ditto.
5635 * sparc64.cpu (h-fpsr): Add get/set specs.
5636 * sparccom.cpu (ldd-reg+reg): Load value all at once.
5637 (fp-ld-op): New arg `dest', all callers updated.
5638 (*): Replace `make-di' with `join'.
5640 * sid-cpu.scm (-gen-cpu-reg-access-defns): Use get/set specs if
5642 (gen-semantic-code): Save/restore rtl generator state.
5643 (cgen-cpu.h): Call rtl-gen-init!.
5644 * sid.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5645 (-gen-ifld-extract-beyond): Ditto.
5646 (<multi-ifield>,gen-ifld-extract): Ditto.
5647 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5649 (-hw-gen-set-quiet-pc): Ditto.
5650 (<hw-pc>,gen-write): Ditto.
5651 (-hw-cxmake-get): Ditto. Call getter function if present.
5652 (<hw-register>,cxmake-get-raw): New method.
5653 (<hw-register>,gen-set-quiet-raw): New method.
5654 (-hw-gen-set-quiet): New arg `gstate'.
5655 (hw-fun-access?): Delete.
5656 (gen-reg-access-defn): Output function contents.
5657 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5659 (-gen-hw-index): Ditto.
5660 (op:read): Update gen-read invocation.
5661 (op:write): Update gen-write invocation.
5662 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Handle raw-reg
5664 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5665 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5666 (<unit>,gen-profile-code): Update to sim.scm version.
5668 * sim-arch.scm (-regs-for-access-fns): New proc.
5669 (-biggest-reg-mode): New proc.
5670 (-gen-arch-reg-access-decls,-gen-arch-reg-access-defns): Rewrite.
5671 * sim-cpu.scm (-gen-hardware-types): Output get/set handlers for
5672 virtual regs separately.
5673 (-gen-cpu-reg-access-defns): Replace fun-access? with new
5675 (gen-semantic-code): Save/restore rtl generator state.
5676 (cgen-cpu.h): Call rtl-gen-init!.
5677 (cgen-cpu.c): Ditto. #include cgen-ops.h.
5678 * sim-model.scm: mach:cpu renamed to mach-cpu. mach:bfd-name
5679 renamed to mach-bfd-name.
5680 * sim.scm (-gen-ifld-extract-base): Update call to rtx-c-with-alist.
5681 (-gen-ifld-extract-beyond): Ditto.
5682 (<multi-ifield>,gen-ifld-extract): Ditto.
5683 (<scalar>,gen-sym-get-macro): Update call to gen-get-macro.
5684 (<scalar>,gen-sym-set-macro): Update call to gen-set-macro.
5685 (all gen-read,gen-write,cxmake-get,gen-set-* methods): New arg
5687 (hw-fun-access?): Delete.
5688 (-hw-gen-set-quiet-pc): New arg `gstate'.
5689 (<hw-register>,gen-get-macro): Rewrite.
5690 (<hw-register>,gen-set-macro): Rewrite.
5691 (-hw-gen-fun-get,-hw-gen-fun-set): Delete.
5692 (-hw-cxmake-get): New arg `gstate'. Rewrite.
5693 (<hw-register>,cxmake-get-raw): New method.
5694 (-hw-gen-set-quiet): New arg `gstate'. Rewrite.
5695 (<hw-register>,gen-set-quiet-raw): New method.
5696 (-gen-hw-index-raw): Update call to rtx-c. Update cxmake-get
5698 (-gen-hw-index): Ditto.
5699 (<hw-index>): New arg `gstate'.
5700 (-gen-hw-selector): Update call to rtx-c.
5701 (<pc>): New arg `gstate'.
5702 (op:read): Update gen-read invocation.
5703 (op:write): Update gen-write invocation.
5704 (<operand>,cxmake-get): Handle raw-reg.
5705 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): New arg `gstate'.
5706 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
5707 (<operand>,gen-set-quiet): Handle raw-reg.
5708 (<operand>,gen-set-trace): Handle raw-reg.
5709 (-gen-mach-data): mach:cpu renamed to mach-cpu.
5711 * desc-cpu.scm (gen-operand-decls): Take nub of operands for
5712 cgen_operand_type enum.
5713 (gen-operand-table): Add operand type enum. Replace pointer to
5714 hardware element with its enum. Null terminate table.
5715 (-gen-cpu-open): Add new `isa' argument to @arch@_cgen_cpu_open.
5716 Build operand table.
5717 * ifield.scm (-ifield-parse): Recognize ISA attribute.
5718 * mach.scm (<arch-data>): New member `isas'.
5719 (adata-isas): New accessor.
5721 (isa-default-insn-word-bitsize): New accessor.
5722 (isa-enum): New proc.
5723 (current-arch-default-insn-word-bitsize): Delete.
5724 (current-isa-list,current-isa-lookup): New procs.
5725 (-arch-parse-isa): New proc.
5726 (-arch-parse): Rewrite.
5727 (-arch-read): Recognize `isas'. Delete `default-insn-word-bitsize'.
5728 (define-arch): Define ISA attribute.
5729 (def-isa-attr!,isa-supports?): New procs.
5730 (<mach>): New member `isas'.
5731 (mach-isas): New accessor.
5732 (-mach-parse): New arg `isas', all callers updated.
5733 (-mach-read): Recognize `isas'.
5734 (arch-finish!): Rewrite.
5735 * opc-ibld.scm (-gen-fget-switch): Add `cd' arg to
5736 @arch@_cgen_get_{int,vma}_operand.
5737 (-gen-fset-switch): Add `cd' arg to @arch@_cgen_set_{int,vma}_operand.
5738 * opc-opinst.scm (-gen-operand-instance): Output operand enum instead
5739 of pointer to table entry.
5740 * opcodes.scm (gen-switch): Handle multiply defined operands.
5741 * operand.scm (op-sort): New proc.
5743 * hardware.scm (<hardware-base>): Rename getters/setters to get/set.
5744 (hw-getter,hw-setter): Renamed from hw-getters,hw-setter.
5745 (hw-enum): Accept symbol argument.
5746 (hardware-builtin!): Delete attribute FUN-ACCESS.
5747 * ifield.scm (ifld-encode-mode,ifld-decode-mode): New procs.
5749 * attr.scm (atlist-source-form): New proc.
5750 (attr-builtin!): New attr `PRIVATE'.
5751 * desc.scm (<keyword>,gen-defn): Make keyword entry table static.
5752 * desc-cpu.scm (-gen-hw-defn): Only output index and value tables
5753 if they have `PRIVATE' attribute.
5754 (gen-hw-table-defns): Output definitions of explicitly defined
5756 * hardware.scm (<keyword>): New member print-name. Rename member
5757 `value' to `values', all uses updated.
5758 (kw-mode,kw-print-name,kw-prefix,kw-values): New procs.
5759 (keyword-parse): Rewrite.
5760 (-keyword-read): New proc.
5761 (define-keyword): New proc.
5762 (-hw-parse-keyword): New proc.
5763 (-hw-parse-indices): Rewrite keyword handling, support new index spec
5765 (-hw-parse-values): Ditto.
5766 (-hw-parse-get,-hw-parse-set): Rewrite.
5767 (hardware-init!): Add new comment define-keyword.
5768 * mach.scm (<arch>): New member `kw-list'.
5769 (arch:kw-list,arch_set-kw-list!): New accessors.
5770 (current-kw-list,current-kw-add!,current-kw-lookup): New procs.
5772 * hardware.scm (<hw-register>,mode-ok?): Rewrite.
5773 * mode.scm (mode-class-integral?): New proc.
5774 (mode-class-float?,mode-class-numeric?): New procs.
5775 (mode-integral?,mode-float?,mode-numeric?): New procs.
5776 (mode-compatible?): New proc.
5777 * opcodes.scm (<ifield>,gen-insert): Update alist arg to
5779 (<ifield>,gen-extract): Ditto.
5780 * rtl.scm (-rtl-simulator?,-rtx-current-obj): Delete.
5781 (<gstate>): New class.
5782 (gstate-simulator?,gstate-set-simulator?!): New accessors.
5783 (gstate-context,gstate-set-context!): New accessors.
5784 (gstate-macro?,gstate-set-macro?!): New accessors.
5785 (gstate-make,gstate-copy): New procs.
5786 (-rtl-current-gstate): New global.
5787 (current-gstate-simulator?): New proc.
5788 (current-gstate-context,current-gstate-macro?): New procs.
5789 (current-gstate,current-gstate-set!): New procs.
5790 (rtl-gen-init!): Rewrite.
5791 (-rtx-valid-types): Add INTMODE, FLOATMODE, NUMMODE.
5792 (tstate-make): New arg `gstate', all callers updated.
5793 (tstate-set-expr-fn!,tstate-set-op-fn!): New accessors.
5794 (tstate-set-cond?!,tstate-set?,tstate-set-set?!): New accessors.
5795 (tstate-gstate,tstate-set-gstate!): New accessors.
5796 (tstate-copy): New proc.
5797 (tstate-new-cond?,tstate-new-set?): Rewrite.
5798 (-rtx-traverse-operands): Handle INTMODE, FLOATMODE, NUMMODE.
5799 (rtx-traverse): New arg `gstate', all callers updated.
5800 (rtx-strdump): New proc.
5801 (-simplify-for-compilation): New arg `gstate', all callers updated.
5802 (semantic-in-out-operands): Ditto.
5803 (semantic-attrs): Ditto.
5804 (rtx-eval): Rewrite. New arg `gstate', all callers updated.
5805 (rtx-eval-with-temps,rtx-eval-with-alist): Ditto.
5806 (rtx-value): Rewrite.
5807 (<c-expr>,gen-name): New method.
5808 (<c-expr>,gen-set-quiet): New arg `gstate', all callers updated.
5809 (<c-expr>,gen-set-trace): New arg `gstate', all callers updated.
5810 (cx-new-mode): New proc.
5811 (-rtx-c-with-tstate): New proc.
5812 (rtx-c,rtx-c-with-temps,rtx-c-with-alist): New arg `gstate', all
5814 (-rtx-mode): Rewrite.
5815 (-rtx-mode-compatible?): New proc.
5816 (<c-expr-temp>): New member `value'.
5817 (cx-temp:value): New accessor.
5818 (<c-expr-temp>,make!): Override default method.
5819 (<c-expr-temp>,cxmake-get): Rewrite.
5820 (<c-expr-temp>,gen-set-quiet): Rewrite.
5821 (<c-expr-temp>,gen-set-trace): Rewrite.
5822 (gen-temp-defs): Use cx-temp:value.
5823 (record-temp!): New arg value, all callers updated.
5824 (cx-temp:cx:make): Delete.
5825 (-cx-temp-dump-stack): New proc.
5826 (rtx-get): New arg `gstate', all callers updated. Do mode
5827 compatibility checks. Ensure result has specified mode.
5828 (rtx-set-quiet): New arg `gstate', all callers updated.
5829 (rtx-set-trace): Ditto.
5830 (s-c-call): New arg `tstate', all callers updated.
5831 (s-c-raw-call): Ditto.
5832 (s-unop,s-binop,s-binop-with-with,s-shop,s-boolifop,s-convop): Ditto.
5833 (s-cmpop,s-if,e-if): Ditto.
5834 (s-subreg): New proc.
5835 (-par-new-temp!): New proc.
5836 (-par-next-temp!): Rewrite.
5837 (-par-replace-set-dests): Use -par-new-temp!.
5838 (s-parallel): Rewrite temp handling. Use -rtx-c-with-state.
5839 (s-sequence): Use -rtx-c-with-state.
5840 * rtx-funcs.scm (*): Update.
5841 (raw-reg:): New rtx function.
5843 (join:,subreg:): New rtx functions.
5845 * insn.scm (<insn>): New members pre-cond-trap, condition,
5846 post-cond-trap, compiled-condition.
5848 * insn.scm (syntax-break-out): Replace eval with current-op-lookup.
5850 * opcodes.scm (<pc>,cxmake-get): New arg `selector'.
5852 * utils-cgen.scm (parse-symbol): New proc.
5853 (parse-string): New proc.
5854 (gen-get-macro,gen-set-macro): New arg `index-args'.
5855 (gen-set-macro2): Ditto. Enclose code in do { } while (0).
5856 Prepend \ to newlines.
5858 * utils.scm (alist-remove-duplicates): Delete.
5860 * sid.scm (sim-init!): Delete private debugging code.
5862 1999-03-10 Frank Ch. Eigler <fche@cygnus.com>
5864 * cgen-sid.scm: New file for C++ simulator application.
5865 * sid-arch.scm: Ditto.
5866 * sid-cpu.scm: Ditto.
5867 * sid-decode.scm: Ditto.
5868 * sid-model.scm: Ditto.
5870 * utils-cgen.scm (gen-mach-sid-name): Remove this accident.
5872 1999-03-05 Ben Elliston <bje@cygnus.com>
5874 * arm.cpu: New file.
5876 1999-03-03 Doug Evans <devans@casey.cygnus.com>
5878 * Makefile.am (CGEN_HOB_INPUT_FILES): Add hardware.scm.
5879 * Makefile.in: Rebuild.
5881 * attr.scm (<integer-attribute>,parse-value-def): Tweak.
5882 (-attr-parse): Validate default value.
5884 * read.scm (-CGEN-VERSION): Change to 0.7.1.
5885 (-CGEN-LANG-VERSION): Ditto.
5886 (-keep-all-machs): Renamed from -keep-all, all uses updated.
5887 (<reader>): New member keep-isa plus accessors.
5888 (-keep-isa-set!,keep-isa-validate!): New procs.
5889 (keep-isa?,keep-isa-atlist?,keep-isa-obj?): New procs.
5890 (common-arguments): New variable.
5891 (cgen-usage,getarg,catch-with-backtrace,option-arg): New procs.
5892 (-debug-repl,continue): New procs.
5893 (-cgen,cgen): New procs.
5894 * cgen-gas.scm: Rewrite.
5895 * cgen-opc.scm: Rewrite.
5896 * cgen-sim.scm: Rewrite.
5897 * cgen-stest.scm: Rewrite.
5899 * gas-test.scm (gas-test-init!): Call opcodes-init!.
5900 (gas-test-finish!): Call opcodes-finish!.
5901 (gas-test-analyze!): Call opcodes-analyze!.
5902 (<hw-asm>): New method test-data.
5903 (<operand>,testdata): Rewrite.
5904 * sim-test.scm (sim-test-init!): Call opcodes-init!.
5905 (sim-test-finish!): Call opcodes-finish!.
5906 (sim-test-analyze!): Call opcodes-analyze!.
5907 (<hw-asm>): New method test-data.
5908 (<operand>,testdata): Rewrite.
5910 1999-03-01 Doug Evans <devans@casey.cygnus.com>
5912 * fixup.scm (reverse!): Define if missing.
5913 * *.scm: Use reverse! instead of list-reverse!.
5915 * utils.scm (leading-id-char?): New proc.
5916 (id-char?): Rewrite.
5917 (chars-until-delimiter): New proc.
5918 * opc-itab.scm (extract-syntax-operands): Rewrite.
5919 (strip-mnemonic): Rewrite.
5920 (compute-syntax): Rewrite.
5922 * pmacros.scm (-pmacro-substr): New proc.
5923 (pmacros-init!): Add builtin .substr.
5925 1999-02-26 Doug Evans <devans@casey.cygnus.com>
5927 * thumb.cpu: New file.
5929 1999-02-24 Doug Evans <devans@casey.cygnus.com>
5931 * Makefile.am (CGENCFLAGS): New variable.
5932 (WITH_HOBBIT): Use automake conditional.
5933 (CGEN_HOB_SRC): New variable.
5934 (libcpu_a_SOURCES): Use $(CGEN_HOB_SRC).
5935 (*.o): Compile with CGENCFLAGS.
5936 (cgen-hob.c): Simplify.
5937 (cgen-nohob.c): New rule.
5938 (hobbit): Renamed from hob.x.
5939 (CLEANFILES): Add cgen-nohob.c.
5940 * Makefile.in: Rebuild.
5941 * doc/Makefile.in: Rebuild.
5942 * configure.in (AM_INIT_AUTOMAKE): Update CGEN version to 0.7.1.
5943 (WITH_HOBBIT): Use AM_CONDITIONAL.
5944 * configure: Rebuild.
5945 * aclocal.m4: Rebuild.
5947 * sim-arch.scm (-gen-arch-reg-access-defns): Replace string-map
5948 with string-write-map.
5950 * sim-cpu.scm (hw-need-storage?): New proc.
5951 (-gen-hardware-types): Use it.
5952 (gen-parallel-exec-elm): Call op-save-index?.
5954 * sim-decode.scm (cgen-decode.c): Call rtl-gen-init!.
5956 * sim.scm (-gen-ifld-extract-base): Use mode:class instead of
5958 (-gen-ifld-extract-beyond): Ditto.
5959 (<integer>): Delete all references.
5960 (<sim-hardware>): Delete.
5961 (hw-profilable?): New proc.
5962 (<hardware-base>): New methods gen-get-macro,gen-set-macro.
5963 (<hw-register>): Rename method get-index-mode to save-index?.
5964 (<hw-register>): New methods gen-get-macro,gen-set-macro.
5965 (<hw-register>,gen-sym-decl): Make virtual.
5966 (<hw-memory>,gen-sym-decl): Make virtual.
5967 (<hw-memory>): Rename method get-index-mode to save-index?.
5968 (<hw-address>,gen-sym-decl): Make virtual.
5969 (<operand>): New method save-index?.
5970 (sim-init!): Delete calls to sim-hw-init!,sim-hw-init-parsers!.
5972 * opc-itab.scm (opc-{parse,insert,extract,print}-handlers): opc-
5973 prefix added. All uses updated.
5975 * opc-opinst.scm (-gen-operand-instance): Output hw enum value
5976 rather than pointer to table entry.
5978 * opcodes.scm: Remove all attribute support, lives in desc.scm.
5979 Remove all hw-asm,op-asm support.
5980 (-gen-parse-number,-gen-parse-address): New procs.
5981 (<keyword>,gen-parse): Redo function name computation.
5982 (<keyword>,gen-print): Ditto.
5983 (<operand>,gen-function-name): Rewrite.
5984 (<operand>,gen-fget,gen-fset,gen-parse,gen-print): Ditto.
5985 (opcodes-init!): Delete call to add-parser!.
5987 * desc-cpu.scm (gen-hw-decls): Rename enum hw_type to cgen_hw_type.
5988 Define enum using hardware semantic name.
5989 (-gen-hw-decl,-gen-hw-defn): New procs.
5990 (gen-hw-table-decls): Use -gen-hw-decl.
5991 (gen-hw-table-defns): Use -gen-hw-defn. Rewrite generation of
5992 CGEN_HW_ENTRY structs.
5993 (gen-operand-table): Output hw's enum, not pointer to table entry.
5994 (-gen-cpu-open): Build table of selected hardware elements.
5996 * desc.scm (-hw-asm-specs,-parse-hw-asm): Delete.
5997 (<hardware> support): Delete.
5998 (<hw-asm>): Delete, moved to hardware.scm.
5999 (normal-hw-asm,hw-asm:parse,hw-asm:print): Delete.
6000 (<hw-asm>,gen-table-entry): New method.
6001 (<hw-asm>,parse!): Delete.
6002 (<keyword>,gen-table-entry): New method.
6003 (<keyword>,parse!): Delete.
6004 (<hw-{register,memory,immediate,address}>): Delete forwarding methods
6005 for gen-decl,gen-defn,gen-ref,gen-init.
6006 (desc-init!): Don't create parser for operand asm specs.
6008 * attr.scm (attr-builtin!): Delete UNSIGNED attribute.
6009 * ifield.scm (<ifield>): New member `mode'.
6010 (<ifield>,make!): New arg `mode'.
6011 (ifld-mode): Rewrite.
6012 (ifld-hw-type): Rewrite.
6013 (<ifield>,min-value): Rewrite.
6014 (<ifield>,max-value): Rewrite.
6015 (-ifield-parse): New arg `mode'.
6016 (-ifield-read): Update.
6017 (define-full-ifield): New arg `mode'.
6018 (define-full-multi-ifield): Ditto.
6019 (-multi-ifield-parse): Ditto.
6020 (-multi-ifield-read): Update.
6021 (define-full-multi-ifield): New arg `mode'.
6022 (ifield-builtin!): Update definition of f-nil.
6023 * simplify.inc (define-normal-ifield): Update call to
6025 (define-normal-multi-ifield): Update call to define-full-multi-ifield.
6026 (define-normal-hardware): Delete arg asm. New args indices, values,
6027 handlers. Update call to define-full-hardware.
6028 (define-simple-hardware,dsh): New pmacros.
6029 (define-normal-operand): Update call to define-full-operand.
6030 * fr30.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6031 Specify INT/UINT mode instead.
6032 (h-gr,h-cr): Use "indices" instead of "asm".
6033 (h-dr,h-ps): Update keyword syntax.
6034 (h-r13,h-r14,h-r15): Ditto.
6035 (h-nbit,h-zbit,h-vbit,h-cbit): Use dsh instead of dnh.
6036 (h-d0bit,h-d1bit,h-ibit,h-sbit,h-tbit,h-ccr,h-scr,h-ilm): Ditto.
6037 (m4): Fix typo on HASH-PREFIX. Use "handlers" instead of "asm".
6038 (reglist_low_ld,reglist_hi_ld,reglist_low_st,reglist_hi_st): Ditto.
6039 * i960.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6040 Specify INT/UINT mode instead.
6041 (h-gr): Use "indices" instead of "asm".
6042 (h-cc): Update keyword syntax.
6043 * m32r.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6044 Specify INT/UINT mode instead.
6045 (h-hi16,h-slo16,h-ulo16): Update.
6046 (h-gr,h-cr): Use "indices" instead of "asm".
6047 (h-accum,h-cond,h-psw,h-bpsw,h-bbpsw,h-lock): Use dsh instead of dnh.
6048 (h-accums): Update keyword syntax.
6049 (hash,hi16,slo16,ulo16): Use "indices" instead of "asm".
6050 * sparc.cpu (f-*): Delete UNSIGNED attribute. Default is now UNSIGNED.
6051 Specify INT/UINT mode instead.
6052 (h-gr-indices): New pmacro.
6053 (h-gr32,h-gr64): Split up from h-gr.
6054 (h-a): Update type spec. Use values instead of asm spec.
6055 (h-icc-[cnvz],h-xcc-[cnvz]): Use dsh instead of dnh.
6056 (h-y,h-annul-p): Ditto.
6057 (h-asr): Update keyword spec.
6058 (h-lo10,h-lo13,h-hi22): Update.
6059 (get-freg-spec,set-freg-spec): New pmacros.
6060 (h-fr32,h-fr64): Split up from h-fr.
6061 (rdd): Comment out get/set specs.
6062 (lo10,lo13,hi22): Use "handlers" instead of "asm".
6063 * sparc32.cpu (h-psr): Use dsh instead of dnh.
6064 (h-s,h-ps,h-pil,h-et,h-tbr,h-cwp,h-ag,h-ec,h-ef,h-fsr): Ditto.
6065 * sparc64.cpu (f-*): Delete UNSIGNED attribute. Default is now
6066 UNSIGNED. Specify INT/UINT mode instead.
6067 (h-*): Use dsh instead of dnh where appropriate.
6068 (h-ixcc): Update type spec. Use "values" instead of "asm".
6069 (h-p,h-membarmask): Ditto.
6070 (membarmask): Use "handlers" instead of "asm".
6072 * hardware.scm (<hardware-base>): New member sem-name,type,indices,
6073 values,handlers,getters,setters plus accessors.
6074 (hw-mode-ok?,hw-default-mode): New procs.
6075 (<hardware-base>): Rename method new-mode to mode-ok?
6076 (<hardware-base>): New method get-index-mode.
6077 (hw-index-mode): New proc.
6078 (pc?): Delete, moved to operand.scm.
6079 (address?): New proc.
6080 (<hardware>): Delete.
6081 (<hw-asm>): Definition moved here from desc.scm.
6082 (keyword-parse): New proc.
6083 (hardware-parsers): Delete.
6084 (-parse-hw-type,-parse-hw-asm,-parse-hw-profile): Delete.
6085 (-hw-parse-indices,-hw-parse-values,-hw-parse-handlers): New procs.
6086 (-hw-parse-get,-hw-parse-set): New procs.
6087 (-hw-parse): Delete args aasm,profile,extra. New args semantic-name,
6088 indices,values,handlers,get,set. Rewrite.
6089 (-hw-read-extra): Delete.
6091 (define-hardware): Don't add object if not selected.
6092 (define-full-hardware): Ditto.
6093 (current-hw-sem-lookup,current-hw-sem-lookup-1): New procs.
6094 (<hw-register>): Member `type' moved to baseclass. Delete member
6096 (<hw-register>,parse!): Rewrite.
6097 (<hw-register>): Delete methods get-rank,get-mode.
6098 (<hw-register>): Method new-mode renamed to mode-ok?
6099 (<hw-register>): New method get-index-mode.
6100 (<hw-pc>,parse!): Rewrite.
6101 (<hw-memory>): Member `type' moved to baseclass. Delete member hw-asm.
6102 (<hw-memory>,parse!): Rewrite.
6103 (<hw-memory>): Delete methods get-rank,get-mode.
6104 (<hw-memory>): Method new-mode renamed to mode-ok?
6105 (<hw-memory>): New method get-index-mode.
6106 (<hw-immediate>): Member `type' moved to baseclass. Delete member
6108 (<hw-immediate>,parse!): Rewrite.
6109 (<hw-immediate>): Delete methods get-rank,get-mode.
6110 (<hw-immediate>): Method new-mode renamed to mode-ok?
6111 (<hw-address>): Delete member hw-asm.
6112 (<hw-address>,parse!): Rewrite.
6113 (<hw-address>): Delete methods get-rank,get-mode.
6114 (<hw-address>): Method new-mode renamed to mode-ok?
6115 (hw-profilable?): Delete.
6116 (hardware-init!): Delete hardware-parsers reference.
6117 Update argument specs of command define-full-hardware.
6118 (hardware-builtin!): Update definitions of hardware builtins.
6119 * operand.scm (<operand>): New members hw-name,mode-name.
6120 Delete member op-asm. New member handlers.
6121 (<operand>,make!): Update.
6122 (op:hw-name,op:mode-name,op:handlers): New procs.
6125 (<operand>): New method get-index-mode.
6126 (<pc>,make!): Update.
6127 (op:new-mode): Rewrite.
6128 (operand-parsers): Delete.
6129 (-operand-parse): Rewrite. Return #f if insn not selected.
6130 (-op-read-extra): Delete.
6131 (-operand-read): Update.
6132 (define-operand,define-full-operand): Update.
6133 (operand-init!): Delete operand-parsers reference.
6134 Update syntax of define-full-operand command.
6136 * insn.scm (-insn-parse): Rewrite. Return #f if insn not selected.
6137 (define-full-insn): Update.
6138 * minsn.scm (-minsn-parse): Rewrite. Return #f if insn not selected.
6139 (define-full-minsn): Update.
6141 * mode.scm (<mode>): New member class.
6142 (mode:class): New proc.
6144 (-mode-parse): New arg class.
6145 (define-full-mode): Update.
6146 (mode-find): Rewrite.
6147 (mode-make-int,mode-make-uint): New procs.
6148 (mode-init!): Update syntax of define-full-mode command.
6149 (mode-builtin!): Update definitions of builtin modes.
6151 * model.scm (<profile>): Delete.
6153 * read.scm (keep-atlist?): New proc.
6154 (keep-multiple?): New proc.
6155 (<parser-list>): Delete.
6156 (add-parser!,parse-spec!): Delete.
6158 * rtl.scm (def-rtx-node): Prepend arg *tstate* to all handlers.
6159 (def-rtx-syntax-node): Ditto.
6160 (-rtx-traverse-debug?): New variable.
6161 (tstate-make): New proc.
6162 (tstate-expr-fn,tstate-op-fn,tstate-cond?,tstate-set?): New procs.
6163 (tstate-new-cond?,tstate-new-set?): New procs.
6164 (-rtx-traverse-normal): Delete args cond?,expr-fn,op-fn. New arg
6165 tstate. All callers updated.
6166 (-rtx-traverse-expr,-rtx-traverse-debug): Ditto.
6167 (-rtx-traverse-list,-rtx-traverse-operands): Ditto.
6168 (-build-operand!): Replace arg cond? with tstate.
6169 (-build-reg-operand!,-build-mem-operand!): Ditto.
6170 (-build-index-of-operand!): Update making of <operand> object.
6171 (s-ifield): New arg tstate. All callers updated.
6172 (hw:): New arg tstate. All callers updated. Replace call to
6173 current-hw-lookup with current-hw-sem-lookup-1.
6174 (s-index-of): New arg tstate. All callers updated.
6176 (-rtx-use-sem-fn?): New proc.
6177 (s-unop,s-binop,s-shop): Use it. Only use semantic mode when using
6179 (s-convop): Only use semantic mode when using semantic cover fns.
6180 (s-cmpop): Call -rtx-use-sem-fn?.
6181 (s-cond,s-case): New arg tstate. All callers updated.
6182 (s-parallel,s-sequence): Ditto.
6184 * rtx-funcs.scm (set,set-quiet:): Use SETRTX to mark the set dest.
6186 * types.scm (<scalar>): Rewrite implementation.
6187 (<integer>): Delete.
6188 (parse-type): Rewrite.
6190 * utils-cgen.scm (parse-handlers): New proc.
6192 * utils.scm (!=): New proc.
6194 Tue Feb 23 12:10:29 1999 Doug Evans <devans@canuck.cygnus.com>
6196 * pmacros.scm (-pmacro-expand): Fix typo.
6198 1999-02-12 Doug Evans <devans@casey.cygnus.com>
6200 * pmacros.scm (-pmacro-hex,-pmacro-upcase,-pmacro-downcase): New procs.
6201 (pmacros-init!): Install builtins .hex, .upcase, .downcase.
6202 * i960.cpu (build-hex2): New pmacro.
6203 (insn-opcode): Simplify.
6204 (insn-opcode2): Ditto.
6206 * cgen-sim.scm (catch-with-backtrace): Comment out debugging printf.
6207 * cgen-stest.scm (catch-with-backtrace): Ditto.
6209 1999-02-11 Doug Evans <devans@casey.cygnus.com>
6211 * pmacros.scm (-pmacro-lookup): Renamed from -pmacro-ref.
6212 All callers updated.
6213 (-pmacro-invoke): New proc.
6214 (-pmacro-sym,-pmacro-str): New procs.
6215 (-pmacro-iota,-pmacro-map,-pmacro-apply): New procs.
6216 (pmacros-init!): Install builtins .iota, .map, .apply.
6217 * sparc.cpu (cc-tests): Add CC_NZ,CC_Z,CC_GEU,CC_LU aliases.
6218 (h-fr): Simplify register name spec.
6219 * sparc64.cpu (cond-move-1): New arg mnemonic. All callers updated.
6220 * utils.scm (num-args-ok?): New proc.
6222 1999-02-10 Doug Evans <devans@casey.cygnus.com>
6224 * pmacros.scm (-pmacro-error): New proc.
6225 (-pmacro-expand): Use it.
6226 (-pmacro-splice): New proc.
6227 (pmacros-init!): Install new builtin .splice.
6229 * sparc.cpu: Include sparc64.cpu when appropriate.
6230 (f-mmask,f-simm11): Moved to sparc64.cpu.
6231 (insn-fmt2): Add FLUSH,FLUSHW,IMPDEP1,IMPDEP2,MEMBAR,MOVCC.
6232 (ANNUL attribute): Delete.
6233 (test-* pmacros): New arg cc, all callers updated.
6234 (uncond-br-sem,cond-br-sem): New arg cc, all callers updated.
6235 * sparc32.cpu (atom-op): Moved to sparccom.cpu and renamed to
6237 (ldstub,swap): Moved to sparccom.cpu.
6238 * sparc64.cpu: Add more insns.
6240 1999-02-09 Doug Evans <devans@casey.cygnus.com>
6242 * sim-cpu.scm (cgen-semantics.c): Replace CGEN_INSN_ATTR with
6244 (cgen-sem-switch.c): Ditto.
6245 * sim-decode.scm (-gen-idesc-decls): struct idesc definition
6246 moved to cgen-engine.h.
6247 (-gen-insn-sem-type): Delete, struct insn_sem mvoed to cgen-engine.h.
6248 (-gen-idesc-init-fn,init_idesc): Lookup insn table via descriptor, not
6249 global. Cache attributes and insn length in IDESC.
6250 * sim-model.scm (-gen-cpu-defns): Generate new func @cpu@_prepare_run.
6251 @cpu@_opcode renamed to @cpu@_get_idata.
6252 (-gen-mach-defns,@mach@_init_cpu): Don't initialize IDESC table here,
6253 done later underneath sim_resume.
6254 (@mach@_mach): Record @cpu@_prepare_run.
6255 * sim.scm (<hardware-base>,cxmake-get): New arg selector, all callers
6257 (-hw-gen-set-quiet-pc): Ditto.
6258 (-hw-cxmake-get,-hw-gen-set-quiet): Ditto.
6259 (<hw-memory>,cxmake-get,gen-set-quiet): Ditto.
6260 (<hw-addr>,cxmake-get): Ditto.
6261 (<hw-iaddr>,cxmake-get): Ditto.
6262 (<pc>,cxmake-get): Ditto.
6263 (<operand>,cxmake-get,gen-set-quiet,gen-set-trace): Ditto.
6264 (-op-gen-set-quiet,-op-gen-set-quiet-parallel): Ditto.
6265 (-op-gen-set-trace,-op-gen-set-trace-parallel): Ditto.
6266 (<hw-pc>,gen-write): Use hw-selector-default.
6267 (<hw-register>,gen-write): Ditto.
6268 (<hw-memory>,gen-write): Ditto.
6269 (-gen-hw-index-raw,-gen-hw-index): Handle selector.
6270 (-gen-hw-selector): New proc.
6272 * desc.scm: New file.
6273 * desc-cpu.scm: New file.
6274 * opcodes.scm: Split up into several smaller files.
6275 * opc-asmdis.scm: New file.
6276 * opc-ibld.scm: New file.
6277 * opc-itab.scm: New file.
6278 * opc-opinst.scm: New file.
6279 * Makefile.am (desc): New target.
6280 (opcodes): Update args to cgen-opc.scm.
6281 * Makefile.in: Rebuild.
6282 * aclocal.m4: Rebuild.
6283 * config.in: Rebuild.
6284 * configure.in: Update arg to AC_INIT.
6285 Update version number to 0.7.0. Change AM_EXEEXT to AC_EXEEXT.
6286 Update AC_PREREG arg to 2.13. Change AM_PROG_INSTALL to
6288 * configure: Rebuild.
6289 * cgen-gas.scm: Update files to load.
6290 * cgen-opc.scm: Ditto. Reorganize option letters.
6291 * cgen-sim.scm: Update files to load.
6292 * cgen-stest.scm: Ditto.
6293 * dev.scm (cload): New app "DESC".
6294 (load-opc): Update files to load.
6295 (load-gtest,load-sim,load-stest): Ditto.
6297 * attr.scm (bool-attr?): New proc.
6298 (attr-list-enum-list): New proc.
6299 (-attr-sort): Rewrite.
6300 (attr-builtin!): Give ALIAS attribute a fixed index.
6301 * utils-cgen.scm (gen-attr-enum-decl): Call attr-list-enum-list to
6302 calculate attribute enum list.
6303 (gen-attr-mask): Subtract CGEN_ATTR_BOOL_OFFSET from attribute's enum.
6305 * insn.scm (-insn-parse): Renamed from parse-insn.
6307 * hardware.scm (-hw-parse): New arg errtxt, all callers updated.
6310 * mode.scm (-mode-parse): Renamed from parse-mode.
6312 * operand.scm (<operand>): New member `selector'.
6313 (<operand>,make!): Use default selector.
6314 (hw-selector-default): New variable.
6315 (hw-selector-default?): New proc.
6317 * pmacros.scm (pmacros-init!): New proc.
6318 (-pmacro-{make,name,arg-spec,transformer,comment}): New procs.
6319 (-env-set!): Delete.
6320 (-pmacro-expand): New proc apply-macro.
6321 Use it in scan-list,scan. Scan list first, then see if macro
6323 (define-pmacro): Rewrite.
6324 * read.scm (-init-parse-cpu!): Call utils-init!,parse-init!.
6326 * rtl.scm (-simplify-for-compilation): Ensure at least one mach
6327 selected if (current-mach) seen.
6328 (rtx?): Renamed from rtx-uneval?, all callers updated.
6329 (<c-expr>,gen-set-quiet,gen-set-trace): New arg selector, all callers
6331 (<c-expr-temp>,cxmake-get,gen-set-quiet,gen-set-trace): New arg
6332 selector, all callers updated.
6333 (hw:): New arg selector, all callers updated. Delete old comments
6335 (reg:,mem:): Handle selectors
6336 * rtx-funcs.scm (reg:): Handle selectors.
6338 * read.scm: Renamed from cpu.scm.
6339 (<command>): New class.
6340 (<reader>): New member commands.
6341 (reader-add-command!): New proc.
6342 (reader-lookup-command): New proc.
6343 (reader-error,-reader-process-expanded,reader-process): New procs.
6344 (reader-read-file!): New proc.
6345 (include): Call reader-read-file!.
6347 (cpu-load): Call reader-read-file!.
6348 * utils.scm (num-args): New proc.
6349 * simplify.inc: New file.
6350 * *.scm: Delete def-foo procs. Rewrite define-foo/define-full-foo
6351 procs. Move define-normal-foo procs (and abbreviated forms) to
6352 simplify.inc. Install define-foo/define-full-foo commands in foo-init!
6354 * fr30.cpu: Include simplify.inc.
6355 * fr30.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6356 * i960.cpu: Include simplify.inc.
6357 * m32r.cpu: Include simplify.inc.
6358 * m32r.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6359 (CGEN_PRINT_NORMAL): Use CGEN_BOOL_ATTR.
6360 * sparc.cpu: Include simplify.inc.
6361 * sparc.opc: CGEN_OPCODE_DESC renamed to CGEN_CPU_DESC.
6362 * utils-cgen.scm (parse-error): Moved to read.scm.
6363 (sanitize): Rewrite.
6364 (utils-init!): New proc.
6366 1999-02-02 Doug Evans <devans@casey.cygnus.com>
6368 * sparc.cpu: New file.
6369 * sparc32.cpu: New file.
6370 * sparc64.cpu: New file.
6371 * sparccom.cpu: New file.
6372 * sparc.opc: New file.
6374 1999-01-27 Frank Eigler <fche@cygnus.com>
6376 * utils.scm (gen-copyright): New proc.
6378 1999-01-27 Doug Evans <devans@casey.cygnus.com>
6380 Parameterize rtl parsing, rather than having lots of little handlers.
6381 * rtl.scm (<rtx-func>): New members arg-types,arg-modes.
6382 Delete member traverse.
6383 (rtx:set-traverse!): Delete.
6384 (-rtx-valid-types,-rtx-valid-matches): New variables.
6385 (-rtx-func-lookup): Take symbol or <rtx-func> object as argument
6386 instead of expression. All callers updated.
6387 (def-rtx-node): New args arg-types,arg-modes.
6388 (def-rtx-syntax-node): Ditto.
6389 (def-rtx-dual-mode): Ditto.
6390 (-rtx-macro-expand-list): Renamed from -rtx-macro-maybe-expand-list.
6391 All callers updated.
6392 (-rtx-macro-expand): Renamed from -rtx-macro-maybe-expand.
6393 All callers updated.
6394 (rtx-macro-expand): New proc.
6395 (-rtx-traverse-check-args): Delete.
6396 (-rtx-traverse-normal): Call -rtx-traverse-expr rather than calling
6397 an rtx specific traverser.
6398 (-rtx-any-mode?,-rtx-symornum?): New procs.
6399 (-rtx-traverse-rtx-list,-rtx-traverse-error): New proc.
6400 (-rtx-traverse-no-mode): Delete.
6401 (-rtx-traverse-syntax-expr,-rtx-traverse-syntax-no-mode): Delete.
6402 (-rtx-traverse-operands): Rewrite.
6403 (-rtx-traverse-expr): Rewrite.
6404 (rtx-traverse): Don't expand macros here, leave for caller to do.
6405 (rtx-simplify): Delete.
6406 (rtx-compile-time-constant?): Rewrite. Handle FALSE/TRUE for boolean
6408 (rtx-true?,rtx-false?): Ditto.
6409 (-rtx-ref-type): Set dest is operand 1 now.
6410 (-simplify-for-compilation): New proc.
6411 (semantic-in-out-operands): Recognize regno as an alias for index-of.
6412 Expand macros before calling rtx-traverse. Sort operands by name
6413 to avoid unnecessary semantic formats.
6414 (semantic-attrs): New proc.
6415 (rtx-uneval?): Handle (<rtx-func> ...).
6416 (s-boolifop): Delete arg mode. All callers updated.
6417 * rtx-funcs.scm (all non-macros): Add arg-type and arg-mode specs.
6418 (eq-attr): New arg obj.
6420 * m32r.cpu (rach): Update calls to andif.
6422 * minsn.scm (-minsn-parse-expansion): Renamed from
6423 parse-minsn-expansion.
6424 (-minsn-parse): Renamed from parse-minsn.
6425 (-minsn-read): Renamed from read-minsn.
6426 (def-minsn): Don't check APPLICATION here.
6427 (def-full-minsn): New proc.
6428 (define-macro-insn): Check APPLICATION here. Expand macros.
6429 (define-normal-macro-insn): Ditto.
6431 * utils.scm (word-value): New arg start-lsb?.
6432 (word-mask,word-extract): Ditto.
6433 (split-bits,powers-of-2): Use integer-expt instead of expt.
6434 (bit-set?): Handle 32 bit values (which are bignums).
6435 (cg-logand,cg-logxor): New functions.
6436 * ifield.scm (<ifield>,field-mask): Update call to word-mask.
6437 (<ifield>,field-value): Update call to word-value.
6438 (<ifield>,min-value): Use integer-expt instead of expt.
6439 (<ifield>,max-value): Ditto.
6441 * hardware.scm (<hw-register>,new-mode): Rename local mode to cur-mode.
6443 * insn.scm (def-full-insn): Discard ALIAS insns if simulator.
6445 Compute raw instruction format in addition to semantic based format.
6446 * iformat.scm: Delete members cti?,sem-in-ops,sem-out-ops.
6447 (<iformat> accessors): Rename accessors to ifmt-*.
6448 (<sformat>): New class.
6449 (fmt-enum): Renamed from fmt:enum.
6450 (-ifmt-search-key): Rewrite.
6451 (-sfmt-search-key): New proc.
6452 (ifmt-analyze): Rename arg include-sem-operands? to compute-sformat?
6453 Compute iformat and sformat search keys.
6454 (ifmt-build): Update.
6455 (sfmt-build): New proc.
6456 (-ifmt-lookup-ifmt!,-ifmt-lookup-sfmt!): New procs.
6457 (ifmt-compute!): Compute instruction format <iformat> based on
6458 instruction fields alone. Compute new semantic format <sformat>
6459 based on instruction fields and semantic information.
6460 (ifmt:lookup): Delete.
6461 * mach.scm (<arch>): New member sfmt-list, plus accessors.
6462 (current-sfmt-list): New proc.
6463 * insn.scm (<insn>): Rename member fmt-tmp to tmp.
6464 Rename member fmt to ifmt. New members fmt-desc, sfmt.
6465 (insn-length,insn-length-bytes): Update.
6466 (insn:mask-length,insn:mask): Update.
6467 (insn-lookup-op): Update.
6468 * gas-test.scm (gas-test-analyze!): Update.
6469 (gen-gas-test): Ditto.
6470 * sim-test.scm (sim-test-analyze!): Update.
6471 (gen-sim-test): Ditto.
6472 * opcodes.scm (gen-operand-instance-table): Update.
6473 (gen-operand-instance-ref): Ditto.
6474 (max-operand-instances): Use heuristic if semantics not parsed.
6475 (ifmt-opcode-operands): Renamed from fmt-opcode-operands.
6476 (opcodes-analyze!): Only scan semantics of building operand instance
6478 * sim-cpu.scm (*) Update calls to <iformat>/<sformat> accessors.
6479 (-gen-extract-ifmt-macro): Renamed from -gen-extract-fmt-macro.
6480 * sim-decode.scm (*) Update calls to <iformat>/<sformat> accessors.
6481 (gen-sfmt-argvars-defns): Renamed from gen-ifmt-argvars-defns.
6482 (gen-sfmt-argvars-assigns): Renamed from gen-ifmt-argvars-assigns.
6483 * sim-model.scm (*) Update calls to <iformat>/<sformat> accessors.
6484 * sim.scm (*) Update calls to <iformat>/<sformat> accessors.
6486 * sim-decode.scm (usable-decode-bit?): Rename from decode-bit?
6487 New arg lsb0? All callers updated.
6488 (decode-bits): New arg lsb0?. All callers updated.
6489 (opcode-slots): Update call to bit-set?. Call integer-expt instead
6491 (-gen-decode-bits): New arg lsb0?. All callers updated.
6492 (build-slots): Call integer-expt instead of expt.
6493 (build-decode-table-entry): Handle crossing word boundaries better.
6494 (-gen-decode-switch): New arg lsb0?. All callers updated.
6495 (-gen-extract-decls): Rename decode format entry from ifmt to sfmt.
6497 * enum.scm (define-enum): Rewrite.
6498 (define-normal-enum): Ditto.
6499 (def-full-insn-enum): New proc.
6500 (define-normal-insn-enum): Rewrite.
6502 * attr.scm (<bitset-attribute>,gen-value-for-defn): Ensure result is
6504 (<{integer,enum}-attribute>,gen-value-for-defn): Ditto.
6506 * dev.scm: Add sid support.
6508 * Makefile.am (opcodes,sim-arch,sim-cpu): New targets.
6509 (CLEANFILES): Add tmp-*.
6510 * Makefile.in: Rebuild.
6512 * doc/Makefile.am: New file.
6513 * doc/Makefile.in: New file.
6514 * doc/cgen.texi: New file.
6515 * Makefile.am (SUBDIRS): Define.
6516 * Makefile.in: Rebuild.
6517 * configure.in: Create doc/Makefile.
6518 * configure: Rebuild.
6520 1999-01-18 Doug Evans <devans@casey.cygnus.com>
6522 * insn.scm (insn:syn): Delete.
6524 1999-01-15 Doug Evans <devans@casey.cygnus.com>
6526 * fr30.cpu (model fr30-1): Add state variables load-regs,
6527 load-regs-pending. Delete h-gr. Clean up operand names of all units.
6528 * m32r.cpu (model m32r/d): Clean up operand names of u-exec.
6529 (model m32rx): Ditto.
6530 (addi): Simplify function unit usage spec.
6531 (ld-plus): Rewrite operand names in function unit usage spec.
6532 (mvtachi,mvtachi-a,mvtaclo,mvtaclo-a,st-plus,st-minus): Ditto.
6533 * sim.scm (<unit>,gen-profile-code): Redo how operand names are
6534 overridden. Allow operand to appear in input and output spec.
6535 (<insn>,gen-profile-code): string-append -> string-list.
6537 * ifield.scm (define-ifield): Call pmacro-expand.
6538 (define-full-ifield,define-normal-ifield): Ditto.
6539 (define-multi-ifield,define-normal-multi-ifield): Ditto.
6541 * sim.scm (gen-argbuf-type): Keep leading part of ARGBUF same for
6542 with-scache and without-scache cases.
6544 1999-01-14 Doug Evans <devans@casey.cygnus.com>
6546 * fr30.cpu (fr30-1): Add state variable h-gr.
6547 Add units u-cti, u-load, u-store, u-ldm, u-stm.
6548 (all insns): First pass at providing cycle counts.
6549 * sim.scm (<unit>,gen-profile-code): Only check for output operands
6550 when initializing unit output operands, ditto for input operands.
6552 * insn.scm (insn-length,insn-length-bytes): New procs.
6553 * mach.scm (-adata-set-derived!): Use them.
6554 * sim-cpu.scm (-gen-sem-case): Ditto.
6556 * sim-cpu.scm (-gen-trace-record-type): PCADDR->IADDR.
6557 (-gen-write-case): Ditto.
6558 (gen-semantic-fn): Ditto. Split into two:
6559 -gen-scache-semantic-fn and -gen-no-scache-semantic-fn. Fix bitrot
6561 (-gen-all-semantic-fns): Renamed from -gen-all-semantics. Handle
6562 scache/no-scache appropriately. All callers updated.
6563 (-gen-sem-case): PCADDR->IADDR.
6564 * sim.scm (gen-argbuf-type): PCADDR->IADDR.
6566 * sim-decode.scm (*): Replace string-append,string-map with
6567 string-list,string-list-map where the result is sufficiently large.
6568 (-gen-decode-insn-table): Go back to simple version for non-scache
6569 case: just record IDESC in decoder tables and leave field extraction
6571 (-gen-decode-switch): Ditto.
6572 (-gen-decode-fn): Ditto.
6573 (-gen-extract-decls): Only emit format enum if with-scache?.
6574 * sim-model.scm (-gen-model-insn-fn): Extract ifields here in
6576 (-gen-model-insn-fns): Don't emit model fns for virtual insns.
6577 (-gen-insn-timing): Ditto.
6578 * sim.scm (gen-argbuf-type): Only output sem_fields union in
6581 * sim.scm (-hw-gen-fun-get): Use GET_<H-NAME> macro.
6582 (-hw-gen-fun-set): Use SET_<H-NAME> macro.
6584 1999-01-12 Doug Evans <devans@casey.cygnus.com>
6586 * cpu.scm (keep-mach-validate!): New proc.
6587 (include): New proc.
6589 * mach.scm (current-arch-mach-name-list): New proc.
6590 (-parse-arch-machs): Always return canonical form.
6591 (def-arch): Validate user specified machs to be kept.
6592 (def-mach-attr!): Simplify.
6594 * opcodes.scm (-opcodes-build-operand-instance-table?): New global.
6595 (option-init!): Initialize it.
6596 (option-set!): Set it.
6597 (gen-insn-table-entry): Emit 0 for operand instance ref if not
6598 output operand instance tables.
6599 (cgen-opc.in): Only output operand instance tables if asked to.
6601 * sim.scm (option-init!,option-set!): Clarify returned value.
6603 * sim.scm (gen-mach-bfd-name): Move from here.
6604 * utils-cgen.scm: To here.
6606 1999-01-11 Doug Evans <devans@casey.cygnus.com>
6608 * fr30.cpu (ilm): Fix comment field.
6609 (cond-branch): Remove explicit setting of COND-CTI, let cgen
6612 * rtl.scm (rtx-simplify,rtx-compile-time-constant?): New procs.
6613 (rtx-true?, rtx-false?): New procs.
6614 * rtx-funcs.scm (annul): Rename vpc to pc.
6615 (-rtx-traverse-if): Improve determination of whether then/else parts
6616 are conditionally executed.
6618 * sim.scm (-gen-argbuf-fields-union): Move definition of union to
6620 (gen-argbuf-type): Simplify generated definition (big sem_fields
6621 union moved outside).
6623 1999-01-11 Ben Elliston <bje@cygnus.com>
6625 * doc/porting.texi: New file.
6627 * doc/intro.texi: New file.
6628 (Layout): Use @example to insert preformatted ASCII text (such as
6629 diagrams). @code is inappropriate here.
6631 1999-01-06 Doug Evans <devans@casey.cygnus.com>
6633 * ifield.scm (-multi-ifield-read): Fix handling of insert/extract.
6635 * m32r.opc (print_hash): Cast dis_info.
6637 * sim-cpu.scm (-gen-hardware-types): Sanitize get/set macros.
6638 * sim.scm (<sim-hardware>,make!): Emit a comment for user-written
6641 1999-01-05 Doug Evans <devans@casey.cygnus.com>
6643 * i960.cpu (f-br-disp): Remove RELOC attribute.
6644 (f-ctrl-disp): Ditto.
6645 (callx-disp): set-quiet -> set for (reg h-gr 2).
6646 (callx-indirect,callx-indirect-offset): Ditto.
6648 * Makefile.am (gas-test): Fix dependencies.
6649 * Makefile.in: Rebuild.
6650 * cgen-gas.asm: File creation args are -<uppercase-letter>.
6651 * gas-test.scm (break-out-syntax,make-file-name): Delete.
6652 (gas-test-analyze!): Use syntax-break-out.
6653 * sim-test.scm (break-out-syntax,make-file-name): Delete.
6654 (sim-test-analyze!): Use syntax-break-out.
6655 (cgen-build.sh): Use gen-file-name.
6656 (cgen-allinsn.exp): Compute and pass all machs to run_sim_test.
6657 * insn.scm (syntax-break-out): New proc.
6658 * utils.scm (gen-file-name): New proc.
6660 * fixup.scm (nil,<?,<=?,>?): Delete.
6662 * utils.scm (count-true): Rewrite.
6664 * slib/sort.scm: Move sort.scm to slib directory.
6667 * iformat.scm (ifmt-compute!): Record empty format.
6669 * rtl.scm (semantic-in-out-operands): Simplify by moving several
6670 internal procs outside. Handle expression register numbers.
6673 * rtx-funcs.scm (annul): Rename new_pc to vpc.
6675 * sim-cpu.scm (-gen-cpu-reg-access-defns): Define access fns for
6677 (-gen-write-case): Pass vpc to SEM_BRANCH_FINI.
6678 (gen-semantic-fn,-gen-sem-case): Ditto.
6679 (cgen-cpu.c): Define WANT_CPU to @cpu@.
6680 (cgen-semantics.c): Ditto.
6681 * sim-decode.scm (-gen-extract-decls): Handle non-with-scache case.
6682 (gen-ifmt-argvars-defns): New proc.
6683 (gen-ifmt-argvars-assigns): New proc.
6684 (-gen-all-extractors): Delete FMT_EMPTY case, now handled like others.
6685 (-gen-decode-fn): Handle non-with-scache case.
6686 (cgen-decode.c): Define WANT_CPU to @cpu@.
6687 * sim-models.scm (-gen-mach-defns): Emit bfd name.
6688 (cgen-model.c): Define WANT_CPU to @cpu@.
6689 * sim.scm (gen-ifld-extract-argvar): New proc.
6690 (<sim-hardware>,make!): Don't emit [GS]ET_H_FOO macros for elements
6691 with FUN-ACCESS specified.
6692 (hw-fun-access?): New proc, as <hardware-base>:fun-access? method.
6693 (<hw-register>,gen-extract): New arg local?.
6694 (<hw-address>,gen-extract): Ditto.
6695 (-hw-cxmake-get): Handle non-with-scache case.
6696 (-hw-gen-set-quiet): Ditto.
6697 (<hw-address>,cxmake-get): Handle non-with-scache case.
6698 (gen-op-extract-argvar): New proc.
6699 (<operand>,gen-record-profile): Rewrite.
6700 (<operand>,gen-profile-code): Rewrite.
6701 (<unit>,gen-profile-code): Use -gen-argfld-ref.
6702 (gen-argbuf-fields-union): New proc.
6703 (gen-argbuf-type): Use it. Handle non-scache case.
6705 * *.scm: class:foo procs renamed to class-foo.
6706 * attr.scm (<attribute>): New member `for'.
6707 (-attr-parse): New first value in list for default if
6709 (non-bool-attr-list,attr:add!): Delete.
6710 (def-attr): Use current-attr-add!.
6711 (atlist-attr-value-no-default): New proc.
6712 (attr-lookup-default): Handle boolean attributes.
6713 (gen-attr-enum): New proc.
6714 (-attr-remove-meta-attrs-alist): New proc.
6715 (attr-nub): New proc.
6716 (current-attr-list-for): New proc.
6717 (current-{ifld,hw,op,insn}-attr-list): New procs.
6718 (attr-builtin!): New proc.
6719 * cpu.scm (keep-obj?): Rewrite.
6720 (-init-parse-cpu!): Call arch-init!.
6721 (-install-builtin!): Call {attr,mode,ifield,insn}-builtin!.
6722 (-finish-parse-cpu!): Call arch-finish!.
6723 * enum.scm (enum-list,enum:add,enum:lookup): Delete.
6724 (def-enum,def-full-enum): Use current-enum-add!.
6725 (gen-obj-list-enums): New proc.
6726 * hardware.scm (hw:add!,hw:lookup): Delete.
6727 (def-hardware,def-hardware-ext): Use current-hw-add!.
6728 (hw:std-attrs,hw:attr-list): Delete.
6729 (hardware-builtin!): Define builtin hardware attributes.
6730 * ifield.scm (ifld:add!,ifld:lookup): Delete.
6731 (def-ifield,def-full-ifield): Use current-ifld-add!.
6732 (ifld:std-attrs,ifld:attr-list): Delete.
6733 (ifield-builtin!): New proc.
6734 * insn.scm (insn:add!,insn:lookup): Delete.
6735 (def-full-insn): Use current-insn-add!.
6736 (insn:std-attrs): Delete.
6737 (insn-builtin!): New proc.
6738 * mach.scm (<arch>): New members attr-list,enum-list,op-list,
6740 (<arch-data>): New member machs.
6741 (current-attr-list,current-enum-list): New procs.
6742 (current-op-list,current-minsn-list): New procs.
6743 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-add!): Ditto.
6744 (current-{attr,enum,ifld,op,hw,insn,minsn,cpu,mach,model}-lookup):
6746 (-parse-arch-machs): New proc.
6747 (-arch-parse): New arg machs, all callers updated.
6748 (-arch-read): Handle machs spec.
6749 (def-arch): Define MACH attribute here.
6750 (mach-init!,mach-finish!): Not here.
6751 (cpu:add!,cpu:lookup): Delete.
6752 (def-cpu): Use current-cpu-add!.
6753 (<mach>): New member bfd-name.
6754 (-mach-parse): New arg bfd-name, all callers updated.
6755 (-mach-read): Handle bfd-name spec.
6756 (mach:add!,mach:lookup): Delete.
6757 (def-mach): Use current-mach-add!.
6758 (def-mach-attr!): New proc.
6759 (arch-init!): New proc.
6760 (arch-finish!): New proc. Reverse all object lists here.
6761 * minsn.scm (minsn-list,minsn-add!,minsn:lookup): Delete.
6762 (def-minsn): Use current-minsn-add!. Ignore minsn if mach not kept.
6763 (define-normal-macro-insn): Ignore minsn if mach not kept.
6764 * mode.scm (mode-builtin!): New proc.
6765 * model.scm (model:add!,model:lookup): Delete.
6766 (def-model): Use current-model-add!.
6767 * opcodes.scm (insn:attr-list): Delete.
6768 (attr-bool-gen-decl,attr-bool-gen-defn): New procs.
6769 (gen-attr-table-defn): Emit value for default.
6770 (gen-attr-table-defns): Emit bool_attr. Emit ifield attr table.
6771 (op:attr-list): Delete.
6772 (gen-operand-decls,gen-insn-decls): New proc.
6773 (compute-insn-attr-list): Delete.
6774 (cgen-opc.h): Reorganize and simplify.
6775 * operand.scm (-operand-list,operand-list,op:add,op:lookup): Delete.
6776 (def-operand,def-full-operand): Use current-op-add!.
6777 (op:std-attrs): Delete.
6778 (operand-enum): Delete.
6779 (operand-builtin!): Define builtin operand attrs.
6780 * utils-cgen.scm (sanitize): Update calls to lookup procs.
6781 (gen-attr-enum-decl): Use gen-obj-list-enums.
6782 (gen-obj-attr-defn): Renamed from gen-attr-defn, all callers updated.
6784 * fr30.cpu (define-arch): Add machs spec.
6785 (f-i4): SIGNED attribute -> !UNSIGNED.
6786 (f-disp8,f-disp9,f-disp10,f-s10,f-rel9,f-rel12): Ditto.
6787 (HASH-PREFIX): Define operand attribute.
6788 (NOT-IN-DELAY-SLOT): Define insn attribute.
6789 * i960.cpu (define-arch): Add machs spec.
6790 * m32r.cpu (define-arch): Add machs spec.
6791 (h-hi16): Remove UNSIGNED,SIGN-OPT attributes.
6792 (HASH-PREFIX): Define operand attribute.
6793 (FILL-SLOT): Define insn attribute.
6795 Thu Dec 17 17:15:06 1998 Dave Brolley <brolley@cygnus.com>
6797 * fr30.cpu (stilm): Correct mask for and operation.
6799 1998-12-17 Doug Evans <devans@casey.cygnus.com>
6801 * sim-test.scm (cgen-build.sh): Use `mach' to specify machs, not `cpu'.
6802 Replace START/EXIT with start/pass.
6803 (gen-sim-test): Delete ".text".
6805 Wed Dec 16 16:16:39 1998 Dave Brolley <brolley@cygnus.com>
6807 * fr30.cpu (cond-branch): Conditional branches not allowed in delay slots.
6809 Tue Dec 15 17:30:01 1998 Dave Brolley <brolley@cygnus.com>
6811 * fr30.cpu: Add NOT-IN-DELAY-SLOT as appropriate.
6812 (h-sbit): Make it FUN-ACCESS.
6813 (h-gr): Reorder so that general regs are always printed by number.
6815 1998-12-14 James E Wilson <wilson@wilson-pc.cygnus.com>
6817 * i960.cpu (flushreg): Use nop.
6819 1998-12-14 Doug Evans <devans@casey.cygnus.com>
6821 * m32r.cpu (default-alignment): Specify.
6822 * mach.scm (<arch-data>): New member default-alignment.
6823 (adata:default-alignment): New proc.
6824 (current-arch-default-alignment): New proc.
6825 (-arch-parse): New arg default-alignment.
6826 (parse-alignment): New proc.
6827 (-arch-read): Handle default-alignment spec.
6829 * rtx-funcs.scm (attr:): Pass attr-name through gen-c-symbol.
6831 * insn.scm (f-%): Delete.
6832 * sim-cpu.scm (gen-define-fields): Delete support for f-%. Can
6833 be readded if proved useful.
6834 (gen-extract-fields): Ditto. Use gen-ifetch.
6835 * sim.scm (<hw-memory>,cxmake-get): Pass pc to GETMEM*.
6836 (<hw-memory>,gen-set-quiet): Pass pc to SETMEM*.
6838 Mon Dec 14 16:20:59 1998 Dave Brolley <brolley@cygnus.com>
6840 * fr30.cpu (div2): Set zbit properly when remainder not zero.
6842 1998-12-14 Dave Brolley <brolley@cygnus.com>
6844 * fr30.cpu: Remove stub macros.
6845 (div1): Shift bits from mdl into mdh. Don't use addc/subc.
6846 (div2): Don't use addc/subc.
6848 1998-12-11 Doug Evans <devans@casey.cygnus.com>
6850 * utils-cgen.scm (gen-obj-sanitize): Only catch spelling errors
6853 Thu Dec 10 18:37:34 1998 Dave Brolley <brolley@cygnus.com>
6855 * fr30.cpu (div0s,div0u,div1,div2,div3,div4s): Implemented.
6857 Thu Dec 10 12:28:53 1998 Doug Evans <devans@canuck.cygnus.com>
6859 * cpu.scm (keep-all?): New proc.
6860 (assert-keep-all): Use it.
6861 * opcodes.scm (gen-ifmt-table-1): Use gen-obj-sanitize.
6862 * utils-cgen.scm (gen-obj-sanitize): Handle macro-insns.
6863 Check for spelling errors.
6865 1998-12-09 Doug Evans <devans@casey.cygnus.com>
6867 * rtl.scm (s-convop): Call -rtx-sem-mode.
6869 Tue Dec 8 10:58:38 1998 Doug Evans <devans@canuck.cygnus.com>
6871 * hardware.scm (-parse-hw-type): parse! no longer returns a result.
6872 (-parse-hw-profile): Ditto.
6873 (<hw-register>, parse!): Return `void' result.
6874 (<hw-pc>, parse!): Ditto.
6875 (<hw-memory>, parse!): Ditto.
6876 (<hw-immediate>, parse!): Ditto.
6877 (<hw-address>, parse!): Ditto.
6879 * ifield.scm (-ifield-parse): Validate encode/decode fields.
6880 (-ifld-parse-encode-decode): New proc.
6881 (-ifld-parse-encode,-ifld-parse-decode): New proc.
6882 (-multi-ifield-parse): Set encode/decode to #f.
6883 (ifld:decode-mode): New proc.
6884 * utils.scm (nub): Rewrite.
6885 * operand.scm (op-nub): Rewrite.
6886 * sim.scm (<ifield>, gen-type): Rewrite.
6887 (-gen-ifld-argbuf-defn): New proc.
6888 (gen-ifld-extract,gen-ifld-trace-extract): New procs.
6889 (<sim-hardware>): Forward gen-trace-extract onto `type'.
6890 Ditto for needed-iflds. gen-argbuf-defn renamed from gen-argbuf-elm.
6891 (<hardware-base>): New method needed-iflds. gen-argbuf-defn
6892 renamed from gen-argbuf-elm, return "". Rewrite gen-extract.
6893 New method gen-trace-extract.
6894 (<hw-register>): New method needed-iflds. gen-argbuf-defn renamed
6895 from gen-argbuf-elm, return "" if not caching register address.
6896 Rewrite gen-extract. New method gen-trace-extract.
6897 (<hw-address>): New methods needed-iflds, gen-argbuf-defn,
6898 gen-extract, gen-trace-extract, cxmake-get.
6899 (<hw-iaddress>): New method cxmake-get.
6900 (op-needed-iflds): New proc.
6901 (<operand>): Delete methods gen-argbuf-elm, gen-extract.
6902 (-gen-op-argbuf-defn): New proc.
6903 (gen-op-extract): Renamed from op:extract.
6904 (gen-op-trace-extract): Renamed from op:trace-extract.
6905 (fmt-extractable-operands): Renamed from fmt-semantic-operands
6907 (gen-argbuf-elm): Rewrite.
6908 * sim-decode.scm (-gen-record-args): Update.
6910 * sim.scm (c-cpu-macro): Renamed from cpu-deref. All uses changed.
6912 * pmacros.scm (-pmacro-expand): Handle procedural macros in
6913 argument position. Flag symbolic macros in function position as
6915 (define-pmacro): Handle quoting in definition of symbolic macros.
6916 (pmacro-trace): Call -pmacro-expand, not -pmacro-ref.
6918 Tue Dec 8 13:06:44 1998 Dave Brolley <brolley@cygnus.com>
6920 * fr30.opc (parse_register_list): Account for reverse masks
6922 (print_register_list): Ditto.
6923 (parse_low_register_list_ld): New function.
6924 (parse_hi_register_list_ld): New function.
6925 (parse_low_register_list_st): New function.
6926 (parse_hi_register_list_st): New function.
6927 (print_hi_register_list_ld): New function.
6928 (print_hi_register_list_st): New function.
6929 (print_low_register_list_ld): New function.
6930 (print_low_register_list_st): New function.
6931 * fr30.cpu (ldr15dr): Implement workaround.
6932 (ldm0,ldm1,stm0,stm1): Implemented.
6934 1998-12-08 Doug Evans <devans@casey.cygnus.com>
6936 * configure.in: Rename --with-hobbit to --with-cgen-hobbit.
6937 * configure: Regenerate.
6938 * Makefile.am (WITH_HOBBIT): Update.
6939 (cgen-hob.c): Remove Makefile dependency.
6940 (cgen.o): Depend on cgen-gh.h, config.h.
6941 * Makefile.in: Regenerate.
6942 * aclocal.m4: Regenerate.
6944 1998-12-07 James E Wilson <wilson@wilson-pc.cygnus.com>
6946 * i960.cpu, i960.opc: New files.
6948 Mon Dec 7 14:30:24 1998 Dave Brolley <brolley@cygnus.com>
6950 * fr30.opc (parse_register_number): New function.
6951 (parse_register_list): New function.
6952 (parse_low_register_list): Use parse_register_list.
6953 (parse_hi_register_list): Use parse_register_list.
6954 * fr30.cpu (sth): Fix assembler syntax. Implement more
6957 Fri Dec 4 16:07:13 1998 Doug Evans <devans@canuck.cygnus.com>
6959 * sim-cpu.scm (cgen-sem-switch.c): Update definition of TRACE_RESULT.
6960 * sim-decode.scm (-gen-record-args): Update call to TRACE_EXTRACT.
6961 * sim.scm (-op-gen-set-trace): Update call to TRACE_RESULT.
6962 (-op-gen-set-trace-parallel): Ditto.
6963 (gen-argbuf-type): New ARGBUF members trace_p,profile_p;
6965 * fr30.cpu (call,calld): Fix setting of pc.
6966 (f-op5): Fix start bit number.
6968 Fri Dec 4 17:06:28 1998 Dave Brolley <brolley@cygnus.com>
6970 * fr30.cpu (st): Fix operand ordering. Implement more
6973 Thu Dec 3 23:59:40 1998 Doug Evans <devans@canuck.cygnus.com>
6975 * ifield.scm (ifld:mode,ifld:hw-type): New procs.
6976 * iformat.scm (fmt-opcode-operands): Move to opcodes.scm.
6977 (fmt-semantic-operands): Move to sim.scm.
6978 * opcodes.scm (fmt-opcode-operands): Moved here from iformat.scm.
6979 * operand.scm (<hw-index>): New member `name'. All builders updated.
6980 (<hw-index>): New method get-name.
6981 (op-profilable?): Moved to sim.scm.
6983 * sim.scm (fmt-semantic-operands): Moved here from iformat.scm.
6984 (op-profilable?): Moved here from operand.scm.
6985 (gen-extract-type): Delete.
6986 (c-argfld-macro): Renamed from c-ifield-macro. All uses updated.
6987 (-gen-argfld-ref): New proc.
6988 (-gen-ifld-argfld-name): New proc.
6989 (gen-ifld-argfld-ref): Renamed from -gen-ifld-ref. All uses updated.
6990 (-gen-ifld-decoded-val): Renamed from -gen-ifld-raw-val.
6991 (-gen-hw-index-argfld-name,-gen-hw-index-argfld-ref): New procs.
6992 (<hardware-base>): Delete method gen-extract-type. New method
6994 (<hw-register): Ditto. Update method gen-extract.
6995 (<operand>, method gen-argbuf-elm): Rewrite.
6996 * rtl.scm (semantic-in-out-operands): Handle (ifield f-name).
6997 (s-cmpop): Fix handling of eq,ne for unsigned modes.
6998 * rtx-funcs.scm (eq,ne,lt,le,gt,ge,ltu,leu,gtu,geu): Update.
7000 * sim-decode.scm (-gen-record-args): Tweak.
7002 * sim.scm (gen-argbuf-elm): Handle case of all constant opcode fields.
7004 Thu Dec 3 14:23:27 1998 Dave Brolley <brolley@cygnus.com>
7006 * doc/porting: Fix typo: gas->sim.
7007 * fr30.opc (print_m4): New function.
7008 * fr30.cpu: Implemented many insns.
7010 Thu Dec 3 00:03:16 1998 Doug Evans <devans@canuck.cygnus.com>
7012 * rtl.scm (build-reg-operand!): Remove redundant setting of hw-name.
7014 * fr30.cpu (f-rel9): Delete RELOC attribute.
7015 (f-rel12): Add PCREL-ADDR attribute.
7016 (label9): Make an h-iaddr, not h-uint. Delete asm print spec.
7017 (label12): Delete PCREL-ADDR attribute. Make an h-iaddr, not h-sint.
7018 * fr30.opc (print_label9): Delete.
7020 * iformat.scm (ifmt-analyze): Check attributes derived from semantic
7021 code for CTI indicators.
7022 * insn.scm (insn-cti?): Simplify.
7023 * utils-cgen.scm (atlist:cti?): New proc.
7025 1998-11-30 Doug Evans <devans@casey.cygnus.com>
7027 * fr30.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7028 (f-i20-4,f-i20-16,f-i20): New fields.
7034 * fr30.opc (CGEN_DIS_HASH_SIZE,CGEN_DIS_HASH): Define in opc.h.
7035 * m32r.cpu (arch): default-insn-bitsize -> default-insn-word-bitsize.
7036 * mach.scm (arch-data): Ditto.
7037 (current-arch-default-insn-word-bitsize): Renamed from
7038 current-arch-default-insn-bitsize [ya, that's a pretty long name].
7039 (-arch-read): Update.
7041 * hardware.scm (hw:attr-list): Move here ...
7042 * opcodes.scm: ... from here.
7044 * ifield.scm (fld:bitrange): Delete.
7045 (fld:word-offset,fld:word-length): New procs.
7046 (ifield?): Use class-instance.
7047 (<ifield>, method field-start): Rewrite.
7048 (ifld:enum): New proc.
7049 (<ifield>, methods field-mask,field-value): Rewrite.
7050 (-ifield-parse): Rewrite.
7051 (<multi-ifield> support): Rewrite.
7052 (ifld-beyond-base?): Rewrite.
7053 (ifld:std-attrs): New variable.
7054 (ifld:attr-list): New proc.
7055 * iformat.scm (-compute-insn-mask): Rewrite.
7056 * insn.scm (-parse-insn-format): New arg errtxt, all callers updated.
7058 (-parse-insn-format-symbol,-parse-insn-format-list): New procs.
7059 * opcodes.scm (<hardware>): No longer forward gen-insert,gen-extract
7061 (<operand>): Ditto. Forward onto index instead.
7062 (gen-ifld-decls,gen-ifld-defns): New procs.
7063 (ifld:insert,ifld:extract): New procs.
7064 (<ifield>): New methods gen-insert, gen-extract.
7065 (<multi-ifield>): Ditto.
7066 (<hw-index>): Forward gen-insert,gen-extract onto value.
7067 (<hw-asm>): Delete insert/extract support.
7068 (<hw-register,hw-memory,hw-immediate>): Ditto.
7069 (gen-hash-defines): Use string-list.
7070 Define CGEN_MAX_IFMT_OPERANDS.
7071 (gen-switch): Use string-list,string-list-map.
7072 (gen-fget-switch,gen-fset-switch): Use string-list.
7073 (gen-parse-switch,gen-insert-switch): Ditto.
7074 (gen-extract-switch,gen-print-switch): Ditto.
7075 (gen-insert-switch,gen-extract-switch): New local `total_length'.
7076 (gen-ifmt-table-1,gen-ifmt-table): New procs.
7077 (gen-ifmt-entry): Renamed from gen-iformat-entry, rewrite.
7078 (gen-ivalue-entry): New proc.
7079 (gen-insn-table-entry): Use string-list. Update iformat,ivalue
7080 computation. Use 0 for operand ref table if ALIAS insn.
7081 (gen-minsn-table-entry): Use string-list.
7082 (gen-macro-insn-table): Temporarily emit format tables for ALIAS insns.
7083 (gen-opcode-open): Record address of ifield table.
7084 (cgen-opc.h): Call gen-ifld-decls.
7085 (cgen-opc.in): Call gen-ifld-defns, gen-ifmt-table.
7086 * types.scm (<bitrange>): New members word-offset,word-length.
7087 Delete member total-length. Delete methods start,mask,value.
7088 (bitrange:word-offset,bitrange:word-length): New procs.
7089 * sim-cpu.scm (gen-define-fields): Simplify.
7090 (gen-extract-fields): Simplify.
7091 * sim.scm (<ifield>, gen-ifld-extract): Rewrite.
7092 (<ifield>): New methods gen-ifld-extract-decl.
7093 Delete method gen-ifld-extract-beyond.
7094 (<multi-ifield>): New methods gen-ifld-extract-decl.
7095 (<multi-ifield>, method gen-ifld-extract): Implement.
7096 (-gen-ifld-extract-base,-gen-ifld-extract-beyond): New procs.
7097 (gen-ifld-exttact,gen-ifld-extract-beyond): Delete.
7099 * rtl.scm (-rtx-traverse-no-mode): Process operands.
7100 (-rtx-traverse-syntax-no-mode): New proc.
7101 (semantic-in-out-operands): Watch for `delay' and add DELAY-SLOT attr.
7102 (s-ifield): New proc.
7103 (s-shop): Don't prepend `unsigned' for unsigned modes.
7104 * rtx-funcs.scm (ifield): New rtx function.
7105 (ref,symbol): Use standard -rtx-traverse-syntax-no-mode.
7106 (delay): New rtx function.
7107 * insn.scm (insn:std-attrs): Add DELAY-SLOT.
7109 * cos.scm (-elm-make-method-getter): Fix typo.
7111 * utils.scm (backslash): Handle lists of strings.
7113 Thu Nov 26 11:47:29 1998 Dave Brolley <brolley@cygnus.com>
7115 * fr30.cpu (f-rel9): Correct for pc+2.
7116 (label9): Use print_label9.
7117 * fr30.opc (print_label9): New function.
7119 Tue Nov 24 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
7121 * fr30.cpu: Change $r13,$r14,$r15 to uppercase.
7122 * fr30.opc (parse_low_register_list): Renamed.
7123 (parse_hi_register_list): Renamed.
7124 (print_hi_register_list): Renamed.
7125 (print_low_register_list): Renamed.
7127 Mon Nov 23 18:26:36 1998 Dave Brolley <brolley@cygnus.com>
7129 * fr30.cpu (f-rel9): Now a pc relative offset.
7131 1998-11-23 Doug Evans <devans@casey.cygnus.com>
7133 * opcodes.scm (op-asm): Move to here, from operands.scm.
7134 (<op-asm>, method parse!): Validate arguments.
7135 (<operand>, method gen-function-name): Fix thinko.
7136 * operand.scm (<operand>, method make!): Don't set op-asm here.
7137 * utils.scm (list-elements-ok?): New proc.
7139 * opcodes.scm: Clean up pass.
7141 1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
7143 * fr30.cpu (int): Defer saving of ps,pc and setting ibit,sbit to
7144 the fr30_int function.
7145 (h-cr): Remove PROFILE,CACHE-ADDR attributes.
7146 (h-dr): Add FUN-ACCESS attribute.
7148 1998-11-20 James E Wilson <wilson@wilson-pc.cygnus.com>
7150 * sim-model.scm (-gen-mach-defns): Use gen-sym instead of obj:name
7151 for C symbol for models array.
7153 Thu Nov 19 15:57:45 1998 Dave Brolley <brolley@cygnus.com>
7155 * fr30.opc (parse_reglist_low): New function.
7156 (parse_reglist_hi): New function.
7157 (print_reglist_low): New function.
7158 (print_reglist_hi): New function.
7159 * fr30.cpu: Finish remaining insn stubs.
7161 1998-11-19 Doug Evans <devans@tobor.to.cygnus.com>
7163 * sim.scm (-gen-extract-word): Handle fields shorter than entire word.
7165 * fr30.cpu (ldi32m): Don't use for disassembly.
7167 Wed Nov 18 21:34:41 1998 Dave Brolley <brolley@cygnus.com>
7169 * fr30.cpu (int): Implement it.
7171 1998-11-18 Doug Evans <devans@casey.cygnus.com>
7173 * rtx-funcs.scm (nop): Fix C code.
7175 * rtl.scm (semantic-in-out-operands): Fix setting of sem-attrs.
7177 * fr30.cpu (f-i32): New ifield.
7180 (ldi32m): New macro insn.
7181 (inte): Provide simple version for now.
7183 * sim-arch.scm: New file.
7184 * sim.scm: Move architecture support generation to sim-arch.scm.
7185 * cgen-sim.scm: Load sim-arch.scm.
7188 * hardware.scm (pc?) New proc.
7189 (class <hardware-base>): Rewrite method 'pc?.
7190 (class <hardware>): Forward 'pc? to the hardware type.
7191 (class <hw-pc>): New method 'pc?.
7193 Add support for variable length ISAs.
7194 * ifield.scm (ifld-beyond-base?): New proc.
7195 * m32r.cpu: Remove integral-insn? spec.
7196 * mach.scm (arch:derived,arch:set-derived!): New procs.
7197 (arch:app-data,arch:set-app-data!): New procs.
7198 (class <arch>): New members derived, app-data.
7199 (class <cpu>): Delete member integral-insn?.
7200 (cpu:integral-insn?): Delete.
7201 (-cpu-parse): Delete arg integral-insn?. All callers updated.
7202 (-cpu-read): Delete integral-insn? support.
7203 (state:decode-assist): Delete.
7204 (state:int-insn?): Delete.
7205 (<derived-arch-data>): New class.
7206 (-adata-set-derived!): New proc.
7207 (mach-finish!): Call it.
7208 * opcodes.scm (<hw-asm>, method gen-extract): Pass pc to C handler.
7209 (gen-operand-instance): Add COND_REF support.
7210 (gen-operand-instance-table): Ditto.
7211 (gen-hash-defines): Update.
7212 (gen-extract-switch): Update type of `insn_value' arg.
7213 (gen-opcode-open): Update type of `value' arg of dis_hash_insn.
7214 * rtl.scm (-rtx-ref-type): Renamed from -rtx-set?. All callers
7216 (semantic-in-out-operands): Compute UNCOND-CTI,COND-CTI from rtl.
7217 * sim-cpu.scm (gen-define-fields): Create vars to hold insn value
7218 beyond the base insn (for large insns).
7219 (-gen-extract-beyond-var-list): New proc.
7220 (gen-extract-fields): Handle large insns.
7221 (-gen-write-case): Update sem_arg computation.
7222 Update initial vpc computation.
7223 (gen-semantic-fn): Ditto. Update type of `insn'.
7224 (-gen-sem-case): Update sem_arg computation.
7225 Update initial vpc computation.
7226 * sim.scm (<ifield>, gen-ifld-extract): Renamed from `extract'.
7227 (-gen-extract-word): New proc.
7228 (<ifield>): New method gen-ifld-extract-beyond.
7229 (gen-ifld-extract-beyond): New proc.
7230 * types.scm (bitrange-overlap?): New proc.
7232 * utils.scm (bits->bytes): New proc.
7233 (bytes->bits): New proc.
7235 Move extraction support into decoder.
7236 * sim-cpu.scm (-gen-record-args,-gen-record-profile-args,
7237 -gen-extractor,-gen-all-extractors,cgen-extract.c): Move extraction
7238 support to sim-decode.scm.
7239 * sim-decode.scm (-gen-decode-insn-table): Change decoder data to
7240 be array of IDESC,FMT entries. Make the array const.
7241 (-gen-gcc-label-table): Make array const.
7242 (-gen-decode-switch): Branch to extraction code after insn has been
7244 (-gen-decode-insn-globals): Delete extract handler from
7246 (gen-decode-fn): Add extraction support.
7247 (-gen-sem-fn-decls): Delete extraction fn decls.
7248 (-gen-idesc-decls): Update @cpu@_decode decl.
7249 (-gen-idesc-init-fn): Delete extraction support.
7250 (-gen-extract-decls): New proc.
7252 * sim-cpu.scm (cgen-sem-switch.c): Update switch test.
7253 (sim-finish!): Surround pbb only code with #if WITH_SCACHE_PBB.
7255 * sim-decode.scm (build-decode-table-entry): New arg invalid insn.
7256 All callers updated.
7257 (table-entry:make): Record insn value as insn object, not name.
7260 * hobbit.scm (path_basename): Renamed from `basename' to avoid
7261 collision with C function.
7262 (path_dirname): Similarily.
7263 * hobbit.c,hobbit.h: Rebuild.
7265 Wed Nov 18 11:26:17 1998 Dave Brolley <brolley@cygnus.com>
7267 * fr30.cpu (dir2r15-predec-stub): Reference to R15 must be indirect.
7269 Mon Nov 16 19:19:50 1998 Dave Brolley <brolley@cygnus.com>
7271 * fr30.cpu: Implement more instruction stubs.
7273 Thu Nov 12 19:20:28 1998 Dave Brolley <brolley@cygnus.com>
7275 * fr30.cpu: Implement more instruction stubs.
7277 Tue Nov 10 10:53:55 1998 Doug Evans <devans@canuck.cygnus.com>
7279 * rtl.scm (-rtx-expr-mode-name): Handle sequence locals.
7281 * rtx-funcs.scm (zflag:,zflag,nflag:,nflag): New rtx fns.
7283 * operand.scm (<pc>, method make!): FAKE renamed to SEM-ONLY.
7284 (op:std-attrs): Ditto.
7285 * opcodes.scm (gen-operand-instance): Ditto.
7286 (gen-switch): Ditto.
7287 * m32r.cpu (condbit,accum): Update.
7288 * fr30.cpu (nbit,vbit,zbit,cbit): Update.
7290 Mon Nov 9 14:30:51 1998 Doug Evans <devans@seba.cygnus.com>
7292 * enum.scm (-enum-read): Fix typo.
7294 * iformat.scm (-ifmt-search-key): Simplify a little.
7296 Mon Nov 9 12:07:56 1998 Dave Brolley <brolley@cygnus.com>
7298 * doc/porting: semantics.c -> sem.c.
7299 * Makefile.in: Regenerate.
7300 * fr30.cpu (add): Change ADD to add. Add more registers and set
7301 status bits on 'add' instruction.
7303 Fri Nov 6 18:15:05 1998 James E Wilson <wilson@wilson-pc.cygnus.com>
7305 * sim.scm (-gen-arch-model-decls): Default MAX_UNITS to 1 instead
7308 Fri Nov 6 17:43:16 1998 Doug Evans <devans@seba.cygnus.com>
7310 * minsn.scm (minsn:enum): Update, call current-arch-name.
7312 * pmacros.scm (-pmacro-expand): Make `cep' a variable.
7314 * Makefile.am (CGEN_HOB_INPUT_FILES): Add pmacros.scm,enum.scm,
7315 mach.scm,model.scm,types.scm,ifield.scm,minsn.scm.
7316 (ARCH,CGEN,CGENFLAGS): New variables.
7317 (gas-test,sim-test): New rules.
7318 * Makefile.in: Rebuild.
7319 * configure.in (arch): Define.
7320 * configure: Rebuild.
7322 * cgen-hob.scm (*UNSPECIFIED*): Renamed from UNSPECIFIED.
7323 * All .scm files: Ditto.
7325 * dev.scm: Fix gas-test call to cpu-load.
7326 * gas-test.scm: Clean up pass to remove bit-rot.
7327 * sim-test.scm: Ditto.
7329 * enum.scm (read-enum): Fix typo in `vals' handling.
7331 * hardware.scm (-parse-hw-type): Fix typo.
7332 (parse-hardware): Rename `asm' to `aasm' to avoid GCC reserved word.
7333 (def-hardware,define-normal-hardware): Ditto.
7335 * hobbit.scm (*case-sensitive-flag*): New configuration variable.
7336 (display-var): Use it.
7337 * hobbit.c: Rebuild.
7338 * hobbit.h: Rebuild.
7340 * ifield.scm (-ifield-read): Rename local `length' to `length-' to
7341 avoid hobbit problem.
7342 * mach.scm (-cpu-read): Rename local `parallel-insns' to
7343 `parallel-insns-' to avoid hobbit problem.
7345 Fri Nov 6 17:19:12 1998 Doug Evans <devans@canuck.cygnus.com>
7347 * m32r.opc (parse_hi16): Fix call to cgen_parse_address.
7348 (parse_slo16,parse_ulo16): Ditto.
7349 * opcodes.scm (<hw-address>, method gen-parse): Ditto.
7351 Thu Nov 5 13:04:53 1998 Doug Evans <devans@canuck.cygnus.com>
7353 * Makefile.am (GUILELDFLAGS,GUILELDADD): New variables.
7354 (cgen_LDFLAGS,cgen_LDADD,hob.x): Use them.
7355 * Makefile.in: Rebuild.
7356 * insn.scm (define-normal-insn): Expand pmacros.
7357 * mode.scm (<mode>): New member `host?'. All uses updated.
7358 (mode:host?): New proc.
7359 * rtl.scm (define-rtx-node): Make a syntax proc, not a macro.
7360 (define-rtx-syntax-node,define-rtx-macro-node): Ditto.
7361 (define-rtx-dual-mode): Ditto.
7362 (s-index-of): New proc.
7363 (s-unop): Use plain C for host mode operations.
7364 (s-binop,s-shop,s-boolifop,s-cmpop): Ditto.
7365 * rtx-funcs.scm (index-of): New rtx function.
7366 * sim.scm (<hw-index>): New method cxmake-get.
7368 Wed Nov 4 23:58:08 1998 Doug Evans <devans@seba.cygnus.com>
7370 * sim-cpu.scm (-gen-engine-decls): Delete.
7372 Wed Nov 4 18:40:47 1998 Dave Brolley <brolley@cygnus.com>
7374 * doc/rtl (Example): Correct Typo.
7375 * doc/porting: Add 'make dep' step to opcodes port instructions.
7376 * fr30.opc: New file.
7377 * fr30.cpu: New file.
7379 Wed Oct 28 13:36:15 1998 Doug Evans <devans@canuck.cygnus.com>
7381 * configure.in: Handle guile $exec_prefix = $prefix/foo.
7382 * Makefile.am (GUILEINCDIR): New variable.
7384 * configure: Regenerate.
7385 * Makefile.in: Ditto.
7386 * aclocal.m4: Ditto.
7388 Mon Oct 19 13:19:34 1998 Doug Evans <devans@seba.cygnus.com>
7390 * sim-cpu.scm (cgen-extract.c): Delete #include cpu-sim.h
7391 (cgen-semantics.c): Ditto.
7392 * sim-decode.scm (cgen-decode.c): Delete #include cpu-sim.h,cpu-opc.h.
7393 * sim-model.scm (cgen-model.c): Ditto.
7394 * sim.scm (cgen-arch.h): Delete #include @arch@-opc.h.
7395 (cgen-arch.c): Delete #include cpu-sim.h,cpu-opc.h.
7397 * opcodes.scm (read-cpu.opc): Handle empty file.
7399 * cos.scm (-elm-make-method-setter): Fix typo.
7401 * cpu.scm (-init-parse-cpu!): Call types-init!.
7402 (-finish-parse-cpu!): Call types-finish!.
7403 * ifield.scm (<ifield>): Delete members start,length.
7404 New member bitrange.
7405 (<ifield>, methods field-start,field-length): Update.
7406 (fld:start): New arg insn-len. All callers updated.
7407 (<ifield>, methods field-mask,field-value): Update.
7408 (-ifield-parse): Update.
7409 (ifield-init!): Update.
7410 * iformat.scm (compute-insn-length): Simplify.
7411 (compute-insn-mask): Update.
7412 * insn.scm (insn:value): Update.
7413 * mach.scm (<arch-data>): New members default-insn-bitsize,insn-lsb0?.
7414 (current-arch-default-insn-bitsize): New proc.
7415 (current-arch-insn-lsb0?): New proc.
7416 (-arch-parse,-arch-read): Update.
7417 (<cpu>): New member file-transform.
7418 (-cpu-parse,-cpu-read): Update.
7419 * opcodes.scm (<hw-asm>, method gen-extract): Pass ex_info to handler.
7420 (gen-hash-defines): Define CGEN_INSN_LSB0_P.
7421 (CGEN_INT_INSN_P): Renamed from CGEN_INT_INSN.
7422 (gen-insert-switch): Update args of @arch@_cgen_insert_operand.
7423 (gen-extract-switch): Update args of @arch@_cgen_extract_operand.
7424 (gen-opcode-open): Set CGEN_OPCODE_INSN_ENDIAN.
7425 * operand.scm (op:start): Update call to field-start method.
7426 * sim-decode.scm (opcode-slots): New arg lsb0?.
7427 (fill-slot!,build-slots): Ditto.
7428 (build-decode-table-entry,build-decode-table-guts): Ditto.
7429 (gen-decoder-table,gen-decoder-switch,gen-decoder): Ditto.
7430 (gen-decode-fn): Ditto.
7431 (cgen-decode.c): Update call to gen-decode-fn.
7432 * sim.scm (gen-argbuf-type): Move `semantic' to cpu specific part.
7433 (-gen-cpu-header,-gen-cpuall-includes): New procs.
7434 (cgen-cpuall.h): Call -gen-cpuall-includes.
7435 * types.scm (<bitrange>): New class.
7436 (types-init!,types-finish!): New procs.
7437 * utils-cgen.scm (parse-number): New proc.
7438 (parse-boolean): New proc.
7439 * utils.scm (word-value): Renamed from shift-bits, rewrite.
7440 (word-mask): Rewrite.
7441 * m32r.cpu (define-arch): New fields default-insn-bitsize,insn-lsb0?.
7442 (m32rxf): New field `file-transform'.
7443 * m32r.opc (my_print_insn): print_int_insn -> print_insn.
7445 * hobbit.h: Fix include file name.
7447 Fri Oct 9 16:58:10 1998 Doug Evans <devans@seba.cygnus.com>
7449 * slib: New directory of slib files used by cgen/hobbit.
7450 * hobbit.scm: New file.
7451 * hobbit.c: New file.
7452 * hobbit.h: New file.
7453 * hobscmif.h: New file.
7454 * hob-main.c: New file.
7455 * hobslib.scm: New file.
7457 * Makefile.am: Add support for compiling hobbit, and using compiled
7458 version of hobbit to compile cgen.
7459 * Makefile.in: Regenerate.
7460 * configure.in: Support --with-hobbit.
7461 * configure: Regenerate.
7462 * acconfig.h (WITH_HOBBIT): Add.
7463 * config.in: Regenerate.
7465 * rtl.scm: New file, was cdl-c.scm.
7466 Definition of rtx funcs moved to rtx-funcs.scm.
7467 (semantic-in-out-operands): Rewrite to compute object form of
7469 * rtx-funcs.scm: New file.
7471 * cgen-gh.c: #include "config.h".
7472 (gh_cadddr,gh_cddddr): New fns.
7473 (cgh_vector_to_list): New fn.
7474 (cgh_map1,cgh_map2,cgh_map1_fn2): Rewrite.
7475 (cgh_init): Prefix qsort procs with "cgh-".
7476 * cgen-gh.h (gh_cadddr,gh_cddddr,cgh_vector_to_list): Declare.
7477 * cgen.c: #include "config.h".
7479 * attr.scm (bitset-attr?): New proc.
7480 (<bitset-attribute>, method parse-value): Value syntax changed from
7481 (val1 val2 ...) to val1,val2,....
7482 (<bitset-attribute>): New method gen-value.
7483 (<integer-attribute>): New method gen-value.
7484 (<enum-attribute>): New method gen-value.
7485 * cpu.scm: Disable debugging evaluator if (not (defined? 'DEBUG-EVAL)).
7486 (<reader>): New class.
7487 (CURRENT-ARCH,CURRENT-READER): New globals.
7488 (keep-mach?): Move here from mach.scm.
7489 * mach.scm (arch,arch-comment,arch-default-mach): Delete.
7490 (<arch>): New class.
7491 (<arch-data>): New class.
7492 (<cpu>): Make subclass of <ident>.
7493 (*ENDIAN* variables): Delete.
7494 (process-state-vars): Delete.
7495 (mach-finish!): Add `base' value to MACH attribute.
7496 * hardware.scm (<hardware>): Make subclass of <ident>.
7497 (hw:std-attrs): New global.
7498 (hw-profilable?): New proc.
7499 * ifield.scm (<ifield>): Make subclass of <ident>.
7500 (sort-ifield-list): Move here from iformat.scm.
7501 * iformat.scm (<iformat>): Renamed from <insn-format>.
7502 Make subclass of <ident>.
7503 (-ifmt-search-key): Include cti? in categorization of formats.
7504 (ifmt-analyze): Compile semantics (turn to object form).
7505 * insn.scm (<insn>): Make subclass of <ident>.
7506 New member compiled-semantics.
7507 (insn:std-attrs): Add SKIP-CTI, VIRTUAL.
7508 * mode.scm (<mode>): Make subclass of <ident>.
7510 * model.scm (<unit>): Make subclass of <ident>.
7511 New members inputs,outputs.
7512 (<model>): Make subclass of <ident>. New member state.
7513 (-unit-parse): Parse inputs,outputs.
7514 (<iunit>): New class.
7515 (-insn-timing-parse-model): New proc.
7516 (parse-insn-timing): Function unit spec rewritten.
7517 * operand.scm (<operand>): Make subclass of <ident>.
7518 New members sem-name,num,cond? New method gen-pretty-name.
7519 (hw-index-scalar): New global.
7520 (op-nub-hw): Move here from rtl.scm.
7521 (op:lookup-sem-name,op-profilable?): New procs.
7522 * pmacros.scm: Rewrite to pass through hobbit.
7523 * utils-cgen.scm (gen-attr-defn): Simplify using new gen-value method.
7524 * utils.scm (logit): Make a macro.
7525 (bit-set?): Rewrite.
7526 (high-part): Rewrite.
7528 * m32r.cpu (define-arch): Move to top of file.
7529 (cpu family m32rbf): Renamed from m32rb.
7530 (model m32r/d): Function unit spec rewritten.
7531 (all insns): Ditto. Replace UBI with BI.
7533 * opcodes.scm (gen-attr-table-decls): Declare
7534 @arch@_cgen_hw_attr_table.
7535 (gen-attr-table-defns): Generate hw attribute table.
7537 * sim-cpu.scm (-gen-engine-decls): New proc.
7538 (-gen-model-decls): New proc.
7539 (gen-parallel-exec-type): Add new member `written' to struct parexec.
7540 (-gen-record-args): Add SEM_BRANCH_INIT_EXTRACT if cti insn.
7541 (-gen-record-profile-args): Simplify.
7542 (-gen-parallel-sem-case): Delete.
7543 (gen-semantic-fn): Emit SEM_BRANCH_{INIT,FINI} if cti insn.
7544 New local `written'. Delete profiling code.
7545 (-gen-sem-case): Ditto.
7546 (-uncond-written-mask,-any-cond-written?): New procs.
7547 (cgen-sem-switch.c): Include duplicates of insns that can be executed
7548 parallelly or serially, and write-back handlers for all parallel insns.
7549 * sim-decode.scm (-gen-decode-insn-globals): Add parallel write-back
7550 support to initialization of struct insn_sem.
7551 (-gen-idesc-decls): Add parallel write-back support to struct idesc.
7552 (-gen-insn-sem-type): Add parallel write-back support to struct
7554 (-gen-idesc-init-fn): Add support for virtual insns.
7555 Add parallel write-back support.
7556 * sim-model.scm (gen-model-profile-fn): Delete
7557 (-gen-model-fn-decls): New proc.
7558 (-gen-model-insn-fn,-gen-model-insn-fns): New procs.
7559 (-gen-model-init-fn): New proc.
7560 (-gen-mach-defns): Initialize insn-name lookup and fast/full engine_fn
7561 members in @mach@_init_cpu.
7562 (cgen-model.c): Generate model handlers for each insn.
7563 * sim.scm (gen-define-field-macro): Cti insns handled differently.
7564 (<hw-pc>): New method gen-write.
7565 (<hw-register>, method gen-write): New arg `mode'.
7566 (<hw-register>): Delete method gen-record-profile!.
7567 New method gen-profile-index-type.
7568 (<hw-memory>, method gen-write): New arg `mode'.
7569 (<hw-address>, method gen-extract): Delete.
7570 (<hw-address>, method gen-write): New arg `mode'.
7571 (<hw-index>, method get-write-index): Rewrite.
7572 (<pc>, method cxmake-get-direct): Delete.
7573 (<pc>): New method cxmake-get. Comment out methods
7574 gen-set-quiet,gen-set-trace.
7575 (<operand>): New methods gen-argbuf-elm,gen-profile-argbuf-elm,
7576 gen-profile-index-type,gen-profile-code.
7577 Delete method gen-pretty-name. Rewrite method gen-write.
7578 Delete method cxmake-get-direct.
7579 (-op-gen-set-trace): Update `written'.
7580 (-op-gen-set-trace-parallel): Ditto.
7581 (-gen-hw-index-raw,-gen-hw-index): Handle strings.
7582 (gen-cpu-insn-enum-decl): Add extra entries for parallel
7583 insns and their write-back handlers.
7584 (insn-op-lookup): New proc.
7585 (<unit>): New method gen-profile-code.
7586 (<iunit>): New method gen-profile-code.
7587 (gen-argbuf-elm): Add profiling elements.
7588 (gen-argbuf-type): Define cti insns separately in their own struct.
7589 Add member `addr_cache' to this struct. Add entries for pbb virtual
7590 insns. Move semantic entries here from struct scache.
7591 Delete everything from struct scache except argbuf.
7592 (<insn>, method gen-profile-locals): Rewrite.
7593 (<insn>, method gen-profile-code): Rewrite.
7594 (sim-finish!): Create virtual pbb insns.
7596 Tue Sep 15 15:22:02 1998 Doug Evans <devans@canuck.cygnus.com>
7598 * m32r.cpu (h-cr): Add bbpc,bbpsw.
7599 (h-sm,h-bsm,h-ie,h-bie,h-bcond,h-bpc): Delete.
7600 (h-psw,h-bpsw,h-bbpsw): Define.
7601 (rte,trap): Handle bbpc,bbpsw.
7602 * opcodes.scm (max-operand-instances): Fix typo.
7603 * sim.scm (<hardware-base>, method 'fun-access?): Don't force virtual
7604 hardware elements to be fun-access.
7605 (-hw-gen-fun-get,-hw-gen-fun-set): Fix handling of scalars.
7607 Wed Sep 9 15:28:55 1998 Doug Evans <devans@canuck.cygnus.com>
7609 * m32r.cpu (trap): Pass `pc' to m32r_trap.
7611 Mon Aug 10 14:29:33 1998 Doug Evans <devans@canuck.cygnus.com>
7613 * opcodes.scm (gen-insn-table-entry): Comment out generation of cdx.
7615 Mon Aug 3 11:51:04 1998 Doug Evans <devans@seba.cygnus.com>
7617 * m32r.cpu (cpu m32rb): Renamed from m32r to distinguish from
7619 (mach m32r): Update.
7621 * mach.scm (mach:supports?): New proc.
7622 * sim-cpu.scm (gen-cpu-reg-access-{decls,defns}): Renamed from
7623 gen-reg-access-{decls,defns}.
7624 * sim.scm (gen-reg-access-{decl,defn}): New procs.
7625 (gen-mach-bfd-name): New proc.
7626 (gen-arch-reg-access-{decls,defns}): New procs.
7627 (cgen-arch.[ch]): Output register access cover fns.
7629 * hardware.scm (hardware-builtin!): Set print handlers for
7631 * m32r.opc (parse_hash,parse_hi16,parse_slo16,parse_ulo16): New arg
7633 (CGEN_PRINT_NORMAL,print_hash): Ditto.
7634 (my_print_insn): Ditto. Delete args buf, buflen.
7635 * opcodes.scm: Pass `od' (opcode-descriptor) to all C handlers.
7636 (-hw-asm-specs): Add `handlers' spec.
7637 (-parse-hw-asm): Lookup class at runtime. If no asm-spec, use
7639 (<hw-asm>): Renamed from <opval>. New elements parse,insert,extract,
7641 (<hw-asm>, gen-insert,gen-extract,gen-print): Use them.
7642 (<hw-asm>, parse!): New method.
7643 (gen-insn-table-entry): Print semantics.
7644 (gen-opcode-open): Renamed from gen-opcode-table.
7646 * utils.scm (string-write): No longer a macro.
7647 (-string-write): Handle procedure args.
7648 * opcodes.scm: Update all calls to string-write.
7649 * sim-cpu.scm: Ditto.
7650 * sim-decode.scm: Ditto.
7651 * sim-model.scm: Ditto.
7654 Fri Jul 31 14:40:38 1998 Doug Evans <devans@seba.cygnus.com>
7656 * opcodes.scm (cgen-ibd.h,gen-extra-ibd.h): New procs.
7657 (-gen-insn-builders,-gen-insn-builder): New procs.
7659 Fri Jul 24 11:38:59 1998 Doug Evans <devans@canuck.cygnus.com>
7661 * opcodes.scm (gen-syntax-entry): Fix bracketing for -Wall.
7662 (gen-opcode-table): Properly terminate comment.
7664 Tue Jul 21 10:51:42 1998 Doug Evans <devans@seba.cygnus.com>
7667 Clean up pass over everything, so starting fresh.